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 ++++--- 111 files changed, 633 insertions(+), 475 deletions(-) (limited to 'apps') 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 -- cgit v1.2.3