1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-01-17 05:12:57 +01:00

use subfolder instead of file name prefix

This commit is contained in:
Oleg Hahm 2014-01-14 17:58:29 +01:00
parent 4ac82bd5f8
commit 74a3158cb2

View File

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