From a444a16f4746959a1332cb21749fbdf9a31df091 Mon Sep 17 00:00:00 2001 From: patacongo Date: Sat, 17 Nov 2012 18:54:53 +0000 Subject: Most of the changes needed to support Windows native clean; distclean is has a problem git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5367 42af7a65-404d-4744-a932-0658087f49c3 --- apps/Makefile | 11 ++++-- apps/examples/adc/Makefile | 5 ++- apps/examples/buttons/Makefile | 5 ++- apps/examples/can/Makefile | 5 ++- apps/examples/cdcacm/Makefile | 5 ++- apps/examples/composite/Makefile | 5 ++- apps/examples/cxxtest/Makefile | 5 ++- apps/examples/dhcpd/Makefile | 5 ++- apps/examples/discover/Makefile | 5 ++- apps/examples/elf/Makefile | 5 ++- apps/examples/elf/tests/errno/Makefile | 14 +++---- apps/examples/elf/tests/hello/Makefile | 12 +++--- apps/examples/elf/tests/helloxx/Makefile | 29 ++++++++------- apps/examples/elf/tests/longjmp/Makefile | 12 +++--- apps/examples/elf/tests/mutex/Makefile | 12 +++--- apps/examples/elf/tests/pthread/Makefile | 12 +++--- apps/examples/elf/tests/signal/Makefile | 12 +++--- apps/examples/elf/tests/struct/Makefile | 12 +++--- apps/examples/elf/tests/task/Makefile | 14 +++---- apps/examples/ftpc/Makefile | 6 ++- apps/examples/ftpd/Makefile | 5 ++- apps/examples/hello/Makefile | 5 ++- apps/examples/helloxx/Makefile | 5 ++- apps/examples/hidkbd/Makefile | 5 ++- apps/examples/igmp/Makefile | 5 ++- apps/examples/json/Makefile | 5 ++- apps/examples/lcdrw/Makefile | 5 ++- apps/examples/mm/Makefile | 5 ++- apps/examples/modbus/Makefile | 5 ++- apps/examples/mount/Makefile | 5 ++- apps/examples/nettest/Makefile | 6 ++- apps/examples/nsh/Makefile | 5 ++- apps/examples/null/Makefile | 5 ++- apps/examples/nx/Makefile | 5 ++- apps/examples/nxconsole/Makefile | 5 ++- apps/examples/nxffs/Makefile | 5 ++- apps/examples/nxflat/Makefile | 5 ++- apps/examples/nxflat/tests/errno/Makefile | 23 +++++++----- apps/examples/nxflat/tests/hello++/Makefile | 53 ++++++++++++++++----------- apps/examples/nxflat/tests/hello/Makefile | 23 +++++++----- apps/examples/nxflat/tests/longjmp/Makefile | 23 +++++++----- apps/examples/nxflat/tests/mutex/Makefile | 23 +++++++----- apps/examples/nxflat/tests/pthread/Makefile | 20 ++++++---- apps/examples/nxflat/tests/signal/Makefile | 23 +++++++----- apps/examples/nxflat/tests/struct/Makefile | 23 +++++++----- apps/examples/nxflat/tests/task/Makefile | 23 +++++++----- apps/examples/nxhello/Makefile | 5 ++- apps/examples/nximage/Makefile | 5 ++- apps/examples/nxlines/Makefile | 5 ++- apps/examples/nxtext/Makefile | 5 ++- apps/examples/ostest/Makefile | 5 ++- apps/examples/pashello/Makefile | 5 ++- apps/examples/pipe/Makefile | 5 ++- apps/examples/poll/Makefile | 6 ++- apps/examples/pwm/Makefile | 5 ++- apps/examples/qencoder/Makefile | 5 ++- apps/examples/relays/Makefile | 5 ++- apps/examples/rgmp/Makefile | 5 ++- apps/examples/romfs/Makefile | 6 ++- apps/examples/sendmail/Makefile | 5 ++- apps/examples/sendmail/Makefile.host | 4 +- apps/examples/serloop/Makefile | 5 ++- apps/examples/telnetd/Makefile | 5 ++- apps/examples/thttpd/Makefile | 5 ++- apps/examples/thttpd/content/Makefile | 6 ++- apps/examples/thttpd/content/hello/Makefile | 23 +++++++----- apps/examples/thttpd/content/netstat/Makefile | 23 +++++++----- apps/examples/thttpd/content/tasks/Makefile | 23 +++++++----- apps/examples/tiff/Makefile | 9 +++-- apps/examples/touchscreen/Makefile | 5 ++- apps/examples/udp/Makefile | 7 +++- apps/examples/uip/Makefile | 7 ++-- apps/examples/usbserial/Makefile | 6 +-- apps/examples/usbserial/Makefile.host | 5 +-- apps/examples/usbstorage/Makefile | 5 ++- apps/examples/usbterm/Makefile | 5 ++- apps/examples/watchdog/Makefile | 5 ++- apps/examples/wget/Makefile | 5 ++- apps/examples/wget/Makefile.host | 4 +- apps/examples/wgetjson/Makefile | 5 ++- apps/examples/wlan/Makefile | 5 ++- apps/examples/xmlrpc/Makefile | 5 ++- apps/graphics/tiff/Makefile | 12 +++--- apps/interpreters/ficl/Makefile | 12 +++--- apps/modbus/Makefile | 13 ++++--- apps/namedapp/Makefile | 10 +++-- apps/netutils/codecs/Makefile | 11 +++--- apps/netutils/dhcpc/Makefile | 11 +++--- apps/netutils/dhcpd/Makefile | 11 +++--- apps/netutils/discover/Makefile | 11 +++--- apps/netutils/ftpc/Makefile | 11 +++--- apps/netutils/ftpd/Makefile | 11 +++--- apps/netutils/json/Makefile | 11 +++--- apps/netutils/resolv/Makefile | 11 +++--- apps/netutils/smtp/Makefile | 11 +++--- apps/netutils/telnetd/Makefile | 11 +++--- apps/netutils/tftpc/Makefile | 11 +++--- apps/netutils/thttpd/Makefile | 25 +++++++------ apps/netutils/uiplib/Makefile | 11 +++--- apps/netutils/webclient/Makefile | 11 +++--- apps/netutils/webserver/Makefile | 11 +++--- apps/netutils/xmlrpc/Makefile | 11 +++--- apps/nshlib/Makefile | 6 ++- apps/system/free/Makefile | 14 ++++--- apps/system/i2c/Makefile | 14 ++++--- apps/system/install/Makefile | 14 ++++--- apps/system/poweroff/Makefile | 14 ++++--- apps/system/ramtron/Makefile | 14 ++++--- apps/system/readline/Makefile | 12 +++--- apps/system/sdcard/Makefile | 14 ++++--- apps/system/sysinfo/Makefile | 14 ++++--- nuttx/Makefile.unix | 23 ++++++++---- nuttx/Makefile.win | 36 +++++++++--------- nuttx/arch/8051/src/Makefile | 6 ++- nuttx/arch/arm/src/Makefile | 5 ++- nuttx/arch/avr/src/Makefile | 5 ++- nuttx/arch/hc/src/Makefile | 5 ++- nuttx/arch/mips/src/Makefile | 5 ++- nuttx/arch/rgmp/src/Makefile | 10 +++-- nuttx/arch/sh/src/Makefile | 5 ++- nuttx/arch/sim/src/Makefile | 6 ++- nuttx/arch/x86/src/Makefile | 5 ++- nuttx/arch/z16/src/Makefile | 10 +++-- nuttx/arch/z80/src/Makefile.sdcc | 10 ++++- nuttx/arch/z80/src/Makefile.zdsii | 10 +++-- nuttx/binfmt/Makefile | 8 ++-- nuttx/configs/stm32f4discovery/src/Makefile | 9 +++-- nuttx/drivers/Makefile | 5 ++- nuttx/fs/Makefile | 8 ++-- nuttx/graphics/Makefile | 6 +-- nuttx/graphics/nxfonts/Makefile.sources | 14 +++---- nuttx/graphics/nxglib/Makefile.sources | 52 +++++++++++++------------- nuttx/lib/Makefile | 2 +- nuttx/libc/Makefile | 11 ++++-- nuttx/libxx/Makefile | 5 ++- nuttx/mm/Makefile | 5 ++- nuttx/mm/Makefile.test | 18 +++++---- nuttx/net/Makefile | 6 +-- nuttx/sched/Makefile | 6 ++- nuttx/syscall/Makefile | 23 +++++++----- nuttx/tools/Config.mk | 30 ++++++++++++++- nuttx/tools/Makefile.host | 18 +++++++-- 142 files changed, 860 insertions(+), 615 deletions(-) diff --git a/apps/Makefile b/apps/Makefile index 7e7d52a40..522731722 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 8f37169c5..e9f3980b1 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 1f209b760..01d0719a9 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 20fb173f0..824cea360 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 1ebbc6e1e..336f57244 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 6fe34a1e9..da528b54b 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 b0f0befbf..f1ab33744 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 6a96281cf..34575f802 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 722ad3d9b..6fa70d092 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 8831a9336..ee3413031 100644 --- a/apps/examples/elf/Makefile +++ b/apps/examples/elf/Makefile @@ -100,10 +100,11 @@ clean_tests: @$(MAKE) -C tests TOPDIR="$(TOPDIR)" APPDIR="$(APPDIR)" CROSSDEV=$(CROSSDEV) clean clean: clean_tests - @rm -f *.o *~ .*.swp .built + $(call DELFILE .built) $(call CLEAN) distclean: clean - @rm -f Make.dep .depend + $(call DELFILE Make.dep) + $(call DELFILE .depend) -include Make.dep diff --git a/apps/examples/elf/tests/errno/Makefile b/apps/examples/elf/tests/errno/Makefile index 09d469f9b..08bffc7dd 100644 --- a/apps/examples/elf/tests/errno/Makefile +++ b/apps/examples/elf/tests/errno/Makefile @@ -33,7 +33,6 @@ # ############################################################################ --include $(TOPDIR)/.config -include $(TOPDIR)/Make.defs BIN = errno @@ -45,16 +44,17 @@ all: $(BIN) $(OBJS): %.o: %.c @echo "CC: $<" - @$(CC) -c $(CELFFLAGS) $< -o $@ + $(Q) $(CC) -c $(CELFFLAGS) $< -o $@ $(BIN): $(OBJS) @echo "LD: $<" - @$(LD) $(LDELFFLAGS) -o $@ $^ + $(Q) $(LD) $(LDELFFLAGS) -o $@ $^ -clean: - @rm -f $(BIN) *.o *~ .*.swp core +clean: + $(call DELFILE $(BIN)) + $(call CLEAN) install: - @mkdir -p $(ROMFS_DIR) - @install $(BIN) $(ROMFS_DIR)/$(BIN) + $(Q) mkdir -p $(ROMFS_DIR) + $(Q) install $(BIN) $(ROMFS_DIR)/$(BIN) diff --git a/apps/examples/elf/tests/hello/Makefile b/apps/examples/elf/tests/hello/Makefile index 88770276b..d4af19e02 100644 --- a/apps/examples/elf/tests/hello/Makefile +++ b/apps/examples/elf/tests/hello/Makefile @@ -33,7 +33,6 @@ # ############################################################################ --include $(TOPDIR)/.config -include $(TOPDIR)/Make.defs BIN = hello @@ -45,15 +44,16 @@ all: $(BIN) $(OBJS): %.o: %.c @echo "CC: $<" - @$(CC) -c $(CELFFLAGS) $< -o $@ + $(Q) $(CC) -c $(CELFFLAGS) $< -o $@ $(BIN): $(OBJS) @echo "LD: $<" - @$(LD) $(LDELFFLAGS) -o $@ $^ + $(Q) $(LD) $(LDELFFLAGS) -o $@ $^ clean: - @rm -f $(BIN) *.o *~ .*.swp core + $(call DELFILE $(BIN)) + $(call CLEAN) install: - @mkdir -p $(ROMFS_DIR) - @install $(BIN) $(ROMFS_DIR)/$(BIN) + $(Q) mkdir -p $(ROMFS_DIR) + $(Q) install $(BIN) $(ROMFS_DIR)/$(BIN) diff --git a/apps/examples/elf/tests/helloxx/Makefile b/apps/examples/elf/tests/helloxx/Makefile index 45b4b8868..e1c9cfc5b 100644 --- a/apps/examples/elf/tests/helloxx/Makefile +++ b/apps/examples/elf/tests/helloxx/Makefile @@ -33,7 +33,6 @@ # ############################################################################ --include $(TOPDIR)/.config -include $(TOPDIR)/Make.defs BIN1 = hello++1 @@ -68,13 +67,13 @@ all: $(BIN1) $(BIN2) $(BIN3) $(BIN4) $(OBJS): %.o: %.cpp @echo "CC: $<" - @$(CXX) -c $(CXXELFFLAGS) $< -o $@ + $(Q) $(CXX) -c $(CXXELFFLAGS) $< -o $@ # This contains libstdc++ stubs to that you can build C++ code # without actually having libstdc++ $(LIBSTDC_STUBS_LIB): - @$(MAKE) -C $(LIBSTDC_STUBS_DIR) TOPDIR=$(TOPDIR) + $(Q) $(MAKE) -C $(LIBSTDC_STUBS_DIR) TOPDIR=$(TOPDIR) # BIN1 and BIN2 link just like C code because they contain no # static constructors. BIN1 is equivalent to a C hello world; @@ -83,18 +82,18 @@ $(LIBSTDC_STUBS_LIB): $(BIN1): $(OBJS1) @echo "LD: $<" - @$(LD) $(LDELFFLAGS) -o $@ $^ + $(Q) $(LD) $(LDELFFLAGS) -o $@ $^ $(BIN2): $(OBJS2) @echo "LD: $<" - @$(LD) $(LDELFFLAGS) -o $@ $^ + $(Q) $(LD) $(LDELFFLAGS) -o $@ $^ # BIN3 is equivalent to BIN2 except that is uses static initializers ifeq ($(CONFIG_BINFMT_CONSTRUCTORS),y) $(BIN3): $(OBJS3) @echo "LD: $<" - @$(LD) $(LDELFFLAGS) -o $@ $^ + $(Q) $(LD) $(LDELFFLAGS) -o $@ $^ endif # BIN4 is similar to BIN3 except that it uses the streams code from libstdc++ @@ -103,19 +102,23 @@ endif # #$(BIN4): $(OBJS4) # @echo "LD: $<" -# @$(LD) $(LDELFFLAGS) -o $@ $^ +# $(Q) $(LD) $(LDELFFLAGS) -o $@ $^ clean: - @rm -f $(ALL_BIN) *.o *~ .*.swp core + $(call DELFILE $(BIN1)) + $(call DELFILE $(BIN2)) + $(call DELFILE $(BIN3)) + $(call DELFILE $(BIN4)) + $(call CLEAN) install: $(ALL_BIN) - @mkdir -p $(ROMFS_DIR) - @install $(BIN1) $(ROMFS_DIR)/$(BIN1) - @install $(BIN2) $(ROMFS_DIR)/$(BIN2) + $(Q) mkdir -p $(ROMFS_DIR) + $(Q) install $(BIN1) $(ROMFS_DIR)/$(BIN1) + $(Q) install $(BIN2) $(ROMFS_DIR)/$(BIN2) ifeq ($(CONFIG_BINFMT_CONSTRUCTORS),y) - @install $(BIN3) $(ROMFS_DIR)/$(BIN3) + $(Q) install $(BIN3) $(ROMFS_DIR)/$(BIN3) endif -# @install $(BIN4) $(ROMFS_DIR)/$(BIN4) +# $(Q) install $(BIN4) $(ROMFS_DIR)/$(BIN4) diff --git a/apps/examples/elf/tests/longjmp/Makefile b/apps/examples/elf/tests/longjmp/Makefile index 04da6ee81..e7a54fc00 100644 --- a/apps/examples/elf/tests/longjmp/Makefile +++ b/apps/examples/elf/tests/longjmp/Makefile @@ -33,7 +33,6 @@ # ############################################################################ --include $(TOPDIR)/.config -include $(TOPDIR)/Make.defs BIN = longjmp @@ -45,15 +44,16 @@ all: $(BIN) $(OBJS): %.o: %.c @echo "CC: $<" - @$(CC) -c $(CELFFLAGS) $< -o $@ + $(Q) $(CC) -c $(CELFFLAGS) $< -o $@ $(BIN): $(OBJS) @echo "LD: $<" - @$(LD) $(LDELFFLAGS) -o $@ $^ + $(Q) $(LD) $(LDELFFLAGS) -o $@ $^ clean: - @rm -f $(BIN) *.o *~ .*.swp core + $(call DELFILE $(BIN)) + $(call CLEAN) install: - @mkdir -p $(ROMFS_DIR) - @install $(BIN) $(ROMFS_DIR)/$(BIN) + $(Q) mkdir -p $(ROMFS_DIR) + $(Q) install $(BIN) $(ROMFS_DIR)/$(BIN) diff --git a/apps/examples/elf/tests/mutex/Makefile b/apps/examples/elf/tests/mutex/Makefile index 756ada2c0..958c0c38e 100644 --- a/apps/examples/elf/tests/mutex/Makefile +++ b/apps/examples/elf/tests/mutex/Makefile @@ -33,7 +33,6 @@ # ############################################################################ --include $(TOPDIR)/.config -include $(TOPDIR)/Make.defs BIN = mutex @@ -45,15 +44,16 @@ all: $(BIN) $(OBJS): %.o: %.c @echo "CC: $<" - @$(CC) -c $(CELFFLAGS) $< -o $@ + $(Q) $(CC) -c $(CELFFLAGS) $< -o $@ $(BIN): $(OBJS) @echo "LD: $<" - @$(LD) $(LDELFFLAGS) -o $@ $^ + $(Q) $(LD) $(LDELFFLAGS) -o $@ $^ clean: - @rm -f $(BIN) *.o *~ .*.swp core + $(call DELFILE $(BIN)) + $(call CLEAN) install: - @mkdir -p $(ROMFS_DIR) - @install $(BIN) $(ROMFS_DIR)/$(BIN) + $(Q) mkdir -p $(ROMFS_DIR) + $(Q) install $(BIN) $(ROMFS_DIR)/$(BIN) diff --git a/apps/examples/elf/tests/pthread/Makefile b/apps/examples/elf/tests/pthread/Makefile index 4bea4515b..a491b9874 100644 --- a/apps/examples/elf/tests/pthread/Makefile +++ b/apps/examples/elf/tests/pthread/Makefile @@ -33,7 +33,6 @@ # ############################################################################ --include $(TOPDIR)/.config -include $(TOPDIR)/Make.defs BIN = pthread @@ -45,15 +44,16 @@ all: $(BIN) $(OBJS): %.o: %.c @echo "CC: $<" - @$(CC) -c $(CELFFLAGS) $< -o $@ + $(Q) $(CC) -c $(CELFFLAGS) $< -o $@ $(BIN): $(OBJS) @echo "LD: $<" - @$(LD) $(LDELFFLAGS) -o $@ $^ + $(Q) $(LD) $(LDELFFLAGS) -o $@ $^ clean: - @rm -f $(BIN) *.o *~ .*.swp core + $(call DELFILE $(BIN)) + $(call CLEAN) install: - @mkdir -p $(ROMFS_DIR) - @install $(BIN) $(ROMFS_DIR)/$(BIN) + $(Q) mkdir -p $(ROMFS_DIR) + $(Q) install $(BIN) $(ROMFS_DIR)/$(BIN) diff --git a/apps/examples/elf/tests/signal/Makefile b/apps/examples/elf/tests/signal/Makefile index 9eaaf8609..227f99521 100644 --- a/apps/examples/elf/tests/signal/Makefile +++ b/apps/examples/elf/tests/signal/Makefile @@ -33,7 +33,6 @@ # ############################################################################ --include $(TOPDIR)/.config -include $(TOPDIR)/Make.defs BIN = signal @@ -45,15 +44,16 @@ all: $(BIN) $(OBJS): %.o: %.c @echo "CC: $<" - @$(CC) -c $(CELFFLAGS) $< -o $@ + $(Q) $(CC) -c $(CELFFLAGS) $< -o $@ $(BIN): $(OBJS) @echo "LD: $<" - @$(LD) $(LDELFFLAGS) -o $@ $^ + $(Q) $(LD) $(LDELFFLAGS) -o $@ $^ clean: - @rm -f $(BIN) *.o *~ .*.swp core + $(call DELFILE $(BIN)) + $(call CLEAN) install: - @mkdir -p $(ROMFS_DIR) - @install $(BIN) $(ROMFS_DIR)/$(BIN) + $(Q) mkdir -p $(ROMFS_DIR) + $(Q) install $(BIN) $(ROMFS_DIR)/$(BIN) diff --git a/apps/examples/elf/tests/struct/Makefile b/apps/examples/elf/tests/struct/Makefile index 2ddd80b89..3224c655e 100644 --- a/apps/examples/elf/tests/struct/Makefile +++ b/apps/examples/elf/tests/struct/Makefile @@ -33,7 +33,6 @@ # ############################################################################ --include $(TOPDIR)/.config -include $(TOPDIR)/Make.defs CELFFLAGS += -I. @@ -46,15 +45,16 @@ all: $(BIN) $(OBJS): %.o: %.c @echo "CC: $<" - @$(CC) -c $(CELFFLAGS) $< -o $@ + $(Q) $(CC) -c $(CELFFLAGS) $< -o $@ $(BIN): $(OBJS) @echo "LD: $<" - @$(LD) $(LDELFFLAGS) -o $@ $^ + $(Q) $(LD) $(LDELFFLAGS) -o $@ $^ clean: - @rm -f $(BIN) *.o *~ .*.swp core + $(call DELFILE $(BIN)) + $(call CLEAN) install: - @mkdir -p $(ROMFS_DIR) - @install $(BIN) $(ROMFS_DIR)/$(BIN) + $(Q) mkdir -p $(ROMFS_DIR) + $(Q) install $(BIN) $(ROMFS_DIR)/$(BIN) diff --git a/apps/examples/elf/tests/task/Makefile b/apps/examples/elf/tests/task/Makefile index accac987f..cf56b1287 100644 --- a/apps/examples/elf/tests/task/Makefile +++ b/apps/examples/elf/tests/task/Makefile @@ -33,7 +33,6 @@ # ############################################################################ --include $(TOPDIR)/.config -include $(TOPDIR)/Make.defs BIN = task @@ -45,15 +44,16 @@ all: $(BIN) $(OBJS): %.o: %.c @echo "CC: $<" - @$(CC) -c $(CELFFLAGS) $< -o $@ + $(Q) $(CC) -c $(CELFFLAGS) $< -o $@ $(BIN): $(OBJS) @echo "LD: $<" - @$(LD) $(LDELFFLAGS) -o $@ $^ + $(Q) $(LD) $(LDELFFLAGS) -o $@ $^ -clean: - @rm -f $(BIN) *.o *~ .*.swp core +clean: + $(call DELFILE $(BIN)) + $(call CLEAN) install: - @mkdir -p $(ROMFS_DIR) - @install $(BIN) $(ROMFS_DIR)/$(BIN) + $(Q) mkdir -p $(ROMFS_DIR) + $(Q) install $(BIN) $(ROMFS_DIR)/$(BIN) diff --git a/apps/examples/ftpc/Makefile b/apps/examples/ftpc/Makefile index 9f9f689db..3cdc93060 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 cae8a282e..071784b8e 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 53fbead98..b35b97eb0 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 295d0116e..739f26252 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 cb0f32c60..0dbfbdb77 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 5f9d4aa98..a94a97cf7 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 0551eccfe..bdd93fd17 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 fab2a6939..bbe46025d 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 5d29c6d90..bb14a2e4e 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 937212f72..f6e964f51 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 d244852d0..becc6670b 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 c1c50bbb8..76ad94d6f 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 fdf5a2a90..0c0ebe8b9 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 fa3b83d2a..d37d9e637 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 7bc861bbd..a77ad792a 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 eb72c87b9..555511882 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 c66a0ec33..be2a34eae 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 4fc315592..5f5a302c3 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 df3ea1e3e..d05154525 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 3433145dc..445049e94 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 e7e66c628..cf1a4eb80 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 47a1c4905..55deadbb7 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 fe6684856..97e5c356e 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 f645441ad..5dd6a2a10 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 222c57dbe..e39f3a8d4 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 69f9dd2f3..ac789f3f4 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 8b17ec822..d27213817 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 6ab65c53d..be52882c3 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 b552c0bf6..b20e46350 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 b52da37d2..cd5753ef9 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 5067d2af7..68c4a026f 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 e49013918..2d93126ad 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 af33975d0..df86e7d62 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 e0168ed0a..e6cefbcdb 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 89b314511..dc33d6b49 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 6aeb38594..c7cc700bd 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 483043c46..817ba17cc 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 bb988f775..385bc8520 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 c7e2c5979..72d5e660a 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 370141276..5190a7a6e 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 e8d05ceab..049321b52 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 bef7eebbf..e6ff39540 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 ecf7984e5..01d2c60fe 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 7c541cba9..a1f0f7c63 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 10bcb9af0..5320a0a13 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 1f5ce4246..8a74201b5 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 76d4e67c8..74ff2116a 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 9769c9207..d9953547a 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 b76c3f22a..c668285d8 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 73a687c25..373c07ca7 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 ad1036316..f25296620 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 d6c89cac4..79606c69b 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 487512072..99e140f04 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 0761dd48c..2c34fa275 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 628304cd4..9fb43269d 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 8c142e0c6..4c8323e00 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 6622759f6..acf9812bd 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 f3c9a8bf9..8bbdbfea6 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 859ae999d..d74c248e9 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 5d746441a..14da45c7e 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 c03715ad5..96748defb 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 c50b13227..be2dbea7a 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 84d3ed4be..5ab60a0dd 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 1ce2813c8..996f51894 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 cbea9163a..97cc9d638 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 59e2e2526..c0f01bc94 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 8f653a208..f52e8a9d5 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 6dcd94e9b..644a07dec 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 67cad4214..0fe968101 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 13f121511..359231398 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 3f5c1f71f..22c06b472 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 65c2d59c5..952489550 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 9956bf97f..cccdf548a 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 4a54ab5f7..d8f492aed 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 d9a74989b..c5ec8fff1 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 d9e6e5c0e..ec3e513b8 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 e024134ff..f614719d5 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 050da06d0..56d3ded12 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 a0d5b0ea2..aa053b709 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 fa9296c0a..d4f73fb83 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 ef9dbd78b..7ade03cb9 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 26362be5d..6c5e3d286 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 1eb391987..bf7815360 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 afe001419..16efe99cc 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 a4cd50687..9637fa772 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 8dd4bc563..7cdbcdf59 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 99de400c9..951917a77 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 a96a60033..46b595e84 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 b300a3711..60a2be66a 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 fb60b6fc4..f67dc85f6 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 50bf0eeb1..ee95505a2 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 a8821c7de..06c27a8be 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 439aa2d4b..3b641e8b2 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 f43f14f0d..f98c5e6d8 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 4772834d9..6c87b8bc9 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 a48d18799..a6d5fa4f4 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 462968ed5..69d3a0fc0 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 0ada6c4c2..7353b44ea 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 057b95d22..b27fe8730 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 7650a0a94..019dca465 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 132ca4610..af7c481a9 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 a5d6100a3..5abd6ce4f 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 19193709c..e93dc2657 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 44f96d03d..d3f581998 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 7c9f45a6c..e29fa9fda 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 666af8945..1d7b1f96d 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 06def551f..f90ea0417 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 b6d0f6226..f4d5a89d9 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 98bb8a7d0..57b2b489a 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 b55ec6218..eb036fed0 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 d0fdb647d..ddcfd21d2 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 f2aa87caf..eeb47d1b2 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 67f8defc3..bb94c1b20 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 dca8ea035..58857dbd4 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 313629f2b..e7dec4776 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 6093ad490..cc5578427 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 8cdfb4d27..b14560ce3 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 63cab910e..e0f1109d8 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 aed5734df..29148fafa 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 601ba5819..ac6489b18 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 a21eb04ee..15e06e097 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 4cdda113c..aafb58f35 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 DELFILE + $(Q) if exist $1 (del /f /q $1) +endef +else +define CLEAN + $(Q) rm -f $1 +endef +endif + +# CLEAN - Default clean target + ifeq ($(CONFIG_WINDOWS_NATIVE),y) define CLEAN - $(Q) rm -f *.o *.a + $(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 *.o *.a *~ .*.swp + $(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 16975a42a..559192c5e 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) -- cgit v1.2.3