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:
parent
8bc99f4ca7
commit
7fea5f15cc
@ -67,16 +67,16 @@ SRC = $(wildcard *.c)
|
|||||||
# string array of all names replaced .c with .o
|
# string array of all names replaced .c with .o
|
||||||
OBJ = $(SRC:%.c=${PROJBINDIR}/%.o)
|
OBJ = $(SRC:%.c=${PROJBINDIR}/%.o)
|
||||||
|
|
||||||
${PROJBINDIR}/$(PROJECT).a: $(OBJ)
|
$(PROJBINDIR)/$(PROJECT).a: $(OBJ)
|
||||||
$(AR) -rc bin/$(PROJECT).a $(OBJ)
|
$(AR) -rc $(PROJBINDIR)/$(PROJECT).a $(OBJ)
|
||||||
|
|
||||||
# pull in dependency info for *existing* .o files
|
# pull in dependency info for *existing* .o files
|
||||||
-include $(OBJ:.o=.d)
|
-include $(OBJ:.o=.d)
|
||||||
|
|
||||||
${PROJBINDIR}/%.o: %.c $(PROJDEPS)
|
$(PROJBINDIR)/%.o: %.c $(PROJDEPS)
|
||||||
@echo; echo "Compiling.... $*.c"; echo
|
@echo; echo "Compiling.... $*.c"; echo
|
||||||
@test -d $(PROJBINDIR) || mkdir -p $(PROJBINDIR)
|
@test -d $(PROJBINDIR) || mkdir -p $(PROJBINDIR)
|
||||||
$(CC) $(CFLAGS) $(INCLUDES) -c $*.c -o bin/$*.o
|
$(CC) $(CFLAGS) $(INCLUDES) -c $*.c -o $(PROJBINDIR)/$*.o
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
$(MAKE) -C $(RIOTBOARD) clean
|
$(MAKE) -C $(RIOTBOARD) clean
|
||||||
|
Loading…
Reference in New Issue
Block a user