1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/msba2/makefile
2013-02-01 16:55:19 +01:00

28 lines
812 B
Makefile

SRC = $(wildcard *.c)
BINDIR = bin/
OBJ = $(SRC:%.c=$(BINDIR)%.o)## defines
DEP = $(SRC:%.c=$(BINDIR)%.d)
INCLUDES += -I$(RIOTBASE)/cpu/arm_common/include/
INCLUDES += -I$(RIOTBASE)/cpu/lpc2387/include/
all: $(BINDIR)msba2_base.a
$(BINDIR)msba2_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:
rm -f $(BINDIR)riot_base.a $(OBJ) $(DEP)