1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-01-18 12:52:44 +01:00
RIOT/boards/msb-430/Makefile
Ludwig Ortmann f7a1edeb2c fix and clean up some board Makefiles
enables building wsn430-v1_3b and wsn430-v1_4
fixes some but not all chronos building issues
2013-11-19 17:56:05 +01:00

35 lines
1020 B
Makefile

SRC = $(wildcard *.c)
BINDIR = bin/
OBJ = $(SRC:%.c=$(BINDIR)%.o)## defines
export ARCH = msb-430_base.a
DEP = $(SRC:%.c=$(BINDIR)%.d)
INCLUDES += -I$(RIOTBOARD)/msb-430-common/include/
INCLUDES += -I$(RIOTBASE)/cpu/msp430-common/include/
INCLUDES += -I$(RIOTBASE)/cpu/msp430x16x/include/
all: $(BINDIR)$(ARCH)
$(MAKE) -C ../msb-430-common
$(BINDIR)$(ARCH): $(OBJ)
mkdir -p $(BINDIR)
$(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
$(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 ../msb-430-common clean
rm -f $(BINDIR)$(ARCH) $(OBJ) $(DEP)
@if [ -d $(BINDIR) ] ; \
then rmdir $(BINDIR) ; \
fi