diff --git a/apps/Makefile b/apps/Makefile index 7e7d52a405..522731722d 100644 --- a/apps/Makefile +++ b/apps/Makefile @@ -169,13 +169,12 @@ ifeq ($(CONFIG_WINDOWS_NATIVE),y) $(Q) for %%G in ($(SUBDIRS)) do ( \ $(MAKE) -C %%G clean TOPDIR="$(TOPDIR)" APPDIR="$(APPDIR)" \ ) - $(Q) rm -f $(BIN) *~ .*.swp *.o else $(Q) for dir in $(SUBDIRS) ; do \ $(MAKE) -C $$dir clean TOPDIR="$(TOPDIR)" APPDIR="$(APPDIR)"; \ done - $(Q) rm -f $(BIN) *~ .*.swp *.o endif + $(call DELFILE $(BIN)) $(call CLEAN) distclean: # clean @@ -183,7 +182,9 @@ ifeq ($(CONFIG_WINDOWS_NATIVE),y) $(Q) for %%G in ($(SUBDIRS)) do ( \ $(MAKE) -C %%G distclean TOPDIR="$(TOPDIR)" APPDIR="$(APPDIR)" \ ) - $(Q) rm -f .config .context .depend + $(call DELFILE .config) + $(call DELFILE .context) + $(call DELFILE .depend) $(Q) ( if exist external ( \ echo ********************************************************" \ echo * The external directory/link must be removed manually *" \ @@ -193,7 +194,9 @@ else $(Q) for dir in $(SUBDIRS) ; do \ $(MAKE) -C $$dir distclean TOPDIR="$(TOPDIR)" APPDIR="$(APPDIR)"; \ done - $(Q) rm -f .config .context .depend + $(call DELFILE .config) + $(call DELFILE .context) + $(call DELFILE .depend) $(Q) ( if [ -e external ]; then \ echo "********************************************************"; \ echo "* The external directory/link must be removed manually *"; \ diff --git a/apps/examples/adc/Makefile b/apps/examples/adc/Makefile index 8f37169c5f..e9f3980b13 100644 --- a/apps/examples/adc/Makefile +++ b/apps/examples/adc/Makefile @@ -98,10 +98,11 @@ context: .context depend: .depend clean: - @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/buttons/Makefile b/apps/examples/buttons/Makefile index 1f209b7608..01d0719a91 100644 --- a/apps/examples/buttons/Makefile +++ b/apps/examples/buttons/Makefile @@ -98,10 +98,11 @@ context: .context depend: .depend clean: - @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/can/Makefile b/apps/examples/can/Makefile index 20fb173f0f..824cea3603 100644 --- a/apps/examples/can/Makefile +++ b/apps/examples/can/Makefile @@ -98,10 +98,11 @@ context: .context depend: .depend clean: - @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/cdcacm/Makefile b/apps/examples/cdcacm/Makefile index 1ebbc6e1e9..336f572442 100644 --- a/apps/examples/cdcacm/Makefile +++ b/apps/examples/cdcacm/Makefile @@ -101,11 +101,12 @@ context: .context depend: .depend clean: - @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/composite/Makefile b/apps/examples/composite/Makefile index 6fe34a1e99..da528b54bf 100644 --- a/apps/examples/composite/Makefile +++ b/apps/examples/composite/Makefile @@ -103,11 +103,12 @@ context: .context depend: .depend clean: - @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/cxxtest/Makefile b/apps/examples/cxxtest/Makefile index b0f0befbf0..f1ab33744c 100644 --- a/apps/examples/cxxtest/Makefile +++ b/apps/examples/cxxtest/Makefile @@ -115,10 +115,11 @@ context: .context depend: .depend clean: - @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/dhcpd/Makefile b/apps/examples/dhcpd/Makefile index 6a96281cfb..34575f802d 100644 --- a/apps/examples/dhcpd/Makefile +++ b/apps/examples/dhcpd/Makefile @@ -98,11 +98,12 @@ context: .context depend: .depend clean: - @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/discover/Makefile b/apps/examples/discover/Makefile index 722ad3d9bc..6fa70d0929 100644 --- a/apps/examples/discover/Makefile +++ b/apps/examples/discover/Makefile @@ -99,10 +99,11 @@ context: .context depend: .depend clean: - @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/Makefile b/apps/examples/elf/Makefile index 8831a9336e..ee34130316 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 09d469f9b4..08bffc7dd5 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 88770276b3..d4af19e02c 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 45b4b8868e..e1c9cfc5be 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 04da6ee819..e7a54fc002 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 756ada2c09..958c0c38e6 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 4bea4515b0..a491b98741 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 9eaaf86096..227f995211 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 2ddd80b893..3224c655e7 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 accac987f2..cf56b1287f 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) diff --git a/apps/examples/ftpc/Makefile b/apps/examples/ftpc/Makefile index 9f9f689db5..3cdc93060c 100644 --- a/apps/examples/ftpc/Makefile +++ b/apps/examples/ftpc/Makefile @@ -98,10 +98,12 @@ context: .context depend: .depend clean: - @rm -f *.o *~ .*.swp .built + $(call DELFILE .built) $(call CLEAN) distclean: clean - @rm -f .context Make.dep .depend + $(call DELFILE .context) + $(call DELFILE Make.dep) + $(call DELFILE .depend) -include Make.dep diff --git a/apps/examples/ftpd/Makefile b/apps/examples/ftpd/Makefile index cae8a282ec..071784b8e2 100644 --- a/apps/examples/ftpd/Makefile +++ b/apps/examples/ftpd/Makefile @@ -94,10 +94,11 @@ context: .context depend: .depend clean: - @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/hello/Makefile b/apps/examples/hello/Makefile index 53fbead98c..b35b97eb0d 100644 --- a/apps/examples/hello/Makefile +++ b/apps/examples/hello/Makefile @@ -98,10 +98,11 @@ context: .context depend: .depend clean: - @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/helloxx/Makefile b/apps/examples/helloxx/Makefile index 295d0116e7..739f262526 100644 --- a/apps/examples/helloxx/Makefile +++ b/apps/examples/helloxx/Makefile @@ -115,10 +115,11 @@ context: .context depend: .depend clean: - @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/hidkbd/Makefile b/apps/examples/hidkbd/Makefile index cb0f32c606..0dbfbdb778 100644 --- a/apps/examples/hidkbd/Makefile +++ b/apps/examples/hidkbd/Makefile @@ -86,10 +86,11 @@ context: depend: .depend clean: - @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/igmp/Makefile b/apps/examples/igmp/Makefile index 5f9d4aa98a..a94a97cf73 100644 --- a/apps/examples/igmp/Makefile +++ b/apps/examples/igmp/Makefile @@ -86,10 +86,11 @@ context: depend: .depend clean: - @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/json/Makefile b/apps/examples/json/Makefile index 0551eccfe3..bdd93fd178 100644 --- a/apps/examples/json/Makefile +++ b/apps/examples/json/Makefile @@ -96,10 +96,11 @@ context: .context depend: .depend clean: - @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/lcdrw/Makefile b/apps/examples/lcdrw/Makefile index fab2a6939c..bbe46025dd 100644 --- a/apps/examples/lcdrw/Makefile +++ b/apps/examples/lcdrw/Makefile @@ -98,10 +98,11 @@ context: .context depend: .depend clean: - @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/mm/Makefile b/apps/examples/mm/Makefile index 5d29c6d905..bb14a2e4ef 100644 --- a/apps/examples/mm/Makefile +++ b/apps/examples/mm/Makefile @@ -86,10 +86,11 @@ context: depend: .depend clean: - @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/modbus/Makefile b/apps/examples/modbus/Makefile index 937212f723..f6e964f51f 100644 --- a/apps/examples/modbus/Makefile +++ b/apps/examples/modbus/Makefile @@ -98,10 +98,11 @@ context: .context depend: .depend clean: - @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/mount/Makefile b/apps/examples/mount/Makefile index d244852d0c..becc6670b8 100644 --- a/apps/examples/mount/Makefile +++ b/apps/examples/mount/Makefile @@ -86,10 +86,11 @@ context: depend: .depend clean: - @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/nettest/Makefile b/apps/examples/nettest/Makefile index c1c50bbb8f..76ad94d6fb 100644 --- a/apps/examples/nettest/Makefile +++ b/apps/examples/nettest/Makefile @@ -131,11 +131,13 @@ context: .context depend: .depend clean: - @rm -f $(HOST_BIN) .built *.o *~ .*.swp + $(call DELFILE $(HOST_BIN)) + $(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/nsh/Makefile b/apps/examples/nsh/Makefile index fdf5a2a908..0c0ebe8b9f 100644 --- a/apps/examples/nsh/Makefile +++ b/apps/examples/nsh/Makefile @@ -86,10 +86,11 @@ context: depend: .depend clean: - @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/null/Makefile b/apps/examples/null/Makefile index fa3b83d2af..d37d9e6371 100644 --- a/apps/examples/null/Makefile +++ b/apps/examples/null/Makefile @@ -86,10 +86,11 @@ context: depend: .depend clean: - @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/nx/Makefile b/apps/examples/nx/Makefile index 7bc861bbd1..a77ad792a2 100644 --- a/apps/examples/nx/Makefile +++ b/apps/examples/nx/Makefile @@ -101,10 +101,11 @@ context: .context depend: .depend clean: - @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/nxconsole/Makefile b/apps/examples/nxconsole/Makefile index eb72c87b9a..555511882b 100644 --- a/apps/examples/nxconsole/Makefile +++ b/apps/examples/nxconsole/Makefile @@ -86,10 +86,11 @@ context: depend: .depend clean: - @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/nxffs/Makefile b/apps/examples/nxffs/Makefile index c66a0ec33b..be2a34eae7 100644 --- a/apps/examples/nxffs/Makefile +++ b/apps/examples/nxffs/Makefile @@ -86,10 +86,11 @@ context: depend: .depend clean: - @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/nxflat/Makefile b/apps/examples/nxflat/Makefile index 4fc315592c..5f5a302c34 100644 --- a/apps/examples/nxflat/Makefile +++ b/apps/examples/nxflat/Makefile @@ -91,10 +91,11 @@ context: depend: .depend clean: - @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/nxflat/tests/errno/Makefile b/apps/examples/nxflat/tests/errno/Makefile index df3ea1e3eb..d05154525a 100644 --- a/apps/examples/nxflat/tests/errno/Makefile +++ b/apps/examples/nxflat/tests/errno/Makefile @@ -33,8 +33,7 @@ # ############################################################################ --include $(TOPDIR)/.config # Current configuration --include $(TOPDIR)/Make.defs # Basic make info +-include $(TOPDIR)/Make.defs BIN = errno @@ -48,31 +47,35 @@ all: $(BIN) $(R1OBJS): %.o: %.c @echo "CC: $<" - @$(CC) -c $(CPICFLAGS) $< -o $@ + $(Q) $(CC) -c $(CPICFLAGS) $< -o $@ $(R2OBJ): %.o: %.S @echo "AS: $<" - @$(CC) -c $(CPICFLAGS) $< -o $@ + $(Q) $(CC) -c $(CPICFLAGS) $< -o $@ $(BIN).r1: $(R1OBJS) @echo "LD: $<" - @$(LD) $(NXFLATLDFLAGS1) -o $@ $^ + $(Q) $(LD) $(NXFLATLDFLAGS1) -o $@ $^ $(R2SRC): $(BIN).r1 @echo "MK: $<" - @$(MKNXFLAT) -o $@ $^ + $(Q) $(MKNXFLAT) -o $@ $^ $(BIN).r2: $(R2OBJ) @echo "LD: $<" - @$(LD) $(NXFLATLDFLAGS2) -o $@ $(R1OBJS) $(R2OBJ) + $(Q) $(LD) $(NXFLATLDFLAGS2) -o $@ $(R1OBJS) $(R2OBJ) $(BIN): $(BIN).r2 @echo "LD: $<" - @$(LDNXFLAT) $(LDNXFLATFLAGS) -o $@ $^ + $(Q) $(LDNXFLAT) $(LDNXFLATFLAGS) -o $@ $^ clean: - @rm -f $(BIN) $(R2SRC) *.o *.r1 *.r2 *~ .*.swp core + $(call DELFILE $(BIN)) + $(call DELFILE $(R2SRC)) + $(call DELFILE *.r1) + $(call DELFILE *.r2) + $(call CLEAN) install: - @install -D $(BIN) $(ROMFS_DIR)/$(BIN) + $(Q) install -D $(BIN) $(ROMFS_DIR)/$(BIN) diff --git a/apps/examples/nxflat/tests/hello++/Makefile b/apps/examples/nxflat/tests/hello++/Makefile index 3433145dc3..445049e94d 100644 --- a/apps/examples/nxflat/tests/hello++/Makefile +++ b/apps/examples/nxflat/tests/hello++/Makefile @@ -33,8 +33,7 @@ # ############################################################################ --include $(TOPDIR)/.config # Current configuration --include $(TOPDIR)/Make.defs # Basic make info +-include $(TOPDIR)/Make.defs BIN1 = hello++1 BIN2 = hello++2 @@ -74,17 +73,17 @@ all: $(BIN1) $(BIN2) $(BIN3) # $(BIN4) $(R1CXXOBJS): %.o: %.cpp @echo "CC: $<" - @$(CXX) -c $(CXXPICFLAGS) $< -o $@ + $(Q) $(CXX) -c $(CXXPICFLAGS) $< -o $@ $(R2AOBJS): %.o: %.S @echo "AS: $<" - @$(CC) -c $(CPICFLAGS) $< -o $@ + $(Q) $(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) + $(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; @@ -93,34 +92,34 @@ $(LIBSTDC_STUBS_LIB): $(BIN1).r1: $(R1OBJS1) @echo "LD: $<" - @$(LD) $(NXFLATLDFLAGS1) -o $@ $^ + $(Q) $(LD) $(NXFLATLDFLAGS1) -o $@ $^ $(R2SRC1): $(BIN1).r1 @echo "MK: $<" - @$(MKNXFLAT) -o $@ $^ + $(Q) $(MKNXFLAT) -o $@ $^ $(BIN1).r2: $(R2OBJ1) @echo "LD: $<" - @$(LD) $(NXFLATLDFLAGS2) -o $@ $(R1OBJS1) $(R2OBJ1) + $(Q) $(LD) $(NXFLATLDFLAGS2) -o $@ $(R1OBJS1) $(R2OBJ1) $(BIN1): $(BIN1).r2 @echo "LD: $<" - @$(LDNXFLAT) $(LDNXFLATFLAGS) -o $@ $^ + $(Q) $(LDNXFLAT) $(LDNXFLATFLAGS) -o $@ $^ $(BIN2).r1: $(R1OBJS2) $(LIBSTDC_STUBS_LIB) @echo "LD: $<" - @$(LD) $(NXFLATLDFLAGS1) -o $@ $^ + $(Q) $(LD) $(NXFLATLDFLAGS1) -o $@ $^ $(R2SRC2): $(BIN2).r1 @echo "MK: $<" - @$(MKNXFLAT) -o $@ $^ + $(Q) $(MKNXFLAT) -o $@ $^ $(BIN2).r2: $(R2OBJ2) - @$(LD) $(NXFLATLDFLAGS2) -o $@ $(R1OBJS2) $(R2OBJ2) + $(Q) $(LD) $(NXFLATLDFLAGS2) -o $@ $(R1OBJS2) $(R2OBJ2) $(BIN2): $(BIN2).r2 @echo "LD: $<" - @$(LDNXFLAT) $(LDNXFLATFLAGS) -o $@ $^ + $(Q) $(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 together the correct @@ -130,19 +129,19 @@ $(BIN2): $(BIN2).r2 $(BIN3).r1: $(R1OBJS3) $(LIBSTDC_STUBS_LIB) @echo "LD: $<" - @$(LD) $(NXFLATLDFLAGS1) -o $@ $^ + $(Q) $(LD) $(NXFLATLDFLAGS1) -o $@ $^ $(R2SRC3): $(BIN3).r1 @echo "MK: $<" - @$(MKNXFLAT) -o $@ $^ + $(Q) $(MKNXFLAT) -o $@ $^ $(BIN3).r2: $(R2OBJ3) @echo "LD: $<" - @$(LD) $(NXFLATLDFLAGS2) -o $@ $(R1OBJS3) $(R2OBJ3) + $(Q) $(LD) $(NXFLATLDFLAGS2) -o $@ $(R1OBJS3) $(R2OBJ3) $(BIN3): $(BIN3).r2 @echo "LD: $<" - @$(LDNXFLAT) $(LDNXFLATFLAGS) -o $@ $^ + $(Q) $(LDNXFLAT) $(LDNXFLATFLAGS) -o $@ $^ # BIN4 is similar to BIN3 except that it uses the streams code from libstdc++ # @@ -164,13 +163,23 @@ $(BIN3): $(BIN3).r2 # $(LDNXFLAT) $(LDNXFLATFLAGS) -o $@ $^ clean: - @rm -f $(ALL_BIN) $(DERIVED) *.o *.r1 *.r2 *~ .*.swp core + $(call DELFILE $(BIN1)) + $(call DELFILE $(BIN2)) + $(call DELFILE $(BIN3)) + $(call DELFILE $(BIN4)) + $(call DELFILE $(R2SRC1)) + $(call DELFILE $(R2SRC2)) + $(call DELFILE $(R2SRC3)) + $(call DELFILE $(R2SRC4)) + $(call DELFILE *.r1) + $(call DELFILE *.r2) + $(call CLEAN) 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) + $(Q) install -D $(BIN1) $(ROMFS_DIR)/$(BIN1) + $(Q) install -D $(BIN2) $(ROMFS_DIR)/$(BIN2) + $(Q) install -D $(BIN3) $(ROMFS_DIR)/$(BIN3) +# $(Q) install -D $(BIN4) $(ROMFS_DIR)/$(BIN4) diff --git a/apps/examples/nxflat/tests/hello/Makefile b/apps/examples/nxflat/tests/hello/Makefile index e7e66c628c..cf1a4eb80c 100644 --- a/apps/examples/nxflat/tests/hello/Makefile +++ b/apps/examples/nxflat/tests/hello/Makefile @@ -33,8 +33,7 @@ # ############################################################################ --include $(TOPDIR)/.config # Current configuration --include $(TOPDIR)/Make.defs # Basic make info +-include $(TOPDIR)/Make.defs BIN = hello @@ -48,31 +47,35 @@ all: $(BIN) $(R1OBJS): %.o: %.c @echo "CC: $<" - @$(CC) -c $(CPICFLAGS) $< -o $@ + $(Q) $(CC) -c $(CPICFLAGS) $< -o $@ $(R2OBJ): %.o: %.S @echo "AS: $<" - @$(CC) -c $(CPICFLAGS) $< -o $@ + $(Q) $(CC) -c $(CPICFLAGS) $< -o $@ $(BIN).r1: $(R1OBJS) @echo "LD: $<" - @$(LD) $(NXFLATLDFLAGS1) -o $@ $^ + $(Q) $(LD) $(NXFLATLDFLAGS1) -o $@ $^ $(R2SRC): $(BIN).r1 @echo "MK: $<" - @$(MKNXFLAT) -o $@ $^ + $(Q) $(MKNXFLAT) -o $@ $^ $(BIN).r2: $(R2OBJ) @echo "LD: $<" - @$(LD) $(NXFLATLDFLAGS2) -o $@ $(R1OBJS) $(R2OBJ) + $(Q) $(LD) $(NXFLATLDFLAGS2) -o $@ $(R1OBJS) $(R2OBJ) $(BIN): $(BIN).r2 @echo "LD: $<" - @$(LDNXFLAT) $(LDNXFLATFLAGS) -o $@ $^ + $(Q) $(LDNXFLAT) $(LDNXFLATFLAGS) -o $@ $^ clean: - @rm -f $(BIN) $(R2SRC) *.o *.r1 *.r2 *~ .*.swp core + $(call DELFILE $(BIN)) + $(call DELFILE $(R2SRC)) + $(call DELFILE *.r1) + $(call DELFILE *.r2) + $(call CLEAN) install: - @install -D $(BIN) $(ROMFS_DIR)/$(BIN) + $(Q) install -D $(BIN) $(ROMFS_DIR)/$(BIN) diff --git a/apps/examples/nxflat/tests/longjmp/Makefile b/apps/examples/nxflat/tests/longjmp/Makefile index 47a1c4905c..55deadbb73 100644 --- a/apps/examples/nxflat/tests/longjmp/Makefile +++ b/apps/examples/nxflat/tests/longjmp/Makefile @@ -33,8 +33,7 @@ # ############################################################################ --include $(TOPDIR)/.config # Current configuration --include $(TOPDIR)/Make.defs # Basic make info +-include $(TOPDIR)/Make.defs BIN = longjmp @@ -48,31 +47,35 @@ all: $(BIN) $(R1OBJS): %.o: %.c @echo "CC: $<" - @$(CC) -c $(CPICFLAGS) $< -o $@ + $(Q) $(CC) -c $(CPICFLAGS) $< -o $@ $(R2OBJ): %.o: %.S @echo "AS: $<" - @$(CC) -c $(CPICFLAGS) $< -o $@ + $(Q) $(CC) -c $(CPICFLAGS) $< -o $@ $(BIN).r1: $(R1OBJS) @echo "LD: $<" - @$(LD) $(NXFLATLDFLAGS1) -o $@ $^ + $(Q) $(LD) $(NXFLATLDFLAGS1) -o $@ $^ $(R2SRC): $(BIN).r1 @echo "MK: $<" - @$(MKNXFLAT) -o $@ $^ + $(Q) $(MKNXFLAT) -o $@ $^ $(BIN).r2: $(R2OBJ) @echo "LD: $<" - @$(LD) $(NXFLATLDFLAGS2) -o $@ $(R1OBJS) $(R2OBJ) + $(Q) $(LD) $(NXFLATLDFLAGS2) -o $@ $(R1OBJS) $(R2OBJ) $(BIN): $(BIN).r2 @echo "LD: $<" - @$(LDNXFLAT) $(LDNXFLATFLAGS) -o $@ $^ + $(Q) $(LDNXFLAT) $(LDNXFLATFLAGS) -o $@ $^ clean: - @rm -f $(BIN) $(R2SRC) *.o *.r1 *.r2 *~ .*.swp core + $(call DELFILE $(BIN)) + $(call DELFILE $(R2SRC)) + $(call DELFILE *.r1) + $(call DELFILE *.r2) + $(call CLEAN) install: - @install -D $(BIN) $(ROMFS_DIR)/$(BIN) + $(Q) install -D $(BIN) $(ROMFS_DIR)/$(BIN) diff --git a/apps/examples/nxflat/tests/mutex/Makefile b/apps/examples/nxflat/tests/mutex/Makefile index fe66848568..97e5c356e6 100644 --- a/apps/examples/nxflat/tests/mutex/Makefile +++ b/apps/examples/nxflat/tests/mutex/Makefile @@ -33,8 +33,7 @@ # ############################################################################ --include $(TOPDIR)/.config # Current configuration --include $(TOPDIR)/Make.defs # Basic make info +-include $(TOPDIR)/Make.defs BIN = mutex @@ -48,31 +47,35 @@ all: $(BIN) $(R1OBJS): %.o: %.c @echo "CC: $<" - @$(CC) -c $(CPICFLAGS) $< -o $@ + $(Q) $(CC) -c $(CPICFLAGS) $< -o $@ $(R2OBJ): %.o: %.S @echo "AS: $<" - @$(CC) -c $(CPICFLAGS) $< -o $@ + $(Q) $(CC) -c $(CPICFLAGS) $< -o $@ $(BIN).r1: $(R1OBJS) @echo "LD: $<" - @$(LD) $(NXFLATLDFLAGS1) -o $@ $^ + $(Q) $(LD) $(NXFLATLDFLAGS1) -o $@ $^ $(R2SRC): $(BIN).r1 @echo "MK: $<" - @$(MKNXFLAT) -o $@ $^ + $(Q) $(MKNXFLAT) -o $@ $^ $(BIN).r2: $(R2OBJ) @echo "LD: $<" - @$(LD) $(NXFLATLDFLAGS2) -o $@ $(R1OBJS) $(R2OBJ) + $(Q) $(LD) $(NXFLATLDFLAGS2) -o $@ $(R1OBJS) $(R2OBJ) $(BIN): $(BIN).r2 @echo "LD: $<" - @$(LDNXFLAT) $(LDNXFLATFLAGS) -o $@ $^ + $(Q) $(LDNXFLAT) $(LDNXFLATFLAGS) -o $@ $^ clean: - @rm -f $(BIN) $(R2SRC) *.o *.r1 *.r2 *~ .*.swp core + $(call DELFILE $(BIN)) + $(call DELFILE $(R2SRC)) + $(call DELFILE *.r1) + $(call DELFILE *.r2) + $(call CLEAN) install: - @install -D $(BIN) $(ROMFS_DIR)/$(BIN) + $(Q) install -D $(BIN) $(ROMFS_DIR)/$(BIN) diff --git a/apps/examples/nxflat/tests/pthread/Makefile b/apps/examples/nxflat/tests/pthread/Makefile index f645441ade..5dd6a2a10d 100644 --- a/apps/examples/nxflat/tests/pthread/Makefile +++ b/apps/examples/nxflat/tests/pthread/Makefile @@ -48,31 +48,35 @@ all: $(BIN) $(R1OBJS): %.o: %.c @echo "CC: $<" - @$(CC) -c $(CPICFLAGS) $< -o $@ + $(Q) $(CC) -c $(CPICFLAGS) $< -o $@ $(R2OBJ): %.o: %.S @echo "AS: $<" - @$(CC) -c $(CPICFLAGS) $< -o $@ + $(Q) $(CC) -c $(CPICFLAGS) $< -o $@ $(BIN).r1: $(R1OBJS) @echo "LD: $<" - @$(LD) $(NXFLATLDFLAGS1) -o $@ $^ + $(Q) $(LD) $(NXFLATLDFLAGS1) -o $@ $^ $(R2SRC): $(BIN).r1 @echo "MK: $<" - @$(MKNXFLAT) -o $@ $^ + $(Q) $(MKNXFLAT) -o $@ $^ $(BIN).r2: $(R2OBJ) @echo "LD: $<" - @$(LD) $(NXFLATLDFLAGS2) -o $@ $(R1OBJS) $(R2OBJ) + $(Q) $(LD) $(NXFLATLDFLAGS2) -o $@ $(R1OBJS) $(R2OBJ) $(BIN): $(BIN).r2 @echo "LD: $<" - @$(LDNXFLAT) $(LDNXFLATFLAGS) -o $@ $^ + $(Q) $(LDNXFLAT) $(LDNXFLATFLAGS) -o $@ $^ clean: - @rm -f $(BIN) $(R2SRC) *.o *.r1 *.r2 *~ .*.swp core + $(call DELFILE $(BIN)) + $(call DELFILE $(R2SRC)) + $(call DELFILE *.r1) + $(call DELFILE *.r2) + $(call CLEAN) install: - @install -D $(BIN) $(ROMFS_DIR)/$(BIN) + $(Q) install -D $(BIN) $(ROMFS_DIR)/$(BIN) diff --git a/apps/examples/nxflat/tests/signal/Makefile b/apps/examples/nxflat/tests/signal/Makefile index 222c57dbe4..e39f3a8d49 100644 --- a/apps/examples/nxflat/tests/signal/Makefile +++ b/apps/examples/nxflat/tests/signal/Makefile @@ -33,8 +33,7 @@ # ############################################################################ --include $(TOPDIR)/.config # Current configuration --include $(TOPDIR)/Make.defs # Basic make info +-include $(TOPDIR)/Make.defs BIN = signal @@ -48,31 +47,35 @@ all: $(BIN) $(R1OBJS): %.o: %.c @echo "CC: $<" - @$(CC) -c $(CPICFLAGS) $< -o $@ + $(Q) $(CC) -c $(CPICFLAGS) $< -o $@ $(R2OBJ): %.o: %.S @echo "AS: $<" - @$(CC) -c $(CPICFLAGS) $< -o $@ + $(Q) $(CC) -c $(CPICFLAGS) $< -o $@ $(BIN).r1: $(R1OBJS) @echo "LD: $<" - @$(LD) $(NXFLATLDFLAGS1) -o $@ $^ + $(Q) $(LD) $(NXFLATLDFLAGS1) -o $@ $^ $(R2SRC): $(BIN).r1 @echo "MK: $<" - @$(MKNXFLAT) -o $@ $^ + $(Q) $(MKNXFLAT) -o $@ $^ $(BIN).r2: $(R2OBJ) @echo "LD: $<" - @$(LD) $(NXFLATLDFLAGS2) -o $@ $(R1OBJS) $(R2OBJ) + $(Q) $(LD) $(NXFLATLDFLAGS2) -o $@ $(R1OBJS) $(R2OBJ) $(BIN): $(BIN).r2 @echo "LD: $<" - @$(LDNXFLAT) $(LDNXFLATFLAGS) -o $@ $^ + $(Q) $(LDNXFLAT) $(LDNXFLATFLAGS) -o $@ $^ clean: - @rm -f $(BIN) $(R2SRC) *.o *.r1 *.r2 *~ .*.swp core + $(call DELFILE $(BIN)) + $(call DELFILE $(R2SRC)) + $(call DELFILE *.r1) + $(call DELFILE *.r2) + $(call CLEAN) install: - @install -D $(BIN) $(ROMFS_DIR)/$(BIN) + $(Q) install -D $(BIN) $(ROMFS_DIR)/$(BIN) diff --git a/apps/examples/nxflat/tests/struct/Makefile b/apps/examples/nxflat/tests/struct/Makefile index 69f9dd2f3e..ac789f3f40 100644 --- a/apps/examples/nxflat/tests/struct/Makefile +++ b/apps/examples/nxflat/tests/struct/Makefile @@ -33,8 +33,7 @@ # ############################################################################ --include $(TOPDIR)/.config # Current configuration --include $(TOPDIR)/Make.defs # Basic make info +-include $(TOPDIR)/Make.defs CFLAGS += -I. @@ -50,31 +49,35 @@ all: $(BIN) $(R1OBJS): %.o: %.c @echo "CC: $<" - @$(CC) -c $(CPICFLAGS) $< -o $@ + $(Q) $(CC) -c $(CPICFLAGS) $< -o $@ $(R2OBJ): %.o: %.S @echo "AS: $<" - @$(CC) -c $(CPICFLAGS) $< -o $@ + $(Q) $(CC) -c $(CPICFLAGS) $< -o $@ $(BIN).r1: $(R1OBJS) @echo "LD: $<" - @$(LD) $(NXFLATLDFLAGS1) -o $@ $^ + $(Q) $(LD) $(NXFLATLDFLAGS1) -o $@ $^ $(R2SRC): $(BIN).r1 @echo "MK: $<" - @$(MKNXFLAT) -o $@ $^ + $(Q) $(MKNXFLAT) -o $@ $^ $(BIN).r2: $(R2OBJ) @echo "LD: $<" - @$(LD) $(NXFLATLDFLAGS2) -o $@ $(R1OBJS) $(R2OBJ) + $(Q) $(LD) $(NXFLATLDFLAGS2) -o $@ $(R1OBJS) $(R2OBJ) $(BIN): $(BIN).r2 @echo "LD: $<" - @$(LDNXFLAT) $(LDNXFLATFLAGS) -o $@ $^ + $(Q) $(LDNXFLAT) $(LDNXFLATFLAGS) -o $@ $^ clean: - @rm -f $(BIN) $(R2SRC) *.o *.r1 *.r2 *~ .*.swp core + $(call DELFILE $(BIN)) + $(call DELFILE $(R2SRC)) + $(call DELFILE *.r1) + $(call DELFILE *.r2) + $(call CLEAN) install: - @install -D $(BIN) $(ROMFS_DIR)/$(BIN) + $(Q) install -D $(BIN) $(ROMFS_DIR)/$(BIN) diff --git a/apps/examples/nxflat/tests/task/Makefile b/apps/examples/nxflat/tests/task/Makefile index 8b17ec822e..d27213817b 100644 --- a/apps/examples/nxflat/tests/task/Makefile +++ b/apps/examples/nxflat/tests/task/Makefile @@ -33,8 +33,7 @@ # ############################################################################ --include $(TOPDIR)/.config # Current configuration --include $(TOPDIR)/Make.defs # Basic make info +-include $(TOPDIR)/Make.defs BIN = task @@ -48,32 +47,36 @@ all: $(BIN) $(R1OBJS): %.o: %.c @echo "CC: $<" - @$(CC) -c $(CPICFLAGS) $< -o $@ + $(Q) $(CC) -c $(CPICFLAGS) $< -o $@ $(R2OBJ): %.o: %.S @echo "AS: $<" - @$(CC) -c $(CPICFLAGS) $< -o $@ + $(Q) $(CC) -c $(CPICFLAGS) $< -o $@ $(BIN).r1: $(R1OBJS) @echo "LD: $<" - @$(LD) $(NXFLATLDFLAGS1) -o $@ $^ + $(Q) $(LD) $(NXFLATLDFLAGS1) -o $@ $^ $(R2SRC): $(BIN).r1 @echo "MK: $<" - @$(MKNXFLAT) -o $@ $^ + $(Q) $(MKNXFLAT) -o $@ $^ $(BIN).r2: $(R2OBJ) @echo "LD: $<" - @$(LD) $(NXFLATLDFLAGS2) -o $@ $(R1OBJS) $(R2OBJ) + $(Q) $(LD) $(NXFLATLDFLAGS2) -o $@ $(R1OBJS) $(R2OBJ) $(BIN): $(BIN).r2 @echo "LD: $<" - @$(LDNXFLAT) $(LDNXFLATFLAGS) -o $@ $^ + $(Q) $(LDNXFLAT) $(LDNXFLATFLAGS) -o $@ $^ clean: - @rm -f $(BIN) $(R2SRC) *.o *.r1 *.r2 *~ .*.swp core + $(call DELFILE $(BIN)) + $(call DELFILE $(R2SRC)) + $(call DELFILE *.r1) + $(call DELFILE *.r2) + $(call CLEAN) install: - @install -D $(BIN) $(ROMFS_DIR)/$(BIN) + $(Q) install -D $(BIN) $(ROMFS_DIR)/$(BIN) diff --git a/apps/examples/nxhello/Makefile b/apps/examples/nxhello/Makefile index 6ab65c53d8..be52882c36 100644 --- a/apps/examples/nxhello/Makefile +++ b/apps/examples/nxhello/Makefile @@ -98,10 +98,11 @@ context: .context depend: .depend clean: - @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/nximage/Makefile b/apps/examples/nximage/Makefile index b552c0bf69..b20e463509 100644 --- a/apps/examples/nximage/Makefile +++ b/apps/examples/nximage/Makefile @@ -98,10 +98,11 @@ context: .context depend: .depend clean: - @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/nxlines/Makefile b/apps/examples/nxlines/Makefile index b52da37d2b..cd5753ef9b 100644 --- a/apps/examples/nxlines/Makefile +++ b/apps/examples/nxlines/Makefile @@ -98,10 +98,11 @@ context: .context depend: .depend clean: - @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/nxtext/Makefile b/apps/examples/nxtext/Makefile index 5067d2af78..68c4a026f8 100644 --- a/apps/examples/nxtext/Makefile +++ b/apps/examples/nxtext/Makefile @@ -102,10 +102,11 @@ context: .context depend: .depend clean: - @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/ostest/Makefile b/apps/examples/ostest/Makefile index e490139187..2d93126ad8 100644 --- a/apps/examples/ostest/Makefile +++ b/apps/examples/ostest/Makefile @@ -142,10 +142,11 @@ context: .context depend: .depend clean: - @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/pashello/Makefile b/apps/examples/pashello/Makefile index af33975d0e..df86e7d626 100644 --- a/apps/examples/pashello/Makefile +++ b/apps/examples/pashello/Makefile @@ -86,10 +86,11 @@ context: depend: .depend clean: - @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/pipe/Makefile b/apps/examples/pipe/Makefile index e0168ed0af..e6cefbcdbd 100644 --- a/apps/examples/pipe/Makefile +++ b/apps/examples/pipe/Makefile @@ -86,10 +86,11 @@ context: depend: .depend clean: - @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/poll/Makefile b/apps/examples/poll/Makefile index 89b3145117..dc33d6b491 100644 --- a/apps/examples/poll/Makefile +++ b/apps/examples/poll/Makefile @@ -87,10 +87,12 @@ context: depend: .depend clean: - @rm -f *.o *~ .*.swp .built + $(call DELFILE .built) $(call CLEAN) distclean: clean - @rm -f Make.dep .depend host + $(call DELFILE Make.dep) + $(call DELFILE .depend) + $(call DELFILE host$(HOSTEXEEXT)) -include Make.dep diff --git a/apps/examples/pwm/Makefile b/apps/examples/pwm/Makefile index 6aeb385948..c7cc700bdc 100644 --- a/apps/examples/pwm/Makefile +++ b/apps/examples/pwm/Makefile @@ -96,10 +96,11 @@ context: .context depend: .depend clean: - @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/qencoder/Makefile b/apps/examples/qencoder/Makefile index 483043c46c..817ba17cc0 100644 --- a/apps/examples/qencoder/Makefile +++ b/apps/examples/qencoder/Makefile @@ -98,10 +98,11 @@ context: .context depend: .depend clean: - @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/relays/Makefile b/apps/examples/relays/Makefile index bb988f7756..385bc85203 100644 --- a/apps/examples/relays/Makefile +++ b/apps/examples/relays/Makefile @@ -98,10 +98,11 @@ context: .context depend: .depend clean: - @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/rgmp/Makefile b/apps/examples/rgmp/Makefile index c7e2c59797..72d5e660a0 100644 --- a/apps/examples/rgmp/Makefile +++ b/apps/examples/rgmp/Makefile @@ -86,10 +86,11 @@ context: depend: .depend clean: - @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/romfs/Makefile b/apps/examples/romfs/Makefile index 3701412762..5190a7a6e8 100644 --- a/apps/examples/romfs/Makefile +++ b/apps/examples/romfs/Makefile @@ -103,11 +103,13 @@ context: depend: .depend clean: - @rm -f *.o *~ .*.swp .built + $(call DELFILE .built) $(call CLEAN) distclean: clean - @rm -f Make.dep .depend testdir.img + $(call DELFILE Make.dep) + $(call DELFILE .depend) + $(call DELFILE testdir.img) -include Make.dep diff --git a/apps/examples/sendmail/Makefile b/apps/examples/sendmail/Makefile index e8d05ceabd..049321b524 100644 --- a/apps/examples/sendmail/Makefile +++ b/apps/examples/sendmail/Makefile @@ -87,12 +87,13 @@ context: depend: .depend clean: - @rm -f *.o *~ .*.swp .built + $(call DELFILE .built) $(call CLEAN) @$(MAKE) -f Makefile.host clean TOPDIR="$(TOPDIR)" APPDIR="$(APPDIR)" distclean: clean - @rm -f Make.dep .depend + $(call DELFILE Make.dep) + $(call DELFILE .depend) -include Make.dep diff --git a/apps/examples/sendmail/Makefile.host b/apps/examples/sendmail/Makefile.host index bef7eebbfc..e6ff39540d 100644 --- a/apps/examples/sendmail/Makefile.host +++ b/apps/examples/sendmail/Makefile.host @@ -71,7 +71,9 @@ $(BIN): headers $(OBJS) $(HOSTCC) $(HOSTLDFLAGS) $(OBJS) -o $@ clean: - @rm -f $(BIN).* *.o1 *~ + $(call DELFILE $(BIN).*) + $(call DELFILE *.o1) + $(call CLEAN) @rm -rf include diff --git a/apps/examples/serloop/Makefile b/apps/examples/serloop/Makefile index ecf7984e53..01d2c60fef 100644 --- a/apps/examples/serloop/Makefile +++ b/apps/examples/serloop/Makefile @@ -87,11 +87,12 @@ context: depend: .depend clean: - @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/telnetd/Makefile b/apps/examples/telnetd/Makefile index 7c541cba98..a1f0f7c63e 100644 --- a/apps/examples/telnetd/Makefile +++ b/apps/examples/telnetd/Makefile @@ -98,10 +98,11 @@ context: .context depend: .depend clean: - @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/thttpd/Makefile b/apps/examples/thttpd/Makefile index 10bcb9af07..5320a0a131 100644 --- a/apps/examples/thttpd/Makefile +++ b/apps/examples/thttpd/Makefile @@ -89,12 +89,13 @@ context: depend: .depend clean: - @rm -f *.o *~ .*.swp .built + $(call DELFILE .built) @$(MAKE) -C content clean TOPDIR="$(TOPDIR)" APPDIR="$(APPDIR)" CROSSDEV=$(CROSSDEV) $(call CLEAN) distclean: clean - @rm -f Make.dep .depend + $(call DELFILE Make.dep) + $(call DELFILE .depend) -include Make.dep diff --git a/apps/examples/thttpd/content/Makefile b/apps/examples/thttpd/content/Makefile index 1f5ce42469..8a74201b5a 100644 --- a/apps/examples/thttpd/content/Makefile +++ b/apps/examples/thttpd/content/Makefile @@ -97,8 +97,10 @@ $(SYMTAB): build # Clean each subdirectory clean: $(foreach DIR, $(SUBDIRS), $(DIR)_clean) - @rm -f $(ROMFS_HDR) $(ROMFS_IMG) $(SYMTAB) + $(call DELFILE$(ROMFS_HDR)) + $(call DELFILE $(ROMFS_IMG)) + $(call DELFILE $(SYMTAB)) @rm -rf $(ROMFS_DIR) - @rm -f *~ .*.swp + $(call CLEAN) diff --git a/apps/examples/thttpd/content/hello/Makefile b/apps/examples/thttpd/content/hello/Makefile index 76d4e67c89..74ff2116af 100644 --- a/apps/examples/thttpd/content/hello/Makefile +++ b/apps/examples/thttpd/content/hello/Makefile @@ -33,8 +33,7 @@ # ############################################################################ --include $(TOPDIR)/.config # Current configuration --include $(TOPDIR)/Make.defs # Basic make info +-include $(TOPDIR)/Make.defs BIN = hello @@ -48,31 +47,35 @@ all: $(BIN) $(R1OBJS): %.o: %.c @echo "CC: $<" - @$(CC) -c $(CPICFLAGS) $< -o $@ + $(Q) $(CC) -c $(CPICFLAGS) $< -o $@ $(R2OBJ): %.o: %.S @echo "AS: $<" - @$(CC) -c $(CPICFLAGS) $< -o $@ + $(Q) $(CC) -c $(CPICFLAGS) $< -o $@ $(BIN).r1: $(R1OBJS) @echo "LD: $<" - @$(LD) $(NXFLATLDFLAGS1) -o $@ $^ + $(Q) $(LD) $(NXFLATLDFLAGS1) -o $@ $^ $(R2SRC): $(BIN).r1 @echo "MK: $<" - @$(MKNXFLAT) -o $@ $^ + $(Q) $(MKNXFLAT) -o $@ $^ $(BIN).r2: $(R2OBJ) @echo "LD: $<" - @$(LD) $(NXFLATLDFLAGS2) -o $@ $(R1OBJS) $(R2OBJ) + $(Q) $(LD) $(NXFLATLDFLAGS2) -o $@ $(R1OBJS) $(R2OBJ) $(BIN): $(BIN).r2 @echo "LD: $<" - @$(LDNXFLAT) $(LDNXFLATFLAGS) -o $@ $^ + $(Q) $(LDNXFLAT) $(LDNXFLATFLAGS) -o $@ $^ clean: - @rm -f $(BIN) $(R2SRC) *.o *.r1 *.r2 *~ .*.swp core + $(call DELFILE $(BIN)) + $(call DELFILE $(R2SRC)) + $(call DELFILE *.r1) + $(call DELFILE *.r2) + $(call CLEAN) install: - @install -m 0755 -D $(BIN) $(CGI_DIR)/$(BIN) + $(Q) install -m 0755 -D $(BIN) $(CGI_DIR)/$(BIN) diff --git a/apps/examples/thttpd/content/netstat/Makefile b/apps/examples/thttpd/content/netstat/Makefile index 9769c92070..d9953547af 100644 --- a/apps/examples/thttpd/content/netstat/Makefile +++ b/apps/examples/thttpd/content/netstat/Makefile @@ -33,8 +33,7 @@ # ############################################################################ --include $(TOPDIR)/.config # Current configuration --include $(TOPDIR)/Make.defs # Basic make info +-include $(TOPDIR)/Make.defs BIN = netstat @@ -48,31 +47,35 @@ all: $(BIN) $(R1OBJS): %.o: %.c @echo "CC: $<" - @$(CC) -c $(CPICFLAGS) $< -o $@ + $(Q) $(CC) -c $(CPICFLAGS) $< -o $@ $(R2OBJ): %.o: %.S @echo "AS: $<" - @$(CC) -c $(CPICFLAGS) $< -o $@ + $(Q) $(CC) -c $(CPICFLAGS) $< -o $@ $(BIN).r1: $(R1OBJS) @echo "LD: $<" - @$(LD) $(NXFLATLDFLAGS1) -o $@ $^ + $(Q) $(LD) $(NXFLATLDFLAGS1) -o $@ $^ $(R2SRC): $(BIN).r1 @echo "MK: $<" - @$(MKNXFLAT) -o $@ $^ + $(Q) $(MKNXFLAT) -o $@ $^ $(BIN).r2: $(R2OBJ) @echo "LD: $<" - @$(LD) $(NXFLATLDFLAGS2) -o $@ $(R1OBJS) $(R2OBJ) + $(Q) $(LD) $(NXFLATLDFLAGS2) -o $@ $(R1OBJS) $(R2OBJ) $(BIN): $(BIN).r2 @echo "LD: $<" - @$(LDNXFLAT) $(LDNXFLATFLAGS) -o $@ $^ + $(Q) $(LDNXFLAT) $(LDNXFLATFLAGS) -o $@ $^ clean: - @rm -f $(BIN) $(R2SRC) *.o *.r1 *.r2 *~ .*.swp core + $(call DELFILE $(BIN)) + $(call DELFILE $(R2SRC)) + $(call DELFILE *.r1) + $(call DELFILE *.r2) + $(call CLEAN) install: - @install -m 0755 -D $(BIN) $(CGI_DIR)/$(BIN) + $(Q) install -m 0755 -D $(BIN) $(CGI_DIR)/$(BIN) diff --git a/apps/examples/thttpd/content/tasks/Makefile b/apps/examples/thttpd/content/tasks/Makefile index b76c3f22a0..c668285d8b 100644 --- a/apps/examples/thttpd/content/tasks/Makefile +++ b/apps/examples/thttpd/content/tasks/Makefile @@ -33,8 +33,7 @@ # ############################################################################ --include $(TOPDIR)/.config # Current configuration --include $(TOPDIR)/Make.defs # Basic make info +-include $(TOPDIR)/Make.defs BIN = tasks @@ -48,31 +47,35 @@ all: $(BIN) $(R1OBJS): %.o: %.c @echo "CC: $<" - @$(CC) -c $(CPICFLAGS) $< -o $@ + $(Q) $(CC) -c $(CPICFLAGS) $< -o $@ $(R2OBJ): %.o: %.S @echo "AS: $<" - @$(CC) -c $(CPICFLAGS) $< -o $@ + $(Q) $(CC) -c $(CPICFLAGS) $< -o $@ $(BIN).r1: $(R1OBJS) @echo "LD: $<" - @$(LD) $(NXFLATLDFLAGS1) -o $@ $^ + $(Q) $(LD) $(NXFLATLDFLAGS1) -o $@ $^ $(R2SRC): $(BIN).r1 @echo "MK: $<" - @$(MKNXFLAT) -o $@ $^ + $(Q) $(MKNXFLAT) -o $@ $^ $(BIN).r2: $(R2OBJ) @echo "LD: $<" - @$(LD) $(NXFLATLDFLAGS2) -o $@ $(R1OBJS) $(R2OBJ) + $(Q) $(LD) $(NXFLATLDFLAGS2) -o $@ $(R1OBJS) $(R2OBJ) $(BIN): $(BIN).r2 @echo "LD: $<" - @$(LDNXFLAT) $(LDNXFLATFLAGS) -o $@ $^ + $(Q) $(LDNXFLAT) $(LDNXFLATFLAGS) -o $@ $^ clean: - @rm -f $(BIN) $(R2SRC) *.o *.r1 *.r2 *~ .*.swp core + $(call DELFILE $(BIN)) + $(call DELFILE $(R2SRC)) + $(call DELFILE *.r1) + $(call DELFILE *.r2) + $(call CLEAN) install: - @install -m 0755 -D $(BIN) $(CGI_DIR)/$(BIN) + $(Q) install -m 0755 -D $(BIN) $(CGI_DIR)/$(BIN) diff --git a/apps/examples/tiff/Makefile b/apps/examples/tiff/Makefile index 73a687c253..373c07ca7c 100644 --- a/apps/examples/tiff/Makefile +++ b/apps/examples/tiff/Makefile @@ -98,11 +98,14 @@ context: .context depend: .depend clean: - @rm -f *.o *~ .*.swp .built - @rm -f result.tif tmpfile1.dat tmpfile2.dat + $(call DELFILE .built) + $(call DELFILE result.tif) + $(call DELFILE tmpfile1.dat) + $(call DELFILE tmpfile2.dat) $(call CLEAN) distclean: clean - @rm -f Make.dep .depend + $(call DELFILE Make.dep) + $(call DELFILE .depend) -include Make.dep diff --git a/apps/examples/touchscreen/Makefile b/apps/examples/touchscreen/Makefile index ad10363161..f252966201 100644 --- a/apps/examples/touchscreen/Makefile +++ b/apps/examples/touchscreen/Makefile @@ -98,10 +98,11 @@ context: .context depend: .depend clean: - @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/udp/Makefile b/apps/examples/udp/Makefile index d6c89cac44..79606c69b3 100644 --- a/apps/examples/udp/Makefile +++ b/apps/examples/udp/Makefile @@ -116,11 +116,14 @@ context: depend: .depend clean: - @rm -f $(TARG_BIN) $(HOST_BIN) *.o *~ .*.swp .built + $(call DELFILE .built) + $(call DELFILE $(TARG_BIN)) + $(call DELFILE $(HOST_BIN)) $(call CLEAN) distclean: clean - @rm -f Make.dep .depend + $(call DELFILE Make.dep) + $(call DELFILE .depend) -include Make.dep diff --git a/apps/examples/uip/Makefile b/apps/examples/uip/Makefile index 487512072e..99e140f043 100644 --- a/apps/examples/uip/Makefile +++ b/apps/examples/uip/Makefile @@ -89,12 +89,13 @@ context: epend: .depend clean: - @rm -f *.o *~ .*.swp .built - @rm -f httpd_fsdata.c + $(call DELFILE .built) + $(call DELFILE httpd_fsdata.c) $(call CLEAN) distclean: clean - @rm -f Make.dep .depend + $(call DELFILE Make.dep) + $(call DELFILE .depend) -include Make.dep diff --git a/apps/examples/usbserial/Makefile b/apps/examples/usbserial/Makefile index 0761dd48c7..2c34fa2757 100644 --- a/apps/examples/usbserial/Makefile +++ b/apps/examples/usbserial/Makefile @@ -33,7 +33,6 @@ # ############################################################################ --include $(TOPDIR)/.config -include $(TOPDIR)/Make.defs include $(APPDIR)/Make.defs @@ -86,12 +85,13 @@ context: depend: .depend clean: - @rm -f *.o *~ .*.swp .built + $(call DELFILE .built) $(call CLEAN) @$(MAKE) -f Makefile.host clean TOPDIR="$(TOPDIR)" APPDIR="$(APPDIR)" distclean: clean - @rm -f Make.dep .depend + $(call DELFILE Make.dep) + $(call DELFILE .depend) -include Make.dep diff --git a/apps/examples/usbserial/Makefile.host b/apps/examples/usbserial/Makefile.host index 628304cd4e..9fb43269d5 100644 --- a/apps/examples/usbserial/Makefile.host +++ b/apps/examples/usbserial/Makefile.host @@ -35,7 +35,6 @@ # TOPDIR must be defined on the make command line --include $(TOPDIR)/.config -include $(TOPDIR)/Make.defs SRC = host.c @@ -61,7 +60,5 @@ $(BIN): $(SRC) @$(HOSTCC) $(HOSTCFLAGS) $(DEFINES) $^ -o $@ clean: - @rm -f $(BIN) *~ .*.swp *.o + $(call DELFILE $(BIN)) $(call CLEAN) - - diff --git a/apps/examples/usbstorage/Makefile b/apps/examples/usbstorage/Makefile index 8c142e0c63..4c8323e005 100644 --- a/apps/examples/usbstorage/Makefile +++ b/apps/examples/usbstorage/Makefile @@ -103,11 +103,12 @@ context: .context depend: .depend clean: - @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/usbterm/Makefile b/apps/examples/usbterm/Makefile index 6622759f6d..acf9812bd6 100644 --- a/apps/examples/usbterm/Makefile +++ b/apps/examples/usbterm/Makefile @@ -98,11 +98,12 @@ context: .context depend: .depend clean: - @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/watchdog/Makefile b/apps/examples/watchdog/Makefile index f3c9a8bf93..8bbdbfea61 100644 --- a/apps/examples/watchdog/Makefile +++ b/apps/examples/watchdog/Makefile @@ -96,10 +96,11 @@ context: .context depend: .depend clean: - @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/wget/Makefile b/apps/examples/wget/Makefile index 859ae999d8..d74c248e91 100644 --- a/apps/examples/wget/Makefile +++ b/apps/examples/wget/Makefile @@ -86,12 +86,13 @@ context: depend: .depend clean: - @rm -f *.o *~ .*.swp .built + $(call DELFILE .built) $(call CLEAN) @$(MAKE) -f Makefile.host clean TOPDIR="$(TOPDIR)" APPDIR="$(APPDIR)" distclean: clean - @rm -f Make.dep .depend + $(call DELFILE Make.dep) + $(call DELFILE .depend) -include Make.dep diff --git a/apps/examples/wget/Makefile.host b/apps/examples/wget/Makefile.host index 5d746441a8..14da45c7e9 100644 --- a/apps/examples/wget/Makefile.host +++ b/apps/examples/wget/Makefile.host @@ -71,7 +71,9 @@ $(BIN): headers $(OBJS) $(HOSTCC) $(HOSTLDFLAGS) $(OBJS) -o $@ clean: - @rm -f $(BIN).* *.o1 *~ + $(call DELFILE $(BIN).*) + $(call DELFILE *.o1) + $(call CLEAN) @rm -rf net nuttx diff --git a/apps/examples/wgetjson/Makefile b/apps/examples/wgetjson/Makefile index c03715ad5e..96748defb5 100644 --- a/apps/examples/wgetjson/Makefile +++ b/apps/examples/wgetjson/Makefile @@ -98,10 +98,11 @@ context: .context depend: .depend clean: - @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/wlan/Makefile b/apps/examples/wlan/Makefile index c50b132278..be2dbea7af 100644 --- a/apps/examples/wlan/Makefile +++ b/apps/examples/wlan/Makefile @@ -87,11 +87,12 @@ context: depend: .depend clean: - @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/xmlrpc/Makefile b/apps/examples/xmlrpc/Makefile index 84d3ed4be5..5ab60a0dd5 100644 --- a/apps/examples/xmlrpc/Makefile +++ b/apps/examples/xmlrpc/Makefile @@ -99,10 +99,11 @@ context: .context depend: .depend clean: - @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/graphics/tiff/Makefile b/apps/graphics/tiff/Makefile index 1ce2813c83..996f518940 100644 --- a/apps/graphics/tiff/Makefile +++ b/apps/graphics/tiff/Makefile @@ -75,21 +75,23 @@ $(COBJS): %$(OBJEXT): %.c .built: $(OBJS) $(call ARCHIVE, $(BIN), $(OBJS)) - @touch .built + $(Q) touch .built context: .depend: Makefile $(SRCS) - @$(MKDEP) $(ROOTDEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep - @touch $@ + $(Q) $(MKDEP) $(ROOTDEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep + $(Q) touch $@ depend: .depend clean: - @rm -f *.o *~ .*.swp .built + $(call DELFILE .built) $(call CLEAN) distclean: clean - @rm -f Make.dep .depend + $(call DELFILE .context) + $(call DELFILE Make.dep) + $(call DELFILE .depend) -include Make.dep diff --git a/apps/interpreters/ficl/Makefile b/apps/interpreters/ficl/Makefile index cbea9163a8..97cc9d6386 100644 --- a/apps/interpreters/ficl/Makefile +++ b/apps/interpreters/ficl/Makefile @@ -97,21 +97,23 @@ debug: .built: debug $(OBJS) $(call ARCHIVE, $(BIN), $(OBJS)) - @touch .built + $(Q) touch .built context: .depend: debug Makefile $(SRCS) - @$(MKDEP) $(ROOT_DEPPATH) $(SRC_DEPPATH) $(FICL_DEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep - @touch $@ + $(Q) $(MKDEP) $(ROOT_DEPPATH) $(SRC_DEPPATH) $(FICL_DEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep + $(Q) touch $@ depend: .depend clean: - @rm -f *.o *~ .*.swp .built + $(call DELFILE .context) + $(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/modbus/Makefile b/apps/modbus/Makefile index 59e2e2526c..c0f01bc94d 100644 --- a/apps/modbus/Makefile +++ b/apps/modbus/Makefile @@ -93,25 +93,28 @@ endif .built: $(OBJS) ifeq ($(CONFIG_MODBUS),y) $(call ARCHIVE, $(BIN), $(OBJS)) - @touch .built + $(Q) touch .built endif context: .depend: Makefile $(SRCS) ifeq ($(CONFIG_MODBUS),y) - @$(MKDEP) $(DEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep - @touch $@ + $(Q) $(MKDEP) $(DEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep + $(Q) touch $@ endif depend: .depend clean: - @rm -f *.o *~ .*.swp .built + $(call DELFILE .built) $(call CLEAN) distclean: clean - @rm -f Make.dep .depend + $(call DELFILE .context) + $(call DELFILE Make.dep) + $(call DELFILE .depend) + -include Make.dep diff --git a/apps/namedapp/Makefile b/apps/namedapp/Makefile index 8f653a2082..f52e8a9d57 100644 --- a/apps/namedapp/Makefile +++ b/apps/namedapp/Makefile @@ -96,13 +96,15 @@ context: .context depend: .depend clean: - $(Q) rm -f *.o *~ .*.swp .built + $(call DELFILE .built) $(call CLEAN) distclean: clean - $(Q) rm -f .context Make.dep .depend - $(Q) rm -f namedapp_list.h - $(Q) rm -f namedapp_proto.h + $(call DELFILE .context) + $(call DELFILE Make.dep) + $(call DELFILE .depend) + $(call DELFILE namedapp_list.h) + $(call DELFILE namedapp_proto.h) -include Make.dep diff --git a/apps/netutils/codecs/Makefile b/apps/netutils/codecs/Makefile index 6dcd94e9bb..644a07dece 100644 --- a/apps/netutils/codecs/Makefile +++ b/apps/netutils/codecs/Makefile @@ -73,21 +73,22 @@ $(COBJS): %$(OBJEXT): %.c .built: $(OBJS) $(call ARCHIVE, $(BIN), $(OBJS)) - @touch .built + $(Q) touch .built context: .depend: Makefile $(SRCS) - @$(MKDEP) $(ROOTDEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep - @touch $@ + $(Q) $(MKDEP) $(ROOTDEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep + $(Q) touch $@ depend: .depend clean: - @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/netutils/dhcpc/Makefile b/apps/netutils/dhcpc/Makefile index 67cad42146..0fe9681011 100644 --- a/apps/netutils/dhcpc/Makefile +++ b/apps/netutils/dhcpc/Makefile @@ -79,21 +79,22 @@ $(COBJS): %$(OBJEXT): %.c .built: $(OBJS) $(call ARCHIVE, $(BIN), $(OBJS)) - @touch .built + $(Q) touch .built context: .depend: Makefile $(SRCS) - @$(MKDEP) $(ROOTDEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep - @touch $@ + $(Q) $(MKDEP) $(ROOTDEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep + $(Q) touch $@ depend: .depend clean: - @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/netutils/dhcpd/Makefile b/apps/netutils/dhcpd/Makefile index 13f1215117..3592313987 100644 --- a/apps/netutils/dhcpd/Makefile +++ b/apps/netutils/dhcpd/Makefile @@ -79,21 +79,22 @@ $(COBJS): %$(OBJEXT): %.c .built: $(OBJS) $(call ARCHIVE, $(BIN), $(OBJS)) - @touch .built + $(Q) touch .built context: .depend: Makefile $(SRCS) - @$(MKDEP) $(ROOTDEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep - @touch $@ + $(Q) $(MKDEP) $(ROOTDEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep + $(Q) touch $@ depend: .depend clean: - @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/netutils/discover/Makefile b/apps/netutils/discover/Makefile index 3f5c1f71f2..22c06b4721 100644 --- a/apps/netutils/discover/Makefile +++ b/apps/netutils/discover/Makefile @@ -82,21 +82,22 @@ $(COBJS): %$(OBJEXT): %.c .built: $(OBJS) $(call ARCHIVE, $(BIN), $(OBJS)) - @touch .built + $(Q) touch .built context: .depend: Makefile $(SRCS) - @$(MKDEP) $(ROOTDEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep - @touch $@ + $(Q) $(MKDEP) $(ROOTDEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep + $(Q) touch $@ depend: .depend clean: - @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/netutils/ftpc/Makefile b/apps/netutils/ftpc/Makefile index 65c2d59c57..9524895501 100644 --- a/apps/netutils/ftpc/Makefile +++ b/apps/netutils/ftpc/Makefile @@ -95,21 +95,22 @@ $(COBJS): %$(OBJEXT): %.c .built: $(OBJS) $(call ARCHIVE, $(BIN), $(OBJS)) - @touch .built + $(Q) touch .built context: .depend: Makefile $(SRCS) - @$(MKDEP) $(ROOTDEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep - @touch $@ + $(Q) $(MKDEP) $(ROOTDEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep + $(Q) touch $@ depend: .depend clean: - @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/netutils/ftpd/Makefile b/apps/netutils/ftpd/Makefile index 9956bf97f9..cccdf548af 100644 --- a/apps/netutils/ftpd/Makefile +++ b/apps/netutils/ftpd/Makefile @@ -79,21 +79,22 @@ $(COBJS): %$(OBJEXT): %.c .built: $(OBJS) $(call ARCHIVE, $(BIN), $(OBJS)) - @touch .built + $(Q) touch .built context: .depend: Makefile $(SRCS) - @$(MKDEP) $(ROOTDEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep - @touch $@ + $(Q) $(MKDEP) $(ROOTDEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep + $(Q) touch $@ depend: .depend clean: - @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/netutils/json/Makefile b/apps/netutils/json/Makefile index 4a54ab5f70..d8f492aed3 100644 --- a/apps/netutils/json/Makefile +++ b/apps/netutils/json/Makefile @@ -73,21 +73,22 @@ $(COBJS): %$(OBJEXT): %.c .built: $(OBJS) $(call ARCHIVE, $(BIN), $(OBJS)) - @touch .built + $(Q) touch .built context: .depend: Makefile $(SRCS) - @$(MKDEP) $(ROOTDEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep - @touch $@ + $(Q) $(MKDEP) $(ROOTDEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep + $(Q) touch $@ depend: .depend clean: - @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/netutils/resolv/Makefile b/apps/netutils/resolv/Makefile index d9a74989b3..c5ec8fff13 100644 --- a/apps/netutils/resolv/Makefile +++ b/apps/netutils/resolv/Makefile @@ -79,21 +79,22 @@ $(COBJS): %$(OBJEXT): %.c .built: $(OBJS) $(call ARCHIVE, $(BIN), $(OBJS)) - @touch .built + $(Q) touch .built context: .depend: Makefile $(SRCS) - @$(MKDEP) $(ROOTDEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep - @touch $@ + $(Q) $(MKDEP) $(ROOTDEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep + $(Q) touch $@ depend: .depend clean: - @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/netutils/smtp/Makefile b/apps/netutils/smtp/Makefile index d9e6e5c0e6..ec3e513b86 100644 --- a/apps/netutils/smtp/Makefile +++ b/apps/netutils/smtp/Makefile @@ -79,21 +79,22 @@ $(COBJS): %$(OBJEXT): %.c .built: $(OBJS) $(call ARCHIVE, $(BIN), $(OBJS)) - @touch .built + $(Q) touch .built context: .depend: Makefile $(SRCS) - @$(MKDEP) $(ROOTDEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep - @touch $@ + $(Q) $(MKDEP) $(ROOTDEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep + $(Q) touch $@ depend: .depend clean: - @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/netutils/telnetd/Makefile b/apps/netutils/telnetd/Makefile index e024134ffb..f614719d5b 100644 --- a/apps/netutils/telnetd/Makefile +++ b/apps/netutils/telnetd/Makefile @@ -79,21 +79,22 @@ $(COBJS): %$(OBJEXT): %.c .built: $(OBJS) $(call ARCHIVE, $(BIN), $(OBJS)) - @touch .built + $(Q) touch .built context: .depend: Makefile $(SRCS) - @$(MKDEP) $(ROOTDEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep - @touch $@ + $(Q) $(MKDEP) $(ROOTDEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep + $(Q) touch $@ depend: .depend clean: - @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/netutils/tftpc/Makefile b/apps/netutils/tftpc/Makefile index 050da06d0b..56d3ded125 100644 --- a/apps/netutils/tftpc/Makefile +++ b/apps/netutils/tftpc/Makefile @@ -81,21 +81,22 @@ $(COBJS): %$(OBJEXT): %.c .built: $(OBJS) $(call ARCHIVE, $(BIN), $(OBJS)) - @touch .built + $(Q) touch .built context: .depend: Makefile $(SRCS) - @$(MKDEP) $(ROOTDEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep - @touch $@ + $(Q) $(MKDEP) $(ROOTDEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep + $(Q) touch $@ depend: .depend clean: - @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/netutils/thttpd/Makefile b/apps/netutils/thttpd/Makefile index a0d5b0ea27..aa053b709f 100644 --- a/apps/netutils/thttpd/Makefile +++ b/apps/netutils/thttpd/Makefile @@ -88,44 +88,45 @@ $(COBJS): %$(OBJEXT): %.c ifeq ($(CONFIG_NXFLAT),y) cgi-bin: - @mkdir cgi-bin + $(Q) mkdir cgi-bin cgi-src/$(SUBDIR_BIN1): - @$(MAKE) -C cgi-src $(SUBDIR_BIN1) + $(Q) $(MAKE) -C cgi-src $(SUBDIR_BIN1) cgi-bin/$(SUBDIR_BIN1): cgi-bin cgi-src/$(SUBDIR_BIN1) - @cp -a cgi-src/$(SUBDIR_BIN1) $@ + $(Q) cp -a cgi-src/$(SUBDIR_BIN1) $@ cgi-src/$(SUBDIR_BIN2): - @$(MAKE) -C cgi-src $(SUBDIR_BIN2) + $(Q) $(MAKE) -C cgi-src $(SUBDIR_BIN2) cgi-bin/$(SUBDIR_BIN2): cgi-bin cgi-src/$(SUBDIR_BIN2) - @cp -a cgi-src/$(SUBDIR_BIN2) $@ + $(Q) cp -a cgi-src/$(SUBDIR_BIN2) $@ cgi-src/$(SUBDIR_BIN3): - @$(MAKE) -C cgi-src $(SUBDIR_BIN3) + $(Q) $(MAKE) -C cgi-src $(SUBDIR_BIN3) cgi-bin/$(SUBDIR_BIN3): cgi-bin cgi-src/$(SUBDIR_BIN3) - @cp -a cgi-src/$(SUBDIR_BIN3) $@ + $(Q) cp -a cgi-src/$(SUBDIR_BIN3) $@ endif .built: $(OBJS) $(call ARCHIVE, $(BIN), $(OBJS)) - @touch .built + $(Q) touch .built context: .depend: Makefile $(SRCS) - @$(MKDEP) $(ROOTDEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep - @touch $@ + $(Q) $(MKDEP) $(ROOTDEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep + $(Q) touch $@ depend: .depend clean: - @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/netutils/uiplib/Makefile b/apps/netutils/uiplib/Makefile index fa9296c0a6..d4f73fb835 100644 --- a/apps/netutils/uiplib/Makefile +++ b/apps/netutils/uiplib/Makefile @@ -95,21 +95,22 @@ $(COBJS): %$(OBJEXT): %.c .built: $(OBJS) $(call ARCHIVE, $(BIN), $(OBJS)) - @touch .built + $(Q) touch .built context: .depend: Makefile $(SRCS) - @$(MKDEP) $(ROOTDEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep - @touch $@ + $(Q) $(MKDEP) $(ROOTDEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep + $(Q) touch $@ depend: .depend clean: - @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/netutils/webclient/Makefile b/apps/netutils/webclient/Makefile index ef9dbd78be..7ade03cb9c 100644 --- a/apps/netutils/webclient/Makefile +++ b/apps/netutils/webclient/Makefile @@ -79,21 +79,22 @@ $(COBJS): %$(OBJEXT): %.c .built: $(OBJS) $(call ARCHIVE, $(BIN), $(OBJS)) - @touch .built + $(Q) touch .built context: .depend: Makefile $(SRCS) - @$(MKDEP) $(ROOTDEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep - @touch $@ + $(Q) $(MKDEP) $(ROOTDEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep + $(Q) touch $@ depend: .depend clean: - @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/netutils/webserver/Makefile b/apps/netutils/webserver/Makefile index 26362be5d5..6c5e3d286f 100644 --- a/apps/netutils/webserver/Makefile +++ b/apps/netutils/webserver/Makefile @@ -86,21 +86,22 @@ $(COBJS): %$(OBJEXT): %.c .built: $(OBJS) $(call ARCHIVE, $(BIN), $(OBJS)) - @touch .built + $(Q) touch .built context: .depend: Makefile $(SRCS) - @$(MKDEP) $(ROOTDEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep - @touch $@ + $(Q) $(MKDEP) $(ROOTDEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep + $(Q) touch $@ depend: .depend clean: - @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/netutils/xmlrpc/Makefile b/apps/netutils/xmlrpc/Makefile index 1eb3919878..bf78153604 100644 --- a/apps/netutils/xmlrpc/Makefile +++ b/apps/netutils/xmlrpc/Makefile @@ -80,21 +80,22 @@ $(COBJS): %$(OBJEXT): %.c .built: $(OBJS) $(call ARCHIVE, $(BIN), $(OBJS)) - @touch .built + $(Q) touch .built context: .depend: Makefile $(SRCS) - @$(MKDEP) $(ROOTDEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep - @touch $@ + $(Q) $(MKDEP) $(ROOTDEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep + $(Q) touch $@ depend: .depend clean: - @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/nshlib/Makefile b/apps/nshlib/Makefile index afe0014195..16efe99cc4 100644 --- a/apps/nshlib/Makefile +++ b/apps/nshlib/Makefile @@ -126,11 +126,13 @@ context: depend: .depend clean: - @rm -f *.o *~ .*.swp .built + $(call DELFILE .built) $(call CLEAN) distclean: clean - @rm -f Make.dep .depend + $(call DELFILE .context) + $(call DELFILE Make.dep) + $(call DELFILE .depend) -include Make.dep diff --git a/apps/system/free/Makefile b/apps/system/free/Makefile index a4cd506870..9637fa772e 100644 --- a/apps/system/free/Makefile +++ b/apps/system/free/Makefile @@ -88,29 +88,31 @@ $(COBJS): %$(OBJEXT): %.c .built: $(OBJS) $(call ARCHIVE, $(BIN), $(OBJS)) - @touch .built + $(Q) touch .built # Register application .context: $(call REGISTER,$(APPNAME),$(PRIORITY),$(STACKSIZE),$(APPNAME)_main) - @touch $@ + $(Q) touch $@ context: .context # Create dependencies .depend: Makefile $(SRCS) - @$(MKDEP) $(ROOTDEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep - @touch $@ + $(Q) $(MKDEP) $(ROOTDEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep + $(Q) touch $@ depend: .depend clean: - @rm -f *.o *~ .*.swp .built + $(call DELFILE .built) $(call CLEAN) distclean: clean - @rm -f .context Make.dep .depend + $(call DELFILE .context) + $(call DELFILE Make.dep) + $(call DELFILE .depend) -include Make.dep diff --git a/apps/system/i2c/Makefile b/apps/system/i2c/Makefile index 8dd4bc5630..7cdbcdf593 100644 --- a/apps/system/i2c/Makefile +++ b/apps/system/i2c/Makefile @@ -78,26 +78,28 @@ $(COBJS): %$(OBJEXT): %.c .built: $(OBJS) $(call ARCHIVE, $(BIN), $(OBJS)) - @touch .built + $(Q) touch .built .context: $(call REGISTER,$(APPNAME),$(PRIORITY),$(STACKSIZE),$(APPNAME)_main) - @touch $@ + $(Q) touch $@ context: .context .depend: Makefile $(SRCS) - @$(MKDEP) $(ROOTDEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep - @touch $@ + $(Q) $(MKDEP) $(ROOTDEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep + $(Q) touch $@ depend: .depend clean: - @rm -f *.o *~ .*.swp .built + $(call DELFILE .built) $(call CLEAN) distclean: clean - @rm -f Make.dep .depend + $(call DELFILE .context) + $(call DELFILE Make.dep) + $(call DELFILE .depend) -include Make.dep diff --git a/apps/system/install/Makefile b/apps/system/install/Makefile index 99de400c97..951917a77c 100644 --- a/apps/system/install/Makefile +++ b/apps/system/install/Makefile @@ -89,29 +89,31 @@ $(COBJS): %$(OBJEXT): %.c .built: $(OBJS) $(call ARCHIVE, $(BIN), $(OBJS)) - @touch .built + $(Q) touch .built # Register application .context: $(call REGISTER,$(APPNAME),$(PRIORITY),$(STACKSIZE),$(APPNAME)_main) - @touch $@ + $(Q) touch $@ context: .context # Create dependencies .depend: Makefile $(SRCS) - @$(MKDEP) $(ROOTDEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep - @touch $@ + $(Q) $(MKDEP) $(ROOTDEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep + $(Q) touch $@ depend: .depend clean: - @rm -f *.o *~ .*.swp .built + $(call DELFILE .built) $(call CLEAN) distclean: clean - @rm -f .context Make.dep .depend + $(call DELFILE .context) + $(call DELFILE Make.dep) + $(call DELFILE .depend) -include Make.dep diff --git a/apps/system/poweroff/Makefile b/apps/system/poweroff/Makefile index a96a600336..46b595e843 100644 --- a/apps/system/poweroff/Makefile +++ b/apps/system/poweroff/Makefile @@ -89,29 +89,31 @@ $(COBJS): %$(OBJEXT): %.c .built: $(OBJS) $(call ARCHIVE, $(BIN), $(OBJS)) - @touch .built + $(Q) touch .built # Register application .context: $(call REGISTER,$(APPNAME),$(PRIORITY),$(STACKSIZE),$(APPNAME)_main) - @touch $@ + $(Q) touch $@ context: .context # Create dependencies .depend: Makefile $(SRCS) - @$(MKDEP) $(ROOTDEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep - @touch $@ + $(Q) $(MKDEP) $(ROOTDEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep + $(Q) touch $@ depend: .depend clean: - @rm -f *.o *~ .*.swp .built + $(call DELFILE .built) $(call CLEAN) distclean: clean - @rm -f .context Make.dep .depend + $(call DELFILE .context) + $(call DELFILE Make.dep) + $(call DELFILE .depend) -include Make.dep diff --git a/apps/system/ramtron/Makefile b/apps/system/ramtron/Makefile index b300a3711a..60a2be66a7 100644 --- a/apps/system/ramtron/Makefile +++ b/apps/system/ramtron/Makefile @@ -89,29 +89,31 @@ $(COBJS): %$(OBJEXT): %.c .built: $(OBJS) $(call ARCHIVE, $(BIN), $(OBJS)) - @touch .built + $(Q) touch .built # Register application .context: $(call REGISTER,$(APPNAME),$(PRIORITY),$(STACKSIZE),$(APPNAME)_main) - @touch $@ + $(Q) touch $@ context: .context # Create dependencies .depend: Makefile $(SRCS) - @$(MKDEP) $(ROOTDEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep - @touch $@ + $(Q) $(MKDEP) $(ROOTDEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep + $(Q) touch $@ depend: .depend clean: - @rm -f *.o *~ .*.swp .built + $(call DELFILE .built) $(call CLEAN) distclean: clean - @rm -f .context Make.dep .depend + $(call DELFILE .context) + $(call DELFILE Make.dep) + $(call DELFILE .depend) -include Make.dep diff --git a/apps/system/readline/Makefile b/apps/system/readline/Makefile index fb60b6fc46..f67dc85f6e 100644 --- a/apps/system/readline/Makefile +++ b/apps/system/readline/Makefile @@ -79,7 +79,7 @@ $(COBJS): %$(OBJEXT): %.c .built: $(OBJS) $(call ARCHIVE, $(BIN), $(OBJS)) - @touch .built + $(Q) touch .built # Context build phase target @@ -88,18 +88,20 @@ context: # Dependency build phase target .depend: Makefile $(SRCS) - @$(MKDEP) $(ROOTDEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep - @touch $@ + $(Q) $(MKDEP) $(ROOTDEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep + $(Q) touch $@ depend: .depend # Housekeeping targets clean: - @rm -f *.o *~ .*.swp .built + $(call DELFILE .built) $(call CLEAN) distclean: clean - @rm -f .context Make.dep .depend + $(call DELFILE .context) + $(call DELFILE Make.dep) + $(call DELFILE .depend) -include Make.dep diff --git a/apps/system/sdcard/Makefile b/apps/system/sdcard/Makefile index 50bf0eeb11..ee95505a20 100644 --- a/apps/system/sdcard/Makefile +++ b/apps/system/sdcard/Makefile @@ -89,29 +89,31 @@ $(COBJS): %$(OBJEXT): %.c .built: $(OBJS) $(call ARCHIVE, $(BIN), $(OBJS)) - @touch .built + $(Q) touch .built # Register application .context: $(call REGISTER,$(APPNAME),$(PRIORITY),$(STACKSIZE),$(APPNAME)_main) - @touch $@ + $(Q) touch $@ context: .context # Create dependencies .depend: Makefile $(SRCS) - @$(MKDEP) $(ROOTDEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep - @touch $@ + $(Q) $(MKDEP) $(ROOTDEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep + $(Q) touch $@ depend: .depend clean: - @rm -f *.o *~ .*.swp .built + $(call DELFILE .built) $(call CLEAN) distclean: clean - @rm -f .context Make.dep .depend + $(call DELFILE .context) + $(call DELFILE Make.dep) + $(call DELFILE .depend) -include Make.dep diff --git a/apps/system/sysinfo/Makefile b/apps/system/sysinfo/Makefile index a8821c7de1..06c27a8be7 100644 --- a/apps/system/sysinfo/Makefile +++ b/apps/system/sysinfo/Makefile @@ -89,29 +89,31 @@ $(COBJS): %$(OBJEXT): %.c .built: $(OBJS) $(call ARCHIVE, $(BIN), $(OBJS)) - @touch .built + $(Q) touch .built # Register application .context: $(call REGISTER,$(APPNAME),$(PRIORITY),$(STACKSIZE),$(APPNAME)_main) - @touch $@ + $(Q) touch $@ context: .context # Create dependencies .depend: Makefile $(SRCS) - @$(MKDEP) $(ROOTDEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep - @touch $@ + $(Q) $(MKDEP) $(ROOTDEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep + $(Q) touch $@ depend: .depend clean: - @rm -f *.o *~ .*.swp .built + $(call DELFILE .built) $(call CLEAN) distclean: clean - @rm -f .context Make.dep .depend + $(call DELFILE .context) + $(call DELFILE Make.dep) + $(call DELFILE .depend) -include Make.dep diff --git a/nuttx/Makefile.unix b/nuttx/Makefile.unix index 439aa2d4bd..3b641e8b26 100644 --- a/nuttx/Makefile.unix +++ b/nuttx/Makefile.unix @@ -419,10 +419,10 @@ context: check_context include/nuttx/config.h include/nuttx/version.h include/ma # and symbolic links created by the context target. clean_context: - $(Q) rm -f include/nuttx/config.h - $(Q) rm -f include/nuttx/version.h - $(Q) rm -f include/math.h - $(Q) rm -f include/stdarg.h + $(call DELFILE include/nuttx/config.h) + $(call DELFILE include/nuttx/version.h) + $(call DELFILE include/math.h) + $(call DELFILE include/stdarg.h) $(Q) $(DIRUNLINK) include/arch/board $(Q) $(DIRUNLINK) include/arch/chip $(Q) $(DIRUNLINK) include/arch @@ -686,8 +686,13 @@ ifeq ($(CONFIG_BUILD_2PASS),y) endif clean: subdir_clean - $(Q) rm -f $(BIN) nuttx.* mm_test *.map _SAVED_APPS_config *~ - $(Q) rm -f nuttx-export* + $(call DELFILE $(BIN)) + $(call DELFILE nuttx.*) + $(call DELFILE mm_test) + $(call DELFILE *.map) + $(call DELFILE _SAVED_APPS_config) + $(call DELFILE nuttx-export*) + $(call CLEAN) subdir_distclean: $(Q) for dir in $(CLEANDIRS) ; do \ @@ -700,7 +705,11 @@ distclean: clean subdir_distclean clean_context ifeq ($(CONFIG_BUILD_2PASS),y) $(Q) $(MAKE) -C $(CONFIG_PASS1_BUILDIR) TOPDIR="$(TOPDIR)" distclean endif - $(Q) rm -f Make.defs setenv.sh setenv.bat .config .config.old + $(call DELFILE Make.defs) + $(call DELFILE setenv.sh) + $(call DELFILE setenv.bat) + $(call DELFILE .config) + $(call DELFILE .config.old) # Application housekeeping targets. The APPDIR variable refers to the user # application directory. A sample apps/ directory is included with NuttX, diff --git a/nuttx/Makefile.win b/nuttx/Makefile.win index f43f14f0da..f98c5e6d83 100644 --- a/nuttx/Makefile.win +++ b/nuttx/Makefile.win @@ -438,10 +438,10 @@ context: check_context include\nuttx\config.h include\nuttx\version.h include\ma # and symbolic links created by the context target. clean_context: - $(Q) rm -f include\nuttx\config.h - $(Q) rm -f include\nuttx\version.h - $(Q) rm -f include\math.h - $(Q) rm -f include\stdarg.h + $(call DELFILE include\nuttx\config.h) + $(call DELFILE include\nuttx\version.h) + $(call DELFILE include\math.h) + $(call DELFILE include\stdarg.h) $(Q) $(DIRUNLINK) include\arch\board $(Q) $(DIRUNLINK) include\arch\chip $(Q) $(DIRUNLINK) include\arch @@ -688,8 +688,13 @@ ifeq ($(CONFIG_BUILD_2PASS),y) endif clean: subdir_clean - $(Q) rm -f $(BIN) nuttx.* mm_test *.map _SAVED_APPS_config *~ - $(Q) rm -f nuttx-export* + $(call DELFILE $(BIN)) + $(call DELFILE nuttx.*) + $(call DELFILE mm_test) + $(call DELFILE *.map) + $(call DELFILE _SAVED_APPS_config) + $(call DELFILE nuttx-export*) + $(call CLEAN) subdir_distclean: $(Q) for %%G in ($(CLEANDIRS)) do ( if exist %%G\Makefile $(MAKE) -C %%G TOPDIR="$(TOPDIR)" distclean ) @@ -698,7 +703,11 @@ distclean: clean subdir_distclean clean_context ifeq ($(CONFIG_BUILD_2PASS),y) $(Q) $(MAKE) -C $(CONFIG_PASS1_BUILDIR) TOPDIR="$(TOPDIR)" distclean endif - $(Q) rm -f Make.defs setenv.sh setenv.bat .config .config.old + $(call DELFILE Make.defs) + $(call DELFILE setenv.sh) + $(call DELFILE setenv.bat) + $(call DELFILE .config) + $(call DELFILE .config.old) # Application housekeeping targets. The APPDIR variable refers to the user # application directory. A sample apps\ directory is included with NuttX, @@ -723,16 +732,9 @@ endif apps_distclean: ifneq ($(APPDIR),) - $(Q) if [ -r "$(TOPDIR)\$(APPDIR)\.config" ]; then \ - cp "$(TOPDIR)\$(APPDIR)\.config" _SAVED_APPS_config || \ - { echo "Copy of $(APPDIR)\.config failed" ; exit 1 ; } \ - else \ - rm -f _SAVED_APPS_config; \ - fi + $(call DELFILE _SAVED_APPS_config + $(Q) if exist "$(TOPDIR)\$(APPDIR)\.config" ( cp "$(TOPDIR)\$(APPDIR)\.config" _SAVED_APPS_config ) $(Q) $(MAKE) -C "$(TOPDIR)\$(APPDIR)" TOPDIR="$(TOPDIR)" distclean - $(Q) if [ -r _SAVED_APPS_config ]; then \ - mv _SAVED_APPS_config "$(TOPDIR)\$(APPDIR)\.config" || \ - { echo "Copy of _SAVED_APPS_config failed" ; exit 1 ; } \ - fi + $(Q) if exist _SAVED_APPS_config ( mv _SAVED_APPS_config "$(TOPDIR)\$(APPDIR)\.config" ) endif diff --git a/nuttx/arch/8051/src/Makefile b/nuttx/arch/8051/src/Makefile index 4772834d9c..6c87b8bc96 100644 --- a/nuttx/arch/8051/src/Makefile +++ b/nuttx/arch/8051/src/Makefile @@ -221,13 +221,15 @@ clean: $(Q) if [ -e board/Makefile ]; then \ $(MAKE) -C board TOPDIR=$(TOPDIR) clean ; \ fi - $(Q) rm -f libarch$(LIBEXT) up_mem.h *~ .*.swp + $(call DELFILE libarch$(LIBEXT)) + $(call DELFILE up_mem.h) $(call CLEAN) distclean: clean $(Q) if [ -e board/Makefile ]; then \ $(MAKE) -C board TOPDIR=$(TOPDIR) distclean ; \ fi - rm -f Make.dep .depend + $(call DELFILE Make.dep) + $(call DELFILE .depend) -include Make.dep diff --git a/nuttx/arch/arm/src/Makefile b/nuttx/arch/arm/src/Makefile index a48d18799b..a6d5fa4f46 100644 --- a/nuttx/arch/arm/src/Makefile +++ b/nuttx/arch/arm/src/Makefile @@ -178,13 +178,14 @@ clean: ifeq ($(BOARDMAKE),y) $(Q) $(MAKE) -C board TOPDIR="$(TOPDIR)" clean endif - $(Q) rm -f libarch$(LIBEXT) *~ .*.swp + $(call DELFILE libarch$(LIBEXT)) $(call CLEAN) distclean: clean ifeq ($(BOARDMAKE),y) $(Q) $(MAKE) -C board TOPDIR="$(TOPDIR)" distclean endif - $(Q) rm -f Make.dep .depend + $(call DELFILE Make.dep) + $(call DELFILE .depend) -include Make.dep diff --git a/nuttx/arch/avr/src/Makefile b/nuttx/arch/avr/src/Makefile index 462968ed53..69d3a0fc04 100644 --- a/nuttx/arch/avr/src/Makefile +++ b/nuttx/arch/avr/src/Makefile @@ -171,14 +171,15 @@ clean: ifeq ($(BOARDMAKE),y) $(Q) $(MAKE) -C board TOPDIR="$(TOPDIR)" clean endif - $(Q) rm -f libarch$(LIBEXT) *~ .*.swp + $(call DELFILE libarch$(LIBEXT)) $(call CLEAN) distclean: clean ifeq ($(BOARDMAKE),y) $(Q) $(MAKE) -C board TOPDIR="$(TOPDIR)" distclean endif - $(Q) rm -f Make.dep .depend + $(call DELFILE Make.dep) + $(call DELFILE .depend) -include Make.dep diff --git a/nuttx/arch/hc/src/Makefile b/nuttx/arch/hc/src/Makefile index 0ada6c4c2c..7353b44ea5 100644 --- a/nuttx/arch/hc/src/Makefile +++ b/nuttx/arch/hc/src/Makefile @@ -166,13 +166,14 @@ clean: ifeq ($(BOARDMAKE),y) $(Q) $(MAKE) -C board TOPDIR="$(TOPDIR)" clean endif - $(Q) rm -f libarch$(LIBEXT) *~ .*.swp + $(call DELFILE libarch$(LIBEXT)) $(call CLEAN) distclean: clean ifeq ($(BOARDMAKE),y) $(Q) $(MAKE) -C board TOPDIR="$(TOPDIR)" distclean endif - $(Q) rm -f Make.dep .depend + $(call DELFILE Make.dep) + $(call DELFILE .depend) -include Make.dep diff --git a/nuttx/arch/mips/src/Makefile b/nuttx/arch/mips/src/Makefile index 057b95d220..b27fe8730a 100644 --- a/nuttx/arch/mips/src/Makefile +++ b/nuttx/arch/mips/src/Makefile @@ -164,13 +164,14 @@ clean: ifeq ($(BOARDMAKE),y) $(Q) $(MAKE) -C board TOPDIR="$(TOPDIR)" clean endif - $(Q) rm -f libarch$(LIBEXT) *~ .*.swp + $(call DELFILE libarch$(LIBEXT)) $(call CLEAN) distclean: clean ifeq ($(BOARDMAKE),y) $(Q) $(MAKE) -C board TOPDIR="$(TOPDIR)" distclean endif - $(Q) rm -f Make.dep .depend + $(call DELFILE Make.dep) + $(call DELFILE .depend) -include Make.dep diff --git a/nuttx/arch/rgmp/src/Makefile b/nuttx/arch/rgmp/src/Makefile index 7650a0a942..019dca4658 100644 --- a/nuttx/arch/rgmp/src/Makefile +++ b/nuttx/arch/rgmp/src/Makefile @@ -96,12 +96,14 @@ export_head: depend: .depend clean: - @rm -f $(TOPDIR)/arch/rgmp/src/x86/*.o - @rm -f $(TOPDIR)/kernel.img nuttx.img - @rm -f libarch$(LIBEXT) *~ .*.swp + $(call DELFILE "$(TOPDIR)/arch/rgmp/src/x86/*.o") + $(call DELFILE "$(TOPDIR)/kernel.img") + $(call DELFILE nuttx.img) + $(call DELFILE libarch$(LIBEXT)) $(call CLEAN) distclean: clean - @rm -f Make.dep .depend + $(call DELFILE Make.dep) + $(call DELFILE .depend) -include Make.dep diff --git a/nuttx/arch/sh/src/Makefile b/nuttx/arch/sh/src/Makefile index 132ca4610e..af7c481a90 100644 --- a/nuttx/arch/sh/src/Makefile +++ b/nuttx/arch/sh/src/Makefile @@ -161,13 +161,14 @@ clean: ifeq ($(BOARDMAKE),y) $(Q) $(MAKE) -C board TOPDIR="$(TOPDIR)" clean endif - $(Q) rm -f libarch$(LIBEXT) *~ .*.swp + $(call DELFILE libarch$(LIBEXT)) $(call CLEAN) distclean: clean ifeq ($(BOARDMAKE),y) $(Q) $(MAKE) -C board TOPDIR="$(TOPDIR)" distclean endif - $(Q) rm -f Make.dep .depend + $(call DELFILE Make.dep) + $(call DELFILE .depend) -include Make.dep diff --git a/nuttx/arch/sim/src/Makefile b/nuttx/arch/sim/src/Makefile index a5d6100a3f..5abd6ce4f0 100644 --- a/nuttx/arch/sim/src/Makefile +++ b/nuttx/arch/sim/src/Makefile @@ -214,14 +214,16 @@ clean: cleanrel $(Q) if [ -e board/Makefile ]; then \ $(MAKE) -C board TOPDIR="$(TOPDIR)" clean ; \ fi - $(Q) rm -f nuttx.rel libarch$(LIBEXT) *~ .*.swp + $(call DELFILE nuttx.rel) + $(call DELFILE libarch$(LIBEXT)) $(call CLEAN) distclean: clean $(Q) if [ -e board/Makefile ]; then \ $(MAKE) -C board TOPDIR="$(TOPDIR)" distclean ; \ fi - $(Q) rm -f Make.dep .depend + $(call DELFILE Make.dep) + $(call DELFILE .depend) $(Q) rm -rf GNU -include Make.dep diff --git a/nuttx/arch/x86/src/Makefile b/nuttx/arch/x86/src/Makefile index 19193709cc..e93dc2657c 100644 --- a/nuttx/arch/x86/src/Makefile +++ b/nuttx/arch/x86/src/Makefile @@ -172,13 +172,14 @@ clean: ifeq ($(BOARDMAKE),y) $(Q) $(MAKE) -C board TOPDIR="$(TOPDIR)" clean endif - $(Q) rm -f libarch$(LIBEXT) *~ .*.swp + $(call DELFILE libarch$(LIBEXT)) $(call CLEAN) distclean: clean ifeq ($(BOARDMAKE),y) $(Q) $(MAKE) -C board TOPDIR="$(TOPDIR)" distclean endif - $(Q) rm -f Make.dep .depend + $(call DELFILE Make.dep) + $(call DELFILE .depend) -include Make.dep diff --git a/nuttx/arch/z16/src/Makefile b/nuttx/arch/z16/src/Makefile index 44f96d03d4..d3f5819989 100644 --- a/nuttx/arch/z16/src/Makefile +++ b/nuttx/arch/z16/src/Makefile @@ -137,16 +137,20 @@ clean: $(Q) if [ -e board/Makefile ]; then \ $(MAKE) -C board TOPDIR="$(TOPDIR)" clean ; \ fi - $(Q) rm -f libarch$(LIBEXT) *~ .*.swp ifeq ($(COMPILER),zneocc.exe) - $(Q) rm -f nuttx.linkcmd *.asm *.tmp *.map + $(call DELFILE nuttx.linkcmd) + $(call DELFILE *.asm) + $(call DELFILE *.tmp) + $(call DELFILE *.map) endif + $(call DELFILE libarch$(LIBEXT)) $(call CLEAN) distclean: clean $(Q) if [ -e board/Makefile ]; then \ $(MAKE) -C board TOPDIR="$(TOPDIR)" distclean ; \ fi - $(Q) rm -f Make.dep .depend + $(call DELFILE Make.dep) + $(call DELFILE .depend) -include Make.dep diff --git a/nuttx/arch/z80/src/Makefile.sdcc b/nuttx/arch/z80/src/Makefile.sdcc index 7c9f45a6c7..e29fa9fda8 100644 --- a/nuttx/arch/z80/src/Makefile.sdcc +++ b/nuttx/arch/z80/src/Makefile.sdcc @@ -240,13 +240,19 @@ clean: $(Q) if [ -e board/Makefile ]; then \ $(MAKE) -C board TOPDIR="$(TOPDIR)" clean ; \ fi - $(Q) rm -f libarch$(LIBEXT) up_mem.h asm_mem.h pass1.* nuttx.* *~ .*.swp + $(call DELFILE up_mem.h) + $(call DELFILE asm_mem.h) + $(call DELFILE pass1.*) + $(call DELFILE nuttx.*) + $(call DELFILE libarch$(LIBEXT)) $(call CLEAN) + distclean: clean $(Q) if [ -e board/Makefile ]; then \ $(MAKE) -C board TOPDIR="$(TOPDIR)" distclean ; \ fi - $(Q) rm -f Make.dep .depend + $(call DELFILE Make.dep) + $(call DELFILE .depend) -include Make.dep diff --git a/nuttx/arch/z80/src/Makefile.zdsii b/nuttx/arch/z80/src/Makefile.zdsii index 666af89452..1d7b1f96d1 100644 --- a/nuttx/arch/z80/src/Makefile.zdsii +++ b/nuttx/arch/z80/src/Makefile.zdsii @@ -150,14 +150,18 @@ clean: $(Q) if [ -e board/Makefile ]; then \ $(MAKE) -C board TOPDIR="$(TOPDIR)" clean ; \ fi - $(Q) rm -f libarch$(LIBEXT) *~ .*.swp - $(Q) rm -f nuttx.linkcmd *.asm *.tmp *.map + $(call DELFILE nuttx.linkcmd) + $(call DELFILE *.asm) + $(call DELFILE *.tmp) + $(call DELFILE *.map) + $(call DELFILE libarch$(LIBEXT)) $(call CLEAN) distclean: clean $(Q) if [ -e board/Makefile ]; then \ $(MAKE) -C board TOPDIR="$(TOPDIR)" distclean ; \ fi - $(Q) rm -f Make.dep .depend + $(call DELFILE Make.dep) + $(call DELFILE .depend) -include Make.dep diff --git a/nuttx/binfmt/Makefile b/nuttx/binfmt/Makefile index 06def551f1..f90ea0417a 100644 --- a/nuttx/binfmt/Makefile +++ b/nuttx/binfmt/Makefile @@ -87,13 +87,11 @@ $(BIN): $(BINFMT_OBJS) depend: .depend clean: - $(Q) rm -f $(BIN) *~ .*.swp + $(call DELFILE $(BIN)) $(call CLEAN) - $(Q) ( for dir in $(SUBDIRS); do \ - rm -f $${dir}/*~ $${dir}/.*.swp; \ - done ; ) distclean: clean - $(Q) rm -f Make.dep .depend + $(call DELFILE Make.dep) + $(call DELFILE .depend) -include Make.dep diff --git a/nuttx/configs/stm32f4discovery/src/Makefile b/nuttx/configs/stm32f4discovery/src/Makefile index b6d0f6226d..f4d5a89d9f 100644 --- a/nuttx/configs/stm32f4discovery/src/Makefile +++ b/nuttx/configs/stm32f4discovery/src/Makefile @@ -126,16 +126,17 @@ libboard$(LIBEXT): $(OBJS) $(call ARCHIVE, $@, $(OBJS)) .depend: Makefile $(SRCS) - @$(MKDEP) $(CC) -- $(CFLAGS) -- $(SRCS) >Make.dep - @touch $@ + $(Q) $(MKDEP) $(CC) -- $(CFLAGS) -- $(SRCS) >Make.dep + $(Q) touch $@ depend: .depend clean: - @rm -f libboard$(LIBEXT) *~ .*.swp + $(call DELFILE libboard$(LIBEXT)) $(call CLEAN) distclean: clean - @rm -f Make.dep .depend + $(call DELFILE Make.dep) + $(call DELFILE .depend) -include Make.dep diff --git a/nuttx/drivers/Makefile b/nuttx/drivers/Makefile index 98bb8a7d0f..57b2b489a2 100644 --- a/nuttx/drivers/Makefile +++ b/nuttx/drivers/Makefile @@ -111,10 +111,11 @@ $(BIN): $(OBJS) depend: .depend clean: - $(Q) rm -f $(BIN) *~ .*.swp + $(call DELFILE $(BIN)) $(call CLEAN) distclean: clean - $(Q) rm -f Make.dep .depend + $(call DELFILE Make.dep) + $(call DELFILE .depend) -include Make.dep diff --git a/nuttx/fs/Makefile b/nuttx/fs/Makefile index b55ec6218b..eb036fed0d 100644 --- a/nuttx/fs/Makefile +++ b/nuttx/fs/Makefile @@ -130,13 +130,11 @@ $(BIN): $(OBJS) depend: .depend clean: - $(Q) rm -f $(BIN) *~ .*.swp + $(call DELFILE $(BIN)) $(call CLEAN) - $(Q) ( for dir in $(SUBDIRS); do \ - rm -f $${dir}/*~ $${dir}/.*.swp; \ - done ; ) distclean: clean - $(Q) rm -f Make.dep .depend + $(call DELFILE Make.dep) + $(call DELFILE .depend) -include Make.dep diff --git a/nuttx/graphics/Makefile b/nuttx/graphics/Makefile index d0fdb647dd..ddcfd21d24 100644 --- a/nuttx/graphics/Makefile +++ b/nuttx/graphics/Makefile @@ -33,7 +33,6 @@ # ############################################################################ --include $(TOPDIR)/.config -include $(TOPDIR)/Make.defs DEPPATH = --dep-path . @@ -201,13 +200,14 @@ context: gensources clean: $(Q) $(MAKE) -C nxglib -f Makefile.sources clean TOPDIR=$(TOPDIR) EXTRADEFINES=$(EXTRADEFINES) $(Q) $(MAKE) -C nxfonts -f Makefile.sources clean TOPDIR=$(TOPDIR) EXTRADEFINES=$(EXTRADEFINES) - $(Q) rm -f $(BIN) *~ .*.swp + $(call DELFILE $(BIN)) $(call CLEAN) distclean: clean $(Q) $(MAKE) -C nxglib -f Makefile.sources distclean TOPDIR=$(TOPDIR) EXTRADEFINES=$(EXTRADEFINES) $(Q) $(MAKE) -C nxfonts -f Makefile.sources distclean TOPDIR=$(TOPDIR) EXTRADEFINES=$(EXTRADEFINES) - $(Q) rm -f Make.dep .depend + $(call DELFILE Make.dep) + $(call DELFILE .depend) -include Make.dep diff --git a/nuttx/graphics/nxfonts/Makefile.sources b/nuttx/graphics/nxfonts/Makefile.sources index f2aa87cafd..eeb47d1b25 100644 --- a/nuttx/graphics/nxfonts/Makefile.sources +++ b/nuttx/graphics/nxfonts/Makefile.sources @@ -33,7 +33,6 @@ # ############################################################################ --include $(TOPDIR)/.config -include $(TOPDIR)/Make.defs ifdef NXFONTS_BITSPERPIXEL @@ -177,13 +176,14 @@ all: $(GEN_CSRC) .PHONY : clean distclean $(GEN_CSRC) : $(DEPENDENCY) - @$(call PREPROCESS, $<, $(GEN_TMP)) - @cat $(GEN_TMP) | sed -e "/^#/d" >$@ - @rm -f $(GEN_TMP) + $(call PREPROCESS, $<, $(GEN_TMP)) + $(Q) cat $(GEN_TMP) | sed -e "/^#/d" >$@ + $(Q) rm -f $(GEN_TMP) clean: - @rm -f *~ .*.swp *.i + $(call DELFILE *.i) + $(call CLEAN) distclean: clean - @rm -f nxfonts_convert_*bpp.c - @rm -f nxfonts_bitmaps_*.c + $(call DELFILE nxfonts_convert_*bpp.c) + $(call DELFILE nxfonts_bitmaps_*.c) diff --git a/nuttx/graphics/nxglib/Makefile.sources b/nuttx/graphics/nxglib/Makefile.sources index 67f8defc31..bb94c1b20f 100644 --- a/nuttx/graphics/nxglib/Makefile.sources +++ b/nuttx/graphics/nxglib/Makefile.sources @@ -33,7 +33,6 @@ # ############################################################################ --include $(TOPDIR)/.config -include $(TOPDIR)/Make.defs ifeq ($(NXGLIB_BITSPERPIXEL),1) @@ -123,53 +122,54 @@ all: $(GEN_CSRCS) $(SETP_CSRC) : $(BLITDIR)/nxglib_setpixel.c nxglib_bitblit.h ifneq ($(NXGLIB_BITSPERPIXEL),) - @$(call PREPROCESS, $(BLITDIR)/nxglib_setpixel.c, $(SETP_TMP)) - @cat $(SETP_TMP) | sed -e "/^#/d" >$@ - @rm -f $(SETP_TMP) + $(call PREPROCESS, $(BLITDIR)/nxglib_setpixel.c, $(SETP_TMP)) + $(Q) cat $(SETP_TMP) | sed -e "/^#/d" >$@ + $(Q) rm -f $(SETP_TMP) endif $(RFILL_CSRC) : $(BLITDIR)/nxglib_fillrectangle.c nxglib_bitblit.h ifneq ($(NXGLIB_BITSPERPIXEL),) - @$(call PREPROCESS, $(BLITDIR)/nxglib_fillrectangle.c, $(RFILL_TMP)) - @cat $(RFILL_TMP) | sed -e "/^#/d" >$@ - @rm -f $(RFILL_TMP) + $(call PREPROCESS, $(BLITDIR)/nxglib_fillrectangle.c, $(RFILL_TMP)) + $(Q) cat $(RFILL_TMP) | sed -e "/^#/d" >$@ + $(Q) rm -f $(RFILL_TMP) endif $(RGET_CSRC) : $(BLITDIR)/nxglib_getrectangle.c nxglib_bitblit.h ifneq ($(NXGLIB_BITSPERPIXEL),) - @$(call PREPROCESS, $(BLITDIR)/nxglib_getrectangle.c, $(RGET_TMP)) - @cat $(RGET_TMP) | sed -e "/^#/d" >$@ - @rm -f $(RGET_TMP) + $(call PREPROCESS, $(BLITDIR)/nxglib_getrectangle.c, $(RGET_TMP)) + $(Q) cat $(RGET_TMP) | sed -e "/^#/d" >$@ + $(Q) rm -f $(RGET_TMP) endif $(TFILL_CSRC) : $(BLITDIR)/nxglib_filltrapezoid.c nxglib_bitblit.h ifneq ($(NXGLIB_BITSPERPIXEL),) - @$(call PREPROCESS, $(BLITDIR)/nxglib_filltrapezoid.c, $(TFILL_TMP)) - @cat $(TFILL_TMP) | sed -e "/^#/d" >$@ - @rm -f $(TFILL_TMP) + $(call PREPROCESS, $(BLITDIR)/nxglib_filltrapezoid.c, $(TFILL_TMP)) + $(Q) cat $(TFILL_TMP) | sed -e "/^#/d" >$@ + $(Q) rm -f $(TFILL_TMP) endif $(RMOVE_CSRC) : $(BLITDIR)/nxglib_moverectangle.c nxglib_bitblit.h ifneq ($(NXGLIB_BITSPERPIXEL),) - @$(call PREPROCESS, $(BLITDIR)/nxglib_moverectangle.c, $(RMOVE_TMP)) - @cat $(RMOVE_TMP) | sed -e "/^#/d" >$@ - @rm -f $(RMOVE_TMP) + $(call PREPROCESS, $(BLITDIR)/nxglib_moverectangle.c, $(RMOVE_TMP)) + $(Q) cat $(RMOVE_TMP) | sed -e "/^#/d" >$@ + $(Q) rm -f $(RMOVE_TMP) endif $(RCOPY_CSRC) : $(BLITDIR)/nxglib_copyrectangle.c nxglib_bitblit.h ifneq ($(NXGLIB_BITSPERPIXEL),) - @$(call PREPROCESS, $(BLITDIR)/nxglib_copyrectangle.c, $(RCOPY_TMP)) - @cat $(RCOPY_TMP) | sed -e "/^#/d" >$@ - @rm -f $(RCOPY_TMP) + $(call PREPROCESS, $(BLITDIR)/nxglib_copyrectangle.c, $(RCOPY_TMP)) + $(Q) cat $(RCOPY_TMP) | sed -e "/^#/d" >$@ + $(Q) rm -f $(RCOPY_TMP) endif clean: - @rm -f *~ .*.swp *.i + $(call DELFILE *.i) + $(call CLEAN) distclean: clean - @rm -f nxglib_setpixel_*bpp.c - @rm -f nxglib_fillrectangle_*bpp.c - @rm -f nxglib_getrectangle_*bpp.c - @rm -f nxglib_filltrapezoid_*bpp.c - @rm -f nxglib_moverectangle_*bpp.c - @rm -f nxglib_copyrectangle_*bpp.c + $(call DELFILE nxglib_setpixel_*bpp.c) + $(call DELFILE nxglib_fillrectangle_*bpp.c) + $(call DELFILE nxglib_getrectangle_*bpp.c) + $(call DELFILE nxglib_filltrapezoid_*bpp.c) + $(call DELFILE nxglib_moverectangle_*bpp.c) + $(call DELFILE nxglib_copyrectangle_*bpp.c) diff --git a/nuttx/lib/Makefile b/nuttx/lib/Makefile index dca8ea035a..58857dbd41 100644 --- a/nuttx/lib/Makefile +++ b/nuttx/lib/Makefile @@ -40,6 +40,6 @@ all: depend: clean: - $(Q) rm -f *$(LIBEXT) + $(call CLEAN) distclean: clean diff --git a/nuttx/libc/Makefile b/nuttx/libc/Makefile index 313629f2b8..e7dec47768 100644 --- a/nuttx/libc/Makefile +++ b/nuttx/libc/Makefile @@ -114,7 +114,7 @@ else $(Q) ( if [ -f .userlib ]; then rm -f *$(OBJEXT); fi ) endif endif - $(Q) rm -f .userlib *~ .*.swp + $(call DELFILE .userlib) # Clean kernel-mode temporary files (retaining the KBIN binary) @@ -126,17 +126,20 @@ else $(Q) ( if [ -f .kernlib ]; then rm -f *$(OBJEXT); fi ) endif endif - $(Q) rm -f .kernlib *~ .*.swp + $(call DELFILE .kernlib) # Really clean everything clean: uclean kclean - $(Q) rm -f $(BIN) $(UBIN) $(KBIN) *~ .*.swp + $(call DELFILE $(BIN)) + $(call DELFILE $(UBIN)) + $(call DELFILE $(KBIN)) $(call CLEAN) # Deep clean -- removes all traces of the configuration distclean: clean - $(Q) rm -f Make.dep .depend + $(call DELFILE Make.dep) + $(call DELFILE .depend) -include Make.dep diff --git a/nuttx/libxx/Makefile b/nuttx/libxx/Makefile index 6093ad4902..cc55784274 100644 --- a/nuttx/libxx/Makefile +++ b/nuttx/libxx/Makefile @@ -105,10 +105,11 @@ $(BIN): $(OBJS) depend: .depend clean: - $(Q) rm -f $(BIN) *~ .*.swp + $(call DELFILE $(BIN)) $(call CLEAN) distclean: clean - $(Q) rm -f Make.dep .depend + $(call DELFILE Make.dep) + $(call DELFILE .depend) -include Make.dep diff --git a/nuttx/mm/Makefile b/nuttx/mm/Makefile index 8cdfb4d279..b14560ce36 100644 --- a/nuttx/mm/Makefile +++ b/nuttx/mm/Makefile @@ -70,10 +70,11 @@ $(BIN): $(OBJS) depend: .depend clean: - $(Q) rm -f $(BIN) *~ .*.swp + $(call DELFILE $(BIN)) $(call CLEAN) distclean: clean - $(Q) rm -f Make.dep .depend + $(call DELFILE Make.dep) + $(call DELFILE .depend) -include Make.dep diff --git a/nuttx/mm/Makefile.test b/nuttx/mm/Makefile.test index 63cab910e9..e0f1109d86 100644 --- a/nuttx/mm/Makefile.test +++ b/nuttx/mm/Makefile.test @@ -33,12 +33,14 @@ # ############################################################################ -SRCS = mm_test.c mm_initialize.c mm_sem.c mm_addfreechunk.c mm_size2ndx.c mm_shrinkchunk.c \ +-include $(TOPDIR)/Make.defs + +SRCS = mm_test.c mm_initialize.c mm_sem.c mm_addfreechunk.c mm_size2ndx.c mm_shrinkchunk.c \ mm_malloc.c mm_zalloc.c mm_calloc.c mm_realloc.c \ mm_memalign.c mm_free.c mm_mallinfo.c -OBJS = $(SRCS:.c=.o1) +OBJS = $(SRCS:.c=.o1) -LIBS = -lpthread -lc +LIBS = -lpthread -lc CC = gcc LD = gcc @@ -48,17 +50,19 @@ WARNIGNS = -Wall -Wstrict-prototypes -Wshadow CFLAGS = -g $(DEFINES) LDFLAGS = -BIN = ../mm_test +BIN = ..$(DELIM)mm_test all: $(BIN) $(OBJS): %.o1: %.c @echo "Compiling $<" - $(CC) -c $(CFLAGS) $< -o $@ + $(Q) $(CC) -c $(CFLAGS) $< -o $@ $(BIN): $(OBJS) @echo "Linking {$(OBJS)} to produce $@" - $(LD) $(LDFLAGS) $(OBJS) $(LIBS) -o $@ + $(Q) $(LD) $(LDFLAGS) $(OBJS) $(LIBS) -o $@ clean: - @rm -f $(BIN) *.o1 *~ + $(call DELFILE $(BIN)) + $(call DELFILE *.o1) + $(call CLEAN) diff --git a/nuttx/net/Makefile b/nuttx/net/Makefile index aed5734dfc..29148fafac 100644 --- a/nuttx/net/Makefile +++ b/nuttx/net/Makefile @@ -111,11 +111,11 @@ endif depend: .depend clean: - $(Q) rm -f $(BIN) *~ .*.swp - $(Q) rm -f uip/*~ uip/.*.swp + $(call DELFILE $(BIN)) $(call CLEAN) distclean: clean - $(Q) rm -f Make.dep .depend + $(call DELFILE Make.dep) + $(call DELFILE .depend) -include Make.dep diff --git a/nuttx/sched/Makefile b/nuttx/sched/Makefile index 601ba58193..ac6489b184 100644 --- a/nuttx/sched/Makefile +++ b/nuttx/sched/Makefile @@ -188,6 +188,7 @@ OBJS = $(AOBJS) $(COBJS) BIN = libsched$(LIBEXT) all: $(BIN) +.PHONY: context depend clean distclean $(AOBJS): %$(OBJEXT): %.S $(call ASSEMBLE, $<, $@) @@ -205,10 +206,11 @@ $(BIN): $(OBJS) depend: .depend clean: - $(Q) rm -f $(BIN) + $(call DELFILE $(BIN)) $(call CLEAN) distclean: clean - $(Q) rm -f Make.dep .depend + $(call DELFILE Make.dep) + $(call DELFILE .depend) -include Make.dep diff --git a/nuttx/syscall/Makefile b/nuttx/syscall/Makefile index a21eb04ee7..15e06e097b 100644 --- a/nuttx/syscall/Makefile +++ b/nuttx/syscall/Makefile @@ -34,11 +34,11 @@ ########################################################################### -include $(TOPDIR)/Make.defs -include proxies/Make.defs -include stubs/Make.defs +include proxies$(DELIM)Make.defs +include stubs$(DELIM)Make.defs -MKSYSCALL = "$(TOPDIR)/tools/mksyscall$(EXEEXT)" -CSVFILE = "$(TOPDIR)/syscall/syscall.csv" +MKSYSCALL = "$(TOPDIR)$(DELIM)tools$(DELIM)mksyscall$(EXEEXT)" +CSVFILE = "$(TOPDIR)$(DELIM)syscall$(DELIM)syscall.csv" STUB_SRCS += stub_lookup.c @@ -85,7 +85,7 @@ $(BIN2): $(STUB_OBJS) depend: .depend $(MKSYSCALL): - $(Q) $(MAKE) -C $(TOPDIR)/tools -f Makefile.host mksyscall + $(Q) $(MAKE) -C $(TOPDIR)$(DELIM)tools -f Makefile.host mksyscall .context: syscall.csv $(Q) (cd proxies; $(MKSYSCALL) -p $(CSVFILE);) @@ -95,15 +95,20 @@ $(MKSYSCALL): context: $(MKSYSCALL) .context clean: - $(Q) rm -f $(BIN1) $(BIN2) *~ .*.swp + $(call DELFILE $(BIN1)) + $(call DELFILE $(BIN2)) ifneq ($(OBJEXT),) - $(Q) rm -f proxies/*$(OBJEXT) stubs/*$(OBJEXT) + $(call DELFILE proxies$(DELIM)*$(OBJEXT)) + $(call DELFILE stubs$(DELIM)*$(OBJEXT)) endif $(call CLEAN) distclean: clean - $(Q) rm -f Make.dep .depend .context - $(Q) rm -f proxies/*.c stubs/*.c + $(call DELFILE .context) + $(call DELFILE Make.dep) + $(call DELFILE .depend) + $(call DELFILE proxies$(DELIM)*.c) + $(call DELFILE stubs$(DELIM)*.c) -include Make.dep diff --git a/nuttx/tools/Config.mk b/nuttx/tools/Config.mk index 4cdda113c7..aafb58f35b 100644 --- a/nuttx/tools/Config.mk +++ b/nuttx/tools/Config.mk @@ -2,7 +2,9 @@ # Config.mk # Global build rules and macros. # +# Copyright (C) 2011 Gregory Nutt. All rights reserved. # Author: Richard Cochran +# Gregory Nutt # # This file (along with $(TOPDIR)/.config) must be included by every # configuration-specific Make.defs file. @@ -43,6 +45,12 @@ CONFIG_ARCH := $(patsubst "%",%,$(strip $(CONFIG_ARCH))) CONFIG_ARCH_CHIP := $(patsubst "%",%,$(strip $(CONFIG_ARCH_CHIP))) CONFIG_ARCH_BOARD := $(patsubst "%",%,$(strip $(CONFIG_ARCH_BOARD))) +# Some defaults just to prohibit some bad behavior if for some reason they +# are not defined + +OBJEXT ?= .o +LIBEXT ?= .a + # DELIM - Path segment delimiter character # # Depends on this settings defined in board-specific defconfig file installed @@ -167,12 +175,30 @@ define ARCHIVE endef endif +# DELFILE - Delete one file + ifeq ($(CONFIG_WINDOWS_NATIVE),y) -define CLEAN - $(Q) rm -f *.o *.a +define DELFILE + $(Q) if exist $1 (del /f /q $1) endef else define CLEAN - $(Q) rm -f *.o *.a *~ .*.swp + $(Q) rm -f $1 endef endif + +# CLEAN - Default clean target + +ifeq ($(CONFIG_WINDOWS_NATIVE),y) +define CLEAN + $(Q) if exist *$(OBJEXT) (del /f /q *$(OBJEXT)) + $(Q) if exist *$(LIBEXT) (del /f /q *$(LIBEXT)) + $(Q) if exist *~ (del /f /q *~) + $(Q) if exist (del /f /q .*.swp) +endef +else +define CLEAN + $(Q) rm -f *$(OBJEXT) *$(LIBEXT) *~ .*.swp +endef +endif + \ No newline at end of file diff --git a/nuttx/tools/Makefile.host b/nuttx/tools/Makefile.host index 16975a42a3..559192c5e3 100644 --- a/nuttx/tools/Makefile.host +++ b/nuttx/tools/Makefile.host @@ -122,8 +122,18 @@ mkdeps: mkdeps$(HOSTEXEEXT) endif clean: - $(Q) rm -f *.o *.a *~ .*.swp - $(Q) rm -f mkdeps mkconfig mksyscall mkversion bdf-converter - $(Q) rm -f mkdeps.exe mkconfig.exe mksyscall.exe mkversion.exe bdf-converter.exe + $(call DELFILE mkdeps) + $(call DELFILE mkdeps.exe) + $(call DELFILE mkconfig) + $(call DELFILE mkconfig.exe) + $(call DELFILE Make.dep) + $(call DELFILE mksyscall) + $(call DELFILE mksyscall.exe) + $(call DELFILE mkversion) + $(call DELFILE mkversion.exe) + $(call DELFILE bdf-converter) + $(call DELFILE bdf-converter.exe) +ifneq ($(CONFIG_WINDOWS_NATIVE),y) $(Q) rm -rf *.dSYM - +endif + $(call CLEAN)