diff --git a/Makefile b/Makefile index 1d41fa5b5e09f5004b73f417adb837c9188757bb..cc2095343a1b7907b2a28d097ae144ce27f22925 100644 --- a/Makefile +++ b/Makefile @@ -2,6 +2,9 @@ DIRS = $(RIOTCPU)/$(CPU) core drivers sys .PHONY: all clean doc +include $(RIOTCPU)/$(CPU)/Makefile.include +include $(RIOTBOARD)/$(BOARD)/Makefile.include + all: mkdir -p $(BINDIR) @for i in $(DIRS) ; do "$(MAKE)" -C $$i ; done ; diff --git a/Makefile.base b/Makefile.base index 500c6b6a8004c464c4d4df9c0d972d9a37e686ef..dbc33f8811e5b887d9a003e5cc1201b141a5a28a 100644 --- a/Makefile.base +++ b/Makefile.base @@ -23,9 +23,6 @@ export CFLAGS += -DVERSION=\"$(GIT_VERSION)\" .PHONY: clean -include $(RIOTCPU)/$(CPU)/Makefile.include -include $(RIOTBOARD)/$(BOARD)/Makefile.include - $(BINDIR)$(MODULE).a: $(OBJ) $(ASMOBJ) @$(AR) -rc $(BINDIR)$(MODULE).a $(OBJ) $(ASMOBJ) diff --git a/boards/avsextrem/Makefile b/boards/avsextrem/Makefile index 6d0e8b94aa788a0ab37ce5109dbf0ccf41a4129f..9a90303614ff1603521ea22e477807c9a1a07fa8 100644 --- a/boards/avsextrem/Makefile +++ b/boards/avsextrem/Makefile @@ -1,7 +1,5 @@ MODULE =$(BOARD)_base -include $(RIOTBOARD)/$(BOARD)/Makefile.include - DIRS = drivers $(RIOTBOARD)/msba2-common all: $(BINDIR)$(MODULE).a diff --git a/boards/chronos/Makefile b/boards/chronos/Makefile index 9b021711be59ef535a378646c45977d657ebda72..08503227da87bf13e8d5b73415be6753bf007748 100644 --- a/boards/chronos/Makefile +++ b/boards/chronos/Makefile @@ -1,7 +1,5 @@ MODULE =$(BOARD)_base -include $(RIOTBOARD)/$(BOARD)/Makefile.include - DIRS = drivers all: $(BINDIR)$(MODULE).a diff --git a/boards/mbed_lpc1768/Makefile b/boards/mbed_lpc1768/Makefile index a1a4f9665a4459cb2e4db5f0b7282399d1100614..ff5489888b2070c3cbaee187beee2113f5d2329c 100644 --- a/boards/mbed_lpc1768/Makefile +++ b/boards/mbed_lpc1768/Makefile @@ -1,5 +1,3 @@ MODULE =$(BOARD)_base -include $(RIOTBOARD)/$(BOARD)/Makefile.include - include $(RIOTBASE)/Makefile.base diff --git a/boards/mbed_lpc1768/Makefile.include b/boards/mbed_lpc1768/Makefile.include index 1a80e037283a878c2cd5947bb41084c288b3bd36..48f3b63bb4aab411ccc8e1e0e4071b02155306c9 100644 --- a/boards/mbed_lpc1768/Makefile.include +++ b/boards/mbed_lpc1768/Makefile.include @@ -23,6 +23,5 @@ export FFLAGS = $(HEXFILE) export ELFFILE = bin/$(PROJECT).elf export DEBUGGER_FLAGS = $(ELFFILE) -INCLUDES += -Iinclude/ -INCLUDES += -I$(RIOTCPU)/$(CPU)/include +INCLUDES += -Iinclude/ -I$(RIOTCPU)/$(CPU)/include export OFLAGS = -O binary diff --git a/boards/msb-430-common/Makefile b/boards/msb-430-common/Makefile index 9b021711be59ef535a378646c45977d657ebda72..08503227da87bf13e8d5b73415be6753bf007748 100644 --- a/boards/msb-430-common/Makefile +++ b/boards/msb-430-common/Makefile @@ -1,7 +1,5 @@ MODULE =$(BOARD)_base -include $(RIOTBOARD)/$(BOARD)/Makefile.include - DIRS = drivers all: $(BINDIR)$(MODULE).a diff --git a/boards/msb-430/Makefile b/boards/msb-430/Makefile index d61c7c8f29aa1a8402d77e4755c87f7a18ea324a..0a7ebeb6372570bfb26360c69be87b9e92fc0902 100644 --- a/boards/msb-430/Makefile +++ b/boards/msb-430/Makefile @@ -1,7 +1,5 @@ MODULE =$(BOARD)_base -include $(RIOTBOARD)/$(BOARD)/Makefile.include - DIRS = $(RIOTBOARD)/msb-430-common all: $(BINDIR)$(MODULE).a diff --git a/boards/msb-430h/Makefile b/boards/msb-430h/Makefile index d61c7c8f29aa1a8402d77e4755c87f7a18ea324a..0a7ebeb6372570bfb26360c69be87b9e92fc0902 100644 --- a/boards/msb-430h/Makefile +++ b/boards/msb-430h/Makefile @@ -1,7 +1,5 @@ MODULE =$(BOARD)_base -include $(RIOTBOARD)/$(BOARD)/Makefile.include - DIRS = $(RIOTBOARD)/msb-430-common all: $(BINDIR)$(MODULE).a diff --git a/boards/msba2-common/Makefile b/boards/msba2-common/Makefile index 04766aa7f5a3137b805be7da5a3bfc4256a1f667..08503227da87bf13e8d5b73415be6753bf007748 100644 --- a/boards/msba2-common/Makefile +++ b/boards/msba2-common/Makefile @@ -1,5 +1,4 @@ MODULE =$(BOARD)_base -include $(RIOTBOARD)/$(BOARD)/Makefile.include DIRS = drivers diff --git a/boards/msba2/Makefile b/boards/msba2/Makefile index ab866cfdd97f3647ca0932f8cd19dcdabd1798ea..12fef1c0edfd00a04c9ee653cd6e28c6c50c3873 100644 --- a/boards/msba2/Makefile +++ b/boards/msba2/Makefile @@ -1,5 +1,4 @@ MODULE =$(BOARD)_base -include $(RIOTBOARD)/$(BOARD)/Makefile.include INCLUDES += -I$(RIOTBASE)/drivers/cc110x DIRS = $(RIOTBOARD)/msba2-common diff --git a/boards/native/Makefile b/boards/native/Makefile index 9b021711be59ef535a378646c45977d657ebda72..08503227da87bf13e8d5b73415be6753bf007748 100644 --- a/boards/native/Makefile +++ b/boards/native/Makefile @@ -1,7 +1,5 @@ MODULE =$(BOARD)_base -include $(RIOTBOARD)/$(BOARD)/Makefile.include - DIRS = drivers all: $(BINDIR)$(MODULE).a diff --git a/boards/native/drivers/Makefile b/boards/native/drivers/Makefile index ab6caa06bdd27665652d8c9162b3618b65109180..9dd5bad5e4f8c12d650369d462935145ecaa2195 100644 --- a/boards/native/drivers/Makefile +++ b/boards/native/drivers/Makefile @@ -1,7 +1,5 @@ MODULE =$(BOARD)_base -include $(RIOTBOARD)/$(BOARD)/Makefile.include - all: $(BINDIR)$(MODULE).a @for i in $(DIRS) ; do "$(MAKE)" -C $$i ; done ; diff --git a/boards/redbee-econotag/Makefile b/boards/redbee-econotag/Makefile index 9b021711be59ef535a378646c45977d657ebda72..08503227da87bf13e8d5b73415be6753bf007748 100644 --- a/boards/redbee-econotag/Makefile +++ b/boards/redbee-econotag/Makefile @@ -1,7 +1,5 @@ MODULE =$(BOARD)_base -include $(RIOTBOARD)/$(BOARD)/Makefile.include - DIRS = drivers all: $(BINDIR)$(MODULE).a diff --git a/boards/telosb/Makefile b/boards/telosb/Makefile index a1a4f9665a4459cb2e4db5f0b7282399d1100614..ff5489888b2070c3cbaee187beee2113f5d2329c 100644 --- a/boards/telosb/Makefile +++ b/boards/telosb/Makefile @@ -1,5 +1,3 @@ MODULE =$(BOARD)_base -include $(RIOTBOARD)/$(BOARD)/Makefile.include - include $(RIOTBASE)/Makefile.base diff --git a/boards/wsn430-common/Makefile b/boards/wsn430-common/Makefile index 9b021711be59ef535a378646c45977d657ebda72..08503227da87bf13e8d5b73415be6753bf007748 100644 --- a/boards/wsn430-common/Makefile +++ b/boards/wsn430-common/Makefile @@ -1,7 +1,5 @@ MODULE =$(BOARD)_base -include $(RIOTBOARD)/$(BOARD)/Makefile.include - DIRS = drivers all: $(BINDIR)$(MODULE).a diff --git a/boards/wsn430-v1_3b/Makefile b/boards/wsn430-v1_3b/Makefile index fa371cab29a3fd3927c9dc27107d89d01ef99cbf..7f7fba05eafe74122353c887d150e61a6d9f8475 100644 --- a/boards/wsn430-v1_3b/Makefile +++ b/boards/wsn430-v1_3b/Makefile @@ -1,7 +1,5 @@ MODULE =$(BOARD)_base -include $(RIOTBOARD)/$(BOARD)/Makefile.include - DIRS = $(RIOTBOARD)/wsn430-common all: $(BINDIR)$(MODULE).a diff --git a/boards/wsn430-v1_4/Makefile b/boards/wsn430-v1_4/Makefile index fa371cab29a3fd3927c9dc27107d89d01ef99cbf..7f7fba05eafe74122353c887d150e61a6d9f8475 100644 --- a/boards/wsn430-v1_4/Makefile +++ b/boards/wsn430-v1_4/Makefile @@ -1,7 +1,5 @@ MODULE =$(BOARD)_base -include $(RIOTBOARD)/$(BOARD)/Makefile.include - DIRS = $(RIOTBOARD)/wsn430-common all: $(BINDIR)$(MODULE).a diff --git a/core/Makefile b/core/Makefile index 57938d4829d786547db169aefb062e3bfc1f9ccc..d420149bd23b6c56f4240c6f853d9aa8cb542747 100644 --- a/core/Makefile +++ b/core/Makefile @@ -1,5 +1,3 @@ MODULE =core -INCLUDES = -Iinclude -I$(RIOTBASE)/sys/include -I$(RIOTCPU)/$(CPU)/include - include $(RIOTBASE)/Makefile.base diff --git a/cpu/cc430/Makefile b/cpu/cc430/Makefile index d08377bd38003f5b6e82baffbda4127755e87ef7..3e10d1237ad615784e47c543a11a2f2644368628 100644 --- a/cpu/cc430/Makefile +++ b/cpu/cc430/Makefile @@ -1,6 +1,5 @@ MODULE = cpu -INCLUDES += -I$(RIOTCPU)/$(CPU)/include -I$(RIOTBASE)/core/include -I$(RIOTBASE)/drivers/cc110x_ng/include DIRS = $(RIOTCPU)/msp430-common all: $(BINDIR)$(MODULE).a diff --git a/cpu/lpc2387/Makefile b/cpu/lpc2387/Makefile index 461827d5f97535e3c4eca0f9599e3e7ba3b20069..8b9db756198a624310a3c8bfd8c6f10a2647bf8a 100644 --- a/cpu/lpc2387/Makefile +++ b/cpu/lpc2387/Makefile @@ -1,6 +1,7 @@ MODULE =cpu -INCLUDES = -I../include -Idrivers/include -I../arm_common/include -I../../sys/lib -I../../drivers/include -I../../core/include -I../../sys/include -I../../hal/include -I../../.. +include $(RIOTCPU)/$(CPU)/Makefile.include + DIRS = $(RIOTCPU)/arm_common $(RIOTCPU)/lpc_common ifneq (,$(findstring gpioint,$(USEMODULE))) DIRS += gpioint diff --git a/cpu/lpc2387/gpioint/Makefile b/cpu/lpc2387/gpioint/Makefile index 758cd9f320d2ca2d1a79dc3544028ec1359ff3b9..edd98724ddfadb2344ab12c55b9aca369e0517fc 100644 --- a/cpu/lpc2387/gpioint/Makefile +++ b/cpu/lpc2387/gpioint/Makefile @@ -1,5 +1,3 @@ -INCLUDES = -I$(RIOTBASE)/drivers/include -I$(RIOTBASE)/sys/include -I../../net -I../include -I../../lib -I../../../.. -I../../../cpu/ -I../../../core/include -I../../ - MODULE =gpioint include $(MAKEBASE)/Makefile.base diff --git a/cpu/lpc2387/mci/Makefile b/cpu/lpc2387/mci/Makefile index 9034267a5b25440a529e316c79f895784b947656..22fd2a480b7e7797bfcf8c8a23e176b7ee5ca093 100644 --- a/cpu/lpc2387/mci/Makefile +++ b/cpu/lpc2387/mci/Makefile @@ -1,5 +1,3 @@ -INCLUDES = -I$(RIOTBASE)/drivers/include -I$(RIOTBASE)/sys/include -I../../net -I../include -I../../lib -I../../../.. -I../../../cpu/ -I../../../core/include -I../../ - MODULE =mci include $(MAKEBASE)/Makefile.base diff --git a/cpu/lpc2387/rtc/Makefile b/cpu/lpc2387/rtc/Makefile index 8cd5c1e0af1de5ade99fbd0d4920ad59a722a852..64278b51d685d909f379a0b3005b07366b6eb5cb 100644 --- a/cpu/lpc2387/rtc/Makefile +++ b/cpu/lpc2387/rtc/Makefile @@ -1,5 +1,3 @@ -INCLUDES = -I$(RIOTBASE)/drivers/include -I$(RIOTBASE)/core/include - MODULE =rtc include $(MAKEBASE)/Makefile.base diff --git a/cpu/msp430-common/Makefile b/cpu/msp430-common/Makefile index 0a92437f979a42ab11fc9f92b8ea3e5a30e0c30c..4d745160cd832ee38cf4d1ccada57da07fb9131d 100644 --- a/cpu/msp430-common/Makefile +++ b/cpu/msp430-common/Makefile @@ -1,6 +1,5 @@ MODULE =msp430_common -INCLUDES += -Iinclude -I$(RIOTBASE)/core/include/ -I$(RIOTBOARD)/$(BOARD)/include DIRS = all: $(BINDIR)$(MODULE).a diff --git a/cpu/msp430x16x/Makefile b/cpu/msp430x16x/Makefile index 0d95efd3a990d98affe688c295dc6dc7dd338316..3b9fcd10ac13a174c2fb04422e17051c86c5ba37 100644 --- a/cpu/msp430x16x/Makefile +++ b/cpu/msp430x16x/Makefile @@ -1,6 +1,7 @@ MODULE =cpu -INCLUDES = -I../include -I$(RIOTBASE)/core/include +include $(RIOTCPU)/$(CPU)/Makefile.include + DIRS = $(RIOTCPU)/msp430-common/ all: $(BINDIR)$(MODULE).a diff --git a/cpu/native/Makefile b/cpu/native/Makefile index d5d520f74b7c32a0eb2dfd5c4531e8dc5e580414..d8e6b930b18d4de01fae1bc61fd559277e656d2f 100644 --- a/cpu/native/Makefile +++ b/cpu/native/Makefile @@ -1,7 +1,5 @@ MODULE = cpu -INCLUDES += -I../include -I$(RIOTBASE)/core/include - EXCLUDES := -I$(RIOTBASE)/sys/posix/% DIRS = diff --git a/cpu/native/net/Makefile b/cpu/native/net/Makefile index 3ce631f49c6e92146649220c92e862c101a80760..8679594811a166fcae2b5cfe2bea189478ef67da 100644 --- a/cpu/native/net/Makefile +++ b/cpu/native/net/Makefile @@ -1,5 +1,3 @@ -INCLUDES += -I$(RIOTBASE)/core/include -I$(RIOTBASE)/sys/include - EXCLUDES := -I$(RIOTBASE)/sys/posix/% MODULE = nativenet diff --git a/cpu/native/rtc/Makefile b/cpu/native/rtc/Makefile index 8cd5c1e0af1de5ade99fbd0d4920ad59a722a852..64278b51d685d909f379a0b3005b07366b6eb5cb 100644 --- a/cpu/native/rtc/Makefile +++ b/cpu/native/rtc/Makefile @@ -1,5 +1,3 @@ -INCLUDES = -I$(RIOTBASE)/drivers/include -I$(RIOTBASE)/core/include - MODULE =rtc include $(MAKEBASE)/Makefile.base diff --git a/drivers/Makefile b/drivers/Makefile index 709eb35d7aeac0ca118f3b566ecb219bc43fbcbb..4a5d79a370940b8aaf6ed6272b0bc8a2d247d9f9 100644 --- a/drivers/Makefile +++ b/drivers/Makefile @@ -1,5 +1,4 @@ MODULE = drivers -INCLUDES = -I$(RIOTBASE)/sys/include -I$(RIOTBASE)/core/include -I$(CURDIR)/include -Iinclude -I$(RIOTBASE)/sys/net/include DIRS= ifneq (,$(findstring powermon,$(USEMODULE))) diff --git a/drivers/cc110x_ng/spi/Makefile b/drivers/cc110x_ng/spi/Makefile index 644fb0062e4d2ebc3d3a234e6fcea6bbefbb5094..c7b442df9fc65f5d3e971dea406fe54ac86d579c 100644 --- a/drivers/cc110x_ng/spi/Makefile +++ b/drivers/cc110x_ng/spi/Makefile @@ -1,5 +1,3 @@ -INCLUDES = -I$(RIOTBASE)/sys/include -I../../net -I../include -I../../lib -I../../../.. -I../../../cpu/ -I$(RIOTBASE)/core/include -I../../ -Iinclude/ - MODULE =cc110x_spi include $(MAKEBASE)/Makefile.base diff --git a/sys/Makefile b/sys/Makefile index 020f0c24ec0795f443de9efb915cbe57c952db89..58020bfd19119d71cfbb178babb7227e8b0cf28a 100644 --- a/sys/Makefile +++ b/sys/Makefile @@ -1,5 +1,3 @@ -export INCLUDES = -Iinclude -I$(CURDIR)/include -I$(RIOTBASE)/sys/net/include -I$(RIOTBASE)/drivers/include -I$(RIOTCPU)/$(CPU)/include -I$(RIOTBASE)/core/include - MODULE =sys ifneq (,$(findstring auto_init,$(USEMODULE))) DIRS += auto_init @@ -17,6 +15,7 @@ ifneq (,$(findstring ps,$(USEMODULE))) DIRS += ps endif ifneq (,$(findstring posix,$(USEMODULE))) + INCLUDES += -I$(RIOTBASE)/sys/posix/include DIRS += posix endif ifneq (,$(findstring shell,$(USEMODULE))) diff --git a/sys/net/link_layer/protocol-multiplex/Makefile b/sys/net/link_layer/protocol-multiplex/Makefile index 10d40e8e0ea785768ceda2cc01233662ef895851..764e02c5b2ff41ba30274d3833d6b747abcf6fc7 100644 --- a/sys/net/link_layer/protocol-multiplex/Makefile +++ b/sys/net/link_layer/protocol-multiplex/Makefile @@ -1,3 +1,5 @@ +INCLUDES += -I$(RIOTBASE)/sys/net/include + MODULE:=protocol_multiplex include $(RIOTBASE)/Makefile.base