Skip to content
Snippets Groups Projects
Commit 0e492407 authored by patacongo's avatar patacongo
Browse files

Clean operations are now toolchain specific

git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@542 42af7a65-404d-4744-a932-0658087f49c3
parent 435528e7
No related branches found
No related tags found
No related merge requests found
Showing
with 50 additions and 32 deletions
......@@ -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
......
......@@ -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
......@@ -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 \
......
......@@ -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 \
......
......@@ -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
......@@ -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 \
......
......@@ -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
......
......@@ -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 \
......
......@@ -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 \
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment