1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-01-18 12:52:44 +01:00

prefixing application object files to avoid dups

This commit is contained in:
Oleg Hahm 2014-01-10 17:17:26 +01:00
parent 076c05794d
commit e57d94cf44

View File

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