summaryrefslogtreecommitdiff
path: root/nuttx/libxx
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2012-10-31 19:13:18 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2012-10-31 19:13:18 +0000
commit329b6095ddda830433e6000b943fab82d1c83cf1 (patch)
tree605301a07119dea4433c994f9000743eed20d165 /nuttx/libxx
parent8f6e28f194274bde92d11c6383167ddbcc496cb3 (diff)
downloadpx4-nuttx-329b6095ddda830433e6000b943fab82d1c83cf1.tar.gz
px4-nuttx-329b6095ddda830433e6000b943fab82d1c83cf1.tar.bz2
px4-nuttx-329b6095ddda830433e6000b943fab82d1c83cf1.zip
Add misc/uClibc++ and build hooks in nuttx/
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5283 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/libxx')
-rw-r--r--nuttx/libxx/Makefile41
1 files changed, 29 insertions, 12 deletions
diff --git a/nuttx/libxx/Makefile b/nuttx/libxx/Makefile
index 4122931ac..67f8531d7 100644
--- a/nuttx/libxx/Makefile
+++ b/nuttx/libxx/Makefile
@@ -35,20 +35,37 @@
-include $(TOPDIR)/Make.defs
-ASRCS =
-AOBJS = $(ASRCS:.S=$(OBJEXT))
-CSRCS =
-COBJS = $(CSRCS:.c=$(OBJEXT))
-CXXSRCS = libxx_cxapurevirtual.cxx libxx_delete.cxx libxx_deletea.cxx \
- libxx_eabi_atexit.cxx libxx_new.cxx libxx_newa.cxx
-CXXOBJS = $(CXXSRCS:.cxx=$(OBJEXT))
+# Sources
-SRCS = $(ASRCS) $(CSRCS) $(CXXSRCS)
-OBJS = $(AOBJS) $(COBJS) $(CXXOBJS)
+ASRCS =
+CSRCS =
+CXXSRCS = libxx_cxapurevirtual.cxx libxx_delete.cxx libxx_deletea.cxx
+CXXSRCS += libxx_eabi_atexit.cxx libxx_new.cxx libxx_newa.cxx
-BIN = liblibxx$(LIBEXT)
+# Paths
-all: $(BIN)
+DEPPATH = --dep-path .
+VPATH = .
+
+# Include the uClibc++ Make.defs file (if it is present). If is present,
+# 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
+
+-include/uClibc++/Make.defs
+
+# Object Files
+
+AOBJS = $(ASRCS:.S=$(OBJEXT))
+COBJS = $(CSRCS:.c=$(OBJEXT))
+CXXOBJS = $(CXXSRCS:.cxx=$(OBJEXT))
+
+SRCS = $(ASRCS) $(CSRCS) $(CXXSRCS)
+OBJS = $(AOBJS) $(COBJS) $(CXXOBJS)
+
+BIN = liblibxx$(LIBEXT)
+
+all: $(BIN)
$(AOBJS): %$(OBJEXT): %.S
$(call ASSEMBLE, $<, $@)
@@ -65,7 +82,7 @@ $(BIN): $(OBJS)
done ; )
.depend: Makefile $(SRCS)
- @$(MKDEP) $(CXX) -- $(CXXFLAGS) -- $(SRCS) >Make.dep
+ @$(MKDEP) $(DEPPATH) $(CXX) -- $(CXXFLAGS) -- $(SRCS) >Make.dep
@touch $@
depend: .depend