walnux/libs/libxx/Makefile
Luchian Mihai 7335b36eca
Some checks failed
Build Documentation / build-html (push) Has been cancelled
Docker-Linux / push (push) Has been cancelled
walnux: moveout
2025-11-04 19:15:10 +02:00

90 lines
2.5 KiB
Makefile

############################################################################
# libs/libxx/Makefile
#
# SPDX-License-Identifier: Apache-2.0
#
# 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
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# 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
#
###########################################################################
# Include the uClibc++ Make.defs file if selected. If it is included,
# 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
#
# Note that an error will occur if you select CONFIG_LIBXX_UCLIBCXX
# without installing the uClibc++ package. This is intentional to let
# you know about the configuration problem. Refer to the README.txt file
# in the NuttX uClibc++ GIT repository for more information
ifeq ($(CONFIG_UCLIBCXX),y)
include uClibc++/Make.defs
else ifeq ($(CONFIG_LIBCXX),y)
include libcxx/Make.defs
else ifeq ($(CONFIG_LIBCXXMINI),y)
include libcxxmini/Make.defs
endif
ifeq ($(CONFIG_ETL),y)
include etl/Make.defs
endif
ifeq ($(CONFIG_LIBCXXABI),y)
include libcxxabi/Make.defs
endif
# Object Files
AOBJS = $(ASRCS:.S=.o)
COBJS = $(CSRCS:.c=.o)
CXXOBJS = $(CXXSRCS:.cxx=.o)
CPPOBJS = $(CPPSRCS:.cpp=.o)
SRCS = $(ASRCS) $(CSRCS) $(CXXSRCS) $(CPPSRCS)
OBJS := $(addprefix ${OUT}/, $(AOBJS) $(COBJS) $(CXXOBJS) $(CPPOBJS))
BIN = ${OUT}/libxx.o
all: $(BIN)
.PHONY: depend context
$(AOBJS): %$(OBJEXT): %.S
$(call ASSEMBLE, $<, $@)
$(COBJS): %$(OBJEXT): %.c
$(call COMPILE, $<, $@)
$(CXXOBJS): %$(OBJEXT): %.cxx
$(call COMPILEXX, $<, $@)
$(CPPOBJS): %$(OBJEXT): %.cpp
$(call COMPILEXX, $<, $@)
$(BIN): $(OBJS)
$(call ARCHIVE, $@, $(OBJS))
context::
makedepfile: $(CXXSRCS:.cxx=.ddx) $(CPPSRCS:.cpp=.ddp)
$(call CATFILE, Make.dep, $^)
$(call DELFILE, $^)
.depend: Makefile $(SRCS) $(TOPDIR)$(DELIM).config
$(Q) $(MAKE) makedepfile
$(Q) touch $@
depend: .depend
-include Make.dep