2013-02-06 12:19:39 +01:00
|
|
|
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)
|
2013-04-17 18:03:32 +02:00
|
|
|
$(AR) rcs $(BINDIR)${ARCH} $(OBJ)
|
2013-02-06 12:19:39 +01:00
|
|
|
|
|
|
|
# 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)
|
|
|
|
|