diff --git a/Makefile b/Makefile index cd5bd421c3242124343f830523d1e08628f058a2..cc2095343a1b7907b2a28d097ae144ce27f22925 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,10 @@ -DIRS = $(RIOTCPU) core drivers sys +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 ed8d4c15e8835ce5fee50f17d99ea6f881322726..5ea0a1565774f74bd889f9258a2768f955f894da 100644 --- a/Makefile.base +++ b/Makefile.base @@ -23,28 +23,25 @@ export CFLAGS += -DVERSION=\"$(GIT_VERSION)\" .PHONY: clean -include $(RIOTCPU)/Makefile.base -include $(RIOTBOARD)/Makefile.base - $(BINDIR)$(MODULE).a: $(OBJ) $(ASMOBJ) - @$(AR) -rc $(BINDIR)$(MODULE).a $(OBJ) $(ASMOBJ) + $(AD)$(AR) -rc $(BINDIR)$(MODULE).a $(OBJ) $(ASMOBJ) # pull in dependency info for *existing* .o files -include $(OBJ:.o=.d) # compile and generate dependency info $(BINDIR)%.o: %.c - @$(CC) $(CFLAGS) $(INCLUDES) -c $*.c -o $(BINDIR)$*.o - @$(CC) $(CFLAGS) $(INCLUDES) -MM $*.c > $(BINDIR)$*.d + $(AD)$(CC) $(CFLAGS) $(INCLUDES) -c $*.c -o $(BINDIR)$*.o + $(AD)$(CC) $(CFLAGS) $(INCLUDES) -MM $*.c > $(BINDIR)$*.d @printf "$(BINDIR)"|cat - $(BINDIR)$*.d > /tmp/riot_out && mv /tmp/riot_out $(BINDIR)$*.d $(BINDIR)%.o: %.s - @$(AS) $(ASFLAGS) $*.s -o $(BINDIR)$*.o + $(AD)$(AS) $(ASFLAGS) $*.s -o $(BINDIR)$*.o $(BINDIR)%.o: %.S - @$(CC) -c $(CFLAGS) $*.S -o $(BINDIR)$*.o + $(AD)$(CC) -c $(CFLAGS) $*.S -o $(BINDIR)$*.o # remove compilation products clean:: - @rm -f $(BINDIR)$(MODULE).a $(OBJ) $(DEP) $(ASMOBJ) + $(AD)rm -f $(BINDIR)$(MODULE).a $(OBJ) $(DEP) $(ASMOBJ) diff --git a/Makefile.include b/Makefile.include index 84c5c990b07dca843af6b39c307531ab66a465db..cee04a2a7741a5cffd37f4fb53ffaf2c9908a9f9 100644 --- a/Makefile.include +++ b/Makefile.include @@ -17,16 +17,23 @@ CPUDEF = $(shell echo $(CPU)|tr 'a-z' 'A-Z') CFLAGS += -DBOARD=$(BB) -DCPU_$(CPUDEF) export CFLAGS +export BINDIR =$(CURDIR)/bin/$(BOARD)/ + +ifeq ($(QUIET),1) + AD=@ +else + AD= +endif +export AD + # mandatory includes! +include $(RIOTBASE)/Makefile.modules include $(RIOTBOARD)/$(BOARD)/Makefile.include -include $(RIOTCPU)/Makefile.include -include $(RIOTBASE)/Makefile.modules +include $(RIOTCPU)/$(CPU)/Makefile.include # your binaries to link -BASELIBS += $(RIOTBOARD)/$(BOARD)/bin/$(BOARD)_base.a -BASELIBS += $(PROJBINDIR)/${PROJECT}.a - -PROJBINDIR =$(CURDIR)/bin +BASELIBS += $(BINDIR)$(BOARD)_base.a +BASELIBS += $(BINDIR)${PROJECT}.a # clumsy way to enable building native on osx: BUILDOSXNATIVE = 0 @@ -48,46 +55,46 @@ endif .PHONY: all clean flash doc term ## make script for your project. Build RIOT-base here! -all: $(PROJBINDIR)/$(PROJECT).a +all: $(BINDIR)$(PROJECT).a @echo "Building project $(PROJECT) for $(BOARD) w/ MCU $(MCU)." - "$(MAKE)" -C $(RIOTBOARD) + "$(MAKE)" -C $(RIOTBOARD)/$(BOARD) "$(MAKE)" -C $(RIOTBASE) @for i in $(EXTERNAL_MODULES) ; do "$(MAKE)" -C $$i ; done ; ifeq ($(BUILDOSXNATIVE),1) - @$(LINK) $(UNDEF) -o $(PROJBINDIR)/$(PROJECT).elf $(BASELIBS) $(LINKFLAGS) -Wl,-no_pie + $(LINK) $(UNDEF) -o $(BINDIR)$(PROJECT).elf $(BASELIBS) $(LINKFLAGS) -Wl,-no_pie else - @$(LINK) $(UNDEF) -o $(PROJBINDIR)/$(PROJECT).elf -Wl,--start-group $(BASELIBS) -lm -Wl,--end-group -Wl,-Map=$(PROJBINDIR)/$(PROJECT).map $(LINKFLAGS) - @$(SIZE) $(PROJBINDIR)/$(PROJECT).elf - @$(OBJCOPY) $(OFLAGS) $(PROJBINDIR)/$(PROJECT).elf $(PROJBINDIR)/$(PROJECT).hex + @$(LINK) $(UNDEF) -o $(BINDIR)$(PROJECT).elf -Wl,--start-group $(BASELIBS) -lm -Wl,--end-group -Wl,-Map=$(BINDIR)$(PROJECT).map $(LINKFLAGS) + @$(SIZE) $(BINDIR)$(PROJECT).elf + @$(OBJCOPY) $(OFLAGS) $(BINDIR)$(PROJECT).elf $(BINDIR)$(PROJECT).hex endif ## your make rules ## Only basic example - modify it for larger projects!! -#$(PROJBINDIR)/$(PROJECT).a: $(PROJBINDIR)/$(PROJECT).o -# $(AR) -rc $(PROJBINDIR)/project.a $(PROJBINDIR)/$(PROJECT).o +#$(BINDIR)/$(PROJECT).a: $(BINDIR)/$(PROJECT).o +# $(AR) -rc $(BINDIR)/project.a $(BINDIR)/$(PROJECT).o # string array of all names of c files in dir SRC = $(wildcard *.c) # string array of all names replaced .c with .o -OBJ = $(SRC:%.c=${PROJBINDIR}/%.o) +OBJ = $(SRC:%.c=${BINDIR}%.o) -$(PROJBINDIR)/$(PROJECT).a: $(OBJ) - $(AR) -rc $(PROJBINDIR)/$(PROJECT).a $(OBJ) +$(BINDIR)$(PROJECT).a: $(OBJ) + $(AD)$(AR) -rc $(BINDIR)$(PROJECT).a $(OBJ) # pull in dependency info for *existing* .o files -include $(OBJ:.o=.d) -$(PROJBINDIR)/%.o: %.c $(PROJDEPS) +$(BINDIR)%.o: %.c $(PROJDEPS) @echo; echo "Compiling.... $*.c"; echo - @test -d $(PROJBINDIR) || mkdir -p $(PROJBINDIR) - $(CC) $(CFLAGS) $(INCLUDES) -c $*.c -o $(PROJBINDIR)/$*.o + @test -d $(BINDIR) || mkdir -p $(BINDIR) + $(AD)$(CC) $(CFLAGS) $(INCLUDES) -c $*.c -o $(BINDIR)$*.o clean: - "$(MAKE)" -C $(RIOTBOARD) clean + "$(MAKE)" -C $(RIOTBOARD)/$(BOARD) clean "$(MAKE)" -C $(RIOTBASE) clean @for i in $(EXTERNAL_MODULES) ; do "$(MAKE)" -C $$i clean ; done ; - rm -rf $(PROJBINDIR) + rm -rf $(BINDIR) flash: all $(FLASHER) $(FFLAGS) diff --git a/Makefile.modules b/Makefile.modules index 12019c1f68cc50aad4a89bf37e44c72b2ca47a3e..246a8d6e37df83adad0cd2783069329359fd64b3 100644 --- a/Makefile.modules +++ b/Makefile.modules @@ -1,8 +1,8 @@ export MAKEBASE =$(RIOTBASE) -export BINDIR =$(RIOTBASE)/bin/ UNDEF += $(BINDIR)startup.o USEMODULE += cpu core sys +INCLUDES += -I$(RIOTBASE)/core/include -I$(RIOTBASE)/drivers/include -I$(RIOTBASE)/sys/include ED = $(USEMODULE:%=-DMODULE_%) EXTDEFINES = $(shell echo $(ED)|tr 'a-z' 'A-Z') BL=$(USEMODULE:%= $(BINDIR)%.a) @@ -16,4 +16,3 @@ include $(RIOTBASE)/Makefile.dep export USEMODULE -export INCLUDES += -I$(RIOTBASE)/core/include diff --git a/boards/Makefile b/boards/Makefile deleted file mode 100644 index 7a3c9d345b5d49f74d5e989363073f64cdc5b11c..0000000000000000000000000000000000000000 --- a/boards/Makefile +++ /dev/null @@ -1,5 +0,0 @@ -all: - "$(MAKE)" -C $(BOARD) - -clean: - "$(MAKE)" -C $(BOARD) clean diff --git a/boards/Makefile.base b/boards/Makefile.base deleted file mode 100644 index 7f064306b61b23abd8884019ad3960d0f3f781ee..0000000000000000000000000000000000000000 --- a/boards/Makefile.base +++ /dev/null @@ -1,36 +0,0 @@ -ifeq ($(BOARD),msba2) - INCLUDES += -I$(RIOTBOARD)/msba2/include/ - INCLUDES += -I$(RIOTBOARD)/msba2-common/include/ - INCLUDES += -I$(RIOTBOARD)/msba2-common/drivers/include/ -endif -ifeq ($(BOARD),msb-430) - INCLUDES += -I$(RIOTBOARD)/msb-430/include/ - INCLUDES += -I$(RIOTBOARD)/msb-430-common/include/ - INCLUDES += -I$(RIOTBOARD)/msb-430-common/drivers/include/ -endif -ifeq ($(BOARD),msb-430h) - INCLUDES += -I$(RIOTBOARD)/msb-430h/include/ - INCLUDES += -I$(RIOTBOARD)/msb-430-common/include/ - INCLUDES += -I$(RIOTBOARD)/msb-430-common/drivers/include/ -endif -ifeq ($(BOARD),wsn430-v1_3b) - INCLUDES += -I$(RIOTBOARD)/wsn430-v1_3b/include/ - INCLUDES += -I$(RIOTBOARD)/wsn430-common/include/ -endif -ifeq ($(BOARD),wsn430-v1_4) - INCLUDES += -I$(RIOTBOARD)/wsn430-v1_4/include/ - INCLUDES += -I$(RIOTBOARD)/wsn430-common/include/ -endif -ifeq ($(BOARD),chronos) - INCLUDES += -I$(RIOTBOARD)/chronos/include/ - INCLUDES += -I$(RIOTBOARD)/chronos/drivers/include/ -endif -ifeq ($(BOARD),telosb) - INCLUDES += -I$(RIOTBOARD)/telosb/include/ -endif -ifeq ($(BOARD),native) - INCLUDES += -I$(RIOTBOARD)/native/include/ -endif -ifeq ($(BOARD),mbed_lpc1768) - INCLUDES += -I$(RIOTBOARD)/mbed_lpc1768/include/ -endif diff --git a/boards/avsextrem/Makefile b/boards/avsextrem/Makefile index 3597e18c735c0d7e314ddde169b283e9e6ba2ffa..9a90303614ff1603521ea22e477807c9a1a07fa8 100644 --- a/boards/avsextrem/Makefile +++ b/boards/avsextrem/Makefile @@ -1,38 +1,11 @@ -SRC = $(wildcard *.c) -BINDIR = bin/ -OBJ = $(SRC:%.c=$(BINDIR)%.o)## defines -export ARCH = avsextrem_base.a +MODULE =$(BOARD)_base -DEP = $(SRC:%.c=$(BINDIR)%.d) +DIRS = drivers $(RIOTBOARD)/msba2-common -INCLUDES += -I$(RIOTBOARD)/msba2-common/include/ -INCLUDES += -I$(RIOTBASE)/cpu/arm_common/include/ -INCLUDES += -I$(RIOTBASE)/cpu/lpc2387/include/ -INCLUDES += -I$(RIOTBASE)/drivers/cc110x +all: $(BINDIR)$(MODULE).a + @for i in $(DIRS) ; do "$(MAKE)" -C $$i ; done ; -all: $(BINDIR)$(ARCH) - "$(MAKE)" -C ../msba2-common - "$(MAKE)" -C drivers - -$(BINDIR)$(ARCH): $(OBJ) - $(AR) rcs $(BINDIR)$(ARCH) $(OBJ) - -# pull in dependency info for *existing* .o files --include $(OBJ:.o=.d) - -# compile and generate dependency info -$(BINDIR)%.o: %.c - mkdir -p $(BINDIR) - $(CC) $(CFLAGS) $(INCLUDES) $(BOARDINCLUDE) $(PROJECTINCLUDE) $(CPUINCLUDE) -c $*.c -o $(BINDIR)$*.o - $(CC) $(CFLAGS) $(INCLUDES) $(BOARDINCLUDE) $(PROJECTINCLUDE) $(CPUINCLUDE) -MM $*.c > $(BINDIR)$*.d - @printf "$(BINDIR)"|cat - $(BINDIR)$*.d > /tmp/riot_out && mv /tmp/riot_out $(BINDIR)$*.d - -# remove compilation products -clean: - "$(MAKE)" -C ../msba2-common clean - "$(MAKE)" -C drivers clean - rm -f $(BINDIR)$(ARCH) $(OBJ) $(DEP) - @if [ -d $(BINDIR) ] ; \ - then rmdir $(BINDIR) ; \ - fi +include $(RIOTBASE)/Makefile.base +clean:: + @for i in $(DIRS) ; do "$(MAKE)" -C $$i clean ; done ; diff --git a/boards/avsextrem/Makefile.include b/boards/avsextrem/Makefile.include index 741b952a92424157d0623685e826be5a976f8da8..ae4227e38821af9928681d322ed831ff678daa25 100644 --- a/boards/avsextrem/Makefile.include +++ b/boards/avsextrem/Makefile.include @@ -1,3 +1,3 @@ -export INCLUDES += -I$(RIOTBOARD)/msba2-common/include +export INCLUDES += -I$(RIOTBOARD)/avsextrem/include include $(RIOTBOARD)/msba2-common/Makefile.include diff --git a/boards/avsextrem/board_init.c b/boards/avsextrem/board_init.c index 419198da9ad4a95a1c2e1894f675afd5078a0b50..05b19ccf0cc703504f64c3f759ef6524b97c9255 100644 --- a/boards/avsextrem/board_init.c +++ b/boards/avsextrem/board_init.c @@ -23,9 +23,7 @@ * @note $Id: board_init.c 1071 2013-09-19 16:50:56 kasmi $ */ #include "lpc23xx.h" -#include "VIC.h" #include "cpu.h" -#include "gpioint.h" #define PCRTC BIT9 #define CL_CPU_DIV 4 diff --git a/boards/avsextrem/drivers/Makefile b/boards/avsextrem/drivers/Makefile index 71736befcce42345865842285e74dc3c77272574..df363e77a2a403e35b7c8acb0e7e6016429981bc 100644 --- a/boards/avsextrem/drivers/Makefile +++ b/boards/avsextrem/drivers/Makefile @@ -1,24 +1,5 @@ -SRC = $(wildcard *.c) -BINDIR = $(RIOTBOARD)/$(BOARD)/bin/ -OBJ = $(SRC:%.c=$(BINDIR)%.o) -DEP = $(SRC:%.c=$(BINDIR)%.d) - -INCLUDES += -I$(RIOTBASE)/sys/include/ -I$(RIOTBASE)/drivers/cc110x_ng/include/ -I$(RIOTBOARD)/$(BOARD)/include - -$(BINDIR)avsextrem_base.a: $(OBJ) - $(AR) rcs $(BINDIR)${ARCH} $(OBJ) - -# pull in dependency info for *existing* .o files --include $(OBJ:.o=.d) - -# compile and generate dependency info -$(BINDIR)%.o: %.c - $(CC) $(CFLAGS) $(INCLUDES) $(BOARDINCLUDE) $(PROJECTINCLUDE) $(CPUINCLUDE) -c $*.c -o $(BINDIR)$*.o - $(CC) $(CFLAGS) $(INCLUDES) $(BOARDINCLUDE) $(PROJECTINCLUDE) $(CPUINCLUDE) -MM $*.c > $(BINDIR)$*.d - @printf "$(BINDIR)" | cat - $(BINDIR)$*.d > /tmp/riot_out && mv /tmp/riot_out $(BINDIR)$*.d - -# remove compilation products - -clean: - rm -f $(BINDIR)$(MODULE).a $(OBJ) $(DEP) $(ASMOBJ) +MODULE =avsextrem_base +include $(RIOTBOARD)/$(BOARD)/Makefile.include +INCLUDES += -I$(RIOTBASE)/drivers/cc110x +include $(RIOTBASE)/Makefile.base diff --git a/boards/avsextrem/drivers/avsextrem-cc1100.c b/boards/avsextrem/drivers/avsextrem-cc1100.c index e898440755771cea6ec158f279990732e57e2057..43dd2315bee755befc698ef31dba406008659f69 100644 --- a/boards/avsextrem/drivers/avsextrem-cc1100.c +++ b/boards/avsextrem/drivers/avsextrem-cc1100.c @@ -119,6 +119,9 @@ void cc1100_spi_init(void) while (SPI_RX_AVAIL) { // while RNE (Receive FIFO Not Empty)... dummy = SSP1DR; // read data } + + /* to suppress unused-but-set-variable */ + (void) dummy; } uint8_t diff --git a/boards/avsextrem/drivers/avsextrem-smb380.c b/boards/avsextrem/drivers/avsextrem-smb380.c index fb0343c52b8295041a4547d7ace8148d2fd9f0ba..8462662dca5a04546b99a6675064ef91a840b2b9 100644 --- a/boards/avsextrem/drivers/avsextrem-smb380.c +++ b/boards/avsextrem/drivers/avsextrem-smb380.c @@ -977,7 +977,6 @@ uint8_t SMB380_setAnyMotionLimit(uint16_t mg, uint16_t gvalueint) return 0; } - unsigned short uReg; unsigned long cpsr = disableIRQ(); SMB380_Prepare(); /* 0,3g = 300 / 15,6mg = 19 */ @@ -985,7 +984,7 @@ uint8_t SMB380_setAnyMotionLimit(uint16_t mg, uint16_t gvalueint) SMB380_ssp_read(); //Set duration at this point SMB380_ssp_write(SMB380_ANY_MOTION_DUR_HYST, 0, SMB380_READ_REGISTER); - uReg = SMB380_ssp_read(); + SMB380_ssp_read(); SMB380_Unprepare(); restoreIRQ(cpsr); return 1; diff --git a/boards/avsextrem/drivers/avsextrem-ssp0.c b/boards/avsextrem/drivers/avsextrem-ssp0.c index e396e5dddbe5015cf619d977120ab0457013fcb5..a43993ff7c7dbb2d8746779f079301459b287254 100644 --- a/boards/avsextrem/drivers/avsextrem-ssp0.c +++ b/boards/avsextrem/drivers/avsextrem-ssp0.c @@ -201,11 +201,14 @@ uint8_t SSP0Prepare(uint8_t chip, uint8_t datasize, uint8_t cpol, uint8_t cpha, // Enable SSP0CR1 |= BIT1; // SSP0 enabled - uint32_t Dummy; + uint32_t dummy; for (uint32_t i = 0; i < FIFOSIZE; i++) { - Dummy = SSP0DR; // clear the RxFIFO + dummy = SSP0DR; // clear the RxFIFO } + + /* to suppress unused-but-set-variable */ + (void) dummy; return 1; } diff --git a/boards/chronos/Makefile b/boards/chronos/Makefile index c4cf57edb54d7029d13c17ed6506dd8dbae544c3..30a260e0efc90978e66e37e09e151e2a6640d1d2 100644 --- a/boards/chronos/Makefile +++ b/boards/chronos/Makefile @@ -1,35 +1,12 @@ -export ARCH = chronos_base.a +MODULE =$(BOARD)_base -SRC = $(wildcard *.c) -BINDIR = $(RIOTBOARD)/$(BOARD)/bin/ -OBJ = $(SRC:%.c=$(BINDIR)%.o) -DEP = $(SRC:%.c=$(BINDIR)%.d) +INCLUDES += -I$(RIOTBOARD)/$(BOARD)/drivers/include +DIRS = drivers -INCLUDES += -I$(RIOTBOARD)/$(BOARD)/include -I$(RIOTBASE)/sys/lib -I$(RIOTBASE)/sys/drivers/include -INCLUDES += -I$(RIOTBASE)/sys/drivers/cc110x_ng/include -INCLUDES += -I$(RIOTBASE)/core/include -INCLUDES += -I$(RIOTCPU)/msp430-common/include/ -INCLUDES += -I$(RIOTCPU)/cc430/include/ +all: $(BINDIR)$(MODULE).a + @for i in $(DIRS) ; do "$(MAKE)" -C $$i ; done ; -all: $(BINDIR)$(ARCH) - $(MAKE) -C drivers +include $(RIOTBASE)/Makefile.base -$(BINDIR)$(ARCH): $(OBJ) - $(AR) rcs $(BINDIR)$(ARCH) $(OBJ) - -# pull in dependency info for *existing* .o files --include $(OBJ:.o=.d) - -# compile and generate dependency info -$(BINDIR)%.o: %.c - mkdir -p $(BINDIR) - $(CC) $(CFLAGS) $(INCLUDES) $(BOARDINCLUDE) $(PROJECTINCLUDE) $(CPUINCLUDE) -c $*.c -o $(BINDIR)$*.o - $(CC) $(CFLAGS) $(INCLUDES) $(BOARDINCLUDE) $(PROJECTINCLUDE) $(CPUINCLUDE) -MM $*.c > $(BINDIR)$*.d - @printf "$(BINDIR)"|cat - $(BINDIR)$*.d > /tmp/fw_out && mv /tmp/fw_out $(BINDIR)$*.d - -# remove compilation products -clean: - $(MAKE) -C drivers clean - rm -f $(OBJ) $(DEP) - rm -f $(BINDIR)$(ARCH) - -rmdir $(BINDIR) +clean:: + @for i in $(DIRS) ; do "$(MAKE)" -C $$i clean ; done ; diff --git a/boards/chronos/Makefile.include b/boards/chronos/Makefile.include index a0f331e5c8714da989fad56d76ebfb879befe3eb..f3c9891a3f88f04d7037782f639734dae74ac2a0 100644 --- a/boards/chronos/Makefile.include +++ b/boards/chronos/Makefile.include @@ -1,23 +1,22 @@ -export INCLUDES += -I$(RIOTBOARD)/chronos/include -I$(RIOTBOARD)/chronos/drivers/include/ -export INCLUDES += -I$(RIOTCPU)/cc430/include/ -I$(RIOTCPU)/msp430-common/include/ +export INCLUDES += -I$(RIOTBOARD)/$(BOARD)/include ## the cpu to build for export CPU = cc430 export MCU = cc430f6137 # toolchain config -export PREFIX = @msp430- -export CC = @$(PREFIX)gcc -export AR = @$(PREFIX)ar +export PREFIX = msp430- +export CC = $(PREFIX)gcc +export AR = $(PREFIX)ar export CFLAGS += -std=gnu99 -Wstrict-prototypes -gdwarf-2 -Os -Wall -mmcu=$(MCU) -D CC430 export ASFLAGS += -mmcu=$(MCU) --defsym $(MCU)=1 --gdwarf-2 export AS = $(PREFIX)as export LINK = $(PREFIX)gcc export SIZE = $(PREFIX)size export OBJCOPY = $(PREFIX)objcopy -export LINKFLAGS = -mmcu=$(MCU) -lgcc $(RIOTBASE)/bin/startup.o +export LINKFLAGS = -mmcu=$(MCU) -lgcc $(BINDIR)startup.o export FLASHER = mspdebug -export HEXFILE = bin/$(PROJECT).hex +export HEXFILE = $(BINDIR)$(PROJECT).hex export USEMODULE += msp430_common export FFLAGS = rf2500 "prog $(HEXFILE)" export OFLAGS = -O ihex diff --git a/boards/chronos/drivers/Makefile b/boards/chronos/drivers/Makefile index bf355bf8e258423c5254f880a2cc9fcfc185986e..3c61103789376cd5da8348c6f935fa70c4afe9b8 100644 --- a/boards/chronos/drivers/Makefile +++ b/boards/chronos/drivers/Makefile @@ -1,24 +1,5 @@ -SRC = $(wildcard *.c) -BINDIR = $(RIOTBOARD)/$(BOARD)/bin/ -OBJ = $(SRC:%.c=$(BINDIR)%.o) -DEP = $(SRC:%.c=$(BINDIR)%.d) +MODULE =$(BOARD)_base -INCLUDES += -I$(RIOTBASE)/sys/include/ -I$(RIOTBASE)/drivers/cc110x_ng/include/ - -$(BINDIR)chronos_drivers.a: $(OBJ) - $(AR) rcs $(BINDIR)chronos_base.a $(OBJ) - -# pull in dependency info for *existing* .o files --include $(OBJ:.o=.d) - -# compile and generate dependency info -$(BINDIR)%.o: %.c - $(CC) $(CFLAGS) $(INCLUDES) $(BOARDINCLUDE) $(PROJECTINCLUDE) $(CPUINCLUDE) -c $*.c -o $(BINDIR)$*.o - $(CC) $(CFLAGS) $(INCLUDES) $(BOARDINCLUDE) $(PROJECTINCLUDE) $(CPUINCLUDE) -MM $*.c > $(BINDIR)$*.d - @printf "$(BINDIR)" | cat - $(BINDIR)$*.d > /tmp/riot_out && mv /tmp/riot_out $(BINDIR)$*.d - -# remove compilation products - -clean: - rm -f $(OBJ) $(DEP) +INCLUDES += -I$(RIOTBASE)/drivers/cc110x_ng/include +include $(RIOTBASE)/Makefile.base diff --git a/boards/mbed_lpc1768/Makefile b/boards/mbed_lpc1768/Makefile index e706445a92e56b94bf6564aee5c650e3bf197d42..ff5489888b2070c3cbaee187beee2113f5d2329c 100644 --- a/boards/mbed_lpc1768/Makefile +++ b/boards/mbed_lpc1768/Makefile @@ -1,28 +1,3 @@ -SRC = $(wildcard *.c) -BINDIR = $(RIOTBOARD)/$(BOARD)/bin/ -OBJ = $(SRC:%.c=$(BINDIR)%.o)## defines -DEP = $(SRC:%.c=$(BINDIR)%.d) -export ARCH = mbed_lpc1768_base.a +MODULE =$(BOARD)_base -INCLUDES += -Iinclude/ -INCLUDES += -I$(RIOTCPU)/$(CPU)/include -INCLUDES += -I$(RIOTBASE)/core/include - -all: $(BINDIR)$(ARCH) - -$(BINDIR)$(ARCH): $(OBJ) - $(AR) rcs $(BINDIR)$(ARCH) $(OBJ) - -# pull in dependency info for *existing* .o files --include $(OBJ:.o=.d) - -# compile and generate dependency info -$(BINDIR)%.o: %.c - mkdir -p $(BINDIR) - $(CC) $(CFLAGS) $(INCLUDES) $(BOARDINCLUDE) $(PROJECTINCLUDE) $(CPUINCLUDE) -c $*.c -o $(BINDIR)$*.o - $(CC) $(CFLAGS) $(INCLUDES) $(BOARDINCLUDE) $(PROJECTINCLUDE) $(CPUINCLUDE) -MM $*.c > $(BINDIR)$*.d - @printf "$(BINDIR)"|cat - $(BINDIR)$*.d > /tmp/riot_out && mv /tmp/riot_out $(BINDIR)$*.d - -# remove compilation products -clean: - rm -f $(OBJ) $(DEP) +include $(RIOTBASE)/Makefile.base diff --git a/boards/mbed_lpc1768/Makefile.include b/boards/mbed_lpc1768/Makefile.include index dfdf7ddc7dccc622649a35a709360c0633e142c7..b28c3c63f5e1b8fac6ca8d7ace2a23dd218a47c9 100644 --- a/boards/mbed_lpc1768/Makefile.include +++ b/boards/mbed_lpc1768/Makefile.include @@ -3,9 +3,9 @@ export CPU = lpc1768 # toolchain config export PREFIX = arm-none-eabi- -export CC = @$(PREFIX)gcc -export AR = @$(PREFIX)ar -export CFLAGS = -DUSE_STDPERIPH_DRIVER -ggdb -g3 -std=gnu99 -O0 -Wall -Wstrict-prototypes -mcpu=cortex-m3 $(FPU_USAGE) -mlittle-endian -mthumb -mthumb-interwork -nostartfiles +export CC = $(PREFIX)gcc +export AR = $(PREFIX)ar +export CFLAGS += -DUSE_STDPERIPH_DRIVER -ggdb -g3 -std=gnu99 -O0 -Wall -Wstrict-prototypes -mcpu=cortex-m3 $(FPU_USAGE) -mlittle-endian -mthumb -mthumb-interwork -nostartfiles export ASFLAGS = -ggdb -g3 -mcpu=cortex-m3 $(FPU_USAGE) -mlittle-endian export AS = $(PREFIX)as export LINK = $(PREFIX)gcc @@ -17,12 +17,11 @@ LINKFLAGS = -mcpu=cortex-m3 -mthumb -Wl,--gc-sections,--cref -lc -lgcc -lnosys - ifeq ($(strip $(PORT)),) export PORT = /dev/ttyUSB0 endif -export HEXFILE = bin/$(PROJECT).hex +export HEXFILE = $(BINDIR)$(PROJECT).hex export FFLAGS = $(HEXFILE) export ELFFILE = bin/$(PROJECT).elf export DEBUGGER_FLAGS = $(ELFFILE) -INCLUDES += -Iinclude/ -INCLUDES += -I$(RIOTCPU)/$(CPU)/include +export INCLUDES += -I$(RIOTBOARD)/$(BOARD)/include/ -I$(RIOTCPU)/$(CPU)/include export OFLAGS = -O binary diff --git a/boards/msb-430-common/Makefile b/boards/msb-430-common/Makefile index 4ca6a9248b97d916f2e48882ca07b188b043988c..08503227da87bf13e8d5b73415be6753bf007748 100644 --- a/boards/msb-430-common/Makefile +++ b/boards/msb-430-common/Makefile @@ -1,33 +1,11 @@ -SRC = $(wildcard *.c) -BINDIR = $(RIOTBOARD)/$(BOARD)/bin/ -OBJ = $(SRC:%.c=$(BINDIR)%.o)## defines -DEP = $(SRC:%.c=$(BINDIR)%.d) +MODULE =$(BOARD)_base -INCLUDES += -I$(RIOTBOARD)/msb-430-common/include/ -I${RIOTBOARD}/${BOARD}/include/ -INCLUDES += -I$(RIOTBASE)/cpu/msp430-common/include/ -INCLUDES += -I$(RIOTBASE)/cpu/mspx16x/include/ -INCLUDES += -I$(RIOTBASE)/drivers/include/ +DIRS = drivers -.PHONY: $(BINDIR)$(ARCH) +all: $(BINDIR)$(MODULE).a + @for i in $(DIRS) ; do "$(MAKE)" -C $$i ; done ; -all: $(BINDIR)$(ARCH) - $(MAKE) -C drivers +include $(RIOTBASE)/Makefile.base -$(BINDIR)$(ARCH): $(OBJ) - echo $(AR) rcs $(BINDIR)$(ARCH) $(OBJ) - $(AR) rcs $(BINDIR)$(ARCH) $(OBJ) - -# pull in dependency info for *existing* .o files --include $(OBJ:.o=.d) - -# compile and generate dependency info -$(BINDIR)%.o: %.c - $(CC) $(CFLAGS) $(INCLUDES) $(BOARDINCLUDE) $(PROJECTINCLUDE) $(CPUINCLUDE) -c $*.c -o $(BINDIR)$*.o - $(CC) $(CFLAGS) $(INCLUDES) $(BOARDINCLUDE) $(PROJECTINCLUDE) $(CPUINCLUDE) -MM $*.c > $(BINDIR)$*.d - @printf "$(BINDIR)"|cat - $(BINDIR)$*.d > /tmp/riot_out && mv /tmp/riot_out $(BINDIR)$*.d - -# remove compilation products -clean: - $(MAKE) -C drivers clean - rm -f $(OBJ) $(DEP) - rm -f $(BINDIR)$(ARCH) +clean:: + @for i in $(DIRS) ; do "$(MAKE)" -C $$i clean ; done ; diff --git a/boards/msb-430-common/Makefile.include b/boards/msb-430-common/Makefile.include index 4f5bb857d37bc5dd9da19db4bf49f7ae4f223f86..d25fd8efeec43c19157891c501c9b57b4414c674 100644 --- a/boards/msb-430-common/Makefile.include +++ b/boards/msb-430-common/Makefile.include @@ -3,18 +3,18 @@ export CPU = msp430x16x export MCU = msp430f1612 # toolchain config -export PREFIX = @msp430- -export CC = @$(PREFIX)gcc -export AR = @$(PREFIX)ar +export PREFIX = msp430- +export CC = $(PREFIX)gcc +export AR = $(PREFIX)ar export CFLAGS += -std=gnu99 -Wstrict-prototypes -gdwarf-2 -Os -Wall -mmcu=$(MCU) export ASFLAGS += -mmcu=$(MCU) --defsym $(MCU)=1 --gdwarf-2 export AS = $(PREFIX)as export LINK = $(PREFIX)gcc export SIZE = $(PREFIX)size export OBJCOPY = $(PREFIX)objcopy -export LINKFLAGS = -mmcu=$(MCU) -lgcc $(RIOTBASE)/bin/startup.o +export LINKFLAGS = -mmcu=$(MCU) -lgcc TERMPROG = $(RIOTBASE)/dist/tools/pyterm/pyterm.py -export HEXFILE = bin/$(PROJECT).hex +export HEXFILE = $(BINDIR)$(PROJECT).hex ifeq ($(strip $(FLASHER)),) @@ -36,5 +36,5 @@ endif export FFLAGS += "prog $(HEXFILE)" export USEMODULE += msp430_common -export INCLUDES += -I $(RIOTCPU)/msp430-common/include/ -I$(RIOTBOARD)/msb-430-common/include +export INCLUDES += -I $(RIOTCPU)/msp430-common/include/ -I$(RIOTBOARD)/msb-430-common/include -I$(RIOTBOARD)/msb-430-common/drivers/include export OFLAGS = -O ihex diff --git a/boards/msb-430-common/drivers/Makefile b/boards/msb-430-common/drivers/Makefile index d4b65dc0319c6cf99c012d9bc24c784606687598..a1a4f9665a4459cb2e4db5f0b7282399d1100614 100644 --- a/boards/msb-430-common/drivers/Makefile +++ b/boards/msb-430-common/drivers/Makefile @@ -1,24 +1,5 @@ -SRC = $(wildcard *.c) -BINDIR = $(RIOTBOARD)/$(BOARD)/bin/ -OBJ = $(SRC:%.c=$(BINDIR)%.o) -DEP = $(SRC:%.c=$(BINDIR)%.d) +MODULE =$(BOARD)_base -INCLUDES += -I$(RIOTBASE)/sys/include/ -I$(RIOTBASE)/drivers/cc110x_ng/include/ - -$(BINDIR)msb-430_common_drivers.a: $(OBJ) - $(AR) rcs $(BINDIR)$(ARCH) $(OBJ) - -# pull in dependency info for *existing* .o files --include $(OBJ:.o=.d) - -# compile and generate dependency info -$(BINDIR)%.o: %.c - $(CC) $(CFLAGS) $(INCLUDES) $(BOARDINCLUDE) $(PROJECTINCLUDE) $(CPUINCLUDE) -c $*.c -o $(BINDIR)$*.o - $(CC) $(CFLAGS) $(INCLUDES) $(BOARDINCLUDE) $(PROJECTINCLUDE) $(CPUINCLUDE) -MM $*.c > $(BINDIR)$*.d - @printf "$(BINDIR)" | cat - $(BINDIR)$*.d > /tmp/riot_out && mv /tmp/riot_out $(BINDIR)$*.d - -# remove compilation products - -clean: - rm -f $(OBJ) $(DEP) +include $(RIOTBOARD)/$(BOARD)/Makefile.include +include $(RIOTBASE)/Makefile.base diff --git a/boards/msb-430/Makefile b/boards/msb-430/Makefile index 196aeceab75e21007408ab0929b026db802d1ce4..0a7ebeb6372570bfb26360c69be87b9e92fc0902 100644 --- a/boards/msb-430/Makefile +++ b/boards/msb-430/Makefile @@ -1,34 +1,11 @@ -SRC = $(wildcard *.c) -BINDIR = bin/ -OBJ = $(SRC:%.c=$(BINDIR)%.o)## defines -export ARCH = msb-430_base.a +MODULE =$(BOARD)_base -DEP = $(SRC:%.c=$(BINDIR)%.d) +DIRS = $(RIOTBOARD)/msb-430-common -INCLUDES += -I$(RIOTBOARD)/msb-430-common/include/ -INCLUDES += -I$(RIOTBASE)/cpu/msp430-common/include/ -INCLUDES += -I$(RIOTBASE)/cpu/msp430x16x/include/ +all: $(BINDIR)$(MODULE).a + @for i in $(DIRS) ; do "$(MAKE)" -C $$i ; done ; -all: $(BINDIR)$(ARCH) - $(MAKE) -C ../msb-430-common +include $(RIOTBASE)/Makefile.base -$(BINDIR)$(ARCH): $(OBJ) - mkdir -p $(BINDIR) - $(AR) rcs $(BINDIR)$(ARCH) $(OBJ) - -# pull in dependency info for *existing* .o files --include $(OBJ:.o=.d) - -# compile and generate dependency info -$(BINDIR)%.o: %.c - $(CC) $(CFLAGS) $(INCLUDES) $(BOARDINCLUDE) $(PROJECTINCLUDE) $(CPUINCLUDE) -c $*.c -o $(BINDIR)$*.o - $(CC) $(CFLAGS) $(INCLUDES) $(BOARDINCLUDE) $(PROJECTINCLUDE) $(CPUINCLUDE) -MM $*.c > $(BINDIR)$*.d - @printf "$(BINDIR)"|cat - $(BINDIR)$*.d > /tmp/riot_out && mv /tmp/riot_out $(BINDIR)$*.d - -# remove compilation products -clean: - $(MAKE) -C ../msb-430-common clean - rm -f $(BINDIR)$(ARCH) $(OBJ) $(DEP) - @if [ -d $(BINDIR) ] ; \ - then rmdir $(BINDIR) ; \ - fi +clean:: + @for i in $(DIRS) ; do "$(MAKE)" -C $$i clean ; done ; diff --git a/boards/msb-430h/Makefile b/boards/msb-430h/Makefile index 2bd0f63c26c3de6866836eaee3b3c80a3afaa034..4adc54edf52f7b7f96eeed7b7c544a05ea355003 100644 --- a/boards/msb-430h/Makefile +++ b/boards/msb-430h/Makefile @@ -1,37 +1,13 @@ -SRC = $(wildcard *.c) -BINDIR = bin/ -OBJ = $(SRC:%.c=$(BINDIR)%.o)## defines -export ARCH = msb-430h_base.a +MODULE =$(BOARD)_base -DEP = $(SRC:%.c=$(BINDIR)%.d) +DIRS = $(RIOTBOARD)/msb-430-common -INCLUDES += -I${RIOTBASE}/core/include/ -INCLUDES += -Iinclude/ -I$(RIOTBOARD)/msb-430-common/include/ -INCLUDES += -I$(RIOTBASE)/cpu/msp430-common/include/ -I$(RIOTBASE)/cpu/msp430x16x/include/ -INCLUDES += -I$(RIOTBASE)/drivers/cc110x_ng/include/ -I$(RIOTBASE)/sys/include +INCLUDES += -I$(RIOTBASE)/drivers/cc110x_ng/include -all: $(BINDIR)$(ARCH) - $(MAKE) -C ../msb-430-common - -$(BINDIR)$(ARCH): $(OBJ) - $(AR) rcs $(BINDIR)$(ARCH) $(OBJ) - -# pull in dependency info for *existing* .o files --include $(OBJ:.o=.d) - -# compile and generate dependency info -$(BINDIR)%.o: %.c - mkdir -p $(BINDIR) - $(CC) $(CFLAGS) $(INCLUDES) $(BOARDINCLUDE) $(PROJECTINCLUDE) $(CPUINCLUDE) -c $*.c -o $(BINDIR)$*.o - $(CC) $(CFLAGS) $(INCLUDES) $(BOARDINCLUDE) $(PROJECTINCLUDE) $(CPUINCLUDE) -MM $*.c > $(BINDIR)$*.d - @printf "$(BINDIR)"|cat - $(BINDIR)$*.d > /tmp/riot_out && mv /tmp/riot_out $(BINDIR)$*.d - -# remove compilation products -clean: - $(MAKE) -C ../msb-430-common clean - rm -f $(BINDIR)$(ARCH) $(OBJ) $(DEP) - @if [ -d $(BINDIR) ] ; \ - then rmdir $(BINDIR) ; \ - fi +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/msb-430h/Makefile.include b/boards/msb-430h/Makefile.include index 166060e36fee949587776c7c0889157ca12dc68c..10ae0808755e310a92572c300ad80b640b9551b0 100644 --- a/boards/msb-430h/Makefile.include +++ b/boards/msb-430h/Makefile.include @@ -1,4 +1,4 @@ -export INCLUDES += -I$(RIOTBOARD)/msb-430h/include -I$(RIOTBOARD)/msb-430-common/include +export INCLUDES += -I$(RIOTBOARD)/msb-430h/include include $(RIOTBOARD)/$(BOARD)/Makefile.dep include $(RIOTBOARD)/msb-430-common/Makefile.include diff --git a/boards/msb-430h/driver_cc110x.c b/boards/msb-430h/driver_cc110x.c index 798bc13da2c5db15b8c1e82a9c84c5917a5e26a7..c80f7cbeca545e2116f7ccbfcbae2ddde9472698 100644 --- a/boards/msb-430h/driver_cc110x.c +++ b/boards/msb-430h/driver_cc110x.c @@ -24,7 +24,6 @@ Boston, MA 02111-1307, USA. */ #include "irq.h" #include "cc110x_ng.h" -#include "cc110x-arch.h" #define CC1100_GDO0 (P2IN & 0x02) // read serial I/O (GDO0) #define CC1100_GDO1 (P3IN & 0x04) // read serial I/O (GDO1) diff --git a/boards/msba2-common/Makefile b/boards/msba2-common/Makefile index 29f64c8ecb108af9ffc9c49f57396b1f18926419..08503227da87bf13e8d5b73415be6753bf007748 100644 --- a/boards/msba2-common/Makefile +++ b/boards/msba2-common/Makefile @@ -1,33 +1,11 @@ -SRC = $(wildcard *.c) -BINDIR = $(RIOTBOARD)/$(BOARD)/bin/ -OBJ = $(SRC:%.c=$(BINDIR)%.o)## defines -DEP = $(SRC:%.c=$(BINDIR)%.d) +MODULE =$(BOARD)_base -INCLUDES += -I$(RIOTBOARD)/msba2-common/include/ -INCLUDES += -I$(RIOTBASE)/cpu/arm_common/include/ -INCLUDES += -I$(RIOTBASE)/cpu/lpc2387/include/ -INCLUDES += -I$(RIOTBASE)/drivers/include/ -INCLUDES += -I$(RIOTBOARD)/$(BOARD)/include +DIRS = drivers -.PHONY: $(BINDIR)msba2_common_base.a +all: $(BINDIR)$(MODULE).a + @for i in $(DIRS) ; do "$(MAKE)" -C $$i ; done ; -all: $(BINDIR)msba2_common_base.a - "$(MAKE)" -C drivers - -$(BINDIR)msba2_common_base.a: $(OBJ) - $(AR) rcs $(BINDIR)$(ARCH) $(OBJ) - -# pull in dependency info for *existing* .o files --include $(OBJ:.o=.d) - -# compile and generate dependency info -$(BINDIR)%.o: %.c - $(CC) $(CFLAGS) $(INCLUDES) $(BOARDINCLUDE) $(PROJECTINCLUDE) $(CPUINCLUDE) -c $*.c -o $(BINDIR)$*.o - $(CC) $(CFLAGS) $(INCLUDES) $(BOARDINCLUDE) $(PROJECTINCLUDE) $(CPUINCLUDE) -MM $*.c > $(BINDIR)$*.d - @printf "$(BINDIR)"|cat - $(BINDIR)$*.d > /tmp/riot_out && mv /tmp/riot_out $(BINDIR)$*.d - -# remove compilation products -clean: - "$(MAKE)" -C drivers clean - rm -f $(OBJ) $(DEP) +include $(RIOTBASE)/Makefile.base +clean:: + @for i in $(DIRS) ; do "$(MAKE)" -C $$i clean ; done ; diff --git a/boards/msba2-common/Makefile.include b/boards/msba2-common/Makefile.include index 5d3ba0fb0ddc9791fae6aec8f35e82006ab7150b..85589d8162d5b3f05293165863a03bc7d4d179ba 100644 --- a/boards/msba2-common/Makefile.include +++ b/boards/msba2-common/Makefile.include @@ -2,10 +2,10 @@ export CPU = lpc2387 # toolchain config -export PREFIX = @arm-none-eabi- -#export PREFIX = @arm-elf- -export CC = @$(PREFIX)gcc -export AR = @$(PREFIX)ar +export PREFIX = arm-none-eabi- +#export PREFIX = arm-elf- +export CC = $(PREFIX)gcc +export AR = $(PREFIX)ar export CFLAGS += -std=gnu99 -O2 -Wall -Wstrict-prototypes -mcpu=arm7tdmi-s -gdwarf-2 export ASFLAGS = -gdwarf-2 -mcpu=arm7tdmi-s export AS = $(PREFIX)as @@ -19,9 +19,10 @@ LINKFLAGS = -gdwarf-2 -mcpu=arm7tdmi-s -static -lgcc -nostartfiles -T$(RIOTBASE) ifeq ($(strip $(PORT)),) export PORT = /dev/ttyUSB0 endif -export HEXFILE = bin/$(PROJECT).hex -export FFLAGS = $(PORT) $(PROJBINDIR)/$(PROJECT).hex +export HEXFILE = $(BINDIR)$(PROJECT).hex +export FFLAGS = $(PORT) $(HEXFILE) include $(RIOTBOARD)/msba2-common/Makefile.dep -export INCLUDES += -I$(RIOTCPU)/lpc2387/include +export INCLUDES += -I$(RIOTBOARD)/msba2-common/include -I$(RIOTBOARD)/msba2-common/drivers/include + export OFLAGS = -O ihex diff --git a/boards/msba2-common/board_common_init.c b/boards/msba2-common/board_common_init.c index 8806112fa9c79413dbb67503be6c8cf350a3acef..563eb9d5d151c6d7d3ede7623efc9595dea665dc 100644 --- a/boards/msba2-common/board_common_init.c +++ b/boards/msba2-common/board_common_init.c @@ -43,10 +43,8 @@ and the mailinglist (subscription via web site) #include <string.h> #include "board.h" #include "lpc23xx.h" -#include "VIC.h" #include "cpu.h" #include "config.h" -#include "flashrom.h" #define PCRTC BIT9 #define CL_CPU_DIV 4 diff --git a/boards/msba2-common/drivers/Makefile b/boards/msba2-common/drivers/Makefile index c2ec59716242dd83228b34c436ba8672ae43b04b..c97bf04c92ead8bc2e74cbe148f106c760b8adc7 100644 --- a/boards/msba2-common/drivers/Makefile +++ b/boards/msba2-common/drivers/Makefile @@ -1,24 +1,7 @@ -SRC = $(wildcard *.c) -BINDIR = $(RIOTBOARD)/$(BOARD)/bin/ -OBJ = $(SRC:%.c=$(BINDIR)%.o) -DEP = $(SRC:%.c=$(BINDIR)%.d) +MODULE =$(BOARD)_base +include $(RIOTBOARD)/$(BOARD)/Makefile.include -INCLUDES += -I$(RIOTBASE)/sys/include/ -I$(RIOTBASE)/drivers/cc110x_ng/include/ +INCLUDES += -I$(RIOTBASE)/drivers/cc110x_ng/include -$(BINDIR)msba2_common_drivers.a: $(OBJ) - $(AR) rcs $(BINDIR)${ARCH} $(OBJ) - -# pull in dependency info for *existing* .o files --include $(OBJ:.o=.d) - -# compile and generate dependency info -$(BINDIR)%.o: %.c - $(CC) $(CFLAGS) $(INCLUDES) $(BOARDINCLUDE) $(PROJECTINCLUDE) $(CPUINCLUDE) -c $*.c -o $(BINDIR)$*.o - $(CC) $(CFLAGS) $(INCLUDES) $(BOARDINCLUDE) $(PROJECTINCLUDE) $(CPUINCLUDE) -MM $*.c > $(BINDIR)$*.d - @printf "$(BINDIR)" | cat - $(BINDIR)$*.d > /tmp/riot_out && mv /tmp/riot_out $(BINDIR)$*.d - -# remove compilation products - -clean: - rm -f $(OBJ) $(DEP) +include $(RIOTBASE)/Makefile.base diff --git a/boards/msba2-common/drivers/msba2-cc110x.c b/boards/msba2-common/drivers/msba2-cc110x.c index e41e751576ec7169d1e9ef998074cf97543fcbf8..ea3336892f9a70f8d59c93c4241d15cf26cb03d0 100644 --- a/boards/msba2-common/drivers/msba2-cc110x.c +++ b/boards/msba2-common/drivers/msba2-cc110x.c @@ -39,13 +39,15 @@ and the mailinglist (subscription via web site) #include <stdio.h> #include <stddef.h> -// core -#include "cpu.h" +/* core */ #include "irq.h" -// sys +/* cpu */ +#include "cpu.h" +/* drivers */ #include "cc110x_ng.h" #include "cc110x-arch.h" #include "cc110x_spi.h" + #include "gpioint.h" #define CC1100_GDO0 (FIO0PIN & BIT27) // read serial I/O (GDO0) diff --git a/boards/msba2/Makefile b/boards/msba2/Makefile index 0aff0df0b14cb786c255ac89d8461d5718813bf2..12fef1c0edfd00a04c9ee653cd6e28c6c50c3873 100644 --- a/boards/msba2/Makefile +++ b/boards/msba2/Makefile @@ -1,37 +1,12 @@ -SRC = $(wildcard *.c) -BINDIR = bin/ -OBJ = $(SRC:%.c=$(BINDIR)%.o)## defines -export ARCH = msba2_base.a +MODULE =$(BOARD)_base +INCLUDES += -I$(RIOTBASE)/drivers/cc110x -DEP = $(SRC:%.c=$(BINDIR)%.d) +DIRS = $(RIOTBOARD)/msba2-common -INCLUDES += -I$(RIOTBOARD)/msba2/include/ -INCLUDES += -I$(RIOTBOARD)/msba2-common/include/ -INCLUDES += -I$(RIOTBASE)/cpu/arm_common/include/ -INCLUDES += -I$(RIOTBASE)/cpu/lpc2387/include/ - -all: $(BINDIR)$(ARCH) - $(MAKE) -C ../msba2-common - -$(BINDIR)$(ARCH): $(OBJ) - $(AR) rcs $(BINDIR)$(ARCH) $(OBJ) - -# pull in dependency info for *existing* .o files --include $(OBJ:.o=.d) - -# compile and generate dependency info -$(BINDIR)%.o: %.c - mkdir -p $(BINDIR) - $(CC) $(CFLAGS) $(INCLUDES) $(BOARDINCLUDE) $(PROJECTINCLUDE) $(CPUINCLUDE) -c $*.c -o $(BINDIR)$*.o - $(CC) $(CFLAGS) $(INCLUDES) $(BOARDINCLUDE) $(PROJECTINCLUDE) $(CPUINCLUDE) -MM $*.c > $(BINDIR)$*.d - @printf "$(BINDIR)"|cat - $(BINDIR)$*.d > /tmp/riot_out && mv /tmp/riot_out $(BINDIR)$*.d - -# remove compilation products -clean: - $(MAKE) -C ../msba2-common clean - rm -f $(BINDIR)$(ARCH) $(OBJ) $(DEP) - @if [ -d $(BINDIR) ] ; \ - then rmdir $(BINDIR) ; \ - fi +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/msba2/Makefile.include b/boards/msba2/Makefile.include index 80751c020ac0a95cf54ae8a9adb23083d0d5dce3..41c42a0453d6b574d8f1449a072fe18ea880540b 100644 --- a/boards/msba2/Makefile.include +++ b/boards/msba2/Makefile.include @@ -1,3 +1,4 @@ -export INCLUDES += -I$(RIOTBOARD)/msba2/include -I$(RIOTBOARD)/msba2-common/include +export INCLUDES += -I$(RIOTBOARD)/msba2/include include $(RIOTBOARD)/msba2-common/Makefile.include + diff --git a/boards/native/Makefile b/boards/native/Makefile index ded96b6cf2f0b6228ff2daacd5866086a9d51e5e..08503227da87bf13e8d5b73415be6753bf007748 100644 --- a/boards/native/Makefile +++ b/boards/native/Makefile @@ -1,31 +1,11 @@ -SRC = $(wildcard *.c) -BINDIR = bin/ -OBJ = $(SRC:%.c=$(BINDIR)%.o)## defines -DEP = $(SRC:%.c=$(BINDIR)%.d) -export ARCH = native_base.a +MODULE =$(BOARD)_base -INCLUDES += -I$(RIOTBASE)/cpu/native/include/ -INCLUDES += -I$(RIOTBOARD)/native/include/ +DIRS = drivers -all: $(BINDIR)$(ARCH) - $(MAKE) -C drivers +all: $(BINDIR)$(MODULE).a + @for i in $(DIRS) ; do "$(MAKE)" -C $$i ; done ; -$(BINDIR)$(ARCH): $(OBJ) - $(AR) rcs $(BINDIR)$(ARCH) $(OBJ) - -# pull in dependency info for *existing* .o files --include $(OBJ:.o=.d) - -# compile and generate dependency info -$(BINDIR)%.o: %.c - -mkdir -p $(BINDIR) - $(CC) $(CFLAGS) $(INCLUDES) $(BOARDINCLUDE) $(PROJECTINCLUDE) $(CPUINCLUDE) -c $*.c -o $(BINDIR)$*.o - $(CC) $(CFLAGS) $(INCLUDES) $(BOARDINCLUDE) $(PROJECTINCLUDE) $(CPUINCLUDE) -MM $*.c > $(BINDIR)$*.d - @printf "$(BINDIR)"|cat - $(BINDIR)$*.d > /tmp/riot_out && mv /tmp/riot_out $(BINDIR)$*.d - -# remove compilation products -clean: - ${MAKE} -C drivers clean - rm -f $(BINDIR)$(ARCH) $(OBJ) $(DEP) - -rmdir -p $(BINDIR) +include $(RIOTBASE)/Makefile.base +clean:: + @for i in $(DIRS) ; do "$(MAKE)" -C $$i clean ; done ; diff --git a/boards/native/Makefile.include b/boards/native/Makefile.include index 94e9f3a967d8019b161a1b1a86c2c708b784a2b3..06798698a2dd0b0958d9e9de0b5ba3704e40dba0 100644 --- a/boards/native/Makefile.include +++ b/boards/native/Makefile.include @@ -1,10 +1,10 @@ -export INCLUDES += -I$(RIOTBOARD)/native/include +export INCLUDES += -I$(RIOTBOARD)/$(BOARD)/include export CPU = native # toolchain config export PREFIX = -#export CC = @$(PREFIX)gcc -export AR = @$(PREFIX)ar +#export CC = $(PREFIX)gcc +export AR = $(PREFIX)ar export CFLAGS += -std=gnu99 -Wall -Wextra -pedantic -m32 export ASFLAGS = export AS = $(PREFIX)as diff --git a/boards/native/drivers/Makefile b/boards/native/drivers/Makefile index 6e2c0a70b38ded97dfc4af8a8b74877d85c6485d..9dd5bad5e4f8c12d650369d462935145ecaa2195 100644 --- a/boards/native/drivers/Makefile +++ b/boards/native/drivers/Makefile @@ -1,32 +1,6 @@ -SRC = $(wildcard *.c) -BINDIR = $(RIOTBOARD)/$(BOARD)/bin/ -OBJ = $(BINDIR)native-led.o -ifneq (,$(findstring ltc4150,$(USEMODULE))) - OBJ += $(BINDIR)native-ltc4150.o -endif -ifneq (,$(findstring uart0,$(USEMODULE))) - OBJ += $(BINDIR)native-uart0.o -endif -DEP = $(SRC:%.c=$(BINDIR)%.d) +MODULE =$(BOARD)_base -INCLUDES += -I$(RIOTBOARD)/native/include/ - -EXCLUDES := -I$(RIOTBASE)/sys/posix/% - -$(BINDIR)native_drivers.a: $(OBJ) - @$(AR) rcs $(BINDIR)${ARCH} $(OBJ) - -# pull in dependency info for *existing* .o files --include $(OBJ:.o=.d) - -# compile and generate dependency info -$(BINDIR)%.o: %.c - $(CC) $(CFLAGS) $(filter-out $(EXCLUDES),$(INCLUDES)) $(BOARDINCLUDE) $(PROJECTINCLUDE) $(CPUINCLUDE) -c $*.c -o $(BINDIR)$*.o - @$(CC) $(CFLAGS) $(INCLUDES) $(BOARDINCLUDE) $(PROJECTINCLUDE) $(CPUINCLUDE) -MM $*.c > $(BINDIR)$*.d - @printf "$(BINDIR)" | cat - $(BINDIR)$*.d > /tmp/riot_out && mv /tmp/riot_out $(BINDIR)$*.d - -# remove compilation products - -clean: - rm -f $(OBJ) $(DEP) +all: $(BINDIR)$(MODULE).a + @for i in $(DIRS) ; do "$(MAKE)" -C $$i ; done ; +include $(RIOTBASE)/Makefile.base diff --git a/boards/native/drivers/native-uart0.c b/boards/native/drivers/native-uart0.c index 4ea76dca6d2df878ddd0e2936a17b448f2b8a7e5..74f2328b0d1d0edcc5866b8bbf8717bbd715eb03 100644 --- a/boards/native/drivers/native-uart0.c +++ b/boards/native/drivers/native-uart0.c @@ -225,6 +225,7 @@ void handle_uart_sock() _native_uart_conn = s; } +#ifdef MODULE_UART0 void _native_handle_uart0_input() { if (FD_ISSET(STDIN_FILENO, &_native_rfds)) { @@ -250,6 +251,7 @@ int _native_set_uart_fds(void) return ((STDIN_FILENO > _native_uart_sock) ? STDIN_FILENO : _native_uart_sock); } } +#endif void _native_init_uart0(char *stdiotype, char *ioparam) { diff --git a/boards/redbee-econotag/Makefile b/boards/redbee-econotag/Makefile index 295ea7255f4704ae5a721c8b5504a2cd963aaa8e..08503227da87bf13e8d5b73415be6753bf007748 100644 --- a/boards/redbee-econotag/Makefile +++ b/boards/redbee-econotag/Makefile @@ -1,37 +1,11 @@ -SRC = $(wildcard *.c) -BINDIR = bin/ -OBJ = $(SRC:%.c=$(BINDIR)%.o)## defines -DEP = $(SRC:%.c=$(BINDIR)%.d) -export ARCH = $(BOARD)_base.a +MODULE =$(BOARD)_base -INCLUDES += -I$(RIOTBOARD)/$(BOARD)/drivers/include -INCLUDES += -I$(RIOTBOARD)/$(BOARD)/include -INCLUDES += -I$(RIOTCPU)/arm_common/include -INCLUDES += -I$(RIOTCPU)/$(CPU)/include +DIRS = drivers -.PHONY: $(BINDIR)/$(ARCH) +all: $(BINDIR)$(MODULE).a + @for i in $(DIRS) ; do "$(MAKE)" -C $$i ; done ; -all: $(BINDIR)$(ARCH) - $(MAKE) -C drivers - -$(BINDIR)$(ARCH): $(OBJ) - $(AR) rcs $(BINDIR)$(ARCH) $(OBJ) - -# pull in dependency info for *existing* .o files --include $(OBJ:.o=.d) - -# compile and generate dependency info -$(BINDIR)%.o: %.c - mkdir -p $(BINDIR) - $(CC) $(CFLAGS) $(CFLAGS_MTHUMB) $(INCLUDES) $(BOARDINCLUDE) $(PROJECTINCLUDE) $(CPUINCLUDE) -c $*.c -o $(BINDIR)$*.o - $(CC) $(CFLAGS) $(CFLAGS_MTHUMB) $(INCLUDES) $(BOARDINCLUDE) $(PROJECTINCLUDE) $(CPUINCLUDE) -MM $*.c > $(BINDIR)$*.d - @printf "$(BINDIR)"|cat - $(BINDIR)$*.d > /tmp/riot_out && mv /tmp/riot_out $(BINDIR)$*.d - -# remove compilation products -clean: - "$(MAKE)" -C drivers clean - rm -f $(BINDIR)$(ARCH) $(OBJ) $(DEP) - @if [ -d $(BINDIR) ] ; \ - then rmdir $(BINDIR) ; \ - fi +include $(RIOTBASE)/Makefile.base +clean:: + @for i in $(DIRS) ; do "$(MAKE)" -C $$i clean ; done ; diff --git a/boards/redbee-econotag/Makefile.include b/boards/redbee-econotag/Makefile.include index b9fe5ddfcf666b69f03d117fee242eff23d70960..f513dbd8881b81554dfeb96336aee86f92bd270b 100644 --- a/boards/redbee-econotag/Makefile.include +++ b/boards/redbee-econotag/Makefile.include @@ -2,9 +2,9 @@ export CPU = mc1322x # toolchain config -export PREFIX = @arm-none-eabi- -export CC = @$(PREFIX)gcc -export AR = @$(PREFIX)ar +export PREFIX = arm-none-eabi- +export CC = $(PREFIX)gcc +export AR = $(PREFIX)ar export CFLAGS += -std=gnu99 -march=armv4t -mtune=arm7tdmi-s -mlong-calls \ -msoft-float -mthumb-interwork -fno-strict-aliasing -fno-common \ -ffixed-r8 -ffunction-sections -ffreestanding -fno-builtin \ @@ -24,7 +24,7 @@ LINKFLAGS = -mcpu=arm7tdmi-s -static -lgcc -nostartfiles -T$(RIOTBASE)/cpu/$(CPU ifeq ($(strip $(PORT)),) export PORT = /dev/ttyUSB0 endif -export HEXFILE = bin/$(PROJECT).hex +export HEXFILE = $(BINDIR)/$(PROJECT).hex export FFLAGS = -t $(PORT) -f $(HEXFILE) -c 'bbmc -l redbee-econotag reset' export OFLAGS = -O binary --gap-fill=0xff diff --git a/boards/redbee-econotag/drivers/Makefile b/boards/redbee-econotag/drivers/Makefile index cec1080b6473e4ee8725ae44831955e40be2eeb7..c8ff5efc2740747d08c1b05f011b2b39318352d6 100644 --- a/boards/redbee-econotag/drivers/Makefile +++ b/boards/redbee-econotag/drivers/Makefile @@ -1,26 +1,7 @@ -SRC = $(wildcard *.c) -BINDIR = $(RIOTBOARD)/$(BOARD)/bin/ -OBJ = $(SRC:%.c=$(BINDIR)%.o) -DEP = $(SRC:%.c=$(BINDIR)%.d) +MODULE =$(BOARD)_base -INCLUDES += -I$(RIOTBASE)/sys/include/ +include $(RIOTBOARD)/$(BOARD)/Makefile.include -.PHONY: redbee-econotag_drivers.a - -$(BINDIR)redbee-econotag_common_drivers.a: $(OBJ) - $(AR) rcs $(BINDIR)$(ARCH) $(OBJ) - -# pull in dependency info for *existing* .o files --include $(OBJ:.o=.d) - -# compile and generate dependency info -$(BINDIR)%.o: %.c - $(CC) $(CFLAGS) $(CFLAGS_MTHUMB) $(INCLUDES) $(BOARDINCLUDE) $(PROJECTINCLUDE) $(CPUINCLUDE) -c $*.c -o $(BINDIR)$*.o - $(CC) $(CFLAGS) $(CFLAGS_MTHUMB) $(INCLUDES) $(BOARDINCLUDE) $(PROJECTINCLUDE) $(CPUINCLUDE) -MM $*.c > $(BINDIR)$*.d - @printf "$(BINDIR)" | cat - $(BINDIR)$*.d > /tmp/riot_out && mv /tmp/riot_out $(BINDIR)$*.d - -# remove compilation products - -clean: - rm -f $(OBJ) $(DEP) +INCLUDES += -Iinclude +include $(RIOTBASE)/Makefile.base diff --git a/boards/redbee-econotag/drivers/include/uart.h b/boards/redbee-econotag/drivers/include/uart.h index 252bca811b813044752e2078a0fdad9fc2e21b4f..dc59169b244cc939b9e121f93e261b4329afbdc0 100644 --- a/boards/redbee-econotag/drivers/include/uart.h +++ b/boards/redbee-econotag/drivers/include/uart.h @@ -93,7 +93,7 @@ void uart_init(volatile struct UART_struct *uart, uint32_t baud); void uart_set_baudrate(volatile struct UART_struct *uart, uint32_t baud); void uart_flow_ctl(volatile struct UART_struct *uart, uint8_t on); - +#undef UART0_BUFSIZE #define UART0_BUFSIZE (32) void uart1_putc(uint8_t c); @@ -102,4 +102,4 @@ uint8_t uart1_getc(void); void uart2_putc(uint8_t c); uint8_t uart2_getc(void); -#endif \ No newline at end of file +#endif diff --git a/boards/redbee-econotag/drivers/redbee_uart.c b/boards/redbee-econotag/drivers/redbee_uart.c index cdeb62bc98ada02200b92e913ef8c12ebaa0ce7c..52f13e7f13e79a23671330944ce4acf45cf6daa8 100644 --- a/boards/redbee-econotag/drivers/redbee_uart.c +++ b/boards/redbee-econotag/drivers/redbee_uart.c @@ -179,7 +179,8 @@ int fw_puts(char *astring, int length) return uart0_puts((uint8_t *) astring, (uint32_t) length); } -int bl_uart_init(void) +void bl_uart_init(void) { uart_init(UART1, BAUTRATE_UART1); -} \ No newline at end of file +} + diff --git a/boards/telosb/Makefile b/boards/telosb/Makefile index c5eb97b3bc8da2ff13a6baa7ef55800281eca904..ff5489888b2070c3cbaee187beee2113f5d2329c 100644 --- a/boards/telosb/Makefile +++ b/boards/telosb/Makefile @@ -1,34 +1,3 @@ -SRC = $(wildcard *.c) -BINDIR = bin/ -OBJ = $(SRC:%.c=$(BINDIR)%.o)## defines -export ARCH = telosb_base.a +MODULE =$(BOARD)_base -DEP = $(SRC:%.c=$(BINDIR)%.d) - -INCLUDES += -I${RIOTBOARD}/${BOARD}/include/ -INCLUDES += -I${RIOTBASE}/core/include/ -INCLUDES += -I$(RIOTBASE)/cpu/msp430-common/include/ -I$(RIOTBASE)/cpu/msp430x16x/include/ -INCLUDES += -I$(RIOTBASE)/drivers/cc2420/include/ -I$(RIOTBASE)/sys/include -INCLUDES += -I$(RIOTBASE)/sys/net/include - -all: $(BINDIR)$(ARCH) - -$(BINDIR)$(ARCH): $(OBJ) - $(AR) rcs $(BINDIR)$(ARCH) $(OBJ) - -# pull in dependency info for *existing* .o files --include $(OBJ:.o=.d) - -# compile and generate dependency info -$(BINDIR)%.o: %.c - mkdir -p $(BINDIR) - $(CC) $(CFLAGS) $(INCLUDES) $(BOARDINCLUDE) $(PROJECTINCLUDE) $(CPUINCLUDE) -c $*.c -o $(BINDIR)$*.o - $(CC) $(CFLAGS) $(INCLUDES) $(BOARDINCLUDE) $(PROJECTINCLUDE) $(CPUINCLUDE) -MM $*.c > $(BINDIR)$*.d - @printf "$(BINDIR)"|cat - $(BINDIR)$*.d > /tmp/riot_out && mv /tmp/riot_out $(BINDIR)$*.d - -# remove compilation products -clean: - rm -f $(BINDIR)$(ARCH) $(OBJ) $(DEP) - @if [ -d $(BINDIR) ] ; \ - then rmdir $(BINDIR) ; \ - fi +include $(RIOTBASE)/Makefile.base diff --git a/boards/telosb/Makefile.include b/boards/telosb/Makefile.include index 1f16d2e7b70ad2da0e6002e5356030ed797f1918..8d72d2ffc4c9a2ccaebe3d5d62f38a087308ad06 100644 --- a/boards/telosb/Makefile.include +++ b/boards/telosb/Makefile.include @@ -4,23 +4,23 @@ export CPU = msp430x16x export MCU = msp430f1611 # toolchain config -export PREFIX = @msp430- -export CC = @$(PREFIX)gcc -export AR = @$(PREFIX)ar +export PREFIX = msp430- +export CC = $(PREFIX)gcc +export AR = $(PREFIX)ar export CFLAGS += -std=gnu99 -Wstrict-prototypes -gdwarf-2 -Os -Wall -mmcu=$(MCU) export ASFLAGS += -mmcu=$(MCU) --defsym $(MCU)=1 --gdwarf-2 export AS = $(PREFIX)as export LINK = $(PREFIX)gcc export SIZE = $(PREFIX)size export OBJCOPY = $(PREFIX)objcopy -export LINKFLAGS = -mmcu=$(MCU) -lgcc $(RIOTBASE)/bin/startup.o +export LINKFLAGS = -mmcu=$(MCU) -lgcc $(BINDIR)startup.o export TERMPROG = $(RIOTBASE)/dist/tools/pyterm/pyterm.py export FLASHER = goodfet.bsl ifeq ($(strip $(PORT)),) export PORT = /dev/ttyUSB0 endif -export HEXFILE = bin/$(PROJECT).hex +export HEXFILE = $(BINDIR)$(PROJECT).hex export FFLAGS = --telosb -c $(PORT) -r -e -I -p $(HEXFILE) -export INCLUDES += -I $(RIOTCPU)/msp430-common/include/ -I $(RIOTBOARD)/$(BOARD)/include/ +export INCLUDES += -I $(RIOTCPU)/msp430-common/include -I$(RIOTBOARD)/$(BOARD)/include -I$(RIOTBASE)/drivers/cc2420/include -I$(RIOTBASE)/sys/net/include export OFLAGS = -O ihex diff --git a/boards/wsn430-common/Makefile b/boards/wsn430-common/Makefile index 8f8f23add94f2a6676778a1adc8b103cad9ad510..08503227da87bf13e8d5b73415be6753bf007748 100644 --- a/boards/wsn430-common/Makefile +++ b/boards/wsn430-common/Makefile @@ -1,33 +1,11 @@ -SRC = $(wildcard *.c) -BINDIR = $(RIOTBOARD)/$(BOARD)/bin/ -OBJ = $(SRC:%.c=$(BINDIR)%.o)## defines -DEP = $(SRC:%.c=$(BINDIR)%.d) +MODULE =$(BOARD)_base -INCLUDES += -I$(RIOTBOARD)/wsn430-common/include/ -I${RIOTBOARD}/${BOARD}/include/ -INCLUDES += -I$(RIOTBASE)/cpu/msp430-common/include/ -INCLUDES += -I$(RIOTBASE)/cpu/mspx16x/include/ -INCLUDES += -I$(RIOTBASE)/drivers/include/ +DIRS = drivers -.PHONY: $(BINDIR)$(ARCH) +all: $(BINDIR)$(MODULE).a + @for i in $(DIRS) ; do "$(MAKE)" -C $$i ; done ; -all: $(BINDIR)$(ARCH) - #$(MAKE) -C drivers +include $(RIOTBASE)/Makefile.base -$(BINDIR)$(ARCH): $(OBJ) - echo $(AR) rcs $(BINDIR)$(ARCH) $(OBJ) - $(AR) rcs $(BINDIR)$(ARCH) $(OBJ) - -# pull in dependency info for *existing* .o files --include $(OBJ:.o=.d) - -# compile and generate dependency info -$(BINDIR)%.o: %.c - $(CC) $(CFLAGS) $(INCLUDES) $(BOARDINCLUDE) $(PROJECTINCLUDE) $(CPUINCLUDE) -c $*.c -o $(BINDIR)$*.o - $(CC) $(CFLAGS) $(INCLUDES) $(BOARDINCLUDE) $(PROJECTINCLUDE) $(CPUINCLUDE) -MM $*.c > $(BINDIR)$*.d - @printf "$(BINDIR)"|cat - $(BINDIR)$*.d > /tmp/riot_out && mv /tmp/riot_out $(BINDIR)$*.d - -# remove compilation products -clean: - #$(MAKE) -C drivers clean - rm -f $(OBJ) $(DEP) - rm -f $(BINDIR)$(ARCH) +clean:: + @for i in $(DIRS) ; do "$(MAKE)" -C $$i clean ; done ; diff --git a/boards/wsn430-common/Makefile.include b/boards/wsn430-common/Makefile.include index 346044a3097ed9bd647e44d0085fac4fd4d7220b..4ecffabafabb0495a38ebab3371fba10530f1071 100644 --- a/boards/wsn430-common/Makefile.include +++ b/boards/wsn430-common/Makefile.include @@ -3,23 +3,23 @@ export CPU = msp430x16x export MCU = msp430f1611 # toolchain config -export PREFIX = @msp430- -export CC = @$(PREFIX)gcc -export AR = @$(PREFIX)ar +export PREFIX = msp430- +export CC = $(PREFIX)gcc +export AR = $(PREFIX)ar export CFLAGS += -std=gnu99 -Wstrict-prototypes -gdwarf-2 -Os -Wall -mmcu=$(MCU) export ASFLAGS += -mmcu=$(MCU) --defsym $(MCU)=1 --gdwarf-2 export AS = $(PREFIX)as export LINK = $(PREFIX)gcc export SIZE = $(PREFIX)size export OBJCOPY = $(PREFIX)objcopy -export LINKFLAGS = -mmcu=$(MCU) -lgcc $(RIOTBASE)/bin/startup.o +export LINKFLAGS = -mmcu=$(MCU) -lgcc $(BINDIR)startup.o export FLASHER = mspdebug ifeq ($(strip $(PORT)),) export PORT = /dev/ttyUSB0 endif -export HEXFILE = bin/$(PROJECT).hex +export HEXFILE = $(BINDIR)$(PROJECT).hex export FFLAGS = -d $(PORT) -j uif "prog $(HEXFILE)" -export INCLUDES += -I $(RIOTCPU)/msp430-common/include/ -I$(RIOTBASE)/sys/net/include/ +export INCLUDES += -I$(RIOTBOARD)/wsn430-common/include export OFLAGS = -O ihex diff --git a/boards/wsn430-common/drivers/Makefile b/boards/wsn430-common/drivers/Makefile index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..a1a4f9665a4459cb2e4db5f0b7282399d1100614 100644 --- a/boards/wsn430-common/drivers/Makefile +++ b/boards/wsn430-common/drivers/Makefile @@ -0,0 +1,5 @@ +MODULE =$(BOARD)_base + +include $(RIOTBOARD)/$(BOARD)/Makefile.include + +include $(RIOTBASE)/Makefile.base diff --git a/boards/wsn430-v1_3b/Makefile b/boards/wsn430-v1_3b/Makefile index e19884c6b16a2ab122bf20516fabb2807dce44b0..b7b75b794bbb240a78fab484470f99a9bcbf2808 100644 --- a/boards/wsn430-v1_3b/Makefile +++ b/boards/wsn430-v1_3b/Makefile @@ -1,36 +1,12 @@ -SRC = $(wildcard *.c) -BINDIR = bin/ -OBJ = $(SRC:%.c=$(BINDIR)%.o)## defines -export ARCH = wsn430-v1_3b_base.a +MODULE =$(BOARD)_base -DEP = $(SRC:%.c=$(BINDIR)%.d) +DIRS = $(RIOTBOARD)/wsn430-common +INCLUDES += -I$(RIOTBASE)/drivers/cc110x_ng/include -INCLUDES += -I${RIOTBASE}/core/include/ -INCLUDES += -Iinclude/ -I$(RIOTBOARD)/wsn430-common/include/ -INCLUDES += -I$(RIOTBASE)/cpu/msp430-common/include/ -I$(RIOTBASE)/cpu/msp430x16x/include/ -INCLUDES += -I$(RIOTBASE)/drivers/cc110x_ng/include/ -I$(RIOTBASE)/sys/include -#INCLUDES += -I/usr/msp430/include/ +all: $(BINDIR)$(MODULE).a + @for i in $(DIRS) ; do "$(MAKE)" -C $$i ; done ; -all: $(BINDIR)$(ARCH) - $(MAKE) -C ../wsn430-common +include $(RIOTBASE)/Makefile.base -$(BINDIR)$(ARCH): $(OBJ) - $(AR) rcs $(BINDIR)$(ARCH) $(OBJ) - -# pull in dependency info for *existing* .o files --include $(OBJ:.o=.d) - -# compile and generate dependency info -$(BINDIR)%.o: %.c - mkdir -p $(BINDIR) - $(CC) $(CFLAGS) $(INCLUDES) $(BOARDINCLUDE) $(PROJECTINCLUDE) $(CPUINCLUDE) -c $*.c -o $(BINDIR)$*.o - $(CC) $(CFLAGS) $(INCLUDES) $(BOARDINCLUDE) $(PROJECTINCLUDE) $(CPUINCLUDE) -MM $*.c > $(BINDIR)$*.d - @printf "$(BINDIR)"|cat - $(BINDIR)$*.d > /tmp/riot_out && mv /tmp/riot_out $(BINDIR)$*.d - -# remove compilation products -clean: - $(MAKE) -C ../wsn430-common clean - rm -f $(BINDIR)$(ARCH) $(OBJ) $(DEP) - @if [ -d $(BINDIR) ] ; \ - then rmdir $(BINDIR) ; \ - fi \ No newline at end of file +clean:: + @for i in $(DIRS) ; do "$(MAKE)" -C $$i clean ; done ; diff --git a/boards/wsn430-v1_3b/Makefile.include b/boards/wsn430-v1_3b/Makefile.include index aec438bae0ef17572090043734b292dadbac36d2..ed87f884e39aba4c847458b621db4c24e282b54c 100644 --- a/boards/wsn430-v1_3b/Makefile.include +++ b/boards/wsn430-v1_3b/Makefile.include @@ -1,4 +1,4 @@ -export INCLUDES += -I$(RIOTBOARD)/wsn430-v1_3b/include -I$(RIOTBOARD)/wsn430-common/include +export INCLUDES += -I$(RIOTBOARD)/wsn430-v1_3b/include include $(RIOTBOARD)/$(BOARD)/Makefile.dep include $(RIOTBOARD)/wsn430-common/Makefile.include diff --git a/boards/wsn430-v1_4/Makefile b/boards/wsn430-v1_4/Makefile index 5e426ffbd9fa12ee56ad03f9009aa5a146949d88..7f7fba05eafe74122353c887d150e61a6d9f8475 100644 --- a/boards/wsn430-v1_4/Makefile +++ b/boards/wsn430-v1_4/Makefile @@ -1,35 +1,11 @@ -SRC = $(wildcard *.c) -BINDIR = bin/ -OBJ = $(SRC:%.c=$(BINDIR)%.o)## defines -export ARCH = wsn430-v1_4_base.a +MODULE =$(BOARD)_base -DEP = $(SRC:%.c=$(BINDIR)%.d) +DIRS = $(RIOTBOARD)/wsn430-common -INCLUDES += -I${RIOTBASE}/core/include/ -INCLUDES += -Iinclude/ -I$(RIOTBOARD)/wsn430-common/include/ -INCLUDES += -I$(RIOTBASE)/cpu/msp430-common/include/ -I$(RIOTBASE)/cpu/msp430x16x/include/ -INCLUDES += -I$(RIOTBASE)/drivers/cc2420/include/ -I$(RIOTBASE)/sys/include +all: $(BINDIR)$(MODULE).a + @for i in $(DIRS) ; do "$(MAKE)" -C $$i ; done ; -all: $(BINDIR)$(ARCH) - $(MAKE) -C ../wsn430-common +include $(RIOTBASE)/Makefile.base -$(BINDIR)$(ARCH): $(OBJ) - $(AR) rcs $(BINDIR)$(ARCH) $(OBJ) - -# pull in dependency info for *existing* .o files --include $(OBJ:.o=.d) - -# compile and generate dependency info -$(BINDIR)%.o: %.c - mkdir -p $(BINDIR) - $(CC) $(CFLAGS) $(INCLUDES) $(BOARDINCLUDE) $(PROJECTINCLUDE) $(CPUINCLUDE) -c $*.c -o $(BINDIR)$*.o - $(CC) $(CFLAGS) $(INCLUDES) $(BOARDINCLUDE) $(PROJECTINCLUDE) $(CPUINCLUDE) -MM $*.c > $(BINDIR)$*.d - @printf "$(BINDIR)"|cat - $(BINDIR)$*.d > /tmp/riot_out && mv /tmp/riot_out $(BINDIR)$*.d - -# remove compilation products -clean: - $(MAKE) -C ../wsn430-common clean - rm -f $(BINDIR)$(ARCH) $(OBJ) $(DEP) - @if [ -d $(BINDIR) ] ; \ - then rmdir $(BINDIR) ; \ - fi +clean:: + @for i in $(DIRS) ; do "$(MAKE)" -C $$i clean ; done ; diff --git a/boards/wsn430-v1_4/Makefile.include b/boards/wsn430-v1_4/Makefile.include index b8e4e4a3b92813df7b48127f320d3e10e9e9e5d1..a5ba9a0c946b08c10f7bf43c4e2c468cefff75e6 100644 --- a/boards/wsn430-v1_4/Makefile.include +++ b/boards/wsn430-v1_4/Makefile.include @@ -1,4 +1,4 @@ -export INCLUDES += -I$(RIOTBOARD)/wsn430-v1_4/include -I$(RIOTBOARD)/wsn430-common/include +export INCLUDES += -I$(RIOTBOARD)/wsn430-v1_4/include -I$(RIOTBOARD)/wsn430-common/include -I$(RIOTBASE)/drivers/cc2420/include -I$(RIOTBASE)/sys/net/include include $(RIOTBOARD)/$(BOARD)/Makefile.dep include $(RIOTBOARD)/wsn430-common/Makefile.include diff --git a/core/Makefile b/core/Makefile index 6a5709576b9dacc98ad40c16b214c47ec9bf846c..d420149bd23b6c56f4240c6f853d9aa8cb542747 100644 --- a/core/Makefile +++ b/core/Makefile @@ -1,5 +1,3 @@ MODULE =core -INCLUDES += -Iinclude/ -I../sys/include -I../sys/lib -I$(RIOTBASE)/drivers/include -I$(RIOTCPU)/$(CPU)/include - include $(RIOTBASE)/Makefile.base diff --git a/cpu/Makefile b/cpu/Makefile deleted file mode 100644 index 3988d3058b6b05ed45a5f2e7c6c2749577962e75..0000000000000000000000000000000000000000 --- a/cpu/Makefile +++ /dev/null @@ -1,42 +0,0 @@ -ifeq ($(CPU),lpc1768) - DIRS = lpc1768 -endif - -ifeq ($(CPU),lpc2387) - DIRS = arm_common lpc_common lpc2387 -endif - -ifeq ($(CPU),mc1322x) - DIRS = arm_common mc1322x -endif - -ifeq ($(CPU),cc430) - DIRS = msp430-common cc430 -endif - -ifeq ($(CPU),msp430x16x) - DIRS = msp430-common msp430x16x -endif - -ifeq ($(CPU),native) - DIRS = native -endif - -.PHONY: cpus -.PHONY: $(DIRS) - -cpus: $(DIRS) - -$(DIRS): - @"$(MAKE)" -C $@ - -clean: - @"$(MAKE)" -C lpc1768 clean - @"$(MAKE)" -C lpc2387 clean - @"$(MAKE)" -C mc1322x clean - @"$(MAKE)" -C lpc_common clean - @"$(MAKE)" -C arm_common clean - @"$(MAKE)" -C cc430 clean - @"$(MAKE)" -C msp430-common clean - @"$(MAKE)" -C msp430x16x clean - @"$(MAKE)" -C native clean diff --git a/cpu/Makefile.base b/cpu/Makefile.base deleted file mode 100644 index 9e83ceec69da888941011530abe0b5f3fb2cb712..0000000000000000000000000000000000000000 --- a/cpu/Makefile.base +++ /dev/null @@ -1,24 +0,0 @@ -ifeq ($(CPU),lpc1768) - INCLUDES += -I$(MAKEBASE)/cpu/lpc1768/include -endif -ifeq ($(CPU),lpc2387) - INCLUDES += -I$(MAKEBASE)/cpu/arm_common/include/ - INCLUDES += -I$(MAKEBASE)/cpu/lpc_common/include/ - INCLUDES += -I$(MAKEBASE)/cpu/lpc2387/include -endif -ifeq ($(CPU),mc1322x) - INCLUDES += -I$(MAKEBASE)/cpu/arm_common/include/ - INCLUDES += -I$(MAKEBASE)/cpu/mc1322x/include -endif -ifeq ($(CPU),msp430x16x) - INCLUDES += -I$(MAKEBASE)/cpu/msp430-common/include/ - INCLUDES += -I$(MAKEBASE)/cpu/msp430x16x/include/ -endif -ifeq ($(CPU),cc430) - INCLUDES += -I$(MAKEBASE)/cpu/msp430-common/include/ - INCLUDES += -I$(MAKEBASE)/cpu/cc430/include/ -endif -ifeq ($(CPU),native) - INCLUDES += -I$(MAKEBASE)/cpu/native/include/ -endif - diff --git a/cpu/Makefile.include b/cpu/Makefile.include deleted file mode 100644 index 5498061a250da83a76a31d869f616eb9b2f2484c..0000000000000000000000000000000000000000 --- a/cpu/Makefile.include +++ /dev/null @@ -1,19 +0,0 @@ -### Minimal setup -ifeq ($(CPU),lpc1768) - export UNDEF += $(BINDIR)syscalls.o -endif -ifeq ($(CPU),lpc2387) - export USEMODULE += arm_common lpc_common - export UNDEF += $(BINDIR)syscalls.o $(BINDIR)lpc_syscalls.o - export INCLUDES += -I$(RIOTCPU)/arm_common/include - export INCLUDES += -I$(RIOTCPU)/lpc_common/include -endif -ifeq ($(CPU),mc1322x) - export USEMODULE += arm_common - export UNDEF += $(BINDIR)syscalls.o - export UNDEF += $(BINDIR)mc1322x_syscalls.o - export INCLUDES += -I$(RIOTBASE)/cpu/arm_common/include -endif -ifeq ($(CPU),native) - export INCLUDES += -I$(RIOTCPU)/native/include -endif diff --git a/cpu/arm_common/Makefile b/cpu/arm_common/Makefile index c9bf68070cc17fc5e57211f85562b389661dd918..68ec505674baf8753271c0db4e1c89ec3e0fa7eb 100644 --- a/cpu/arm_common/Makefile +++ b/cpu/arm_common/Makefile @@ -1,5 +1,4 @@ MODULE =arm_common -INCLUDES = -Iinclude -I../$(CPU)/include -I../../sys/lib -I../../drivers/include -I../../core/include -I../../sys/include -I../../hal/include -I../../.. -I../../sys/lib/fat CFLAGS += $(CFLAGS_BASIC) include $(RIOTBASE)/Makefile.base diff --git a/cpu/arm_common/Makefile.include b/cpu/arm_common/Makefile.include new file mode 100644 index 0000000000000000000000000000000000000000..21a06d3fa7738fbacf7aa2c2aa2a294f8400a898 --- /dev/null +++ b/cpu/arm_common/Makefile.include @@ -0,0 +1,4 @@ +INCLUDES += -I$(MAKEBASE)/cpu/arm_common/include/ + +export UNDEF += $(BINDIR)syscalls.o + diff --git a/cpu/cc430/Makefile b/cpu/cc430/Makefile index 14776b83ffb0ef80fe18edddb6ba11bc7235b131..16802b433f92675f86bdfbe0e4c297035898d257 100644 --- a/cpu/cc430/Makefile +++ b/cpu/cc430/Makefile @@ -1,7 +1,8 @@ MODULE = cpu -INCLUDES += -I$(RIOTCPU)/$(CPU)/include -I$(RIOTBASE)/core/include -I$(RIOTBASE)/drivers/cc110x_ng/include -DIRS = +DIRS = $(RIOTCPU)/msp430-common + +INCLUDES += -I$(RIOTBASE)/drivers/cc110x_ng/include all: $(BINDIR)$(MODULE).a @for i in $(DIRS) ; do "$(MAKE)" -C $$i ; done ; diff --git a/cpu/cc430/Makefile.include b/cpu/cc430/Makefile.include new file mode 100644 index 0000000000000000000000000000000000000000..9cabdc9c4fa52117b584ef4b118eb18b62e91598 --- /dev/null +++ b/cpu/cc430/Makefile.include @@ -0,0 +1,4 @@ +INCLUDES += -I$(MAKEBASE)/cpu/cc430/include/ + +include $(RIOTCPU)/msp430-common/Makefile.include + diff --git a/cpu/lpc1768/Makefile b/cpu/lpc1768/Makefile index 4d2bc58f268b6ef57e121dd4417cdc5620a99fe9..ed34d81c6b90662555b0bd5dccfedf3cb03eb2cc 100644 --- a/cpu/lpc1768/Makefile +++ b/cpu/lpc1768/Makefile @@ -7,9 +7,6 @@ CC_SYMBOLS = -DTARGET_LPC1769 -DTOOLCHAIN_GCC_ARM -DNDEBUG -D__CORTEX_M3 LD_FLAGS = -mcpu=cortex-m3 -mthumb -Wl,--gc-sections,-Map=$(PROJECT).map,--cref --specs=nano.specs LD_SYS_LIBS = -lc -lgcc -lnosys -INCLUDES = -Iinclude -INCLUDES += -I$(RIOTBASE)/core/include -I$(RIOTBASE)/sys/include -I$(RIOTBASE)/sys/lib - all: $(BINDIR)$(MODULE).a include $(RIOTBASE)/Makefile.base diff --git a/cpu/lpc1768/Makefile.include b/cpu/lpc1768/Makefile.include new file mode 100644 index 0000000000000000000000000000000000000000..bacb82189b023b2cb34b389f89176f118ad1714d --- /dev/null +++ b/cpu/lpc1768/Makefile.include @@ -0,0 +1,3 @@ +INCLUDES += -I$(MAKEBASE)/cpu/lpc1768/include + +export UNDEF += $(BINDIR)syscalls.o diff --git a/cpu/lpc1768/include/LPC17xx.h b/cpu/lpc1768/include/LPC17xx.h index 377fdf240afac5b49e8f426f472e3eaa7dc84cd0..bdc57c0d896dd5df953e1b86f3df4f042156f174 100644 --- a/cpu/lpc1768/include/LPC17xx.h +++ b/cpu/lpc1768/include/LPC17xx.h @@ -97,7 +97,6 @@ typedef enum IRQn #include "core_cm3.h" /* Cortex-M3 processor and core peripherals */ -#include "system_LPC17xx.h" /* System Header */ /******************************************************************************/ diff --git a/cpu/lpc1768/include/cpu-conf.h b/cpu/lpc1768/include/cpu-conf.h index 624edc7fbbd30df541948921136aeebc39138d68..1e426ce4477699e959156c066dcd2168af45cb0d 100644 --- a/cpu/lpc1768/include/cpu-conf.h +++ b/cpu/lpc1768/include/cpu-conf.h @@ -13,6 +13,8 @@ #endif #define KERNEL_CONF_STACKSIZE_IDLE 1000 + +#define UART0_BUFSIZE (128) /** @} */ #endif /* CPU_CONF_H */ diff --git a/cpu/lpc2387/Makefile b/cpu/lpc2387/Makefile index 627ac79289771518f38c461bed8ac53bd70e446e..8b9db756198a624310a3c8bfd8c6f10a2647bf8a 100644 --- a/cpu/lpc2387/Makefile +++ b/cpu/lpc2387/Makefile @@ -1,7 +1,8 @@ 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../../.. -DIRS = +include $(RIOTCPU)/$(CPU)/Makefile.include + +DIRS = $(RIOTCPU)/arm_common $(RIOTCPU)/lpc_common ifneq (,$(findstring gpioint,$(USEMODULE))) DIRS += gpioint endif diff --git a/cpu/lpc2387/Makefile.include b/cpu/lpc2387/Makefile.include new file mode 100644 index 0000000000000000000000000000000000000000..92ada6348208405aee5229a344cb16430906dcf1 --- /dev/null +++ b/cpu/lpc2387/Makefile.include @@ -0,0 +1,7 @@ +INCLUDES += -I$(RIOTCPU)/lpc2387/include + +include $(RIOTCPU)/arm_common/Makefile.include +include $(RIOTCPU)/lpc_common/Makefile.include + +export USEMODULE += arm_common lpc_common + 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/i2c/Makefile b/cpu/lpc2387/i2c/Makefile index 0d25ac4dfa0514f3da9a7a8bd950df80da5e8a0d..825b7ecde67887dcbc8ca2ff8963dba24849526e 100644 --- a/cpu/lpc2387/i2c/Makefile +++ b/cpu/lpc2387/i2c/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 =i2c 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/lpc_common/Makefile.include b/cpu/lpc_common/Makefile.include new file mode 100644 index 0000000000000000000000000000000000000000..d90912db90429128a2d8619852414a3e027fbf50 --- /dev/null +++ b/cpu/lpc_common/Makefile.include @@ -0,0 +1,3 @@ +INCLUDES += -I$(RIOTCPU)/lpc_common/include + +export UNDEF += $(BINDIR)lpc_syscalls.o diff --git a/cpu/mc1322x/Makefile b/cpu/mc1322x/Makefile index 706aac84a56c7327f30d850b8cd90c654d1d9e1d..cb7f2993a00d69a8492adce0807990bbc1dafb35 100644 --- a/cpu/mc1322x/Makefile +++ b/cpu/mc1322x/Makefile @@ -1,6 +1,6 @@ MODULE =cpu -DIRS = +DIRS = $(RIOTCPU)/arm_common ifneq (,$(findstring mc1322x_adc,$(USEMODULE))) DIRS += adc endif diff --git a/cpu/mc1322x/Makefile.include b/cpu/mc1322x/Makefile.include new file mode 100644 index 0000000000000000000000000000000000000000..9bc7621575ea308b23e73d048d303f2a379b7f79 --- /dev/null +++ b/cpu/mc1322x/Makefile.include @@ -0,0 +1,7 @@ +INCLUDES += -I$(MAKEBASE)/cpu/mc1322x/include + +include $(RIOTCPU)/arm_common/Makefile.include + +export UNDEF += $(BINDIR)mc1322x_syscalls.o + +export USEMODULE += arm_common diff --git a/cpu/mc1322x/gpio.c b/cpu/mc1322x/gpio.c index f238d052da90c58e0db0f009bc80e9f392dc8097..197e9351e409c611b4b5e13310732b42307ea814 100644 --- a/cpu/mc1322x/gpio.c +++ b/cpu/mc1322x/gpio.c @@ -10,19 +10,19 @@ #include "gpio.h" -inline void gpio_pad_dir(volatile uint64_t data) +static inline void gpio_pad_dir(volatile uint64_t data) { GPIO->PAD_DIR0 = (data & 0xffffffff); GPIO->PAD_DIR1 = (data >> 32); } -inline void gpio_data(volatile uint64_t data) +static inline void gpio_data(volatile uint64_t data) { GPIO->DATA0 = (data & 0xffffffff); GPIO->DATA1 = (data >> 32); } -inline uint64_t gpio_data_get(volatile uint64_t bits) { +static inline uint64_t gpio_data_get(volatile uint64_t bits) { uint64_t rdata = 0; rdata = GPIO->DATA0 & (bits & 0xffffffff); @@ -31,43 +31,43 @@ inline uint64_t gpio_data_get(volatile uint64_t bits) { return rdata; } -inline void gpio_pad_pu_en(volatile uint64_t data) +static inline void gpio_pad_pu_en(volatile uint64_t data) { GPIO->PAD_PU_EN0 = (data & 0xffffffff); GPIO->PAD_PU_EN1 = (data >> 32); } -inline void gpio_data_sel(volatile uint64_t data) +static inline void gpio_data_sel(volatile uint64_t data) { GPIO->DATA_SEL0 = (data & 0xffffffff); GPIO->DATA_SEL1 = (data >> 32); } -inline void gpio_pad_pu_sel(volatile uint64_t data) +static inline void gpio_pad_pu_sel(volatile uint64_t data) { GPIO->PAD_PU_SEL0 = (data & 0xffffffff); GPIO->PAD_PU_SEL1 = (data >> 32); } -inline void gpio_data_set(volatile uint64_t data) +static inline void gpio_data_set(volatile uint64_t data) { GPIO->DATA_SET0 = (data & 0xffffffff); GPIO->DATA_SET1 = (data >> 32); } -inline void gpio_data_reset(volatile uint64_t data) +static inline void gpio_data_reset(volatile uint64_t data) { GPIO->DATA_RESET0 = (data & 0xffffffff); GPIO->DATA_RESET1 = (data >> 32); } -inline void gpio_pad_dir_set(volatile uint64_t data) +static inline void gpio_pad_dir_set(volatile uint64_t data) { GPIO->PAD_DIR_SET0 = (data & 0xffffffff); GPIO->PAD_DIR_SET1 = (data >> 32); } -inline void gpio_pad_dir_reset(volatile uint64_t data) +static inline void gpio_pad_dir_reset(volatile uint64_t data) { GPIO->PAD_DIR_RESET0 = (data & 0xffffffff); GPIO->PAD_DIR_RESET1 = (data >> 32); 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/msp430-common/Makefile.include b/cpu/msp430-common/Makefile.include new file mode 100644 index 0000000000000000000000000000000000000000..bd2f745e30fb355c6ac18c93bafe8bb02018f9f2 --- /dev/null +++ b/cpu/msp430-common/Makefile.include @@ -0,0 +1,2 @@ +INCLUDES += -I$(MAKEBASE)/cpu/msp430-common/include/ + diff --git a/cpu/msp430x16x/Makefile b/cpu/msp430x16x/Makefile index 421e3af303a40ecdc1fbb32601082bdb1200a127..3b9fcd10ac13a174c2fb04422e17051c86c5ba37 100644 --- a/cpu/msp430x16x/Makefile +++ b/cpu/msp430x16x/Makefile @@ -1,7 +1,8 @@ MODULE =cpu -INCLUDES = -I../include -I$(RIOTBASE)/core/include -DIRS = +include $(RIOTCPU)/$(CPU)/Makefile.include + +DIRS = $(RIOTCPU)/msp430-common/ all: $(BINDIR)$(MODULE).a @for i in $(DIRS) ; do "$(MAKE)" -C $$i ; done ; diff --git a/cpu/msp430x16x/Makefile.include b/cpu/msp430x16x/Makefile.include new file mode 100644 index 0000000000000000000000000000000000000000..b9dcae6d052f5331991201e4e343234d90ca7279 --- /dev/null +++ b/cpu/msp430x16x/Makefile.include @@ -0,0 +1,4 @@ +INCLUDES += -I$(RIOTCPU)/msp430x16x/include/ + +include $(RIOTCPU)/msp430-common/Makefile.include + diff --git a/cpu/native/Makefile b/cpu/native/Makefile index d5d520f74b7c32a0eb2dfd5c4531e8dc5e580414..a6f241ddcede8d67eb972336467eb2fa518d69c5 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 = @@ -18,7 +16,7 @@ all: $(BINDIR)$(MODULE).a include $(RIOTBASE)/Makefile.base $(BINDIR)%.o: %.c - $(CC) $(CFLAGS) $(filter-out $(EXCLUDES),$(INCLUDES)) $(BOARDINCLUDE) $(PROJECTINCLUDE) $(CPUINCLUDE) -c $*.c -o $(BINDIR)$*.o + $(AD)$(CC) $(CFLAGS) $(filter-out $(EXCLUDES),$(INCLUDES)) $(BOARDINCLUDE) $(PROJECTINCLUDE) $(CPUINCLUDE) -c $*.c -o $(BINDIR)$*.o @$(CC) $(CFLAGS) $(INCLUDES) $(BOARDINCLUDE) $(PROJECTINCLUDE) $(CPUINCLUDE) -MM $*.c > $(BINDIR)$*.d @printf "$(BINDIR)" | cat - $(BINDIR)$*.d > /tmp/riot_out && mv /tmp/riot_out $(BINDIR)$*.d diff --git a/cpu/native/Makefile.include b/cpu/native/Makefile.include new file mode 100644 index 0000000000000000000000000000000000000000..54626e3344d0806ad045862c34bb6b9f54526dfe --- /dev/null +++ b/cpu/native/Makefile.include @@ -0,0 +1,2 @@ +export INCLUDES += -I$(RIOTCPU)/native/include + diff --git a/cpu/native/net/Makefile b/cpu/native/net/Makefile index 3ce631f49c6e92146649220c92e862c101a80760..c0c0e2b827ae16edfe01e62f133d39154c00774f 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 @@ -7,7 +5,7 @@ MODULE = nativenet include $(MAKEBASE)/Makefile.base $(BINDIR)%.o: %.c - $(CC) $(CFLAGS) $(filter-out $(EXCLUDES),$(INCLUDES)) $(BOARDINCLUDE) $(PROJECTINCLUDE) $(CPUINCLUDE) -c $*.c -o $(BINDIR)$*.o + $(AD)$(CC) $(CFLAGS) $(filter-out $(EXCLUDES),$(INCLUDES)) $(BOARDINCLUDE) $(PROJECTINCLUDE) $(CPUINCLUDE) -c $*.c -o $(BINDIR)$*.o @$(CC) $(CFLAGS) $(INCLUDES) $(BOARDINCLUDE) $(PROJECTINCLUDE) $(CPUINCLUDE) -MM $*.c > $(BINDIR)$*.d @printf "$(BINDIR)" | cat - $(BINDIR)$*.d > /tmp/riot_out && mv /tmp/riot_out $(BINDIR)$*.d 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/dist/Makefile b/dist/Makefile index 22423602cbd290bedbda68d9b05c3f20980e6c70..8bf05daf14157e21260762101d73ee6980a587c3 100644 --- a/dist/Makefile +++ b/dist/Makefile @@ -35,4 +35,6 @@ export RIOTBASE =$(CURDIR)/../../RIOT export INCLUDES = -I$(RIOTBOARD)/$(BOARD)/include -I$(RIOTBASE)/core/include -I$(RIOTCPU)/$(CPU)/include -I$(RIOTBASE)/sys/lib -I$(RIOTBASE)/sys/include/ -I$(RIOTBASE)/drivers/include/ +export QUIET := 1 + include $(RIOTBASE)/Makefile.include diff --git a/drivers/Makefile b/drivers/Makefile index d2f4914a21d0a84f3aca6d2e16d8931b8a99eed5..4a5d79a370940b8aaf6ed6272b0bc8a2d247d9f9 100644 --- a/drivers/Makefile +++ b/drivers/Makefile @@ -45,6 +45,3 @@ include $(RIOTBASE)/Makefile.base clean:: @for i in $(DIRS) ; do "$(MAKE)" -C $$i clean ; done ; - - - diff --git a/drivers/at86rf231/Makefile b/drivers/at86rf231/Makefile index 24a3dea93aa53dbdfdc6e58d6f3c2096b56f2b1a..c3b9d941754d7a507f540083fe62ffb9cdc10adf 100644 --- a/drivers/at86rf231/Makefile +++ b/drivers/at86rf231/Makefile @@ -1,4 +1,3 @@ -INCLUDES = -I$(RIOTBASE)/sys/include -I$(RIOTBASE)/core/include -Iinclude/ -I$(RIOTBASE)/sys/net/include MODULE =at86rf231 DIRS = diff --git a/drivers/cc110x/Makefile b/drivers/cc110x/Makefile index 4589024645712a40baadf5b17f3c14b5ee71f0a6..46b179742b6a3e0ea5d8958176a1fa0e27edb137 100644 --- a/drivers/cc110x/Makefile +++ b/drivers/cc110x/Makefile @@ -1,7 +1,4 @@ MODULE =cc110x -INCLUDES += -I$(RIOTBASE)/sys/net/include - include $(MAKEBASE)/Makefile.base - diff --git a/drivers/cc110x_ng/Makefile b/drivers/cc110x_ng/Makefile index 997aea9aeacc930a9d762d54223e8a8a4fe5ada2..f812c2980120b196ade264e7b63d18c887c4815b 100644 --- a/drivers/cc110x_ng/Makefile +++ b/drivers/cc110x_ng/Makefile @@ -1,4 +1,3 @@ -INCLUDES = -I$(RIOTBASE)/sys/include -I../../net -I../include -I../../lib -I../../../.. -I../../../cpu/ -I$(RIOTBASE)/core/include -I../../ -Iinclude/ MODULE =cc110x_ng DIRS = 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/drivers/cc2420/Makefile b/drivers/cc2420/Makefile index 9c1a751946f9459f6171962ae268b24fc8a4d518..786dea6b2d579d5e57b5760828b0c73fe0c63199 100644 --- a/drivers/cc2420/Makefile +++ b/drivers/cc2420/Makefile @@ -1,4 +1,3 @@ -INCLUDES = -I$(RIOTBASE)/sys/include -I$(RIOTBASE)/core/include -Iinclude/ -I$(RIOTBASE)/sys/net/include MODULE =cc2420 DIRS = diff --git a/drivers/lm75a/Makefile b/drivers/lm75a/Makefile index 6c0a13b1b2b1173228af030c7be4e430bd3bd544..b9c7862ef585013c57b237f04f6463df360e0019 100644 --- a/drivers/lm75a/Makefile +++ b/drivers/lm75a/Makefile @@ -1,5 +1,3 @@ -INCLUDES = -I$(RIOTBASE)/core/include -I../include/ -I$(RIOTBASE)/sys/include -I$(RIOTBOARD)/$(BOARD)/include MODULE =lm75a include $(MAKEBASE)/Makefile.base - diff --git a/drivers/ltc4150/Makefile b/drivers/ltc4150/Makefile index 1365fbf9261ae2cbaf730313af34868d12ad25d4..c87af4187d4d566777bd95cdaccc64c0a9d5a40b 100644 --- a/drivers/ltc4150/Makefile +++ b/drivers/ltc4150/Makefile @@ -1,5 +1,3 @@ -INCLUDES = -I$(RIOTBASE)/core/include -I../include/ MODULE =ltc4150 include $(MAKEBASE)/Makefile.base - diff --git a/drivers/sht11/Makefile b/drivers/sht11/Makefile index 51acccc9827fc8ac4eb445d9a5cfd8a0019a6a68..71ca4388be1e554322b1680d667825cd82a3a9ef 100644 --- a/drivers/sht11/Makefile +++ b/drivers/sht11/Makefile @@ -1,5 +1,3 @@ -INCLUDES += -I$(RIOTBASE)/core/include -I../include -I$(RIOTBOARD)/$(BOARD) MODULE =sht11 include $(MAKEBASE)/Makefile.base - diff --git a/drivers/srf02/Makefile b/drivers/srf02/Makefile index 2f8bb4541c3f0e3018c21108bec5fc6cd510fddf..55d8977687f95bf61c9b9220d4853b4c408c5972 100644 --- a/drivers/srf02/Makefile +++ b/drivers/srf02/Makefile @@ -1,5 +1,3 @@ -INCLUDES = -I$(RIOTBASE)/core/include -I../include/ -I$(RIOTBASE)/sys/include MODULE =srf02 include $(MAKEBASE)/Makefile.base - diff --git a/drivers/srf08/Makefile b/drivers/srf08/Makefile index b5919cbf30142ec280f53c091391cce0466caae0..7980d3ed2b517583da6ea643ab38dedc5abd8641 100644 --- a/drivers/srf08/Makefile +++ b/drivers/srf08/Makefile @@ -1,5 +1,3 @@ -INCLUDES = -I$(RIOTBASE)/core/include -I../include/ -I$(RIOTBASE)/sys/include MODULE =srf08 include $(MAKEBASE)/Makefile.base - diff --git a/sys/Makefile b/sys/Makefile index 433d97beaca38414053c1d5b8833910e6921ff8e..58020bfd19119d71cfbb178babb7227e8b0cf28a 100644 --- a/sys/Makefile +++ b/sys/Makefile @@ -1,5 +1,3 @@ -INCLUDES += -Iinclude -I$(RIOTBASE)/drivers/ -I$(RIOTBASE)/drivers/include -Ilib -I$(RIOTCPU)/$(CPU)/include -Inet -I../core/include - MODULE =sys ifneq (,$(findstring auto_init,$(USEMODULE))) DIRS += auto_init @@ -10,28 +8,14 @@ endif ifneq (,$(findstring lib,$(USEMODULE))) DIRS += lib endif -ifneq (,$(findstring cmdd,$(USEMODULE))) - DIRS += cmdd -endif -ifneq (,$(findstring mprint,$(USEMODULE))) - DIRS += mprint -endif ifneq (,$(findstring ping,$(USEMODULE))) DIRS += ping endif ifneq (,$(findstring ps,$(USEMODULE))) DIRS += ps endif -ifneq (,$(findstring sync_read,$(USEMODULE))) - DIRS += sync_read -endif -ifneq (,$(findstring sysmon,$(USEMODULE))) - DIRS += sysmon -endif -ifneq (,$(findstring mqueue,$(USEMODULE))) - DIRS += mqueue -endif ifneq (,$(findstring posix,$(USEMODULE))) + INCLUDES += -I$(RIOTBASE)/sys/posix/include DIRS += posix endif ifneq (,$(findstring shell,$(USEMODULE))) @@ -55,9 +39,6 @@ endif ifneq (,$(findstring destiny,$(USEMODULE))) DIRS += net/transport_layer/destiny endif -ifneq (,$(findstring net_mm,$(USEMODULE))) - DIRS += net/mm -endif ifneq (,$(findstring net_help,$(USEMODULE))) DIRS += net/crosslayer/net_help endif diff --git a/sys/auto_init/auto_init.c b/sys/auto_init/auto_init.c index db4f0f4fbea7a9938b4c4ea7fcd9e50aff7f3cea..0e8dce72b72406d2a0220d6452308591678aca49 100644 --- a/sys/auto_init/auto_init.c +++ b/sys/auto_init/auto_init.c @@ -19,6 +19,26 @@ #include "auto_init.h" +#ifdef MODULE_HWTIMER +#include "hwtimer.h" +#endif + +#ifdef MODULE_SHT11 +#include "sht11.h" +#endif + +#ifdef MODULE_GPIOINT +#include "gpioint.h" +#endif + +#ifdef MODULE_CC110X +#include "cc1100-interface.h" +#endif + +#ifdef MODULE_LTC4150 +#include "ltc4150.h" +#endif + #ifdef MODULE_UART0 #include "board_uart0.h" #endif diff --git a/sys/bloom/Makefile b/sys/bloom/Makefile index 8210b99fe81c1274c39d6e58ae392cea6c715b65..998fbc6c3705c5ff1ec463744afd04ec3f401d36 100644 --- a/sys/bloom/Makefile +++ b/sys/bloom/Makefile @@ -1,4 +1,3 @@ -INCLUDES = -I../include -I$(RIOTBASE)/core/include MODULE = bloom include $(RIOTBASE)/Makefile.base diff --git a/sys/config/Makefile b/sys/config/Makefile index a3329789976d1d6a328f564fe03d1fbef8a5bd59..93a842ac894d48d7e2c856736b3d54eae01bdce0 100644 --- a/sys/config/Makefile +++ b/sys/config/Makefile @@ -1,4 +1,3 @@ -INCLUDES = -I../include -I$(RIOTBASE)/core/include MODULE =config include $(RIOTBASE)/Makefile.base diff --git a/sys/hashes/Makefile b/sys/hashes/Makefile index c14e137b8ba52bdb3b35c2af69e5c49b0084388e..d105e96ecbed2af9e07f685dcdadfaf9b6aa17e3 100644 --- a/sys/hashes/Makefile +++ b/sys/hashes/Makefile @@ -1,4 +1,3 @@ -INCLUDES = -I../include MODULE = hashes include $(RIOTBASE)/Makefile.base diff --git a/sys/include/auto_init.h b/sys/include/auto_init.h index 66d7b60a310afa85418da4b72a9a11261b68d93e..3b13d5ec87aa9fbfb8db0046e9934724562c1c1f 100644 --- a/sys/include/auto_init.h +++ b/sys/include/auto_init.h @@ -22,26 +22,6 @@ #ifndef AUTO_INIT_H #define AUTO_INIT_H -#ifdef MODULE_HWTIMER -#include "hwtimer.h" -#endif - -#ifdef MODULE_SHT11 -#include "sht11.h" -#endif - -#ifdef MODULE_GPIOINT -#include "gpioint.h" -#endif - -#ifdef MODULE_CC110X -#include "cc1100-interface.h" -#endif - -#ifdef MODULE_LTC4150 -#include "ltc4150.h" -#endif - void auto_init(void); /** @} */ diff --git a/sys/lib/hash_string.h b/sys/include/hash_string.h similarity index 100% rename from sys/lib/hash_string.h rename to sys/include/hash_string.h diff --git a/sys/lib/hashtable.h b/sys/include/hashtable.h similarity index 100% rename from sys/lib/hashtable.h rename to sys/include/hashtable.h diff --git a/sys/lib/hashtable_private.h b/sys/include/hashtable_private.h similarity index 100% rename from sys/lib/hashtable_private.h rename to sys/include/hashtable_private.h diff --git a/sys/lib/ringbuffer.h b/sys/include/ringbuffer.h similarity index 100% rename from sys/lib/ringbuffer.h rename to sys/include/ringbuffer.h diff --git a/sys/lib/Makefile b/sys/lib/Makefile index 2a10bf68c4bcaabda93ec8340f6ebba5a69a88a0..59bee59b8aeeade95442edfc34ea4d7a73a0bc7e 100644 --- a/sys/lib/Makefile +++ b/sys/lib/Makefile @@ -1,4 +1,3 @@ -INCLUDES = -I../include -I../drivers/include -I../lib -I$(RIOTCPU)/$(CPU)/include -I../net -I../../core/include MODULE =lib include $(RIOTBASE)/Makefile.base diff --git a/sys/net/ccn_lite/Makefile b/sys/net/ccn_lite/Makefile index 6275081efc4068422e206147a361d482293c8bc7..e5a8423ac4023690d48253962cdb131b1e4349f0 100644 --- a/sys/net/ccn_lite/Makefile +++ b/sys/net/ccn_lite/Makefile @@ -1,4 +1,4 @@ MODULE := ccn_lite -INCLUDES = -I$(RIOTBASE) -I$(RIOTBASE)/sys/include -I$(RIOTBASE)/core/include -I$(RIOTBASE)/drivers/include -I$(RIOTBASE)/sys/net -I$(RIOTBASE)/cpu/arm_common/include/ -I$(RIOTBASE)/drivers/cc110x_ng/include/ -I$(RIOTBASE)/sys/net/include/ +INCLUDES += -I$(RIOTBASE)/drivers/cc110x_ng/include/ -I$(RIOTBASE)/sys/net/ccn_lite include $(RIOTBASE)/Makefile.base diff --git a/sys/net/ccn_lite/ccnl-ext-appserver.c b/sys/net/ccn_lite/ccnl-ext-appserver.c index 75f123cce8572feebf671f6e1fa1bfebb8cba075..704389c3428272b3b27a9c9681551d6c7d0ebd2e 100644 --- a/sys/net/ccn_lite/ccnl-ext-appserver.c +++ b/sys/net/ccn_lite/ccnl-ext-appserver.c @@ -22,8 +22,7 @@ #include "msg.h" #include "thread.h" -#include "ccn_lite/util/ccnl-riot-client.h" -#include "ccn_lite/ccnl-riot-compat.h" +#include "ccnl-riot-compat.h" #include "ccnl-includes.h" #include "ccnl-core.h" diff --git a/sys/net/ccn_lite/util/Makefile b/sys/net/ccn_lite/util/Makefile index cd74302c3b97b9cf0303274f57224e65b47073c2..94010e0b653dbd3db956351d4a3d1dc466142249 100644 --- a/sys/net/ccn_lite/util/Makefile +++ b/sys/net/ccn_lite/util/Makefile @@ -1,4 +1,3 @@ MODULE := ccn_lite_client -INCLUDES = -I$(RIOTBASE) -I$(RIOTBASE)/sys/include -I$(RIOTBASE)/core/include -I$(RIOTBASE)/drivers/include -I$(RIOTBASE)/sys/net -I$(RIOTBASE)/cpu/arm_common/include/ -I$(RIOTBASE)/drivers/cc110x_ng/include/ -I$(RIOTBASE)/sys/net/ccn_lite/ -I$(RIOTBASE)/sys/net/include - +INCLUDES += -I$(RIOTBASE)/drivers/cc110x_ng/include/ -I$(RIOTBASE)/sys/net/ccn_lite include $(RIOTBASE)/Makefile.base diff --git a/sys/net/crosslayer/net_help/Makefile b/sys/net/crosslayer/net_help/Makefile index 026882ed719a58553dc0c4295ec12c113e2ce8fe..0672178a5a16d282ed58df3d81990df76f8c3f80 100644 --- a/sys/net/crosslayer/net_help/Makefile +++ b/sys/net/crosslayer/net_help/Makefile @@ -1,4 +1,5 @@ MODULE:=$(shell basename $(CURDIR)) -INCLUDES += -I$(RIOTBASE)/sys/net/include -I$(RIOTBASE)/sys/include -I$(RIOTBASE)/core/include + +INCLUDES += -I$(RIOTBASE)/drivers/cc110x -I$(RIOTBASE)/drivers/cc110x_ng/include include $(RIOTBASE)/Makefile.base diff --git a/sys/net/link_layer/ieee802154/Makefile b/sys/net/link_layer/ieee802154/Makefile index ef0639c947821f6f32fa001d0ce4ba04f2a11723..c6e31807e89afcfcae778b012c3aae2940ce857a 100644 --- a/sys/net/link_layer/ieee802154/Makefile +++ b/sys/net/link_layer/ieee802154/Makefile @@ -1,4 +1,3 @@ MODULE:=$(shell basename $(CURDIR)) -INCLUDES = -I$(RIOTBASE) -I$(RIOTBASE)/sys/include -I$(RIOTBASE)/core/include -I$(RIOTBASE)/drivers/include -I$(RIOTBASE)/sys/net/include include $(RIOTBASE)/Makefile.base diff --git a/sys/net/link_layer/protocol-multiplex/Makefile b/sys/net/link_layer/protocol-multiplex/Makefile index 07e11ad8799f9f1244105570e3a6a0d521f3d869..764e02c5b2ff41ba30274d3833d6b747abcf6fc7 100644 --- a/sys/net/link_layer/protocol-multiplex/Makefile +++ b/sys/net/link_layer/protocol-multiplex/Makefile @@ -1,4 +1,5 @@ +INCLUDES += -I$(RIOTBASE)/sys/net/include + MODULE:=protocol_multiplex -INCLUDES = -I$(RIOTBASE) -I$(RIOTBASE)/sys/include -I$(RIOTBASE)/core/include -I$(RIOTBASE)/sys/net/include include $(RIOTBASE)/Makefile.base diff --git a/sys/net/network_layer/sixlowpan/Makefile b/sys/net/network_layer/sixlowpan/Makefile index cb1b12da88dba7400069d96028ba3b7daefc38d6..619c8e0159150001c7dfba3ce154b8e31c84c8e6 100644 --- a/sys/net/network_layer/sixlowpan/Makefile +++ b/sys/net/network_layer/sixlowpan/Makefile @@ -1,4 +1,3 @@ MODULE:=$(shell basename $(CURDIR)) -INCLUDES += -I$(RIOTBASE) -I$(RIOTBASE)/sys/include -I$(RIOTBASE)/core/include -I$(RIOTBASE)/drivers/include -I$(RIOTBASE)/drivers/cc110x_ng/include -I$(RIOTBASE)/cpu/arm_common/include -I$(RIOTBASE)/sys/net/include/ - +INCLUDES += -I$(RIOTBASE)/drivers/cc110x -I$(RIOTBASE)/drivers/cc110x_ng/include include $(RIOTBASE)/Makefile.base diff --git a/sys/net/routing/rpl/Makefile b/sys/net/routing/rpl/Makefile index f3edbc5c6bf90e0724f12c3eddadaeb0b3fad01c..0672178a5a16d282ed58df3d81990df76f8c3f80 100644 --- a/sys/net/routing/rpl/Makefile +++ b/sys/net/routing/rpl/Makefile @@ -1,4 +1,5 @@ MODULE:=$(shell basename $(CURDIR)) -INCLUDES += -I$(RIOTBASE) -I$(RIOTBASE)/sys/include -I$(RIOTBASE)/core/include -I$(RIOTBASE)/sys/net/include + +INCLUDES += -I$(RIOTBASE)/drivers/cc110x -I$(RIOTBASE)/drivers/cc110x_ng/include include $(RIOTBASE)/Makefile.base diff --git a/sys/net/transport_layer/destiny/Makefile b/sys/net/transport_layer/destiny/Makefile index 4541761d71c7fcfd03c17bb1fa633e32480da5fe..bf374f567b3e3c28ac942183873766e54a63dd07 100644 --- a/sys/net/transport_layer/destiny/Makefile +++ b/sys/net/transport_layer/destiny/Makefile @@ -1,4 +1,4 @@ MODULE:=$(shell basename $(CURDIR)) -INCLUDES = -I$(RIOTBASE)/sys/include -I$(RIOTBASE)/core/include -I$(RIOTBASE)/drivers/include -I$(RIOTBASE)/sys/net/include -I$(RIOTBASE)/drivers/cc110x_ng/include -I$(RIOTBASE)/drivers/cc110x +INCLUDES += -I$(RIOTBASE)/drivers/cc110x_ng/include -I$(RIOTBASE)/drivers/cc110x include $(RIOTBASE)/Makefile.base diff --git a/sys/ping/Makefile b/sys/ping/Makefile index e944af2dce9901ae5aabaa8bcd696c405286907c..037060005c38802b08144bdf27627032fbef114d 100644 --- a/sys/ping/Makefile +++ b/sys/ping/Makefile @@ -1,4 +1,3 @@ -INCLUDES = -I../include -I$(RIOTBASE)/core/include/ -I$(RIOTBASE)/drivers/include MODULE =ping include $(RIOTBASE)/Makefile.base diff --git a/sys/posix/Makefile b/sys/posix/Makefile index bd15ac0af224293dab60dc1f38bb9577f8e4a46c..883763c56e33c76ff1ec0fe076853fcec1523c14 100644 --- a/sys/posix/Makefile +++ b/sys/posix/Makefile @@ -1,4 +1,3 @@ -INCLUDES = -I$(RIOTBASE)/sys/include -I$(RIOTBASE)/core/include -Iinclude MODULE =posix include $(RIOTBASE)/Makefile.base diff --git a/sys/ps/Makefile b/sys/ps/Makefile index 11d0680982f01aba43255a21adfcdc50ec8976fd..9fec450f4c9b874fd6d31bbb4af8cdfe5bbdc962 100644 --- a/sys/ps/Makefile +++ b/sys/ps/Makefile @@ -1,4 +1,3 @@ -INCLUDES = -I../include -I$(RIOTBASE)/core/include/ -I$(RIOTBASE)/drivers/include MODULE =ps include $(RIOTBASE)/Makefile.base diff --git a/sys/semaphore/Makefile b/sys/semaphore/Makefile index 512a8ea92c61d6ac4d2309aeb1dbf6459c510650..923609e5c9bb77f2f644b168a36de17f8bc70f0c 100644 --- a/sys/semaphore/Makefile +++ b/sys/semaphore/Makefile @@ -1,4 +1,3 @@ -INCLUDES = -I../include -I$(RIOTBASE)/core/include MODULE = semaphore include $(RIOTBASE)/Makefile.base diff --git a/sys/shell/Makefile b/sys/shell/Makefile index 9d889dbf402c84896fd83acc5280c1db69198fef..f2cdb04897dfabb74c1e2f4d0609cc3cee00b251 100644 --- a/sys/shell/Makefile +++ b/sys/shell/Makefile @@ -1,23 +1,22 @@ SRC = shell.c OBJ = $(SRC:%.c=$(BINDIR)%.o) DEP = $(SRC:%.c=$(BINDIR)%.d) -INCLUDES = -I../include MODULE =shell $(BINDIR)$(MODULE).a: $(OBJ) - $(AR) rc $(BINDIR)$(MODULE).a $(OBJ) + $(AD)$(AR) rc $(BINDIR)$(MODULE).a $(OBJ) # pull in dependency info for *existing* .o files -include $(OBJ:.o=.d) # compile and generate dependency info $(BINDIR)%.o: %.c - $(CC) $(CFLAGS) $(INCLUDES) -c $*.c -o $(BINDIR)$*.o - $(CC) $(CFLAGS) $(INCLUDES) -MM $*.c > $(BINDIR)$*.d + $(AD)$(CC) $(CFLAGS) $(INCLUDES) -c $*.c -o $(BINDIR)$*.o + @$(CC) $(CFLAGS) $(INCLUDES) -MM $*.c > $(BINDIR)$*.d @printf "$(BINDIR)"|cat - $(BINDIR)$*.d > /tmp/riot_out && mv /tmp/riot_out $(BINDIR)$*.d # remove compilation products clean:: - rm -f $(BINDIR)$(MODULE).a $(OBJ) $(DEP) $(ASMOBJ) + @rm -f $(BINDIR)$(MODULE).a $(OBJ) $(DEP) $(ASMOBJ) diff --git a/sys/shell/commands/Makefile b/sys/shell/commands/Makefile index 83b0a542134989534180060298bfba7967301cbf..7b7ccb7ae02d5b575d0c3bef197632570b6016b0 100644 --- a/sys/shell/commands/Makefile +++ b/sys/shell/commands/Makefile @@ -1,5 +1,4 @@ SRC = shell_commands.c sc_id.c -INCLUDES = -I../../../core/include -I../../include -I../../../drivers/include/ ifneq (,$(findstring cc110x_ng,$(USEMODULE))) INCLUDES += -I$(RIOTBASE)/drivers/cc110x_ng/include/ diff --git a/sys/timex/Makefile b/sys/timex/Makefile index 0275f959ac2a304bec2fc181d63f99690e41688f..76b21cf14d04c0b633e7b5ed8775286e45ef45c2 100644 --- a/sys/timex/Makefile +++ b/sys/timex/Makefile @@ -1,4 +1,3 @@ -INCLUDES = -I../include MODULE = timex include $(RIOTBASE)/Makefile.base diff --git a/sys/transceiver/Makefile b/sys/transceiver/Makefile index 149822e1f155626424a26ff4ef867b94245361d9..7d3cafb276fe1e6f0a98ec32e5e4da4b28f4c491 100644 --- a/sys/transceiver/Makefile +++ b/sys/transceiver/Makefile @@ -1,6 +1,6 @@ MODULE =transceiver -INCLUDES += -I$(RIOTBASE)/drivers/cc110x_ng/include +INCLUDES += -I$(RIOTBASE)/drivers/cc110x -I$(RIOTBASE)/drivers/cc110x_ng/include -I$(RIOTBASE)/drivers/cc2420/include -I$(RIOTBASE)/drivers/at86rf231/include include $(MAKEBASE)/Makefile.base diff --git a/sys/uart0/Makefile b/sys/uart0/Makefile index 39ca411fbff335d74d20ff0ffc65be2b6b7aaa35..4d873e0393a683a9171d762c0668150371913476 100644 --- a/sys/uart0/Makefile +++ b/sys/uart0/Makefile @@ -1,5 +1,3 @@ -INCLUDES = -I../include -I../drivers/include -I../lib -I$(RIOTCPU)/$(CPU)/include -I../net -I../../core/include - MODULE =uart0 include $(MAKEBASE)/Makefile.base diff --git a/sys/vtimer/Makefile b/sys/vtimer/Makefile index adb12a5d812f2f1b9869cf1198ef2acce293aa0a..35f0910438bdd4dc358d62000cee614b8b201796 100644 --- a/sys/vtimer/Makefile +++ b/sys/vtimer/Makefile @@ -1,4 +1,3 @@ -INCLUDES = -I../include -I$(RIOTBASE)/core/include/ -I$(RIOTBASE)/drivers/include MODULE =vtimer include $(RIOTBASE)/Makefile.base