diff options
Diffstat (limited to 'nuttx')
31 files changed, 83 insertions, 49 deletions
diff --git a/nuttx/Documentation/NuttxPortingGuide.html b/nuttx/Documentation/NuttxPortingGuide.html index 11c134634..9ae720862 100644 --- a/nuttx/Documentation/NuttxPortingGuide.html +++ b/nuttx/Documentation/NuttxPortingGuide.html @@ -16,7 +16,7 @@ </b></big> <p><small>by</small></p> <p>Gregory Nutt</p> - <p><small>Last Update: January 6, 2006</small></p> + <p><small>Last Update: January 10, 2008</small></p> </center> <center><h1>Table of Contents</h1></center> @@ -518,7 +518,7 @@ <ul> <li>Tools: CC, LD, AR, NM, OBJCOPY, OBJDUMP</li> <li>Tool options: CFLAGS, LDFLAGS</li> - <li>COMPILE, ASSEMBLE, ARCHIVE, and MKDEP macros</li> + <li>COMPILE, ASSEMBLE, ARCHIVE, CLEAN, and MKDEP macros</li> </ul> <p> When this makefile fragment runs, it will be passed TOPDIR which diff --git a/nuttx/Makefile b/nuttx/Makefile index 43d8d5093..2d5d2aba5 100644 --- a/nuttx/Makefile +++ b/nuttx/Makefile @@ -217,7 +217,7 @@ subdir_clean: @$(MAKE) -C mm -f Makefile.test TOPDIR="$(TOPDIR)" clean clean: subdir_clean - rm -f $(BIN) $(BIN).* mm_test *.map *~ + @rm -f $(BIN) $(BIN).* mm_test *.map *~ subdir_distclean: @for dir in $(CLEANDIRS) ; do \ @@ -227,6 +227,6 @@ subdir_distclean: done distclean: clean subdir_distclean clean_context - rm -f Make.defs setenv.sh .config + @rm -f Make.defs setenv.sh .config diff --git a/nuttx/arch/arm/src/Makefile b/nuttx/arch/arm/src/Makefile index 445577b4a..9e6bda77c 100644 --- a/nuttx/arch/arm/src/Makefile +++ b/nuttx/arch/arm/src/Makefile @@ -111,8 +111,8 @@ clean: @if [ -e board/Makefile ]; then \ $(MAKE) -C board TOPDIR="$(TOPDIR)" clean ; \ fi - @rm -f libarch$(LIBEXT) *~ - @if [ ! -z "$(OBJEXT)" ]; then rm -f *$(OBJEXT); fi + @rm -f libarch$(LIBEXT) *~ .*.swp + $(call CLEAN) distclean: clean @if [ -e board/Makefile ]; then \ diff --git a/nuttx/arch/c5471/src/Makefile b/nuttx/arch/c5471/src/Makefile index c04d9a9a6..1e7933b8f 100644 --- a/nuttx/arch/c5471/src/Makefile +++ b/nuttx/arch/c5471/src/Makefile @@ -113,7 +113,8 @@ clean: @if [ -e board/Makefile ]; then \ $(MAKE) -C board TOPDIR=$(TOPDIR) clean ; \ fi - rm -f libarch$(LIBEXT) *.o *.obj *~ + @rm -f libarch$(LIBEXT) *~ .*.swp + $(call CLEAN) distclean: clean @if [ -e board/Makefile ]; then \ diff --git a/nuttx/arch/dm320/src/Makefile b/nuttx/arch/dm320/src/Makefile index 41b9a90ab..8ce53aa74 100644 --- a/nuttx/arch/dm320/src/Makefile +++ b/nuttx/arch/dm320/src/Makefile @@ -113,12 +113,13 @@ clean: @if [ -e board/Makefile ]; then \ $(MAKE) -C board TOPDIR=$(TOPDIR) clean ; \ fi - rm -f libarch$(LIBEXT) *.o *.obj *~ + @rm -f libarch$(LIBEXT) *~ .*.swp + $(call CLEAN) distclean: clean @if [ -e board/Makefile ]; then \ $(MAKE) -C board TOPDIR=$(TOPDIR) distclean ; \ fi - rm -f Make.dep .depend + @rm -f Make.dep .depend -include Make.dep diff --git a/nuttx/arch/pjrc-8051/src/Makefile b/nuttx/arch/pjrc-8051/src/Makefile index 5d95b2f78..d77bf546d 100644 --- a/nuttx/arch/pjrc-8051/src/Makefile +++ b/nuttx/arch/pjrc-8051/src/Makefile @@ -211,9 +211,8 @@ clean: @if [ -e board/Makefile ]; then \ $(MAKE) -C board TOPDIR=$(TOPDIR) clean ; \ fi - rm -f libarch$(LIBEXT) up_mem.h - rm -f *.asm *.rel *.lst *.rst *.sym *.adb *.lnk *.map *.mem *.ihx *.hex *~ - if [ ! -z "$(OBJEXT)" ]; then rm -f *$(OBJEXT); fi + @rm -f libarch$(LIBEXT) up_mem.h *~ .*.swp + $(call CLEAN) distclean: clean @if [ -e board/Makefile ]; then \ diff --git a/nuttx/arch/sim/src/Makefile b/nuttx/arch/sim/src/Makefile index c31c4e17e..ea92eb50c 100644 --- a/nuttx/arch/sim/src/Makefile +++ b/nuttx/arch/sim/src/Makefile @@ -101,8 +101,8 @@ nuttx$(EXEEXT): $(LINKOBJS) depend: .depend clean: - @rm -f libarch$(LIBEXT) *~ - @if [ ! -z "$(OBJEXT)" ]; then rm -f *$(OBJEXT); fi + @rm -f libarch$(LIBEXT) *~ .*.swp + $(call CLEAN) distclean: clean @rm -f Make.dep .depend diff --git a/nuttx/arch/z16/src/Makefile b/nuttx/arch/z16/src/Makefile index 2ce3a3013..cd0692447 100644 --- a/nuttx/arch/z16/src/Makefile +++ b/nuttx/arch/z16/src/Makefile @@ -99,8 +99,8 @@ clean: @if [ -e board/Makefile ]; then \ $(MAKE) -C board TOPDIR="$(TOPDIR)" clean ; \ fi - @rm -f libarch$(LIBEXT) *~ - @if [ ! -z "$(OBJEXT)" ]; then rm -f *$(OBJEXT); fi + @rm -f libarch$(LIBEXT) *~ .*.swp + $(call CLEAN) distclean: clean @if [ -e board/Makefile ]; then \ diff --git a/nuttx/arch/z80/src/Makefile b/nuttx/arch/z80/src/Makefile index 2c1f15c99..9f5e752d4 100644 --- a/nuttx/arch/z80/src/Makefile +++ b/nuttx/arch/z80/src/Makefile @@ -234,10 +234,8 @@ clean: @if [ -e board/Makefile ]; then \ $(MAKE) -C board TOPDIR="$(TOPDIR)" clean ; \ fi - rm -f libarch$(LIBEXT) up_mem.h asm_mem.h pass1.* nuttx.* - rm -f *.asm *.rel *.lst *.rst *.sym *.adb *.lnk *.map *.mem *.ihx *.hex - rm -f core *~ .*.swp *.swp - if [ ! -z "$(OBJEXT)" ]; then rm -f *$(OBJEXT); fi + @rm -f libarch$(LIBEXT) up_mem.h asm_mem.h pass1.* nuttx.* *~ .*.swp + $(call CLEAN) distclean: clean @if [ -e board/Makefile ]; then \ diff --git a/nuttx/configs/README.txt b/nuttx/configs/README.txt index 3bcb62e00..fb6c65565 100644 --- a/nuttx/configs/README.txt +++ b/nuttx/configs/README.txt @@ -81,7 +81,7 @@ Make.defs -- This makefile fragment provides architecture and Tools: CC, LD, AR, NM, OBJCOPY, OBJDUMP Tool options: CFLAGS, LDFLAGS - COMPILE, ASSEMBLE, ARCHIVE, and MKDEP macros + COMPILE, ASSEMBLE, ARCHIVE, CLEAN, and MKDEP macros When this makefile fragment runs, it will be passed TOPDIR which is the path to the root directory of the build. This makefile diff --git a/nuttx/configs/c5471evm/Make.defs b/nuttx/configs/c5471evm/Make.defs index cda4d7208..bd44f0f7f 100644 --- a/nuttx/configs/c5471evm/Make.defs +++ b/nuttx/configs/c5471evm/Make.defs @@ -84,6 +84,10 @@ define ARCHIVE $(AR) $1 $2 || { echo "$(AR) $1 $2 FAILED!" ; exit 1 ; } endef +define CLEAN + @rm -f *.o *.a +endef + MKDEP = $(TOPDIR)/tools/mkdeps.sh HOSTCC = gcc diff --git a/nuttx/configs/c5471evm/src/Makefile b/nuttx/configs/c5471evm/src/Makefile index 4b0541ae1..9a05c0162 100644 --- a/nuttx/configs/c5471evm/src/Makefile +++ b/nuttx/configs/c5471evm/src/Makefile @@ -68,8 +68,8 @@ libboard$(LIBEXT): $(OBJS) depend: .depend clean: - rm -f libboard$(LIBEXT) *~ - if [ ! -z "$(OBJEXT)" ]; then rm -f *$(OBJEXT); fi + @rm -f libboard$(LIBEXT) *~ .*.swp + $(call CLEAN) distclean: clean rm -f Make.dep .depend diff --git a/nuttx/configs/m68332evb/Make.defs b/nuttx/configs/m68332evb/Make.defs index af4a88011..f12369c97 100644 --- a/nuttx/configs/m68332evb/Make.defs +++ b/nuttx/configs/m68332evb/Make.defs @@ -84,6 +84,10 @@ define ARCHIVE $(AR) $1 $2 || { echo "$(AR) $1 $2 FAILED!" ; exit 1 ; } endef +define CLEAN + @rm -f *.o *.a +endef + MKDEP = $(TOPDIR)/tools/mkdeps.sh HOSTCC = gcc diff --git a/nuttx/configs/m68332evb/src/Makefile b/nuttx/configs/m68332evb/src/Makefile index a3c568cec..0265ec858 100644 --- a/nuttx/configs/m68332evb/src/Makefile +++ b/nuttx/configs/m68332evb/src/Makefile @@ -65,8 +65,8 @@ libboard$(LIBEXT): $(OBJS) depend: .depend clean: - rm -f libboard$(LIBEXT) *~ - if [ ! -z "$(OBJEXT)" ]; then rm -f *$(OBJEXT); fi + @rm -f libboard$(LIBEXT) *~ .*.swp + $(call CLEAN) distclean: clean rm -f Make.dep .depend diff --git a/nuttx/configs/mcu123-lpc214x/Make.defs b/nuttx/configs/mcu123-lpc214x/Make.defs index 356b6e9c7..70c1d8cc5 100644 --- a/nuttx/configs/mcu123-lpc214x/Make.defs +++ b/nuttx/configs/mcu123-lpc214x/Make.defs @@ -84,6 +84,10 @@ define ARCHIVE $(AR) $1 $2 || { echo "$(AR) $1 $2 FAILED!" ; exit 1 ; } endef +define CLEAN + @rm -f *.o *.a +endef + MKDEP = $(TOPDIR)/tools/mkdeps.sh HOSTCC = gcc diff --git a/nuttx/configs/mcu123-lpc214x/src/Makefile b/nuttx/configs/mcu123-lpc214x/src/Makefile index 93dea86be..ab06f2002 100644 --- a/nuttx/configs/mcu123-lpc214x/src/Makefile +++ b/nuttx/configs/mcu123-lpc214x/src/Makefile @@ -68,8 +68,8 @@ libboard$(LIBEXT): $(OBJS) depend: .depend clean: - rm -f libboard$(LIBEXT) *~ - if [ ! -z "$(OBJEXT)" ]; then rm -f *$(OBJEXT); fi + @rm -f libboard$(LIBEXT) *~ .*.swp + $(call CLEAN) distclean: clean rm -f Make.dep .depend diff --git a/nuttx/configs/ntosd-dm320/Make.defs b/nuttx/configs/ntosd-dm320/Make.defs index 1be65e7b8..25acc1e41 100644 --- a/nuttx/configs/ntosd-dm320/Make.defs +++ b/nuttx/configs/ntosd-dm320/Make.defs @@ -84,6 +84,10 @@ define ARCHIVE $(AR) $1 $2 || { echo "$(AR) $1 $2 FAILED!" ; exit 1 ; } endef +define CLEAN + @rm -f *.o *.a +endef + MKDEP = $(TOPDIR)/tools/mkdeps.sh HOSTCC = gcc diff --git a/nuttx/configs/ntosd-dm320/src/Makefile b/nuttx/configs/ntosd-dm320/src/Makefile index de36b3d5c..45a008c58 100644 --- a/nuttx/configs/ntosd-dm320/src/Makefile +++ b/nuttx/configs/ntosd-dm320/src/Makefile @@ -68,8 +68,8 @@ libboard$(LIBEXT): $(OBJS) depend: .depend clean: - rm -f libboard$(LIBEXT) *~ - if [ ! -z "$(OBJEXT)" ]; then rm -f *$(OBJEXT); fi + @rm -f libboard$(LIBEXT) *~ .*.swp + $(call CLEAN) distclean: clean rm -f Make.dep .depend diff --git a/nuttx/configs/pjrc-8051/Make.defs b/nuttx/configs/pjrc-8051/Make.defs index 5c2482e37..5c77c6f22 100644 --- a/nuttx/configs/pjrc-8051/Make.defs +++ b/nuttx/configs/pjrc-8051/Make.defs @@ -77,6 +77,10 @@ define ARCHIVE $(AR) $1 $2 || { echo "$(AR) $1 $2 FAILED!" ; exit 1 ; } endef +define CLEAN + @rm -f *.asm *.rel *.lst *.rst *.sym *.adb *.lnk *.map *.mem *.ihx *.hex +endef + MKDEP = $(TOPDIR)/tools/mkdeps.sh HOSTCC = gcc diff --git a/nuttx/configs/pjrc-8051/src/Makefile b/nuttx/configs/pjrc-8051/src/Makefile index 31066a637..0d6a7f05a 100644 --- a/nuttx/configs/pjrc-8051/src/Makefile +++ b/nuttx/configs/pjrc-8051/src/Makefile @@ -67,9 +67,8 @@ libboard$(LIBEXT): $(OBJS) depend: .depend clean: - rm -f libboard$(LIBEXT) - rm -f *.asm *.rel *.lst *.rst *.sym *.adb *.lnk *.map *.mem *.ihx *.hex *~ - if [ ! -z "$(OBJEXT)" ]; then rm -f *$(OBJEXT); fi + @rm -f libboard$(LIBEXT) *~ .*.swp + $(call CLEAN) distclean: clean rm -f Make.dep .depend diff --git a/nuttx/configs/sim/Make.defs b/nuttx/configs/sim/Make.defs index 528d8cf53..28069e16a 100644 --- a/nuttx/configs/sim/Make.defs +++ b/nuttx/configs/sim/Make.defs @@ -83,6 +83,10 @@ define ARCHIVE $(AR) $1 $2 || { echo "$(AR) $1 $2 FAILED!" ; exit 1 ; } endef +define CLEAN + @rm -f *.o *.a +endef + MKDEP = $(TOPDIR)/tools/mkdeps.sh HOSTCC = gcc diff --git a/nuttx/configs/sim/src/Makefile b/nuttx/configs/sim/src/Makefile index 55f686091..076b917c5 100644 --- a/nuttx/configs/sim/src/Makefile +++ b/nuttx/configs/sim/src/Makefile @@ -65,8 +65,8 @@ libboard$(LIBEXT): $(OBJS) depend: .depend clean: - rm -f libboard$(LIBEXT) *~ - if [ ! -z "$(OBJEXT)" ]; then rm -f *$(OBJEXT); fi + @rm -f libboard$(LIBEXT) *~ .*.swp + $(call CLEAN) distclean: clean rm -f Make.dep .depend diff --git a/nuttx/configs/z16f2800100zcog/Make.defs b/nuttx/configs/z16f2800100zcog/Make.defs index 7e1984384..8c5b7edfd 100644 --- a/nuttx/configs/z16f2800100zcog/Make.defs +++ b/nuttx/configs/z16f2800100zcog/Make.defs @@ -131,6 +131,10 @@ define ARCHIVE $(AR) $(ARFLAGS) $1=-+$2 || { echo "$(AR) $1=-+$2 FAILED!" ; exit 1 ; } endef +define CLEAN + @rm -f *.obj *.src *.lib *.hex +endef + # This is the tool to use for dependencies (i.e., none) MKDEP = $(TOPDIR)/tools/mknulldeps.sh diff --git a/nuttx/configs/z16f2800100zcog/src/Makefile b/nuttx/configs/z16f2800100zcog/src/Makefile index a479cdbe2..33ac4263b 100644 --- a/nuttx/configs/z16f2800100zcog/src/Makefile +++ b/nuttx/configs/z16f2800100zcog/src/Makefile @@ -70,8 +70,8 @@ libboard$(LIBEXT): $(OBJS) depend: .depend clean: - rm -f libboard$(LIBEXT) *~ - if [ ! -z "$(OBJEXT)" ]; then rm -f *$(OBJEXT); fi + @rm -f libboard$(LIBEXT) *~ .*.swp + $(call CLEAN) distclean: clean rm -f Make.dep .depend diff --git a/nuttx/configs/z80sim/Make.defs b/nuttx/configs/z80sim/Make.defs index 2e4c6db47..75b6de6c8 100644 --- a/nuttx/configs/z80sim/Make.defs +++ b/nuttx/configs/z80sim/Make.defs @@ -82,6 +82,10 @@ define ARCHIVE $(AR) $1 $2 || { echo "$(AR) $1 $2 FAILED!" ; exit 1 ; } endef +define CLEAN + @rm -f *.asm *.rel *.lst *.rst *.sym *.adb *.lnk *.map *.mem *.ihx *.hex +endef + MKDEP = $(TOPDIR)/tools/mkdeps.sh HOSTCC = gcc diff --git a/nuttx/configs/z80sim/src/Makefile b/nuttx/configs/z80sim/src/Makefile index fba996597..472037c58 100644 --- a/nuttx/configs/z80sim/src/Makefile +++ b/nuttx/configs/z80sim/src/Makefile @@ -67,9 +67,8 @@ libboard$(LIBEXT): $(OBJS) depend: .depend clean: - rm -f libboard$(LIBEXT) - rm -f *.asm *.rel *.lst *.rst *.sym *.adb *.lnk *.map *.mem *.ihx *.hex *~ - if [ ! -z "$(OBJEXT)" ]; then rm -f *$(OBJEXT); fi + @rm -f libboard$(LIBEXT) *~ .*.swp + $(call CLEAN) distclean: clean rm -f Make.dep .depend diff --git a/nuttx/drivers/Makefile b/nuttx/drivers/Makefile index cfe0ab02d..1655629d7 100644 --- a/nuttx/drivers/Makefile +++ b/nuttx/drivers/Makefile @@ -80,9 +80,10 @@ endif depend: .depend clean: - rm -f $(BIN) *.o *.obj *.rel *.asm *.lst *.sym *.adb *~ + @rm -f $(BIN) *~ .*.swp + $(call CLEAN) distclean: clean - rm -f Make.dep .depend + @rm -f Make.dep .depend -include Make.dep diff --git a/nuttx/examples/mount/Makefile b/nuttx/examples/mount/Makefile index bee957d07..71e75ed9b 100644 --- a/nuttx/examples/mount/Makefile +++ b/nuttx/examples/mount/Makefile @@ -66,9 +66,10 @@ $(BIN): $(OBJS) depend: .depend clean: - rm -f $(BIN) *.o *.obj *.rel *.asm *.lst *.sym *.adb *~ + @rm -f $(BIN) *~ .*.swp + $(call CLEAN) distclean: clean - rm -f Make.dep .depend + @rm -f Make.dep .depend -include Make.dep diff --git a/nuttx/examples/nettest/Makefile b/nuttx/examples/nettest/Makefile index 1a917e3be..0dd12ccbf 100644 --- a/nuttx/examples/nettest/Makefile +++ b/nuttx/examples/nettest/Makefile @@ -97,9 +97,10 @@ $(HOST_BIN): $(HOST_OBJS) depend: .depend clean: - rm -f $(TARG_BIN) $(HOST_BIN) *.o *.obj *.rel *.asm *.lst *.sym *.adb *~ + @rm -f $(TARG_BIN) $(HOST_BIN) *~ .*.swp + $(call CLEAN) distclean: clean - rm -f Make.dep .depend + @rm -f Make.dep .depend -include Make.dep diff --git a/nuttx/examples/nsh/Makefile b/nuttx/examples/nsh/Makefile index 9c1bb7a78..2f1c2c804 100644 --- a/nuttx/examples/nsh/Makefile +++ b/nuttx/examples/nsh/Makefile @@ -79,9 +79,10 @@ $(BIN): $(OBJS) depend: .depend clean: - rm -f $(BIN) *.o *.obj *.rel *.asm *.lst *.sym *.adb *~ + @rm -f $(BIN) *~ .*.swp + $(call CLEAN) distclean: clean - rm -f Make.dep .depend + @rm -f Make.dep .depend -include Make.dep diff --git a/nuttx/examples/null/Makefile b/nuttx/examples/null/Makefile index 39542b084..3eb745b41 100644 --- a/nuttx/examples/null/Makefile +++ b/nuttx/examples/null/Makefile @@ -66,9 +66,10 @@ $(BIN): $(OBJS) depend: .depend clean: - rm -f $(BIN) *.o *.obj *.rel *.asm *.lst *.sym *.adb *~ + @rm -f $(BIN) *~ .*.swp + $(call CLEAN) distclean: clean - rm -f Make.dep .depend + @rm -f Make.dep .depend -include Make.dep |