1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

Add capability to Makefiles to use PROJBINDIR

Fixes bug in build-system that does not allow you to use other
PROJBINDIR than $(CURDIR)/bin
This commit is contained in:
authmillenon 2013-09-04 22:37:23 +02:00 committed by Martin Lenders
parent 8bc99f4ca7
commit 7fea5f15cc

View File

@ -67,16 +67,16 @@ SRC = $(wildcard *.c)
# string array of all names replaced .c with .o
OBJ = $(SRC:%.c=${PROJBINDIR}/%.o)
${PROJBINDIR}/$(PROJECT).a: $(OBJ)
$(AR) -rc bin/$(PROJECT).a $(OBJ)
$(PROJBINDIR)/$(PROJECT).a: $(OBJ)
$(AR) -rc $(PROJBINDIR)/$(PROJECT).a $(OBJ)
# pull in dependency info for *existing* .o files
-include $(OBJ:.o=.d)
${PROJBINDIR}/%.o: %.c $(PROJDEPS)
$(PROJBINDIR)/%.o: %.c $(PROJDEPS)
@echo; echo "Compiling.... $*.c"; echo
@test -d $(PROJBINDIR) || mkdir -p $(PROJBINDIR)
$(CC) $(CFLAGS) $(INCLUDES) -c $*.c -o bin/$*.o
$(CC) $(CFLAGS) $(INCLUDES) -c $*.c -o $(PROJBINDIR)/$*.o
clean:
$(MAKE) -C $(RIOTBOARD) clean