From b9ffc1a99ecc776820dc11e984f594b242209af4 Mon Sep 17 00:00:00 2001 From: Ludwig Ortmann Date: Wed, 9 Apr 2014 15:23:12 +0200 Subject: [PATCH] fixup for #710: use subfolder in bin dirs (native) Update native Makefiles to provide changed object target paths Fixes #989 --- boards/native/Makefile | 7 ++++--- boards/native/drivers/Makefile | 7 ++++--- cpu/native/Makefile | 7 ++++--- cpu/native/net/Makefile | 7 ++++--- cpu/native/rtc/Makefile | 7 ++++--- 5 files changed, 20 insertions(+), 15 deletions(-) diff --git a/boards/native/Makefile b/boards/native/Makefile index 3e2f63f860..95358519cf 100644 --- a/boards/native/Makefile +++ b/boards/native/Makefile @@ -7,10 +7,11 @@ all: $(BINDIR)$(MODULE).a include $(RIOTBASE)/Makefile.base -$(BINDIR)%.o: %.c - $(AD)$(CC) $(CFLAGS) $(NATIVEINCLUDES) -c $*.c -o $(BINDIR)$*.o +$(BINDIR)$(MODULE)/%.o: %.c + @mkdir -p $(BINDIR)$(MODULE) + $(AD)$(CC) $(CFLAGS) $(NATIVEINCLUDES) -c $*.c -o $(BINDIR)$(MODULE)/$*.o $(AD)$(CC) $(CFLAGS) $(NATIVEINCLUDES) -MM $*.c |\ - sed -e "1s|^|$(BINDIR)|" > $(BINDIR)$*.d + sed -e "1s|^|$(BINDIR)$(MODULE)/|" > $(BINDIR)$(MODULE)/$*.d clean:: @for i in $(DIRS) ; do "$(MAKE)" -C $$i clean || exit 1; done ; diff --git a/boards/native/drivers/Makefile b/boards/native/drivers/Makefile index 7a95daf23e..135a81e21c 100644 --- a/boards/native/drivers/Makefile +++ b/boards/native/drivers/Makefile @@ -5,7 +5,8 @@ all: $(BINDIR)$(MODULE).a include $(RIOTBASE)/Makefile.base -$(BINDIR)%.o: %.c - $(AD)$(CC) $(CFLAGS) $(NATIVEINCLUDES) -c $*.c -o $(BINDIR)$*.o +$(BINDIR)$(MODULE)/%.o: %.c + @mkdir -p $(BINDIR)$(MODULE) + $(AD)$(CC) $(CFLAGS) $(NATIVEINCLUDES) -c $*.c -o $(BINDIR)$(MODULE)/$*.o $(AD)$(CC) $(CFLAGS) $(NATIVEINCLUDES) -MM $*.c |\ - sed -e "1s|^|$(BINDIR)|" > $(BINDIR)$*.d + sed -e "1s|^|$(BINDIR)$(MODULE)/|" > $(BINDIR)$(MODULE)/$*.d diff --git a/cpu/native/Makefile b/cpu/native/Makefile index 2fea129943..a592a86309 100644 --- a/cpu/native/Makefile +++ b/cpu/native/Makefile @@ -13,10 +13,11 @@ all: $(BINDIR)$(MODULE).a include $(RIOTBASE)/Makefile.base -$(BINDIR)%.o: %.c - $(AD)$(CC) $(CFLAGS) $(NATIVEINCLUDES) -c $*.c -o $(BINDIR)$*.o +$(BINDIR)$(MODULE)/%.o: %.c + @mkdir -p $(BINDIR)$(MODULE) + $(AD)$(CC) $(CFLAGS) $(NATIVEINCLUDES) -c $*.c -o $(BINDIR)$(MODULE)/$*.o $(AD)$(CC) $(CFLAGS) $(NATIVEINCLUDES) -MM $*.c |\ - sed -e "1s|^|$(BINDIR)|" > $(BINDIR)$*.d + sed -e "1s|^|$(BINDIR)$(MODULE)/|" > $(BINDIR)$(MODULE)/$*.d clean:: @for i in $(DIRS) ; do "$(MAKE)" -C $$i clean || exit 1; done ; diff --git a/cpu/native/net/Makefile b/cpu/native/net/Makefile index f72d25eb1a..18e5e574f9 100644 --- a/cpu/native/net/Makefile +++ b/cpu/native/net/Makefile @@ -2,7 +2,8 @@ MODULE = nativenet include $(RIOTBASE)/Makefile.base -$(BINDIR)%.o: %.c - $(AD)$(CC) $(CFLAGS) $(NATIVEINCLUDES) -c $*.c -o $(BINDIR)$*.o +$(BINDIR)$(MODULE)/%.o: %.c + @mkdir -p $(BINDIR)$(MODULE) + $(AD)$(CC) $(CFLAGS) $(NATIVEINCLUDES) -c $*.c -o $(BINDIR)$(MODULE)/$*.o $(AD)$(CC) $(CFLAGS) $(NATIVEINCLUDES) -MM $*.c |\ - sed -e "1s|^|$(BINDIR)|" > $(BINDIR)$*.d + sed -e "1s|^|$(BINDIR)$(MODULE)/|" > $(BINDIR)$(MODULE)/$*.d diff --git a/cpu/native/rtc/Makefile b/cpu/native/rtc/Makefile index dee8e6b658..e22d4d999a 100644 --- a/cpu/native/rtc/Makefile +++ b/cpu/native/rtc/Makefile @@ -2,7 +2,8 @@ MODULE =rtc include $(RIOTBASE)/Makefile.base -$(BINDIR)%.o: %.c - $(AD)$(CC) $(CFLAGS) $(NATIVEINCLUDES) -c $*.c -o $(BINDIR)$*.o +$(BINDIR)$(MODULE)/%.o: %.c + @mkdir -p $(BINDIR)$(MODULE) + $(AD)$(CC) $(CFLAGS) $(NATIVEINCLUDES) -c $*.c -o $(BINDIR)$(MODULE)/$*.o $(AD)$(CC) $(CFLAGS) $(NATIVEINCLUDES) -MM $*.c |\ - sed -e "1s|^|$(BINDIR)|" > $(BINDIR)$*.d + sed -e "1s|^|$(BINDIR)$(MODULE)/|" > $(BINDIR)$(MODULE)/$*.d