From e57d94cf44c41e6cabf1ae6a6c656cfbbf7233eb Mon Sep 17 00:00:00 2001 From: Oleg Hahm Date: Fri, 10 Jan 2014 17:17:26 +0100 Subject: [PATCH 1/3] prefixing application object files to avoid dups --- Makefile.include | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile.include b/Makefile.include index e4ff6b2ef..16f090321 100644 --- a/Makefile.include +++ b/Makefile.include @@ -79,7 +79,7 @@ endif SRC = $(wildcard *.c) # string array of all names replaced .c with .o -OBJ = $(SRC:%.c=${BINDIR}%.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)%.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)$*.o + $(AD)$(CC) $(CFLAGS) $(INCLUDES) -c $*.c -o $(BINDIR)$(PROJECT)_$*.o clean: "$(MAKE)" -C $(RIOTBOARD)/$(BOARD) clean From 4ac82bd5f8fb1482e81a09a558a23849ea9d0aea Mon Sep 17 00:00:00 2001 From: Oleg Hahm Date: Tue, 14 Jan 2014 17:53:03 +0100 Subject: [PATCH 2/3] changed duplicate file name for wsn430 uart0.c --- boards/wsn430-common/{uart0.c => wsn430-uart0.c} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename boards/wsn430-common/{uart0.c => wsn430-uart0.c} (100%) diff --git a/boards/wsn430-common/uart0.c b/boards/wsn430-common/wsn430-uart0.c similarity index 100% rename from boards/wsn430-common/uart0.c rename to boards/wsn430-common/wsn430-uart0.c From 74a3158cb2b5beac0d8ab71daad99c87bd20a982 Mon Sep 17 00:00:00 2001 From: Oleg Hahm Date: Tue, 14 Jan 2014 17:58:29 +0100 Subject: [PATCH 3/3] use subfolder instead of file name prefix --- Makefile.include | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Makefile.include b/Makefile.include index 16f090321..713591bb0 100644 --- a/Makefile.include +++ b/Makefile.include @@ -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