2009-04-19 17:52:35 +02:00
|
|
|
############################################################################
|
2018-05-29 21:21:26 +02:00
|
|
|
# libs/libxx/Makefile
|
2009-04-19 17:52:35 +02:00
|
|
|
#
|
2021-02-23 19:12:11 +01:00
|
|
|
# Licensed to the Apache Software Foundation (ASF) under one or more
|
|
|
|
# contributor license agreements. See the NOTICE file distributed with
|
|
|
|
# this work for additional information regarding copyright ownership. The
|
|
|
|
# ASF licenses this file to you under the Apache License, Version 2.0 (the
|
|
|
|
# "License"); you may not use this file except in compliance with the
|
|
|
|
# License. You may obtain a copy of the License at
|
2009-04-19 17:52:35 +02:00
|
|
|
#
|
2021-02-23 19:12:11 +01:00
|
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
2009-04-19 17:52:35 +02:00
|
|
|
#
|
2021-02-23 19:12:11 +01:00
|
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
|
|
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
|
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
|
|
# License for the specific language governing permissions and limitations
|
2009-04-19 17:52:35 +02:00
|
|
|
#
|
|
|
|
###########################################################################
|
|
|
|
|
2020-05-18 21:42:11 +02:00
|
|
|
include $(TOPDIR)/Make.defs
|
2009-04-19 17:52:35 +02:00
|
|
|
|
2012-11-01 22:08:56 +01:00
|
|
|
# Include the uClibc++ Make.defs file if selected. If it is included,
|
2012-10-31 20:13:18 +01:00
|
|
|
# the uClibc++/Make.defs file will add its files to the source file list,
|
|
|
|
# add its DEPPATH info, and will add the appropriate paths to the VPATH
|
|
|
|
# variable
|
2012-11-01 22:08:56 +01:00
|
|
|
#
|
|
|
|
# Note that an error will occur if you select CONFIG_LIBXX_UCLIBCXX
|
|
|
|
# without installing the uClibc++ package. This is intentional to let
|
2015-06-28 16:08:57 +02:00
|
|
|
# you know about the configuration problem. Refer to the README.txt file
|
|
|
|
# in the NuttX uClibc++ GIT repository for more information
|
2012-11-01 22:08:56 +01:00
|
|
|
|
|
|
|
ifeq ($(CONFIG_UCLIBCXX),y)
|
2020-06-27 11:20:25 +02:00
|
|
|
include uClibc++.defs
|
2020-06-28 17:03:57 +02:00
|
|
|
else ifeq ($(CONFIG_LIBCXX),y)
|
2020-05-17 12:26:59 +02:00
|
|
|
include libcxx.defs
|
2020-06-28 17:03:57 +02:00
|
|
|
else
|
2021-08-29 15:36:24 +02:00
|
|
|
include libcxxmini.defs
|
2022-08-04 23:09:17 +02:00
|
|
|
ifeq ($(CONFIG_ETL),y)
|
|
|
|
include etl.defs
|
|
|
|
endif
|
2017-03-08 23:46:26 +01:00
|
|
|
endif
|
|
|
|
|
2021-08-19 11:11:50 +02:00
|
|
|
ifeq ($(CONFIG_LIBCXXABI),y)
|
|
|
|
include libcxxabi.defs
|
|
|
|
endif
|
|
|
|
|
2012-10-31 20:13:18 +01:00
|
|
|
# Object Files
|
|
|
|
|
|
|
|
AOBJS = $(ASRCS:.S=$(OBJEXT))
|
|
|
|
COBJS = $(CSRCS:.c=$(OBJEXT))
|
|
|
|
CXXOBJS = $(CXXSRCS:.cxx=$(OBJEXT))
|
2020-02-25 04:17:47 +01:00
|
|
|
CPPOBJS = $(CPPSRCS:.cpp=$(OBJEXT))
|
2012-10-31 20:13:18 +01:00
|
|
|
|
2020-02-25 04:17:47 +01:00
|
|
|
SRCS = $(ASRCS) $(CSRCS) $(CXXSRCS) $(CPPSRCS)
|
|
|
|
OBJS = $(AOBJS) $(COBJS) $(CXXOBJS) $(CPPOBJS)
|
2012-10-31 20:13:18 +01:00
|
|
|
|
2019-12-31 17:28:48 +01:00
|
|
|
BIN = libxx$(LIBEXT)
|
2012-10-31 20:13:18 +01:00
|
|
|
|
|
|
|
all: $(BIN)
|
2021-08-18 19:31:06 +02:00
|
|
|
.PHONY: depend clean distclean context
|
2009-04-19 17:52:35 +02:00
|
|
|
|
|
|
|
$(AOBJS): %$(OBJEXT): %.S
|
|
|
|
$(call ASSEMBLE, $<, $@)
|
|
|
|
|
|
|
|
$(COBJS): %$(OBJEXT): %.c
|
|
|
|
$(call COMPILE, $<, $@)
|
|
|
|
|
|
|
|
$(CXXOBJS): %$(OBJEXT): %.cxx
|
|
|
|
$(call COMPILEXX, $<, $@)
|
|
|
|
|
2020-02-25 04:17:47 +01:00
|
|
|
$(CPPOBJS): %$(OBJEXT): %.cpp
|
|
|
|
$(call COMPILEXX, $<, $@)
|
|
|
|
|
2023-01-28 03:17:18 +01:00
|
|
|
$(BIN): $(OBJS)
|
2012-11-15 18:43:29 +01:00
|
|
|
$(call ARCHIVE, $@, $(OBJS))
|
2009-04-19 17:52:35 +02:00
|
|
|
|
2021-08-18 19:31:06 +02:00
|
|
|
context::
|
2020-06-27 11:20:25 +02:00
|
|
|
|
2024-09-15 06:41:42 +02:00
|
|
|
makedepfile: $(CXXSRCS:.cxx=.ddx) $(CPPSRCS:.cpp=.ddp)
|
|
|
|
$(call CATFILE, Make.dep, $^)
|
|
|
|
$(call DELFILE, $^)
|
|
|
|
|
2020-07-22 09:54:29 +02:00
|
|
|
.depend: Makefile $(SRCS) $(TOPDIR)$(DELIM).config
|
2024-09-15 06:41:42 +02:00
|
|
|
$(Q) $(MAKE) makedepfile
|
2020-03-23 03:44:03 +01:00
|
|
|
$(Q) touch $@
|
2009-04-19 17:52:35 +02:00
|
|
|
|
2020-03-23 03:44:03 +01:00
|
|
|
depend: .depend
|
2009-04-19 17:52:35 +02:00
|
|
|
|
|
|
|
clean:
|
2012-11-20 16:47:41 +01:00
|
|
|
$(call DELFILE, $(BIN))
|
2009-04-19 17:52:35 +02:00
|
|
|
$(call CLEAN)
|
|
|
|
|
2020-06-27 11:20:25 +02:00
|
|
|
distclean:: clean
|
2012-11-20 16:47:41 +01:00
|
|
|
$(call DELFILE, Make.dep)
|
2020-03-23 03:44:03 +01:00
|
|
|
$(call DELFILE, .depend)
|
2009-04-19 17:52:35 +02:00
|
|
|
|
|
|
|
-include Make.dep
|