diff --git a/Makefile.include b/Makefile.include index d399b77f1..802be19d9 100644 --- a/Makefile.include +++ b/Makefile.include @@ -295,11 +295,10 @@ endef CONTIKI_NG_PROJECT_MAP = $(addsuffix -$(TARGET).map, $(basename $@)) clean: - -rm -f *~ *core core *.srec \ - *.lst *.map *.o \ - *.cprg *.bin *.data contiki*.a *.firmware core-labels.S *.ihex *.ini \ - rm -rf $(CLEAN) + -rm -f *.d *.e *.o $(CONTIKI_NG_TARGET_LIB) $(CLEAN) -rm -rf $(OBJECTDIR) + -rm -f $(addsuffix -$(TARGET).map, $(CONTIKI_PROJECT)) + -rm -f $(addsuffix .$(TARGET), $(CONTIKI_PROJECT)) distclean: clean -rm -f ${addsuffix .$(TARGET),$(CONTIKI_PROJECT)} diff --git a/arch/cpu/arm/Makefile.arm b/arch/cpu/arm/Makefile.arm index ba93b82a0..0b2662423 100644 --- a/arch/cpu/arm/Makefile.arm +++ b/arch/cpu/arm/Makefile.arm @@ -31,7 +31,7 @@ CONTIKI_ARM_DIRS += . common/dbg-io CONTIKI_CPU_DIRS += $(addprefix ../arm/, $(CONTIKI_ARM_DIRS)) ### CPU-dependent cleanup files -CLEAN += *.d *.elf *.hex +CLEAN += *.elf *.bin *.lst *.hex *.i16hex ### Don't treat the following files as intermediate .PRECIOUS: %.elf %.hex %.bin diff --git a/arch/cpu/msp430/Makefile.msp430 b/arch/cpu/msp430/Makefile.msp430 index 3cc432ad5..841e11285 100644 --- a/arch/cpu/msp430/Makefile.msp430 +++ b/arch/cpu/msp430/Makefile.msp430 @@ -184,6 +184,9 @@ CFLAGS += $(CFLAGSNO) PROJECT_OBJECTFILES += ${addprefix $(OBJECTDIR)/,$(CONTIKI_TARGET_MAIN:.c=.o)} +### CPU-dependent cleanup files +CLEAN += *.firmware *.ihex + ### Compilation rules %-stripped.o: %.c diff --git a/arch/platform/cc2538dk/Makefile.cc2538dk b/arch/platform/cc2538dk/Makefile.cc2538dk index 2b88479d2..c452ccfaf 100644 --- a/arch/platform/cc2538dk/Makefile.cc2538dk +++ b/arch/platform/cc2538dk/Makefile.cc2538dk @@ -13,8 +13,6 @@ CONTIKI_TARGET_SOURCEFILES += board-buttons.c als-sensor.c CONTIKI_SOURCEFILES += $(CONTIKI_TARGET_SOURCEFILES) -CLEAN += *.cc2538dk - ### Define the CPU directory CONTIKI_CPU=$(CONTIKI)/arch/cpu/cc2538 include $(CONTIKI_CPU)/Makefile.cc2538 diff --git a/arch/platform/cooja/Makefile.cooja b/arch/platform/cooja/Makefile.cooja index 541ae51f0..d06aa08d5 100644 --- a/arch/platform/cooja/Makefile.cooja +++ b/arch/platform/cooja/Makefile.cooja @@ -64,6 +64,8 @@ CONTIKI_SOURCEFILES += $(CONTIKI_TARGET_SOURCEFILES) .SUFFIXES: +CLEAN += COOJA.log + ### Define the CPU directory CONTIKI_CPU=$(CONTIKI)/arch/cpu/x86 diff --git a/arch/platform/jn516x/Makefile.jn516x b/arch/platform/jn516x/Makefile.jn516x index a70c4f3e6..fafadb831 100644 --- a/arch/platform/jn516x/Makefile.jn516x +++ b/arch/platform/jn516x/Makefile.jn516x @@ -140,7 +140,6 @@ ifdef nodemac CFLAGS += -DMACID=$(nodemac) endif -CLEAN += *.jn516x CLEAN += *.jn516x.bin CONTIKI_TARGET_SOURCEFILES += $(ARCH) diff --git a/arch/platform/native/Makefile.native b/arch/platform/native/Makefile.native index bee104a6c..24f433796 100644 --- a/arch/platform/native/Makefile.native +++ b/arch/platform/native/Makefile.native @@ -30,8 +30,6 @@ CONTIKI_SOURCEFILES += $(CONTIKI_TARGET_SOURCEFILES) # Enable nullmac by default MAKE_MAC ?= MAKE_MAC_NULLMAC -CLEAN += *.native - ### Define the CPU directory CONTIKI_CPU=$(CONTIKI)/arch/cpu/native include $(CONTIKI)/arch/cpu/native/Makefile.native diff --git a/arch/platform/nrf52dk/Makefile.nrf52dk b/arch/platform/nrf52dk/Makefile.nrf52dk index 6187fc532..ff6d54a44 100644 --- a/arch/platform/nrf52dk/Makefile.nrf52dk +++ b/arch/platform/nrf52dk/Makefile.nrf52dk @@ -19,8 +19,6 @@ CONTIKI_CPU_DIRS += ../arm/common/dbg-io CONTIKI_CPU_SOURCEFILES += dbg-printf.c dbg-putchar.c dbg-snprintf.c dbg-sprintf.c strformat.c endif -CLEAN += *.nrf52dk - ### Unless the example dictates otherwise, build with code size optimisations switched off SMALL ?= 0 diff --git a/arch/platform/openmote-cc2538/Makefile.openmote-cc2538 b/arch/platform/openmote-cc2538/Makefile.openmote-cc2538 index 14aa46f78..d3863fdbc 100644 --- a/arch/platform/openmote-cc2538/Makefile.openmote-cc2538 +++ b/arch/platform/openmote-cc2538/Makefile.openmote-cc2538 @@ -20,8 +20,6 @@ CONTIKI_TARGET_SOURCEFILES += antenna.c adxl346.c max44009.c sht21.c tps62730.c CONTIKI_SOURCEFILES += $(CONTIKI_TARGET_SOURCEFILES) -CLEAN += *.openmote-cc2538 - ### Define the CPU directory CONTIKI_CPU=$(CONTIKI)/arch/cpu/cc2538 include $(CONTIKI_CPU)/Makefile.cc2538 diff --git a/arch/platform/sky/Makefile.sky b/arch/platform/sky/Makefile.sky index 9467603a4..0398486b0 100644 --- a/arch/platform/sky/Makefile.sky +++ b/arch/platform/sky/Makefile.sky @@ -4,8 +4,6 @@ CONTIKI_TARGET_SOURCEFILES += contiki-sky-platform.c \ sht11.c sht11-sensor.c light-sensor.c battery-sensor.c \ button-sensor.c -CLEAN += *.sky - include $(CONTIKI)/arch/platform/sky/Makefile.common MODULES += arch/dev/cc2420 arch/dev/sht11 arch/dev/ds2411 os/storage/cfs diff --git a/arch/platform/srf06-cc26xx/Makefile.srf06-cc26xx b/arch/platform/srf06-cc26xx/Makefile.srf06-cc26xx index 7bead9fff..db4209adc 100644 --- a/arch/platform/srf06-cc26xx/Makefile.srf06-cc26xx +++ b/arch/platform/srf06-cc26xx/Makefile.srf06-cc26xx @@ -19,8 +19,6 @@ CONTIKI_TARGET_SOURCEFILES += $(BOARD_SOURCEFILES) CONTIKI_SOURCEFILES += $(CONTIKI_TARGET_SOURCEFILES) -CLEAN += *.srf06-cc26xx - ### Unless the example dictates otherwise, build without code size optimisations SMALL ?= 0 diff --git a/arch/platform/zoul/Makefile.zoul b/arch/platform/zoul/Makefile.zoul index 6bbcd675b..586a74ae2 100644 --- a/arch/platform/zoul/Makefile.zoul +++ b/arch/platform/zoul/Makefile.zoul @@ -38,8 +38,6 @@ CONTIKI_TARGET_SOURCEFILES += $(BOARD_SOURCEFILES) CONTIKI_SOURCEFILES += $(CONTIKI_TARGET_SOURCEFILES) -CLEAN += *.zoul - ### Define the CPU directory CONTIKI_CPU=$(CONTIKI)/arch/cpu/cc2538 include $(CONTIKI_CPU)/Makefile.cc2538