diff --git a/arch/arm/src/Makefile b/arch/arm/src/Makefile index bf652cdd2c..5224cacc98 100644 --- a/arch/arm/src/Makefile +++ b/arch/arm/src/Makefile @@ -35,7 +35,7 @@ ############################################################################ include $(TOPDIR)/Make.defs -include chip/Make.defs +-include chip/Make.defs ifeq ($(CONFIG_ARCH_ARMV7A),y) # ARMv7-A ARCH_SUBDIR = armv7-a @@ -204,6 +204,10 @@ endif depend: .depend +context:: + +clean_context:: + clean: ifeq ($(BOARDMAKE),y) $(Q) $(MAKE) -C board clean diff --git a/arch/avr/src/Makefile b/arch/avr/src/Makefile index 1777888bfb..29bbd9fa66 100644 --- a/arch/avr/src/Makefile +++ b/arch/avr/src/Makefile @@ -34,7 +34,7 @@ ############################################################################ include $(TOPDIR)/Make.defs -include chip/Make.defs +-include chip/Make.defs ifeq ($(CONFIG_ARCH_FAMILY_AVR32),y) ARCH_SUBDIR = avr32 @@ -150,6 +150,10 @@ endif depend: .depend +context:: + +clean_context:: + clean: ifeq ($(BOARDMAKE),y) $(Q) $(MAKE) -C board clean diff --git a/arch/hc/src/Makefile b/arch/hc/src/Makefile index 890eaa5d74..b521aa5766 100644 --- a/arch/hc/src/Makefile +++ b/arch/hc/src/Makefile @@ -34,7 +34,7 @@ ############################################################################ include $(TOPDIR)/Make.defs -include chip/Make.defs +-include chip/Make.defs ifeq ($(CONFIG_ARCH_HC12),y) ARCH_SUBDIR = hc12 @@ -165,6 +165,10 @@ endif depend: .depend +context:: + +clean_context:: + clean: ifeq ($(BOARDMAKE),y) $(Q) $(MAKE) -C board clean diff --git a/arch/mips/src/Makefile b/arch/mips/src/Makefile index ef3db8c519..bc2c19db8c 100644 --- a/arch/mips/src/Makefile +++ b/arch/mips/src/Makefile @@ -34,7 +34,7 @@ ############################################################################ include $(TOPDIR)/Make.defs -include chip/Make.defs +-include chip/Make.defs ifeq ($(CONFIG_ARCH_MIPS),y) ARCH_SUBDIR = mips32 @@ -148,6 +148,10 @@ endif depend: .depend +context:: + +clean_context:: + clean: ifeq ($(BOARDMAKE),y) $(Q) $(MAKE) -C board clean diff --git a/arch/misoc/src/Makefile b/arch/misoc/src/Makefile index 934f6cf37b..2fd406e8f5 100644 --- a/arch/misoc/src/Makefile +++ b/arch/misoc/src/Makefile @@ -34,7 +34,7 @@ ############################################################################ include $(TOPDIR)/Make.defs -include chip/Make.defs +-include chip/Make.defs ifeq ($(CONFIG_ARCH_CHIP_LM32),y) ARCH_SUBDIR = lm32 @@ -151,6 +151,10 @@ endif depend: .depend +context:: + +clean_context:: + clean: ifeq ($(BOARDMAKE),y) $(Q) $(MAKE) -C board clean diff --git a/arch/or1k/src/Makefile b/arch/or1k/src/Makefile index 2b2655e3f0..7b1a552e9c 100644 --- a/arch/or1k/src/Makefile +++ b/arch/or1k/src/Makefile @@ -34,7 +34,7 @@ ############################################################################ include $(TOPDIR)/Make.defs -include chip/Make.defs +-include chip/Make.defs ifeq ($(CONFIG_ARCH_MOR1KX),y) # OpenRISC mor1kx ARCH_SUBDIR = mor1kx @@ -191,6 +191,10 @@ endif depend: .depend +context:: + +clean_context:: + clean: ifeq ($(BOARDMAKE),y) $(Q) $(MAKE) -C board clean diff --git a/arch/renesas/src/Makefile b/arch/renesas/src/Makefile index b8e94e63b0..c5566a5efc 100644 --- a/arch/renesas/src/Makefile +++ b/arch/renesas/src/Makefile @@ -34,7 +34,7 @@ ############################################################################ include $(TOPDIR)/Make.defs -include chip/Make.defs +-include chip/Make.defs ARCH_SRCDIR = $(TOPDIR)$(DELIM)arch$(DELIM)$(CONFIG_ARCH)$(DELIM)src @@ -158,6 +158,10 @@ endif depend: .depend +context:: + +clean_context:: + clean: ifeq ($(BOARDMAKE),y) $(Q) $(MAKE) -C board clean diff --git a/arch/risc-v/src/Makefile b/arch/risc-v/src/Makefile index 47acf2fb9d..5eb527ed0d 100644 --- a/arch/risc-v/src/Makefile +++ b/arch/risc-v/src/Makefile @@ -36,7 +36,7 @@ ############################################################################ include $(TOPDIR)/Make.defs -include chip/Make.defs +-include chip/Make.defs ifeq ($(CONFIG_ARCH_RV32I),y) # Base Integer support ARCH_SUBDIR = rv32i @@ -194,6 +194,10 @@ endif depend: .depend +context:: + +clean_context:: + clean: ifeq ($(BOARDMAKE),y) $(Q) $(MAKE) -C board clean diff --git a/arch/sim/src/Makefile b/arch/sim/src/Makefile index aa9977739b..a7e13df5b5 100644 --- a/arch/sim/src/Makefile +++ b/arch/sim/src/Makefile @@ -34,7 +34,7 @@ # ############################################################################ -include $(TOPDIR)/Make.defs +-include $(TOPDIR)/Make.defs ARCH_SRCDIR = $(TOPDIR)$(DELIM)arch$(DELIM)$(CONFIG_ARCH)$(DELIM)src @@ -324,6 +324,10 @@ export_startup: board/libboard$(LIBEXT) up_head.o $(HOSTOBJS) nuttx-names.dat depend: .depend +context:: + +clean_context:: + clean: $(Q) if [ -e board/Makefile ]; then \ $(MAKE) -C board clean ; \ diff --git a/arch/x86/src/Makefile b/arch/x86/src/Makefile index dff90df022..fe114eee66 100644 --- a/arch/x86/src/Makefile +++ b/arch/x86/src/Makefile @@ -34,7 +34,7 @@ ############################################################################ include $(TOPDIR)/Make.defs -include chip/Make.defs +-include chip/Make.defs ifeq ($(CONFIG_ARCH_I486),y) ARCH_SUBDIR = i486 @@ -163,6 +163,10 @@ endif depend: .depend +context:: + +clean_context:: + clean: ifeq ($(BOARDMAKE),y) $(Q) $(MAKE) -C board clean diff --git a/arch/x86_64/src/Makefile b/arch/x86_64/src/Makefile index 76b9a5d8ad..f4aab34aa8 100644 --- a/arch/x86_64/src/Makefile +++ b/arch/x86_64/src/Makefile @@ -19,7 +19,7 @@ ############################################################################ include $(TOPDIR)/Make.defs -include chip/Make.defs +-include chip/Make.defs ifeq ($(CONFIG_ARCH_INTEL64),y) ARCH_SUBDIR = intel64 @@ -158,6 +158,10 @@ endif depend: .depend +context:: + +clean_context:: + clean: ifeq ($(BOARDMAKE),y) $(Q) $(MAKE) -C board clean diff --git a/arch/xtensa/src/Makefile b/arch/xtensa/src/Makefile index 2aab67489a..ad0e4faaad 100644 --- a/arch/xtensa/src/Makefile +++ b/arch/xtensa/src/Makefile @@ -34,7 +34,7 @@ ############################################################################ include $(TOPDIR)/Make.defs -include chip/Make.defs +-include chip/Make.defs ifeq ($(CONFIG_ARCH_FAMILY_LX6),y) ARCH_SUBDIR = lx6 @@ -149,6 +149,10 @@ endif depend: .depend +context:: + +clean_context:: + clean: ifeq ($(BOARDMAKE),y) $(Q) $(MAKE) -C board clean diff --git a/arch/z16/src/Makefile b/arch/z16/src/Makefile index c00ce98aac..b41ffe4c50 100644 --- a/arch/z16/src/Makefile +++ b/arch/z16/src/Makefile @@ -19,7 +19,7 @@ ############################################################################ include $(TOPDIR)/Make.defs -include chip/Make.defs +-include chip/Make.defs COMPILER = ${shell basename "$(CC)"} ARCHSRCDIR = $(TOPDIR)/arch/$(CONFIG_ARCH)/src @@ -138,6 +138,10 @@ endif depend: .depend +context:: + +clean_context:: + clean: ifeq ($(CONFIG_WINDOWS_NATIVE),y) $(Q) if exist board$(DELIM)Makefile ( $(MAKE) -C board clean ) diff --git a/arch/z80/src/Makefile b/arch/z80/src/Makefile index 883b612b68..6c417e4134 100644 --- a/arch/z80/src/Makefile +++ b/arch/z80/src/Makefile @@ -36,7 +36,7 @@ # Makefile fragments include $(TOPDIR)/Make.defs -include chip/Make.defs +-include chip/Make.defs # Compiler-Dependent Make: SDCC or ZiLOG ZDS-II diff --git a/arch/z80/src/Makefile.sdccl b/arch/z80/src/Makefile.sdccl index d0ee01fea5..3c619fe4a4 100644 --- a/arch/z80/src/Makefile.sdccl +++ b/arch/z80/src/Makefile.sdccl @@ -216,6 +216,10 @@ export_startup: board/libboard$(LIBEXT) $(STARTUP_OBJS) depend: .depend +context:: + +clean_context:: + clean: $(Q) if [ -e board/Makefile ]; then \ $(MAKE) -C board clean ; \ diff --git a/arch/z80/src/Makefile.sdccw b/arch/z80/src/Makefile.sdccw index 96bdb021fd..103c1f762b 100644 --- a/arch/z80/src/Makefile.sdccw +++ b/arch/z80/src/Makefile.sdccw @@ -208,6 +208,10 @@ export_startup: board\libboard$(LIBEXT) $(STARTUP_OBJS) depend: .depend +context:: + +clean_context:: + clean: $(Q) if exist board\Makefile ( $(MAKE) -C board clean ) $(call DELFILE, asm_mem.h) diff --git a/arch/z80/src/Makefile.zdsiil b/arch/z80/src/Makefile.zdsiil index 5be986898c..ef344328ce 100644 --- a/arch/z80/src/Makefile.zdsiil +++ b/arch/z80/src/Makefile.zdsiil @@ -158,6 +158,10 @@ export_startup: board$(DELIM)libboard$(LIBEXT) $(STARTUP_OBJS) depend: .depend +context:: + +clean_context:: + clean: $(Q) if [ -e board$(DELIM)Makefile ]; then \ $(MAKE) -C board clean ; \ diff --git a/arch/z80/src/Makefile.zdsiiw b/arch/z80/src/Makefile.zdsiiw index 9c7c145b51..e891477621 100644 --- a/arch/z80/src/Makefile.zdsiiw +++ b/arch/z80/src/Makefile.zdsiiw @@ -140,6 +140,10 @@ export_startup: board$(DELIM)libboard$(LIBEXT) $(STARTUP_OBJS) depend: .depend +context:: + +clean_context:: + clean: $(Q) if exist board$(DELIM)Makefile ( $(MAKE) -C board clean ) $(call DELFILE, nuttx.linkcmd) diff --git a/tools/Directories.mk b/tools/Directories.mk index a033dff587..07989a41e6 100644 --- a/tools/Directories.mk +++ b/tools/Directories.mk @@ -53,7 +53,7 @@ # CONFIG_BUILD_KERNEL is selected, then applications are not build at all. CLEANDIRS := -CCLEANDIRS := boards $(APPDIR) graphics +CCLEANDIRS := boards $(APPDIR) graphics $(ARCH_SRC) KERNDEPDIRS := USERDEPDIRS := @@ -77,7 +77,7 @@ ifeq ($(EXTERNALDIR),external) KERNDEPDIRS += external endif -CONTEXTDIRS = boards fs $(APPDIR) +CONTEXTDIRS = boards fs $(APPDIR) $(ARCH_SRC) CLEANDIRS += pass1 ifeq ($(CONFIG_BUILD_FLAT),y)