diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2009-06-21 16:58:58 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2009-06-21 16:58:58 +0000 |
commit | ae15cd5e53907a95e42586d1a96a24b71299349d (patch) | |
tree | 187cdab659238c72bca505dd07fec653cf640623 /nuttx/examples/nxflat/tests/hello++/Makefile | |
parent | 77c1a6ae19c1cbe5e2b7f1de0d73809885f11ed7 (diff) | |
download | px4-nuttx-ae15cd5e53907a95e42586d1a96a24b71299349d.tar.gz px4-nuttx-ae15cd5e53907a95e42586d1a96a24b71299349d.tar.bz2 px4-nuttx-ae15cd5e53907a95e42586d1a96a24b71299349d.zip |
Flesh out examples/nxflat build environment
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@1921 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/examples/nxflat/tests/hello++/Makefile')
-rw-r--r-- | nuttx/examples/nxflat/tests/hello++/Makefile | 65 |
1 files changed, 40 insertions, 25 deletions
diff --git a/nuttx/examples/nxflat/tests/hello++/Makefile b/nuttx/examples/nxflat/tests/hello++/Makefile index f9419cf6c..e28281619 100644 --- a/nuttx/examples/nxflat/tests/hello++/Makefile +++ b/nuttx/examples/nxflat/tests/hello++/Makefile @@ -35,7 +35,6 @@ -include $(TOPDIR)/.config # Current configuration -include $(TOPDIR)/Make.defs # Basic make info -include ../Make.defs # NXFLAT make info BIN1 = hello++1 BIN2 = hello++2 @@ -74,16 +73,18 @@ LIBSTDC_STUBS_LIB = $(LIBSTDC_STUBS_DIR)/liblibxx.a all: $(BIN1) $(BIN2) $(BIN3) # $(BIN4) $(R1CXXOBJS): %.o: %.cpp - $(NXFLATCXX) -c $(NXFLATCXXFLAGS) $< -o $@ + @echo "CC: $<" + @$(CXX) -c $(CXXPICFLAGS) $< -o $@ $(R2AOBJS): %.o: %.S - $(NXFLATCC) -c $(NXFLATCFLAGS) $< -o $@ + @echo "AS: $<" + @$(CC) -c $(CPICFLAGS) $< -o $@ # This contains libstdc++ stubs to that you can build C++ code # without actually having libstdc++ $(LIBSTDC_STUBS_LIB): - $(MAKE) -C $(LIBSTDC_STUBS_DIR) TOPDIR=$(TOPDIR) + @$(MAKE) -C $(LIBSTDC_STUBS_DIR) TOPDIR=$(TOPDIR) # BIN1 and BIN2 link just like C code because they contain no # static constructors. BIN1 is equivalent to a C hello world; @@ -91,28 +92,35 @@ $(LIBSTDC_STUBS_LIB): # not statically initialized. $(BIN1).r1: $(R1OBJS1) - $(NXFLATLD) $(NXFLATLDFLAGS1) -o $@ $^ + @echo "LD: $<" + @$(LD) $(NXFLATLDFLAGS1) -o $@ $^ $(R2SRC1): $(BIN1).r1 - $(MKNXFLAT) -o $@ $^ + @echo "MK: $<" + @$(MKNXFLAT) -o $@ $^ $(BIN1).r2: $(R2OBJ1) - $(NXFLATLD) $(NXFLATLDFLAGS2) -o $@ $(R1OBJS1) $(R2OBJ1) + @echo "LD: $<" + @$(LD) $(NXFLATLDFLAGS2) -o $@ $(R1OBJS1) $(R2OBJ1) $(BIN1): $(BIN1).r2 - $(LDNXFLAT) $(LDNXFLATFLAGS) -o $@ $^ + @echo "LD: $<" + @$(LDNXFLAT) $(LDNXFLATFLAGS) -o $@ $^ $(BIN2).r1: $(R1OBJS2) $(LIBSTDC_STUBS_LIB) - $(NXFLATLD) $(NXFLATLDFLAGS1) -o $@ $^ + @echo "LD: $<" + @$(LD) $(NXFLATLDFLAGS1) -o $@ $^ $(R2SRC2): $(BIN2).r1 - $(MKNXFLAT) -o $@ $^ + @echo "MK: $<" + @$(MKNXFLAT) -o $@ $^ $(BIN2).r2: $(R2OBJ2) - $(NXFLATLD) $(NXFLATLDFLAGS2) -o $@ $(R1OBJS2) $(R2OBJ2) + @$(LD) $(NXFLATLDFLAGS2) -o $@ $(R1OBJS2) $(R2OBJ2) -(BIN2): $(BIN2).r2 - $(LDNXFLAT) $(LDNXFLATFLAGS) -o $@ $^ +$(BIN2): $(BIN2).r2 + @echo "LD: $<" + @$(LDNXFLAT) $(LDNXFLATFLAGS) -o $@ $^ # BIN3 and BIN4 require that we include --cxx in the xflat-ld command. # This will instruct xflat-ld that we want it to put togethe the correct @@ -121,41 +129,48 @@ $(BIN2).r2: $(R2OBJ2) # BIN3 is equivalent to BIN2 except that is uses static initializers $(BIN3).r1: $(R1OBJS3) $(LIBSTDC_STUBS_LIB) - $(NXFLATLD) $(NXFLATLDFLAGS1) -o $@ $^ + @echo "LD: $<" + @$(LD) $(NXFLATLDFLAGS1) -o $@ $^ $(R2SRC3): $(BIN3).r1 - $(MKNXFLAT) -o $@ $^ + @echo "MK: $<" + @$(MKNXFLAT) -o $@ $^ $(BIN3).r2: $(R2OBJ3) - $(NXFLATLD) $(NXFLATLDFLAGS2) -o $@ $(R1OBJS3) $(R2OBJ3) + @echo "LD: $<" + @$(LD) $(NXFLATLDFLAGS2) -o $@ $(R1OBJS3) $(R2OBJ3) $(BIN3): $(BIN3).r2 - $(LDNXFLAT) $(LDNXFLATFLAGS) -o $@ $^ + @echo "LD: $<" + @$(LDNXFLAT) $(LDNXFLATFLAGS) -o $@ $^ # BIN4 is similar to BIN3 except that it uses the streams code from libstdc++ # # NOTE: libstdc++ is not available for XFLAT as of this writing # #$(BIN4).r1: $(R1OBJS4) $(LIBSTDC_STUBS_LIB) -# $(NXFLATLD) $(NXFLATLDFLAGS1) -o $@ $^ +# @echo "LD: $<" +# $(LD) $(NXFLATLDFLAGS1) -o $@ $^ # #$(R2SRC4): $(BIN4).r1 +# @echo "MK: $<" # $(MKNXFLAT) -o $@ $^ # -#$(BIN4).r2: $(R2OBJ4) -# $(NXFLATLD) $(NXFLATLDFLAGS2) -o $@ $(R1OBJS4) $(R2OBJ4) +#$(BIN4).r2: $(R2OBJ4)# @echo "LD: $<" +# $(LD) $(NXFLATLDFLAGS2) -o $@ $(R1OBJS4) $(R2OBJ4) # #$(BIN4): $(BIN4).r2 +# @echo "LD: $<" # $(LDNXFLAT) $(LDNXFLATFLAGS) -o $@ $^ clean: - rm -f $(ALL_BIN) $(DERIVED) *.o *.r1 *.r2 *~ .*.swp core + @rm -f $(ALL_BIN) $(DERIVED) *.o *.r1 *.r2 *~ .*.swp core install: $(ALL_BIN) - install -D $(BIN1) $(ROMFS_DIR)/$(BIN1) - install -D $(BIN2) $(ROMFS_DIR)/$(BIN2) - install -D $(BIN3) $(ROMFS_DIR)/$(BIN3) -# install -D $(BIN4) $(ROMFS_DIR)/$(BIN4) + @install -D $(BIN1) $(ROMFS_DIR)/$(BIN1) + @install -D $(BIN2) $(ROMFS_DIR)/$(BIN2) + @install -D $(BIN3) $(ROMFS_DIR)/$(BIN3) +# @install -D $(BIN4) $(ROMFS_DIR)/$(BIN4) |