From 18fe32ffc5d8da980787417d78f9a213322aeef4 Mon Sep 17 00:00:00 2001 From: Thomas Eichinger Date: Mon, 18 Nov 2013 10:48:39 +0100 Subject: [PATCH] fix for the redbee-econotag Makefile to work again --- boards/redbee-econotag/Makefile | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/boards/redbee-econotag/Makefile b/boards/redbee-econotag/Makefile index 8b1d55d8b4..02fafd2997 100644 --- a/boards/redbee-econotag/Makefile +++ b/boards/redbee-econotag/Makefile @@ -1,12 +1,13 @@ SRC = $(wildcard *.c) -BINDIR = $(RIOTBOARD)/$(BOARD)/bin/ +BINDIR = bin/ OBJ = $(SRC:%.c=$(BINDIR)%.o)## defines DEP = $(SRC:%.c=$(BINDIR)%.d) -export ARCH = redbee-econotag_base.a +export ARCH = $(BOARD)_base.a -INCLUDES += -I$(RIOTBOARD)/redbee-econotag/drivers/include -INCLUDES += -I$(RIOTBASE)/cpu/arm_common/include -INCLUDES += -I$(RIOTBASE)/cpu/mc1322x/include +INCLUDES += -I$(RIOTBOARD)/$(BOARD)/drivers/include +INCLUDES += -I$(RIOTBOARD)/$(BOARD)/include +INCLUDES += -I$(RIOTCPU)/arm_common/include +INCLUDES += -I$(RIOTCPU)/$(CPU)/include .PHONY: $(BINDIR)/$(ARCH) @@ -21,6 +22,7 @@ $(BINDIR)$(ARCH): $(OBJ) # compile and generate dependency info $(BINDIR)%.o: %.c + mkdir -p $(BINDIR) $(CC) $(CFLAGS) $(CFLAGS_MTHUMB) $(INCLUDES) $(BOARDINCLUDE) $(PROJECTINCLUDE) $(CPUINCLUDE) -c $*.c -o $(BINDIR)$*.o $(CC) $(CFLAGS) $(CFLAGS_MTHUMB) $(INCLUDES) $(BOARDINCLUDE) $(PROJECTINCLUDE) $(CPUINCLUDE) -MM $*.c > $(BINDIR)$*.d @printf "$(BINDIR)"|cat - $(BINDIR)$*.d > /tmp/riot_out && mv /tmp/riot_out $(BINDIR)$*.d @@ -29,4 +31,7 @@ $(BINDIR)%.o: %.c clean: ${MAKE} -C drivers clean rm -f $(OBJ) $(DEP) + @if [ -d $(BINDIR) ] ; \ + then rmdir $(BINDIR) ; \ + fi