mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
36 lines
1.1 KiB
Makefile
36 lines
1.1 KiB
Makefile
SRC = $(wildcard *.c)
|
|
BINDIR = bin/
|
|
OBJ = $(SRC:%.c=$(BINDIR)%.o)## defines
|
|
|
|
DEP = $(SRC:%.c=$(BINDIR)%.d)
|
|
|
|
INCLUDES = -Iinclude -I../../feuerware-base/sys/lib -I../../feuerware-base/sys/drivers/include
|
|
INCLUDES += -I../../feuerware-base/sys/drivers/cc110x_ng/include
|
|
INCLUDES += -I../../feuerware-base/core/include
|
|
INCLUDES += -I../../feuerware-base/cpu/msp430/include/
|
|
INCLUDES += -I../../feuerware-base/cpu/cc430/include/
|
|
INCLUDES += -I/usr/msp430/include/
|
|
|
|
all: $(BINDIR)chronos_base.a
|
|
$(MAKE) -C drivers
|
|
|
|
$(BINDIR)chronos_base.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/fw_out && mv /tmp/fw_out $(BINDIR)$*.d
|
|
|
|
# remove compilation products
|
|
clean:
|
|
rm -f $(BINDIR)chronos_base.a $(OBJ) $(DEP)
|
|
$(MAKE) -C drivers clean
|
|
|
|
|
|
|