1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-25 14:33:52 +01:00
* updated makefiles
This commit is contained in:
Oleg Hahm 2013-02-06 12:19:39 +01:00
parent 182151f463
commit 39e96d4690
5 changed files with 59 additions and 2 deletions

View File

@ -0,0 +1,24 @@
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/
$(BINDIR)msba2_common_drivers.a: $(OBJ)
$(AR) rcs $(BINDIR)msba2_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)

View File

@ -8,7 +8,6 @@
#include <stdint.h>
#include <stdio.h>
#include "lpc2387.h"
#include "benchmark.h"
void benchmark_init(void)
{

31
msba2-common/makefile Normal file
View File

@ -0,0 +1,31 @@
SRC = $(wildcard *.c)
BINDIR = $(RIOTBOARD)/$(BOARD)/bin/
OBJ = $(SRC:%.c=$(BINDIR)%.o)## defines
DEP = $(SRC:%.c=$(BINDIR)%.d)
INCLUDES += -I$(RIOTBOARD)/msba2-common/include/
INCLUDES += -I$(RIOTBASE)/cpu/arm_common/include/
INCLUDES += -I$(RIOTBASE)/cpu/lpc2387/include/
INCLUDES += -I$(RIOTBASE)/drivers/include/
all: $(BINDIR)msba2_common_base.a
$(MAKE) -C drivers
$(BINDIR)msba2_common_base.a: $(OBJ)
$(AR) rcs $(BINDIR)msba2_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:
make -C drivers clean
rm -f $(OBJ) $(DEP)

BIN
msba2/board_init.o Normal file

Binary file not shown.

View File

@ -4,10 +4,12 @@ OBJ = $(SRC:%.c=$(BINDIR)%.o)## defines
DEP = $(SRC:%.c=$(BINDIR)%.d)
INCLUDES += -I$(RIOTBOARD)/msba2-common/include/
INCLUDES += -I$(RIOTBASE)/cpu/arm_common/include/
INCLUDES += -I$(RIOTBASE)/cpu/lpc2387/include/
all: $(BINDIR)msba2_base.a
$(MAKE) -C ../msba2-common
$(BINDIR)msba2_base.a: $(OBJ)
$(AR) rcs $(BINDIR)msba2_base.a $(OBJ)
@ -23,5 +25,6 @@ $(BINDIR)%.o: %.c
# remove compilation products
clean:
rm -f $(BINDIR)riot_base.a $(OBJ) $(DEP)
$(MAKE) -C ../msba2-common clean
rm -f $(BINDIR)msba2_base.a $(OBJ) $(DEP)