From a444a16f4746959a1332cb21749fbdf9a31df091 Mon Sep 17 00:00:00 2001 From: patacongo Date: Sat, 17 Nov 2012 18:54:53 +0000 Subject: Most of the changes needed to support Windows native clean; distclean is has a problem git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5367 42af7a65-404d-4744-a932-0658087f49c3 --- apps/examples/elf/Makefile | 5 +++-- apps/examples/elf/tests/errno/Makefile | 14 +++++++------- apps/examples/elf/tests/hello/Makefile | 12 ++++++------ apps/examples/elf/tests/helloxx/Makefile | 29 ++++++++++++++++------------- apps/examples/elf/tests/longjmp/Makefile | 12 ++++++------ apps/examples/elf/tests/mutex/Makefile | 12 ++++++------ apps/examples/elf/tests/pthread/Makefile | 12 ++++++------ apps/examples/elf/tests/signal/Makefile | 12 ++++++------ apps/examples/elf/tests/struct/Makefile | 12 ++++++------ apps/examples/elf/tests/task/Makefile | 14 +++++++------- 10 files changed, 69 insertions(+), 65 deletions(-) (limited to 'apps/examples/elf') diff --git a/apps/examples/elf/Makefile b/apps/examples/elf/Makefile index 8831a9336..ee3413031 100644 --- a/apps/examples/elf/Makefile +++ b/apps/examples/elf/Makefile @@ -100,10 +100,11 @@ clean_tests: @$(MAKE) -C tests TOPDIR="$(TOPDIR)" APPDIR="$(APPDIR)" CROSSDEV=$(CROSSDEV) clean clean: clean_tests - @rm -f *.o *~ .*.swp .built + $(call DELFILE .built) $(call CLEAN) distclean: clean - @rm -f Make.dep .depend + $(call DELFILE Make.dep) + $(call DELFILE .depend) -include Make.dep diff --git a/apps/examples/elf/tests/errno/Makefile b/apps/examples/elf/tests/errno/Makefile index 09d469f9b..08bffc7dd 100644 --- a/apps/examples/elf/tests/errno/Makefile +++ b/apps/examples/elf/tests/errno/Makefile @@ -33,7 +33,6 @@ # ############################################################################ --include $(TOPDIR)/.config -include $(TOPDIR)/Make.defs BIN = errno @@ -45,16 +44,17 @@ all: $(BIN) $(OBJS): %.o: %.c @echo "CC: $<" - @$(CC) -c $(CELFFLAGS) $< -o $@ + $(Q) $(CC) -c $(CELFFLAGS) $< -o $@ $(BIN): $(OBJS) @echo "LD: $<" - @$(LD) $(LDELFFLAGS) -o $@ $^ + $(Q) $(LD) $(LDELFFLAGS) -o $@ $^ -clean: - @rm -f $(BIN) *.o *~ .*.swp core +clean: + $(call DELFILE $(BIN)) + $(call CLEAN) install: - @mkdir -p $(ROMFS_DIR) - @install $(BIN) $(ROMFS_DIR)/$(BIN) + $(Q) mkdir -p $(ROMFS_DIR) + $(Q) install $(BIN) $(ROMFS_DIR)/$(BIN) diff --git a/apps/examples/elf/tests/hello/Makefile b/apps/examples/elf/tests/hello/Makefile index 88770276b..d4af19e02 100644 --- a/apps/examples/elf/tests/hello/Makefile +++ b/apps/examples/elf/tests/hello/Makefile @@ -33,7 +33,6 @@ # ############################################################################ --include $(TOPDIR)/.config -include $(TOPDIR)/Make.defs BIN = hello @@ -45,15 +44,16 @@ all: $(BIN) $(OBJS): %.o: %.c @echo "CC: $<" - @$(CC) -c $(CELFFLAGS) $< -o $@ + $(Q) $(CC) -c $(CELFFLAGS) $< -o $@ $(BIN): $(OBJS) @echo "LD: $<" - @$(LD) $(LDELFFLAGS) -o $@ $^ + $(Q) $(LD) $(LDELFFLAGS) -o $@ $^ clean: - @rm -f $(BIN) *.o *~ .*.swp core + $(call DELFILE $(BIN)) + $(call CLEAN) install: - @mkdir -p $(ROMFS_DIR) - @install $(BIN) $(ROMFS_DIR)/$(BIN) + $(Q) mkdir -p $(ROMFS_DIR) + $(Q) install $(BIN) $(ROMFS_DIR)/$(BIN) diff --git a/apps/examples/elf/tests/helloxx/Makefile b/apps/examples/elf/tests/helloxx/Makefile index 45b4b8868..e1c9cfc5b 100644 --- a/apps/examples/elf/tests/helloxx/Makefile +++ b/apps/examples/elf/tests/helloxx/Makefile @@ -33,7 +33,6 @@ # ############################################################################ --include $(TOPDIR)/.config -include $(TOPDIR)/Make.defs BIN1 = hello++1 @@ -68,13 +67,13 @@ all: $(BIN1) $(BIN2) $(BIN3) $(BIN4) $(OBJS): %.o: %.cpp @echo "CC: $<" - @$(CXX) -c $(CXXELFFLAGS) $< -o $@ + $(Q) $(CXX) -c $(CXXELFFLAGS) $< -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) + $(Q) $(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; @@ -83,18 +82,18 @@ $(LIBSTDC_STUBS_LIB): $(BIN1): $(OBJS1) @echo "LD: $<" - @$(LD) $(LDELFFLAGS) -o $@ $^ + $(Q) $(LD) $(LDELFFLAGS) -o $@ $^ $(BIN2): $(OBJS2) @echo "LD: $<" - @$(LD) $(LDELFFLAGS) -o $@ $^ + $(Q) $(LD) $(LDELFFLAGS) -o $@ $^ # BIN3 is equivalent to BIN2 except that is uses static initializers ifeq ($(CONFIG_BINFMT_CONSTRUCTORS),y) $(BIN3): $(OBJS3) @echo "LD: $<" - @$(LD) $(LDELFFLAGS) -o $@ $^ + $(Q) $(LD) $(LDELFFLAGS) -o $@ $^ endif # BIN4 is similar to BIN3 except that it uses the streams code from libstdc++ @@ -103,19 +102,23 @@ endif # #$(BIN4): $(OBJS4) # @echo "LD: $<" -# @$(LD) $(LDELFFLAGS) -o $@ $^ +# $(Q) $(LD) $(LDELFFLAGS) -o $@ $^ clean: - @rm -f $(ALL_BIN) *.o *~ .*.swp core + $(call DELFILE $(BIN1)) + $(call DELFILE $(BIN2)) + $(call DELFILE $(BIN3)) + $(call DELFILE $(BIN4)) + $(call CLEAN) install: $(ALL_BIN) - @mkdir -p $(ROMFS_DIR) - @install $(BIN1) $(ROMFS_DIR)/$(BIN1) - @install $(BIN2) $(ROMFS_DIR)/$(BIN2) + $(Q) mkdir -p $(ROMFS_DIR) + $(Q) install $(BIN1) $(ROMFS_DIR)/$(BIN1) + $(Q) install $(BIN2) $(ROMFS_DIR)/$(BIN2) ifeq ($(CONFIG_BINFMT_CONSTRUCTORS),y) - @install $(BIN3) $(ROMFS_DIR)/$(BIN3) + $(Q) install $(BIN3) $(ROMFS_DIR)/$(BIN3) endif -# @install $(BIN4) $(ROMFS_DIR)/$(BIN4) +# $(Q) install $(BIN4) $(ROMFS_DIR)/$(BIN4) diff --git a/apps/examples/elf/tests/longjmp/Makefile b/apps/examples/elf/tests/longjmp/Makefile index 04da6ee81..e7a54fc00 100644 --- a/apps/examples/elf/tests/longjmp/Makefile +++ b/apps/examples/elf/tests/longjmp/Makefile @@ -33,7 +33,6 @@ # ############################################################################ --include $(TOPDIR)/.config -include $(TOPDIR)/Make.defs BIN = longjmp @@ -45,15 +44,16 @@ all: $(BIN) $(OBJS): %.o: %.c @echo "CC: $<" - @$(CC) -c $(CELFFLAGS) $< -o $@ + $(Q) $(CC) -c $(CELFFLAGS) $< -o $@ $(BIN): $(OBJS) @echo "LD: $<" - @$(LD) $(LDELFFLAGS) -o $@ $^ + $(Q) $(LD) $(LDELFFLAGS) -o $@ $^ clean: - @rm -f $(BIN) *.o *~ .*.swp core + $(call DELFILE $(BIN)) + $(call CLEAN) install: - @mkdir -p $(ROMFS_DIR) - @install $(BIN) $(ROMFS_DIR)/$(BIN) + $(Q) mkdir -p $(ROMFS_DIR) + $(Q) install $(BIN) $(ROMFS_DIR)/$(BIN) diff --git a/apps/examples/elf/tests/mutex/Makefile b/apps/examples/elf/tests/mutex/Makefile index 756ada2c0..958c0c38e 100644 --- a/apps/examples/elf/tests/mutex/Makefile +++ b/apps/examples/elf/tests/mutex/Makefile @@ -33,7 +33,6 @@ # ############################################################################ --include $(TOPDIR)/.config -include $(TOPDIR)/Make.defs BIN = mutex @@ -45,15 +44,16 @@ all: $(BIN) $(OBJS): %.o: %.c @echo "CC: $<" - @$(CC) -c $(CELFFLAGS) $< -o $@ + $(Q) $(CC) -c $(CELFFLAGS) $< -o $@ $(BIN): $(OBJS) @echo "LD: $<" - @$(LD) $(LDELFFLAGS) -o $@ $^ + $(Q) $(LD) $(LDELFFLAGS) -o $@ $^ clean: - @rm -f $(BIN) *.o *~ .*.swp core + $(call DELFILE $(BIN)) + $(call CLEAN) install: - @mkdir -p $(ROMFS_DIR) - @install $(BIN) $(ROMFS_DIR)/$(BIN) + $(Q) mkdir -p $(ROMFS_DIR) + $(Q) install $(BIN) $(ROMFS_DIR)/$(BIN) diff --git a/apps/examples/elf/tests/pthread/Makefile b/apps/examples/elf/tests/pthread/Makefile index 4bea4515b..a491b9874 100644 --- a/apps/examples/elf/tests/pthread/Makefile +++ b/apps/examples/elf/tests/pthread/Makefile @@ -33,7 +33,6 @@ # ############################################################################ --include $(TOPDIR)/.config -include $(TOPDIR)/Make.defs BIN = pthread @@ -45,15 +44,16 @@ all: $(BIN) $(OBJS): %.o: %.c @echo "CC: $<" - @$(CC) -c $(CELFFLAGS) $< -o $@ + $(Q) $(CC) -c $(CELFFLAGS) $< -o $@ $(BIN): $(OBJS) @echo "LD: $<" - @$(LD) $(LDELFFLAGS) -o $@ $^ + $(Q) $(LD) $(LDELFFLAGS) -o $@ $^ clean: - @rm -f $(BIN) *.o *~ .*.swp core + $(call DELFILE $(BIN)) + $(call CLEAN) install: - @mkdir -p $(ROMFS_DIR) - @install $(BIN) $(ROMFS_DIR)/$(BIN) + $(Q) mkdir -p $(ROMFS_DIR) + $(Q) install $(BIN) $(ROMFS_DIR)/$(BIN) diff --git a/apps/examples/elf/tests/signal/Makefile b/apps/examples/elf/tests/signal/Makefile index 9eaaf8609..227f99521 100644 --- a/apps/examples/elf/tests/signal/Makefile +++ b/apps/examples/elf/tests/signal/Makefile @@ -33,7 +33,6 @@ # ############################################################################ --include $(TOPDIR)/.config -include $(TOPDIR)/Make.defs BIN = signal @@ -45,15 +44,16 @@ all: $(BIN) $(OBJS): %.o: %.c @echo "CC: $<" - @$(CC) -c $(CELFFLAGS) $< -o $@ + $(Q) $(CC) -c $(CELFFLAGS) $< -o $@ $(BIN): $(OBJS) @echo "LD: $<" - @$(LD) $(LDELFFLAGS) -o $@ $^ + $(Q) $(LD) $(LDELFFLAGS) -o $@ $^ clean: - @rm -f $(BIN) *.o *~ .*.swp core + $(call DELFILE $(BIN)) + $(call CLEAN) install: - @mkdir -p $(ROMFS_DIR) - @install $(BIN) $(ROMFS_DIR)/$(BIN) + $(Q) mkdir -p $(ROMFS_DIR) + $(Q) install $(BIN) $(ROMFS_DIR)/$(BIN) diff --git a/apps/examples/elf/tests/struct/Makefile b/apps/examples/elf/tests/struct/Makefile index 2ddd80b89..3224c655e 100644 --- a/apps/examples/elf/tests/struct/Makefile +++ b/apps/examples/elf/tests/struct/Makefile @@ -33,7 +33,6 @@ # ############################################################################ --include $(TOPDIR)/.config -include $(TOPDIR)/Make.defs CELFFLAGS += -I. @@ -46,15 +45,16 @@ all: $(BIN) $(OBJS): %.o: %.c @echo "CC: $<" - @$(CC) -c $(CELFFLAGS) $< -o $@ + $(Q) $(CC) -c $(CELFFLAGS) $< -o $@ $(BIN): $(OBJS) @echo "LD: $<" - @$(LD) $(LDELFFLAGS) -o $@ $^ + $(Q) $(LD) $(LDELFFLAGS) -o $@ $^ clean: - @rm -f $(BIN) *.o *~ .*.swp core + $(call DELFILE $(BIN)) + $(call CLEAN) install: - @mkdir -p $(ROMFS_DIR) - @install $(BIN) $(ROMFS_DIR)/$(BIN) + $(Q) mkdir -p $(ROMFS_DIR) + $(Q) install $(BIN) $(ROMFS_DIR)/$(BIN) diff --git a/apps/examples/elf/tests/task/Makefile b/apps/examples/elf/tests/task/Makefile index accac987f..cf56b1287 100644 --- a/apps/examples/elf/tests/task/Makefile +++ b/apps/examples/elf/tests/task/Makefile @@ -33,7 +33,6 @@ # ############################################################################ --include $(TOPDIR)/.config -include $(TOPDIR)/Make.defs BIN = task @@ -45,15 +44,16 @@ all: $(BIN) $(OBJS): %.o: %.c @echo "CC: $<" - @$(CC) -c $(CELFFLAGS) $< -o $@ + $(Q) $(CC) -c $(CELFFLAGS) $< -o $@ $(BIN): $(OBJS) @echo "LD: $<" - @$(LD) $(LDELFFLAGS) -o $@ $^ + $(Q) $(LD) $(LDELFFLAGS) -o $@ $^ -clean: - @rm -f $(BIN) *.o *~ .*.swp core +clean: + $(call DELFILE $(BIN)) + $(call CLEAN) install: - @mkdir -p $(ROMFS_DIR) - @install $(BIN) $(ROMFS_DIR)/$(BIN) + $(Q) mkdir -p $(ROMFS_DIR) + $(Q) install $(BIN) $(ROMFS_DIR)/$(BIN) -- cgit v1.2.3