diff --git a/Makefile.base b/Makefile.base index b28b42e032..fef2c88e91 100644 --- a/Makefile.base +++ b/Makefile.base @@ -4,6 +4,12 @@ endif MODULE ?= $(shell basename $(CURDIR)) +all: $(BINDIR)$(MODULE).a + @for i in $(DIRS); do $(MAKE) -C $$i || exit 1; done; + +clean:: + @for i in $(DIRS); do $(MAKE) -C $$i clean; done; + ASMSRC = $(wildcard *.s) ASSMSRC = $(wildcard *.S) ASMOBJ = $(ASMSRC:%.s=$(BINDIR)$(MODULE)/%.o) diff --git a/boards/arduino-due/Makefile b/boards/arduino-due/Makefile index 7ebd262164..9853e690f5 100644 --- a/boards/arduino-due/Makefile +++ b/boards/arduino-due/Makefile @@ -5,12 +5,4 @@ MODULE = $(BOARD)_base # add a list of board specific subdirectories that should also be build DIRS = -.PHONY: all clean - -all: $(BINDIR)$(MODULE).a - @for i in $(DIRS) ; do $(MAKE) -C $$i ; done ; - include $(RIOTBASE)/Makefile.base - -clean:: - @for i in $(DIRS) ; do $(MAKE) -C $$i clean ; done ; diff --git a/boards/avsextrem/Makefile b/boards/avsextrem/Makefile index 66e75590d5..60612c88c8 100644 --- a/boards/avsextrem/Makefile +++ b/boards/avsextrem/Makefile @@ -2,7 +2,4 @@ MODULE =$(BOARD)_base DIRS = drivers $(RIOTBOARD)/msba2-common -all: $(BINDIR)$(MODULE).a - @for i in $(DIRS) ; do "$(MAKE)" -C $$i || exit 1; done ; - include $(RIOTBASE)/Makefile.base diff --git a/boards/chronos/Makefile b/boards/chronos/Makefile index d5db842fcc..17c1af8c7c 100644 --- a/boards/chronos/Makefile +++ b/boards/chronos/Makefile @@ -3,7 +3,4 @@ MODULE =$(BOARD)_base INCLUDES += -I$(RIOTBOARD)/$(BOARD)/drivers/include DIRS = drivers -all: $(BINDIR)$(MODULE).a - @for i in $(DIRS) ; do "$(MAKE)" -C $$i || exit 1; done ; - include $(RIOTBASE)/Makefile.base diff --git a/boards/msb-430-common/Makefile b/boards/msb-430-common/Makefile index 476661c137..41a2470efe 100644 --- a/boards/msb-430-common/Makefile +++ b/boards/msb-430-common/Makefile @@ -2,7 +2,4 @@ MODULE =$(BOARD)_base DIRS = drivers -all: $(BINDIR)$(MODULE).a - @for i in $(DIRS) ; do "$(MAKE)" -C $$i || exit 1; done ; - include $(RIOTBASE)/Makefile.base diff --git a/boards/msb-430/Makefile b/boards/msb-430/Makefile index 4d3a2ce17d..4a12edb969 100644 --- a/boards/msb-430/Makefile +++ b/boards/msb-430/Makefile @@ -2,7 +2,4 @@ MODULE =$(BOARD)_base DIRS = $(RIOTBOARD)/msb-430-common -all: $(BINDIR)$(MODULE).a - @for i in $(DIRS) ; do "$(MAKE)" -C $$i || exit 1; done ; - include $(RIOTBASE)/Makefile.base diff --git a/boards/msb-430h/Makefile b/boards/msb-430h/Makefile index 4d3a2ce17d..4a12edb969 100644 --- a/boards/msb-430h/Makefile +++ b/boards/msb-430h/Makefile @@ -2,7 +2,4 @@ MODULE =$(BOARD)_base DIRS = $(RIOTBOARD)/msb-430-common -all: $(BINDIR)$(MODULE).a - @for i in $(DIRS) ; do "$(MAKE)" -C $$i || exit 1; done ; - include $(RIOTBASE)/Makefile.base diff --git a/boards/msba2-common/Makefile b/boards/msba2-common/Makefile index 476661c137..41a2470efe 100644 --- a/boards/msba2-common/Makefile +++ b/boards/msba2-common/Makefile @@ -2,7 +2,4 @@ MODULE =$(BOARD)_base DIRS = drivers -all: $(BINDIR)$(MODULE).a - @for i in $(DIRS) ; do "$(MAKE)" -C $$i || exit 1; done ; - include $(RIOTBASE)/Makefile.base diff --git a/boards/msba2/Makefile b/boards/msba2/Makefile index 8f2fb2c9bc..d0f0707c7a 100644 --- a/boards/msba2/Makefile +++ b/boards/msba2/Makefile @@ -3,7 +3,4 @@ INCLUDES += -I$(RIOTBASE)/drivers/cc110x DIRS = $(RIOTBOARD)/msba2-common -all: $(BINDIR)$(MODULE).a - @for i in $(DIRS) ; do "$(MAKE)" -C $$i || exit 1; done ; - include $(RIOTBASE)/Makefile.base diff --git a/boards/native/Makefile b/boards/native/Makefile index c1a5af72c1..d71a2ae828 100644 --- a/boards/native/Makefile +++ b/boards/native/Makefile @@ -2,9 +2,6 @@ MODULE =$(BOARD)_base DIRS = drivers -all: $(BINDIR)$(MODULE).a - @for i in $(DIRS) ; do "$(MAKE)" -C $$i || exit 1; done ; - include $(RIOTBASE)/Makefile.base $(BINDIR)$(MODULE)/%.o: %.c diff --git a/boards/native/drivers/Makefile b/boards/native/drivers/Makefile index 135a81e21c..646c1f9b72 100644 --- a/boards/native/drivers/Makefile +++ b/boards/native/drivers/Makefile @@ -1,8 +1,5 @@ MODULE =$(BOARD)_base -all: $(BINDIR)$(MODULE).a - @for i in $(DIRS) ; do "$(MAKE)" -C $$i || exit 1; done ; - include $(RIOTBASE)/Makefile.base $(BINDIR)$(MODULE)/%.o: %.c diff --git a/boards/pttu/Makefile b/boards/pttu/Makefile index 8f2fb2c9bc..d0f0707c7a 100644 --- a/boards/pttu/Makefile +++ b/boards/pttu/Makefile @@ -3,7 +3,4 @@ INCLUDES += -I$(RIOTBASE)/drivers/cc110x DIRS = $(RIOTBOARD)/msba2-common -all: $(BINDIR)$(MODULE).a - @for i in $(DIRS) ; do "$(MAKE)" -C $$i || exit 1; done ; - include $(RIOTBASE)/Makefile.base diff --git a/boards/qemu-i386/Makefile b/boards/qemu-i386/Makefile index 2fbf158dbd..791a5e6158 100644 --- a/boards/qemu-i386/Makefile +++ b/boards/qemu-i386/Makefile @@ -2,10 +2,4 @@ MODULE = qemu-i386_base DIRS = $(RIOTBOARD)/x86-multiboot-common -all: $(BINDIR)$(MODULE).a - @for i in $(DIRS) ; do "$(MAKE)" -C $$i ; done ; - include $(RIOTBASE)/Makefile.base - -clean:: - @for i in $(DIRS) ; do "$(MAKE)" -C $$i clean ; done ; diff --git a/boards/redbee-econotag/Makefile b/boards/redbee-econotag/Makefile index 476661c137..41a2470efe 100644 --- a/boards/redbee-econotag/Makefile +++ b/boards/redbee-econotag/Makefile @@ -2,7 +2,4 @@ MODULE =$(BOARD)_base DIRS = drivers -all: $(BINDIR)$(MODULE).a - @for i in $(DIRS) ; do "$(MAKE)" -C $$i || exit 1; done ; - include $(RIOTBASE)/Makefile.base diff --git a/boards/udoo/Makefile b/boards/udoo/Makefile index 7ebd262164..2280e8de50 100644 --- a/boards/udoo/Makefile +++ b/boards/udoo/Makefile @@ -1,16 +1,7 @@ - # tell the Makefile.base which module to build MODULE = $(BOARD)_base # add a list of board specific subdirectories that should also be build DIRS = -.PHONY: all clean - -all: $(BINDIR)$(MODULE).a - @for i in $(DIRS) ; do $(MAKE) -C $$i ; done ; - include $(RIOTBASE)/Makefile.base - -clean:: - @for i in $(DIRS) ; do $(MAKE) -C $$i clean ; done ; diff --git a/boards/wsn430-common/Makefile b/boards/wsn430-common/Makefile index 476661c137..41a2470efe 100644 --- a/boards/wsn430-common/Makefile +++ b/boards/wsn430-common/Makefile @@ -2,7 +2,4 @@ MODULE =$(BOARD)_base DIRS = drivers -all: $(BINDIR)$(MODULE).a - @for i in $(DIRS) ; do "$(MAKE)" -C $$i || exit 1; done ; - include $(RIOTBASE)/Makefile.base diff --git a/boards/wsn430-v1_3b/Makefile b/boards/wsn430-v1_3b/Makefile index 13ff3e7086..5e88812e16 100644 --- a/boards/wsn430-v1_3b/Makefile +++ b/boards/wsn430-v1_3b/Makefile @@ -2,7 +2,4 @@ MODULE =$(BOARD)_base DIRS = $(RIOTBOARD)/wsn430-common -all: $(BINDIR)$(MODULE).a - @for i in $(DIRS) ; do "$(MAKE)" -C $$i || exit 1; done ; - include $(RIOTBASE)/Makefile.base diff --git a/boards/wsn430-v1_4/Makefile b/boards/wsn430-v1_4/Makefile index 7d93d90cd6..b906d082de 100644 --- a/boards/wsn430-v1_4/Makefile +++ b/boards/wsn430-v1_4/Makefile @@ -5,7 +5,4 @@ DIRS = $(RIOTBOARD)/wsn430-common INCLUDES += -I$(RIOTBASE)/drivers/cc2420/include \ -I$(RIOTBASE)/sys/net/include -all: $(BINDIR)$(MODULE).a - @for i in $(DIRS) ; do "$(MAKE)" -C $$i || exit 1; done ; - include $(RIOTBASE)/Makefile.base diff --git a/cpu/cc430/Makefile b/cpu/cc430/Makefile index ad74ec937a..9ea7e86c47 100644 --- a/cpu/cc430/Makefile +++ b/cpu/cc430/Makefile @@ -2,7 +2,4 @@ MODULE = cpu DIRS = $(RIOTCPU)/msp430-common -all: $(BINDIR)$(MODULE).a - @for i in $(DIRS) ; do "$(MAKE)" -C $$i || exit 1; done ; - include $(RIOTBASE)/Makefile.base diff --git a/cpu/lpc1768/Makefile b/cpu/lpc1768/Makefile index 92826d6a5b..c2c340da13 100644 --- a/cpu/lpc1768/Makefile +++ b/cpu/lpc1768/Makefile @@ -7,8 +7,6 @@ CC_SYMBOLS = -DTARGET_LPC1769 -DTOOLCHAIN_GCC_ARM -DNDEBUG -D__CORTEX_M3 LD_FLAGS = -mcpu=cortex-m3 -mthumb -Wl,--gc-sections,-Map=$(APPLICATION).map,--cref --specs=nano.specs LD_SYS_LIBS = -lc -lgcc -lnosys -all: $(BINDIR)$(MODULE).a - include $(RIOTBASE)/Makefile.base # This is needed for NXP Cortex M devices diff --git a/cpu/lpc2387/Makefile b/cpu/lpc2387/Makefile index 57ce9fb1f1..5c2a1a1ee2 100644 --- a/cpu/lpc2387/Makefile +++ b/cpu/lpc2387/Makefile @@ -16,7 +16,4 @@ ifneq (,$(filter i2c,$(USEMODULE))) DIRS += i2c endif -all: $(BINDIR)$(MODULE).a - @for i in $(DIRS) ; do "$(MAKE)" -C $$i || exit 1; done ; - include $(RIOTBASE)/Makefile.base diff --git a/cpu/mc1322x/Makefile b/cpu/mc1322x/Makefile index 8abd8bfc89..2ce3f30e54 100644 --- a/cpu/mc1322x/Makefile +++ b/cpu/mc1322x/Makefile @@ -11,7 +11,4 @@ ifneq (,$(filter mc1322x,$(USEMODULE))) DIRS += maca endif -all: $(BINDIR)$(MODULE).a - @for i in $(DIRS) ; do "$(MAKE)" -C $$i || exit 1; done ; - include $(RIOTBASE)/Makefile.base diff --git a/cpu/msp430x16x/Makefile b/cpu/msp430x16x/Makefile index b583dc78ed..67d72bda57 100644 --- a/cpu/msp430x16x/Makefile +++ b/cpu/msp430x16x/Makefile @@ -4,7 +4,4 @@ include $(RIOTCPU)/$(CPU)/Makefile.include DIRS = $(RIOTCPU)/msp430-common/ -all: $(BINDIR)$(MODULE).a - @for i in $(DIRS) ; do "$(MAKE)" -C $$i || exit 1; done ; - include $(RIOTBASE)/Makefile.base diff --git a/cpu/native/Makefile b/cpu/native/Makefile index 34b29cd8c0..bfd643aad3 100644 --- a/cpu/native/Makefile +++ b/cpu/native/Makefile @@ -1,6 +1,5 @@ MODULE = cpu -DIRS = ifneq (,$(filter rtc,$(USEMODULE))) DIRS += rtc endif @@ -8,9 +7,6 @@ ifneq (,$(filter nativenet,$(USEMODULE))) DIRS += net endif -all: $(BINDIR)$(MODULE).a - @for i in $(DIRS) ; do "$(MAKE)" -C $$i || exit 1; done ; - include $(RIOTBASE)/Makefile.base $(BINDIR)$(MODULE)/%.o: %.c diff --git a/cpu/sam3x8e/Makefile b/cpu/sam3x8e/Makefile index c6e9da080a..55e50d2099 100644 --- a/cpu/sam3x8e/Makefile +++ b/cpu/sam3x8e/Makefile @@ -1,21 +1,7 @@ - # define the module that is build MODULE = cpu # add a list of subdirectories, that should also be build -DIRS = periph - -.PHONY: all $(CORTEX_COMMON) - -# when building the CPU module make sure, the STM std peripheral lib will also be build -all: $(CORTEX_COMMON) $(BINDIR)$(MODULE).a - @for i in $(DIRS) ; do $(MAKE) -C $$i ; done ; - -$(CORTEX_COMMON): - @$(MAKE) -C $(CORTEX_COMMON) +DIRS = periph $(CORTEX_COMMON) include $(RIOTBASE)/Makefile.base - -clean:: - @for i in $(DIRS) ; do $(MAKE) -C $$i clean ; done ; - @$(MAKE) -C $(CORTEX_COMMON) clean diff --git a/drivers/Makefile b/drivers/Makefile index de5ade431f..97204ed45d 100644 --- a/drivers/Makefile +++ b/drivers/Makefile @@ -1,4 +1,3 @@ -DIRS= ifneq (,$(filter powermon,$(USEMODULE))) DIRS += powermon endif @@ -33,7 +32,4 @@ ifneq (,$(filter lm75a,$(USEMODULE))) DIRS += lm75a endif -all: - @for i in $(DIRS) ; do "$(MAKE)" -C $$i || exit 1; done ; - include $(RIOTBASE)/Makefile.base diff --git a/drivers/cc110x_ng/Makefile b/drivers/cc110x_ng/Makefile index 4d7564aacc..5b28341447 100644 --- a/drivers/cc110x_ng/Makefile +++ b/drivers/cc110x_ng/Makefile @@ -1,4 +1,3 @@ -DIRS = ifneq (,$(filter msb-430h,$(BOARD))) DIRS += spi endif @@ -9,7 +8,4 @@ ifneq (,$(filter wsn430-v1_3b,$(BOARD))) DIRS += spi endif -all: $(BINDIR)$(MODULE).a - @for i in $(DIRS) ; do "$(MAKE)" -C $$i || exit 1; done ; - include $(RIOTBASE)/Makefile.base diff --git a/sys/Makefile b/sys/Makefile index c20e4781f9..bbf3f59ca7 100644 --- a/sys/Makefile +++ b/sys/Makefile @@ -1,4 +1,3 @@ -MODULE = sys ifneq (,$(filter auto_init,$(USEMODULE))) DIRS += auto_init endif @@ -93,7 +92,4 @@ ifneq (,$(filter oneway_malloc,$(USEMODULE))) DIRS += oneway-malloc endif -all: $(BINDIR)$(MODULE).a - @for i in $(DIRS) ; do "$(MAKE)" -C $$i || exit 1; done ; - include $(RIOTBASE)/Makefile.base