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
This commit is contained in:
patacongo
2012-11-17 18:54:53 +00:00
parent 43dda7996d
commit 26c9112ad2
31 changed files with 228 additions and 141 deletions
+16 -7
View File
@@ -419,10 +419,10 @@ context: check_context include/nuttx/config.h include/nuttx/version.h include/ma
# and symbolic links created by the context target. # and symbolic links created by the context target.
clean_context: clean_context:
$(Q) rm -f include/nuttx/config.h $(call DELFILE include/nuttx/config.h)
$(Q) rm -f include/nuttx/version.h $(call DELFILE include/nuttx/version.h)
$(Q) rm -f include/math.h $(call DELFILE include/math.h)
$(Q) rm -f include/stdarg.h $(call DELFILE include/stdarg.h)
$(Q) $(DIRUNLINK) include/arch/board $(Q) $(DIRUNLINK) include/arch/board
$(Q) $(DIRUNLINK) include/arch/chip $(Q) $(DIRUNLINK) include/arch/chip
$(Q) $(DIRUNLINK) include/arch $(Q) $(DIRUNLINK) include/arch
@@ -686,8 +686,13 @@ ifeq ($(CONFIG_BUILD_2PASS),y)
endif endif
clean: subdir_clean clean: subdir_clean
$(Q) rm -f $(BIN) nuttx.* mm_test *.map _SAVED_APPS_config *~ $(call DELFILE $(BIN))
$(Q) rm -f nuttx-export* $(call DELFILE nuttx.*)
$(call DELFILE mm_test)
$(call DELFILE *.map)
$(call DELFILE _SAVED_APPS_config)
$(call DELFILE nuttx-export*)
$(call CLEAN)
subdir_distclean: subdir_distclean:
$(Q) for dir in $(CLEANDIRS) ; do \ $(Q) for dir in $(CLEANDIRS) ; do \
@@ -700,7 +705,11 @@ distclean: clean subdir_distclean clean_context
ifeq ($(CONFIG_BUILD_2PASS),y) ifeq ($(CONFIG_BUILD_2PASS),y)
$(Q) $(MAKE) -C $(CONFIG_PASS1_BUILDIR) TOPDIR="$(TOPDIR)" distclean $(Q) $(MAKE) -C $(CONFIG_PASS1_BUILDIR) TOPDIR="$(TOPDIR)" distclean
endif endif
$(Q) rm -f Make.defs setenv.sh setenv.bat .config .config.old $(call DELFILE Make.defs)
$(call DELFILE setenv.sh)
$(call DELFILE setenv.bat)
$(call DELFILE .config)
$(call DELFILE .config.old)
# Application housekeeping targets. The APPDIR variable refers to the user # Application housekeeping targets. The APPDIR variable refers to the user
# application directory. A sample apps/ directory is included with NuttX, # application directory. A sample apps/ directory is included with NuttX,
+19 -17
View File
@@ -438,10 +438,10 @@ context: check_context include\nuttx\config.h include\nuttx\version.h include\ma
# and symbolic links created by the context target. # and symbolic links created by the context target.
clean_context: clean_context:
$(Q) rm -f include\nuttx\config.h $(call DELFILE include\nuttx\config.h)
$(Q) rm -f include\nuttx\version.h $(call DELFILE include\nuttx\version.h)
$(Q) rm -f include\math.h $(call DELFILE include\math.h)
$(Q) rm -f include\stdarg.h $(call DELFILE include\stdarg.h)
$(Q) $(DIRUNLINK) include\arch\board $(Q) $(DIRUNLINK) include\arch\board
$(Q) $(DIRUNLINK) include\arch\chip $(Q) $(DIRUNLINK) include\arch\chip
$(Q) $(DIRUNLINK) include\arch $(Q) $(DIRUNLINK) include\arch
@@ -688,8 +688,13 @@ ifeq ($(CONFIG_BUILD_2PASS),y)
endif endif
clean: subdir_clean clean: subdir_clean
$(Q) rm -f $(BIN) nuttx.* mm_test *.map _SAVED_APPS_config *~ $(call DELFILE $(BIN))
$(Q) rm -f nuttx-export* $(call DELFILE nuttx.*)
$(call DELFILE mm_test)
$(call DELFILE *.map)
$(call DELFILE _SAVED_APPS_config)
$(call DELFILE nuttx-export*)
$(call CLEAN)
subdir_distclean: subdir_distclean:
$(Q) for %%G in ($(CLEANDIRS)) do ( if exist %%G\Makefile $(MAKE) -C %%G TOPDIR="$(TOPDIR)" distclean ) $(Q) for %%G in ($(CLEANDIRS)) do ( if exist %%G\Makefile $(MAKE) -C %%G TOPDIR="$(TOPDIR)" distclean )
@@ -698,7 +703,11 @@ distclean: clean subdir_distclean clean_context
ifeq ($(CONFIG_BUILD_2PASS),y) ifeq ($(CONFIG_BUILD_2PASS),y)
$(Q) $(MAKE) -C $(CONFIG_PASS1_BUILDIR) TOPDIR="$(TOPDIR)" distclean $(Q) $(MAKE) -C $(CONFIG_PASS1_BUILDIR) TOPDIR="$(TOPDIR)" distclean
endif endif
$(Q) rm -f Make.defs setenv.sh setenv.bat .config .config.old $(call DELFILE Make.defs)
$(call DELFILE setenv.sh)
$(call DELFILE setenv.bat)
$(call DELFILE .config)
$(call DELFILE .config.old)
# Application housekeeping targets. The APPDIR variable refers to the user # Application housekeeping targets. The APPDIR variable refers to the user
# application directory. A sample apps\ directory is included with NuttX, # application directory. A sample apps\ directory is included with NuttX,
@@ -723,16 +732,9 @@ endif
apps_distclean: apps_distclean:
ifneq ($(APPDIR),) ifneq ($(APPDIR),)
$(Q) if [ -r "$(TOPDIR)\$(APPDIR)\.config" ]; then \ $(call DELFILE _SAVED_APPS_config
cp "$(TOPDIR)\$(APPDIR)\.config" _SAVED_APPS_config || \ $(Q) if exist "$(TOPDIR)\$(APPDIR)\.config" ( cp "$(TOPDIR)\$(APPDIR)\.config" _SAVED_APPS_config )
{ echo "Copy of $(APPDIR)\.config failed" ; exit 1 ; } \
else \
rm -f _SAVED_APPS_config; \
fi
$(Q) $(MAKE) -C "$(TOPDIR)\$(APPDIR)" TOPDIR="$(TOPDIR)" distclean $(Q) $(MAKE) -C "$(TOPDIR)\$(APPDIR)" TOPDIR="$(TOPDIR)" distclean
$(Q) if [ -r _SAVED_APPS_config ]; then \ $(Q) if exist _SAVED_APPS_config ( mv _SAVED_APPS_config "$(TOPDIR)\$(APPDIR)\.config" )
mv _SAVED_APPS_config "$(TOPDIR)\$(APPDIR)\.config" || \
{ echo "Copy of _SAVED_APPS_config failed" ; exit 1 ; } \
fi
endif endif
+4 -2
View File
@@ -221,13 +221,15 @@ clean:
$(Q) if [ -e board/Makefile ]; then \ $(Q) if [ -e board/Makefile ]; then \
$(MAKE) -C board TOPDIR=$(TOPDIR) clean ; \ $(MAKE) -C board TOPDIR=$(TOPDIR) clean ; \
fi fi
$(Q) rm -f libarch$(LIBEXT) up_mem.h *~ .*.swp $(call DELFILE libarch$(LIBEXT))
$(call DELFILE up_mem.h)
$(call CLEAN) $(call CLEAN)
distclean: clean distclean: clean
$(Q) if [ -e board/Makefile ]; then \ $(Q) if [ -e board/Makefile ]; then \
$(MAKE) -C board TOPDIR=$(TOPDIR) distclean ; \ $(MAKE) -C board TOPDIR=$(TOPDIR) distclean ; \
fi fi
rm -f Make.dep .depend $(call DELFILE Make.dep)
$(call DELFILE .depend)
-include Make.dep -include Make.dep
+3 -2
View File
@@ -178,13 +178,14 @@ clean:
ifeq ($(BOARDMAKE),y) ifeq ($(BOARDMAKE),y)
$(Q) $(MAKE) -C board TOPDIR="$(TOPDIR)" clean $(Q) $(MAKE) -C board TOPDIR="$(TOPDIR)" clean
endif endif
$(Q) rm -f libarch$(LIBEXT) *~ .*.swp $(call DELFILE libarch$(LIBEXT))
$(call CLEAN) $(call CLEAN)
distclean: clean distclean: clean
ifeq ($(BOARDMAKE),y) ifeq ($(BOARDMAKE),y)
$(Q) $(MAKE) -C board TOPDIR="$(TOPDIR)" distclean $(Q) $(MAKE) -C board TOPDIR="$(TOPDIR)" distclean
endif endif
$(Q) rm -f Make.dep .depend $(call DELFILE Make.dep)
$(call DELFILE .depend)
-include Make.dep -include Make.dep
+3 -2
View File
@@ -171,14 +171,15 @@ clean:
ifeq ($(BOARDMAKE),y) ifeq ($(BOARDMAKE),y)
$(Q) $(MAKE) -C board TOPDIR="$(TOPDIR)" clean $(Q) $(MAKE) -C board TOPDIR="$(TOPDIR)" clean
endif endif
$(Q) rm -f libarch$(LIBEXT) *~ .*.swp $(call DELFILE libarch$(LIBEXT))
$(call CLEAN) $(call CLEAN)
distclean: clean distclean: clean
ifeq ($(BOARDMAKE),y) ifeq ($(BOARDMAKE),y)
$(Q) $(MAKE) -C board TOPDIR="$(TOPDIR)" distclean $(Q) $(MAKE) -C board TOPDIR="$(TOPDIR)" distclean
endif endif
$(Q) rm -f Make.dep .depend $(call DELFILE Make.dep)
$(call DELFILE .depend)
-include Make.dep -include Make.dep
+3 -2
View File
@@ -166,13 +166,14 @@ clean:
ifeq ($(BOARDMAKE),y) ifeq ($(BOARDMAKE),y)
$(Q) $(MAKE) -C board TOPDIR="$(TOPDIR)" clean $(Q) $(MAKE) -C board TOPDIR="$(TOPDIR)" clean
endif endif
$(Q) rm -f libarch$(LIBEXT) *~ .*.swp $(call DELFILE libarch$(LIBEXT))
$(call CLEAN) $(call CLEAN)
distclean: clean distclean: clean
ifeq ($(BOARDMAKE),y) ifeq ($(BOARDMAKE),y)
$(Q) $(MAKE) -C board TOPDIR="$(TOPDIR)" distclean $(Q) $(MAKE) -C board TOPDIR="$(TOPDIR)" distclean
endif endif
$(Q) rm -f Make.dep .depend $(call DELFILE Make.dep)
$(call DELFILE .depend)
-include Make.dep -include Make.dep
+3 -2
View File
@@ -164,13 +164,14 @@ clean:
ifeq ($(BOARDMAKE),y) ifeq ($(BOARDMAKE),y)
$(Q) $(MAKE) -C board TOPDIR="$(TOPDIR)" clean $(Q) $(MAKE) -C board TOPDIR="$(TOPDIR)" clean
endif endif
$(Q) rm -f libarch$(LIBEXT) *~ .*.swp $(call DELFILE libarch$(LIBEXT))
$(call CLEAN) $(call CLEAN)
distclean: clean distclean: clean
ifeq ($(BOARDMAKE),y) ifeq ($(BOARDMAKE),y)
$(Q) $(MAKE) -C board TOPDIR="$(TOPDIR)" distclean $(Q) $(MAKE) -C board TOPDIR="$(TOPDIR)" distclean
endif endif
$(Q) rm -f Make.dep .depend $(call DELFILE Make.dep)
$(call DELFILE .depend)
-include Make.dep -include Make.dep
+6 -4
View File
@@ -96,12 +96,14 @@ export_head:
depend: .depend depend: .depend
clean: clean:
@rm -f $(TOPDIR)/arch/rgmp/src/x86/*.o $(call DELFILE "$(TOPDIR)/arch/rgmp/src/x86/*.o")
@rm -f $(TOPDIR)/kernel.img nuttx.img $(call DELFILE "$(TOPDIR)/kernel.img")
@rm -f libarch$(LIBEXT) *~ .*.swp $(call DELFILE nuttx.img)
$(call DELFILE libarch$(LIBEXT))
$(call CLEAN) $(call CLEAN)
distclean: clean distclean: clean
@rm -f Make.dep .depend $(call DELFILE Make.dep)
$(call DELFILE .depend)
-include Make.dep -include Make.dep
+3 -2
View File
@@ -161,13 +161,14 @@ clean:
ifeq ($(BOARDMAKE),y) ifeq ($(BOARDMAKE),y)
$(Q) $(MAKE) -C board TOPDIR="$(TOPDIR)" clean $(Q) $(MAKE) -C board TOPDIR="$(TOPDIR)" clean
endif endif
$(Q) rm -f libarch$(LIBEXT) *~ .*.swp $(call DELFILE libarch$(LIBEXT))
$(call CLEAN) $(call CLEAN)
distclean: clean distclean: clean
ifeq ($(BOARDMAKE),y) ifeq ($(BOARDMAKE),y)
$(Q) $(MAKE) -C board TOPDIR="$(TOPDIR)" distclean $(Q) $(MAKE) -C board TOPDIR="$(TOPDIR)" distclean
endif endif
$(Q) rm -f Make.dep .depend $(call DELFILE Make.dep)
$(call DELFILE .depend)
-include Make.dep -include Make.dep
+4 -2
View File
@@ -214,14 +214,16 @@ clean: cleanrel
$(Q) if [ -e board/Makefile ]; then \ $(Q) if [ -e board/Makefile ]; then \
$(MAKE) -C board TOPDIR="$(TOPDIR)" clean ; \ $(MAKE) -C board TOPDIR="$(TOPDIR)" clean ; \
fi fi
$(Q) rm -f nuttx.rel libarch$(LIBEXT) *~ .*.swp $(call DELFILE nuttx.rel)
$(call DELFILE libarch$(LIBEXT))
$(call CLEAN) $(call CLEAN)
distclean: clean distclean: clean
$(Q) if [ -e board/Makefile ]; then \ $(Q) if [ -e board/Makefile ]; then \
$(MAKE) -C board TOPDIR="$(TOPDIR)" distclean ; \ $(MAKE) -C board TOPDIR="$(TOPDIR)" distclean ; \
fi fi
$(Q) rm -f Make.dep .depend $(call DELFILE Make.dep)
$(call DELFILE .depend)
$(Q) rm -rf GNU $(Q) rm -rf GNU
-include Make.dep -include Make.dep
+3 -2
View File
@@ -172,13 +172,14 @@ clean:
ifeq ($(BOARDMAKE),y) ifeq ($(BOARDMAKE),y)
$(Q) $(MAKE) -C board TOPDIR="$(TOPDIR)" clean $(Q) $(MAKE) -C board TOPDIR="$(TOPDIR)" clean
endif endif
$(Q) rm -f libarch$(LIBEXT) *~ .*.swp $(call DELFILE libarch$(LIBEXT))
$(call CLEAN) $(call CLEAN)
distclean: clean distclean: clean
ifeq ($(BOARDMAKE),y) ifeq ($(BOARDMAKE),y)
$(Q) $(MAKE) -C board TOPDIR="$(TOPDIR)" distclean $(Q) $(MAKE) -C board TOPDIR="$(TOPDIR)" distclean
endif endif
$(Q) rm -f Make.dep .depend $(call DELFILE Make.dep)
$(call DELFILE .depend)
-include Make.dep -include Make.dep
+7 -3
View File
@@ -137,16 +137,20 @@ clean:
$(Q) if [ -e board/Makefile ]; then \ $(Q) if [ -e board/Makefile ]; then \
$(MAKE) -C board TOPDIR="$(TOPDIR)" clean ; \ $(MAKE) -C board TOPDIR="$(TOPDIR)" clean ; \
fi fi
$(Q) rm -f libarch$(LIBEXT) *~ .*.swp
ifeq ($(COMPILER),zneocc.exe) ifeq ($(COMPILER),zneocc.exe)
$(Q) rm -f nuttx.linkcmd *.asm *.tmp *.map $(call DELFILE nuttx.linkcmd)
$(call DELFILE *.asm)
$(call DELFILE *.tmp)
$(call DELFILE *.map)
endif endif
$(call DELFILE libarch$(LIBEXT))
$(call CLEAN) $(call CLEAN)
distclean: clean distclean: clean
$(Q) if [ -e board/Makefile ]; then \ $(Q) if [ -e board/Makefile ]; then \
$(MAKE) -C board TOPDIR="$(TOPDIR)" distclean ; \ $(MAKE) -C board TOPDIR="$(TOPDIR)" distclean ; \
fi fi
$(Q) rm -f Make.dep .depend $(call DELFILE Make.dep)
$(call DELFILE .depend)
-include Make.dep -include Make.dep
+8 -2
View File
@@ -240,13 +240,19 @@ clean:
$(Q) if [ -e board/Makefile ]; then \ $(Q) if [ -e board/Makefile ]; then \
$(MAKE) -C board TOPDIR="$(TOPDIR)" clean ; \ $(MAKE) -C board TOPDIR="$(TOPDIR)" clean ; \
fi fi
$(Q) rm -f libarch$(LIBEXT) up_mem.h asm_mem.h pass1.* nuttx.* *~ .*.swp $(call DELFILE up_mem.h)
$(call DELFILE asm_mem.h)
$(call DELFILE pass1.*)
$(call DELFILE nuttx.*)
$(call DELFILE libarch$(LIBEXT))
$(call CLEAN) $(call CLEAN)
distclean: clean distclean: clean
$(Q) if [ -e board/Makefile ]; then \ $(Q) if [ -e board/Makefile ]; then \
$(MAKE) -C board TOPDIR="$(TOPDIR)" distclean ; \ $(MAKE) -C board TOPDIR="$(TOPDIR)" distclean ; \
fi fi
$(Q) rm -f Make.dep .depend $(call DELFILE Make.dep)
$(call DELFILE .depend)
-include Make.dep -include Make.dep
+7 -3
View File
@@ -150,14 +150,18 @@ clean:
$(Q) if [ -e board/Makefile ]; then \ $(Q) if [ -e board/Makefile ]; then \
$(MAKE) -C board TOPDIR="$(TOPDIR)" clean ; \ $(MAKE) -C board TOPDIR="$(TOPDIR)" clean ; \
fi fi
$(Q) rm -f libarch$(LIBEXT) *~ .*.swp $(call DELFILE nuttx.linkcmd)
$(Q) rm -f nuttx.linkcmd *.asm *.tmp *.map $(call DELFILE *.asm)
$(call DELFILE *.tmp)
$(call DELFILE *.map)
$(call DELFILE libarch$(LIBEXT))
$(call CLEAN) $(call CLEAN)
distclean: clean distclean: clean
$(Q) if [ -e board/Makefile ]; then \ $(Q) if [ -e board/Makefile ]; then \
$(MAKE) -C board TOPDIR="$(TOPDIR)" distclean ; \ $(MAKE) -C board TOPDIR="$(TOPDIR)" distclean ; \
fi fi
$(Q) rm -f Make.dep .depend $(call DELFILE Make.dep)
$(call DELFILE .depend)
-include Make.dep -include Make.dep
+3 -5
View File
@@ -87,13 +87,11 @@ $(BIN): $(BINFMT_OBJS)
depend: .depend depend: .depend
clean: clean:
$(Q) rm -f $(BIN) *~ .*.swp $(call DELFILE $(BIN))
$(call CLEAN) $(call CLEAN)
$(Q) ( for dir in $(SUBDIRS); do \
rm -f $${dir}/*~ $${dir}/.*.swp; \
done ; )
distclean: clean distclean: clean
$(Q) rm -f Make.dep .depend $(call DELFILE Make.dep)
$(call DELFILE .depend)
-include Make.dep -include Make.dep
+5 -4
View File
@@ -126,16 +126,17 @@ libboard$(LIBEXT): $(OBJS)
$(call ARCHIVE, $@, $(OBJS)) $(call ARCHIVE, $@, $(OBJS))
.depend: Makefile $(SRCS) .depend: Makefile $(SRCS)
@$(MKDEP) $(CC) -- $(CFLAGS) -- $(SRCS) >Make.dep $(Q) $(MKDEP) $(CC) -- $(CFLAGS) -- $(SRCS) >Make.dep
@touch $@ $(Q) touch $@
depend: .depend depend: .depend
clean: clean:
@rm -f libboard$(LIBEXT) *~ .*.swp $(call DELFILE libboard$(LIBEXT))
$(call CLEAN) $(call CLEAN)
distclean: clean distclean: clean
@rm -f Make.dep .depend $(call DELFILE Make.dep)
$(call DELFILE .depend)
-include Make.dep -include Make.dep
+3 -2
View File
@@ -111,10 +111,11 @@ $(BIN): $(OBJS)
depend: .depend depend: .depend
clean: clean:
$(Q) rm -f $(BIN) *~ .*.swp $(call DELFILE $(BIN))
$(call CLEAN) $(call CLEAN)
distclean: clean distclean: clean
$(Q) rm -f Make.dep .depend $(call DELFILE Make.dep)
$(call DELFILE .depend)
-include Make.dep -include Make.dep
+3 -5
View File
@@ -130,13 +130,11 @@ $(BIN): $(OBJS)
depend: .depend depend: .depend
clean: clean:
$(Q) rm -f $(BIN) *~ .*.swp $(call DELFILE $(BIN))
$(call CLEAN) $(call CLEAN)
$(Q) ( for dir in $(SUBDIRS); do \
rm -f $${dir}/*~ $${dir}/.*.swp; \
done ; )
distclean: clean distclean: clean
$(Q) rm -f Make.dep .depend $(call DELFILE Make.dep)
$(call DELFILE .depend)
-include Make.dep -include Make.dep
+3 -3
View File
@@ -33,7 +33,6 @@
# #
############################################################################ ############################################################################
-include $(TOPDIR)/.config
-include $(TOPDIR)/Make.defs -include $(TOPDIR)/Make.defs
DEPPATH = --dep-path . DEPPATH = --dep-path .
@@ -201,13 +200,14 @@ context: gensources
clean: clean:
$(Q) $(MAKE) -C nxglib -f Makefile.sources clean TOPDIR=$(TOPDIR) EXTRADEFINES=$(EXTRADEFINES) $(Q) $(MAKE) -C nxglib -f Makefile.sources clean TOPDIR=$(TOPDIR) EXTRADEFINES=$(EXTRADEFINES)
$(Q) $(MAKE) -C nxfonts -f Makefile.sources clean TOPDIR=$(TOPDIR) EXTRADEFINES=$(EXTRADEFINES) $(Q) $(MAKE) -C nxfonts -f Makefile.sources clean TOPDIR=$(TOPDIR) EXTRADEFINES=$(EXTRADEFINES)
$(Q) rm -f $(BIN) *~ .*.swp $(call DELFILE $(BIN))
$(call CLEAN) $(call CLEAN)
distclean: clean distclean: clean
$(Q) $(MAKE) -C nxglib -f Makefile.sources distclean TOPDIR=$(TOPDIR) EXTRADEFINES=$(EXTRADEFINES) $(Q) $(MAKE) -C nxglib -f Makefile.sources distclean TOPDIR=$(TOPDIR) EXTRADEFINES=$(EXTRADEFINES)
$(Q) $(MAKE) -C nxfonts -f Makefile.sources distclean TOPDIR=$(TOPDIR) EXTRADEFINES=$(EXTRADEFINES) $(Q) $(MAKE) -C nxfonts -f Makefile.sources distclean TOPDIR=$(TOPDIR) EXTRADEFINES=$(EXTRADEFINES)
$(Q) rm -f Make.dep .depend $(call DELFILE Make.dep)
$(call DELFILE .depend)
-include Make.dep -include Make.dep
+7 -7
View File
@@ -33,7 +33,6 @@
# #
############################################################################ ############################################################################
-include $(TOPDIR)/.config
-include $(TOPDIR)/Make.defs -include $(TOPDIR)/Make.defs
ifdef NXFONTS_BITSPERPIXEL ifdef NXFONTS_BITSPERPIXEL
@@ -177,13 +176,14 @@ all: $(GEN_CSRC)
.PHONY : clean distclean .PHONY : clean distclean
$(GEN_CSRC) : $(DEPENDENCY) $(GEN_CSRC) : $(DEPENDENCY)
@$(call PREPROCESS, $<, $(GEN_TMP)) $(call PREPROCESS, $<, $(GEN_TMP))
@cat $(GEN_TMP) | sed -e "/^#/d" >$@ $(Q) cat $(GEN_TMP) | sed -e "/^#/d" >$@
@rm -f $(GEN_TMP) $(Q) rm -f $(GEN_TMP)
clean: clean:
@rm -f *~ .*.swp *.i $(call DELFILE *.i)
$(call CLEAN)
distclean: clean distclean: clean
@rm -f nxfonts_convert_*bpp.c $(call DELFILE nxfonts_convert_*bpp.c)
@rm -f nxfonts_bitmaps_*.c $(call DELFILE nxfonts_bitmaps_*.c)
+26 -26
View File
@@ -33,7 +33,6 @@
# #
############################################################################ ############################################################################
-include $(TOPDIR)/.config
-include $(TOPDIR)/Make.defs -include $(TOPDIR)/Make.defs
ifeq ($(NXGLIB_BITSPERPIXEL),1) ifeq ($(NXGLIB_BITSPERPIXEL),1)
@@ -123,53 +122,54 @@ all: $(GEN_CSRCS)
$(SETP_CSRC) : $(BLITDIR)/nxglib_setpixel.c nxglib_bitblit.h $(SETP_CSRC) : $(BLITDIR)/nxglib_setpixel.c nxglib_bitblit.h
ifneq ($(NXGLIB_BITSPERPIXEL),) ifneq ($(NXGLIB_BITSPERPIXEL),)
@$(call PREPROCESS, $(BLITDIR)/nxglib_setpixel.c, $(SETP_TMP)) $(call PREPROCESS, $(BLITDIR)/nxglib_setpixel.c, $(SETP_TMP))
@cat $(SETP_TMP) | sed -e "/^#/d" >$@ $(Q) cat $(SETP_TMP) | sed -e "/^#/d" >$@
@rm -f $(SETP_TMP) $(Q) rm -f $(SETP_TMP)
endif endif
$(RFILL_CSRC) : $(BLITDIR)/nxglib_fillrectangle.c nxglib_bitblit.h $(RFILL_CSRC) : $(BLITDIR)/nxglib_fillrectangle.c nxglib_bitblit.h
ifneq ($(NXGLIB_BITSPERPIXEL),) ifneq ($(NXGLIB_BITSPERPIXEL),)
@$(call PREPROCESS, $(BLITDIR)/nxglib_fillrectangle.c, $(RFILL_TMP)) $(call PREPROCESS, $(BLITDIR)/nxglib_fillrectangle.c, $(RFILL_TMP))
@cat $(RFILL_TMP) | sed -e "/^#/d" >$@ $(Q) cat $(RFILL_TMP) | sed -e "/^#/d" >$@
@rm -f $(RFILL_TMP) $(Q) rm -f $(RFILL_TMP)
endif endif
$(RGET_CSRC) : $(BLITDIR)/nxglib_getrectangle.c nxglib_bitblit.h $(RGET_CSRC) : $(BLITDIR)/nxglib_getrectangle.c nxglib_bitblit.h
ifneq ($(NXGLIB_BITSPERPIXEL),) ifneq ($(NXGLIB_BITSPERPIXEL),)
@$(call PREPROCESS, $(BLITDIR)/nxglib_getrectangle.c, $(RGET_TMP)) $(call PREPROCESS, $(BLITDIR)/nxglib_getrectangle.c, $(RGET_TMP))
@cat $(RGET_TMP) | sed -e "/^#/d" >$@ $(Q) cat $(RGET_TMP) | sed -e "/^#/d" >$@
@rm -f $(RGET_TMP) $(Q) rm -f $(RGET_TMP)
endif endif
$(TFILL_CSRC) : $(BLITDIR)/nxglib_filltrapezoid.c nxglib_bitblit.h $(TFILL_CSRC) : $(BLITDIR)/nxglib_filltrapezoid.c nxglib_bitblit.h
ifneq ($(NXGLIB_BITSPERPIXEL),) ifneq ($(NXGLIB_BITSPERPIXEL),)
@$(call PREPROCESS, $(BLITDIR)/nxglib_filltrapezoid.c, $(TFILL_TMP)) $(call PREPROCESS, $(BLITDIR)/nxglib_filltrapezoid.c, $(TFILL_TMP))
@cat $(TFILL_TMP) | sed -e "/^#/d" >$@ $(Q) cat $(TFILL_TMP) | sed -e "/^#/d" >$@
@rm -f $(TFILL_TMP) $(Q) rm -f $(TFILL_TMP)
endif endif
$(RMOVE_CSRC) : $(BLITDIR)/nxglib_moverectangle.c nxglib_bitblit.h $(RMOVE_CSRC) : $(BLITDIR)/nxglib_moverectangle.c nxglib_bitblit.h
ifneq ($(NXGLIB_BITSPERPIXEL),) ifneq ($(NXGLIB_BITSPERPIXEL),)
@$(call PREPROCESS, $(BLITDIR)/nxglib_moverectangle.c, $(RMOVE_TMP)) $(call PREPROCESS, $(BLITDIR)/nxglib_moverectangle.c, $(RMOVE_TMP))
@cat $(RMOVE_TMP) | sed -e "/^#/d" >$@ $(Q) cat $(RMOVE_TMP) | sed -e "/^#/d" >$@
@rm -f $(RMOVE_TMP) $(Q) rm -f $(RMOVE_TMP)
endif endif
$(RCOPY_CSRC) : $(BLITDIR)/nxglib_copyrectangle.c nxglib_bitblit.h $(RCOPY_CSRC) : $(BLITDIR)/nxglib_copyrectangle.c nxglib_bitblit.h
ifneq ($(NXGLIB_BITSPERPIXEL),) ifneq ($(NXGLIB_BITSPERPIXEL),)
@$(call PREPROCESS, $(BLITDIR)/nxglib_copyrectangle.c, $(RCOPY_TMP)) $(call PREPROCESS, $(BLITDIR)/nxglib_copyrectangle.c, $(RCOPY_TMP))
@cat $(RCOPY_TMP) | sed -e "/^#/d" >$@ $(Q) cat $(RCOPY_TMP) | sed -e "/^#/d" >$@
@rm -f $(RCOPY_TMP) $(Q) rm -f $(RCOPY_TMP)
endif endif
clean: clean:
@rm -f *~ .*.swp *.i $(call DELFILE *.i)
$(call CLEAN)
distclean: clean distclean: clean
@rm -f nxglib_setpixel_*bpp.c $(call DELFILE nxglib_setpixel_*bpp.c)
@rm -f nxglib_fillrectangle_*bpp.c $(call DELFILE nxglib_fillrectangle_*bpp.c)
@rm -f nxglib_getrectangle_*bpp.c $(call DELFILE nxglib_getrectangle_*bpp.c)
@rm -f nxglib_filltrapezoid_*bpp.c $(call DELFILE nxglib_filltrapezoid_*bpp.c)
@rm -f nxglib_moverectangle_*bpp.c $(call DELFILE nxglib_moverectangle_*bpp.c)
@rm -f nxglib_copyrectangle_*bpp.c $(call DELFILE nxglib_copyrectangle_*bpp.c)
+1 -1
View File
@@ -40,6 +40,6 @@ all:
depend: depend:
clean: clean:
$(Q) rm -f *$(LIBEXT) $(call CLEAN)
distclean: clean distclean: clean
+7 -4
View File
@@ -114,7 +114,7 @@ else
$(Q) ( if [ -f .userlib ]; then rm -f *$(OBJEXT); fi ) $(Q) ( if [ -f .userlib ]; then rm -f *$(OBJEXT); fi )
endif endif
endif endif
$(Q) rm -f .userlib *~ .*.swp $(call DELFILE .userlib)
# Clean kernel-mode temporary files (retaining the KBIN binary) # Clean kernel-mode temporary files (retaining the KBIN binary)
@@ -126,17 +126,20 @@ else
$(Q) ( if [ -f .kernlib ]; then rm -f *$(OBJEXT); fi ) $(Q) ( if [ -f .kernlib ]; then rm -f *$(OBJEXT); fi )
endif endif
endif endif
$(Q) rm -f .kernlib *~ .*.swp $(call DELFILE .kernlib)
# Really clean everything # Really clean everything
clean: uclean kclean clean: uclean kclean
$(Q) rm -f $(BIN) $(UBIN) $(KBIN) *~ .*.swp $(call DELFILE $(BIN))
$(call DELFILE $(UBIN))
$(call DELFILE $(KBIN))
$(call CLEAN) $(call CLEAN)
# Deep clean -- removes all traces of the configuration # Deep clean -- removes all traces of the configuration
distclean: clean distclean: clean
$(Q) rm -f Make.dep .depend $(call DELFILE Make.dep)
$(call DELFILE .depend)
-include Make.dep -include Make.dep
+3 -2
View File
@@ -105,10 +105,11 @@ $(BIN): $(OBJS)
depend: .depend depend: .depend
clean: clean:
$(Q) rm -f $(BIN) *~ .*.swp $(call DELFILE $(BIN))
$(call CLEAN) $(call CLEAN)
distclean: clean distclean: clean
$(Q) rm -f Make.dep .depend $(call DELFILE Make.dep)
$(call DELFILE .depend)
-include Make.dep -include Make.dep
+3 -2
View File
@@ -70,10 +70,11 @@ $(BIN): $(OBJS)
depend: .depend depend: .depend
clean: clean:
$(Q) rm -f $(BIN) *~ .*.swp $(call DELFILE $(BIN))
$(call CLEAN) $(call CLEAN)
distclean: clean distclean: clean
$(Q) rm -f Make.dep .depend $(call DELFILE Make.dep)
$(call DELFILE .depend)
-include Make.dep -include Make.dep
+11 -7
View File
@@ -33,12 +33,14 @@
# #
############################################################################ ############################################################################
SRCS = mm_test.c mm_initialize.c mm_sem.c mm_addfreechunk.c mm_size2ndx.c mm_shrinkchunk.c \ -include $(TOPDIR)/Make.defs
SRCS = mm_test.c mm_initialize.c mm_sem.c mm_addfreechunk.c mm_size2ndx.c mm_shrinkchunk.c \
mm_malloc.c mm_zalloc.c mm_calloc.c mm_realloc.c \ mm_malloc.c mm_zalloc.c mm_calloc.c mm_realloc.c \
mm_memalign.c mm_free.c mm_mallinfo.c mm_memalign.c mm_free.c mm_mallinfo.c
OBJS = $(SRCS:.c=.o1) OBJS = $(SRCS:.c=.o1)
LIBS = -lpthread -lc LIBS = -lpthread -lc
CC = gcc CC = gcc
LD = gcc LD = gcc
@@ -48,17 +50,19 @@ WARNIGNS = -Wall -Wstrict-prototypes -Wshadow
CFLAGS = -g $(DEFINES) CFLAGS = -g $(DEFINES)
LDFLAGS = LDFLAGS =
BIN = ../mm_test BIN = ..$(DELIM)mm_test
all: $(BIN) all: $(BIN)
$(OBJS): %.o1: %.c $(OBJS): %.o1: %.c
@echo "Compiling $<" @echo "Compiling $<"
$(CC) -c $(CFLAGS) $< -o $@ $(Q) $(CC) -c $(CFLAGS) $< -o $@
$(BIN): $(OBJS) $(BIN): $(OBJS)
@echo "Linking {$(OBJS)} to produce $@" @echo "Linking {$(OBJS)} to produce $@"
$(LD) $(LDFLAGS) $(OBJS) $(LIBS) -o $@ $(Q) $(LD) $(LDFLAGS) $(OBJS) $(LIBS) -o $@
clean: clean:
@rm -f $(BIN) *.o1 *~ $(call DELFILE $(BIN))
$(call DELFILE *.o1)
$(call CLEAN)
+3 -3
View File
@@ -111,11 +111,11 @@ endif
depend: .depend depend: .depend
clean: clean:
$(Q) rm -f $(BIN) *~ .*.swp $(call DELFILE $(BIN))
$(Q) rm -f uip/*~ uip/.*.swp
$(call CLEAN) $(call CLEAN)
distclean: clean distclean: clean
$(Q) rm -f Make.dep .depend $(call DELFILE Make.dep)
$(call DELFILE .depend)
-include Make.dep -include Make.dep
+4 -2
View File
@@ -188,6 +188,7 @@ OBJS = $(AOBJS) $(COBJS)
BIN = libsched$(LIBEXT) BIN = libsched$(LIBEXT)
all: $(BIN) all: $(BIN)
.PHONY: context depend clean distclean
$(AOBJS): %$(OBJEXT): %.S $(AOBJS): %$(OBJEXT): %.S
$(call ASSEMBLE, $<, $@) $(call ASSEMBLE, $<, $@)
@@ -205,10 +206,11 @@ $(BIN): $(OBJS)
depend: .depend depend: .depend
clean: clean:
$(Q) rm -f $(BIN) $(call DELFILE $(BIN))
$(call CLEAN) $(call CLEAN)
distclean: clean distclean: clean
$(Q) rm -f Make.dep .depend $(call DELFILE Make.dep)
$(call DELFILE .depend)
-include Make.dep -include Make.dep
+14 -9
View File
@@ -34,11 +34,11 @@
########################################################################### ###########################################################################
-include $(TOPDIR)/Make.defs -include $(TOPDIR)/Make.defs
include proxies/Make.defs include proxies$(DELIM)Make.defs
include stubs/Make.defs include stubs$(DELIM)Make.defs
MKSYSCALL = "$(TOPDIR)/tools/mksyscall$(EXEEXT)" MKSYSCALL = "$(TOPDIR)$(DELIM)tools$(DELIM)mksyscall$(EXEEXT)"
CSVFILE = "$(TOPDIR)/syscall/syscall.csv" CSVFILE = "$(TOPDIR)$(DELIM)syscall$(DELIM)syscall.csv"
STUB_SRCS += stub_lookup.c STUB_SRCS += stub_lookup.c
@@ -85,7 +85,7 @@ $(BIN2): $(STUB_OBJS)
depend: .depend depend: .depend
$(MKSYSCALL): $(MKSYSCALL):
$(Q) $(MAKE) -C $(TOPDIR)/tools -f Makefile.host mksyscall $(Q) $(MAKE) -C $(TOPDIR)$(DELIM)tools -f Makefile.host mksyscall
.context: syscall.csv .context: syscall.csv
$(Q) (cd proxies; $(MKSYSCALL) -p $(CSVFILE);) $(Q) (cd proxies; $(MKSYSCALL) -p $(CSVFILE);)
@@ -95,15 +95,20 @@ $(MKSYSCALL):
context: $(MKSYSCALL) .context context: $(MKSYSCALL) .context
clean: clean:
$(Q) rm -f $(BIN1) $(BIN2) *~ .*.swp $(call DELFILE $(BIN1))
$(call DELFILE $(BIN2))
ifneq ($(OBJEXT),) ifneq ($(OBJEXT),)
$(Q) rm -f proxies/*$(OBJEXT) stubs/*$(OBJEXT) $(call DELFILE proxies$(DELIM)*$(OBJEXT))
$(call DELFILE stubs$(DELIM)*$(OBJEXT))
endif endif
$(call CLEAN) $(call CLEAN)
distclean: clean distclean: clean
$(Q) rm -f Make.dep .depend .context $(call DELFILE .context)
$(Q) rm -f proxies/*.c stubs/*.c $(call DELFILE Make.dep)
$(call DELFILE .depend)
$(call DELFILE proxies$(DELIM)*.c)
$(call DELFILE stubs$(DELIM)*.c)
-include Make.dep -include Make.dep
+29 -3
View File
@@ -2,7 +2,9 @@
# Config.mk # Config.mk
# Global build rules and macros. # Global build rules and macros.
# #
# Copyright (C) 2011 Gregory Nutt. All rights reserved.
# Author: Richard Cochran # Author: Richard Cochran
# Gregory Nutt <gnutt@nuttx.org>
# #
# This file (along with $(TOPDIR)/.config) must be included by every # This file (along with $(TOPDIR)/.config) must be included by every
# configuration-specific Make.defs file. # configuration-specific Make.defs file.
@@ -43,6 +45,12 @@ CONFIG_ARCH := $(patsubst "%",%,$(strip $(CONFIG_ARCH)))
CONFIG_ARCH_CHIP := $(patsubst "%",%,$(strip $(CONFIG_ARCH_CHIP))) CONFIG_ARCH_CHIP := $(patsubst "%",%,$(strip $(CONFIG_ARCH_CHIP)))
CONFIG_ARCH_BOARD := $(patsubst "%",%,$(strip $(CONFIG_ARCH_BOARD))) CONFIG_ARCH_BOARD := $(patsubst "%",%,$(strip $(CONFIG_ARCH_BOARD)))
# Some defaults just to prohibit some bad behavior if for some reason they
# are not defined
OBJEXT ?= .o
LIBEXT ?= .a
# DELIM - Path segment delimiter character # DELIM - Path segment delimiter character
# #
# Depends on this settings defined in board-specific defconfig file installed # Depends on this settings defined in board-specific defconfig file installed
@@ -167,12 +175,30 @@ define ARCHIVE
endef endef
endif endif
# DELFILE - Delete one file
ifeq ($(CONFIG_WINDOWS_NATIVE),y) ifeq ($(CONFIG_WINDOWS_NATIVE),y)
define CLEAN define DELFILE
$(Q) rm -f *.o *.a $(Q) if exist $1 (del /f /q $1)
endef endef
else else
define CLEAN define CLEAN
$(Q) rm -f *.o *.a *~ .*.swp $(Q) rm -f $1
endef endef
endif endif
# CLEAN - Default clean target
ifeq ($(CONFIG_WINDOWS_NATIVE),y)
define CLEAN
$(Q) if exist *$(OBJEXT) (del /f /q *$(OBJEXT))
$(Q) if exist *$(LIBEXT) (del /f /q *$(LIBEXT))
$(Q) if exist *~ (del /f /q *~)
$(Q) if exist (del /f /q .*.swp)
endef
else
define CLEAN
$(Q) rm -f *$(OBJEXT) *$(LIBEXT) *~ .*.swp
endef
endif
+14 -4
View File
@@ -122,8 +122,18 @@ mkdeps: mkdeps$(HOSTEXEEXT)
endif endif
clean: clean:
$(Q) rm -f *.o *.a *~ .*.swp $(call DELFILE mkdeps)
$(Q) rm -f mkdeps mkconfig mksyscall mkversion bdf-converter $(call DELFILE mkdeps.exe)
$(Q) rm -f mkdeps.exe mkconfig.exe mksyscall.exe mkversion.exe bdf-converter.exe $(call DELFILE mkconfig)
$(call DELFILE mkconfig.exe)
$(call DELFILE Make.dep)
$(call DELFILE mksyscall)
$(call DELFILE mksyscall.exe)
$(call DELFILE mkversion)
$(call DELFILE mkversion.exe)
$(call DELFILE bdf-converter)
$(call DELFILE bdf-converter.exe)
ifneq ($(CONFIG_WINDOWS_NATIVE),y)
$(Q) rm -rf *.dSYM $(Q) rm -rf *.dSYM
endif
$(call CLEAN)