mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-01-18 12:52:44 +01:00
Merge pull request #335 from thomaseichinger/makefile
fix redbee-econotag Makefile
This commit is contained in:
commit
064fb3d6ca
@ -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,12 +22,16 @@ $(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
|
||||
|
||||
# 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
|
||||
|
||||
|
@ -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/
|
||||
|
Loading…
Reference in New Issue
Block a user