1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/boards/wsn430-v1_3b/Makefile
2013-11-06 10:11:57 -08:00

36 lines
1.1 KiB
Makefile

SRC = $(wildcard *.c)
BINDIR = bin/
OBJ = $(SRC:%.c=$(BINDIR)%.o)## defines
export ARCH = wsn430-v1_3b_base.a
DEP = $(SRC:%.c=$(BINDIR)%.d)
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)$(ARCH)
$(MAKE) -C ../wsn430-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 ../wsn430-common clean
rm -f $(BINDIR)$(ARCH) $(OBJ) $(DEP)
@if [ -d $(BINDIR) ] ; \
then rmdir $(BINDIR) ; \
fi