From 18fe32ffc5d8da980787417d78f9a213322aeef4 Mon Sep 17 00:00:00 2001 From: Thomas Eichinger Date: Mon, 18 Nov 2013 10:48:39 +0100 Subject: [PATCH 1/2] 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 From 44dfb87cde813b24709f1542967be0d9bfd1db52 Mon Sep 17 00:00:00 2001 From: Thomas Eichinger Date: Mon, 9 Dec 2013 13:03:43 +0100 Subject: [PATCH 2/2] fixes to build default project and clean properly --- boards/redbee-econotag/Makefile | 4 ++-- boards/redbee-econotag/Makefile.include | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/boards/redbee-econotag/Makefile b/boards/redbee-econotag/Makefile index 02fafd2997..295ea7255f 100644 --- a/boards/redbee-econotag/Makefile +++ b/boards/redbee-econotag/Makefile @@ -29,8 +29,8 @@ $(BINDIR)%.o: %.c # remove compilation products clean: - ${MAKE} -C drivers clean - rm -f $(OBJ) $(DEP) + "$(MAKE)" -C drivers clean + rm -f $(BINDIR)$(ARCH) $(OBJ) $(DEP) @if [ -d $(BINDIR) ] ; \ then rmdir $(BINDIR) ; \ fi diff --git a/boards/redbee-econotag/Makefile.include b/boards/redbee-econotag/Makefile.include index addee0b20e..b9fe5ddfcf 100644 --- a/boards/redbee-econotag/Makefile.include +++ b/boards/redbee-econotag/Makefile.include @@ -27,3 +27,5 @@ endif export HEXFILE = bin/$(PROJECT).hex export FFLAGS = -t $(PORT) -f $(HEXFILE) -c 'bbmc -l redbee-econotag reset' export OFLAGS = -O binary --gap-fill=0xff + +export INCLUDES += -I $(RIOTCPU)/$(CPU)/include/