From d66835d3ab923f7dbf2acea7d1a3a09c4290becb Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Fri, 25 May 2012 22:29:15 +0200 Subject: [PATCH] software/common.mak: support changing source directory --- software/common.mak | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/software/common.mak b/software/common.mak index 168dba84..2b238a51 100644 --- a/software/common.mak +++ b/software/common.mak @@ -44,9 +44,9 @@ LDFLAGS = -nostdlib -nodefaultlibs # compile and generate dependencies, based on # http://scottmcpeak.com/autodepend/autodepend.html -%.o: %.c - $(CC) -c $(CFLAGS) $*.c -o $*.o - @$(CC_normal) -MM $(CFLAGS) $*.c > $*.d +%.o: $(SRCDIR)%.c + $(CC) -c $(CFLAGS) $(SRCDIR)$*.c -o $*.o + @$(CC_normal) -MM $(CFLAGS) $(SRCDIR)$*.c > $*.d @mv -f $*.d $*.d.tmp @sed -e 's|.*:|$*.o:|' < $*.d.tmp > $*.d @sed -e 's/.*://' -e 's/\\$$//' < $*.d.tmp | fmt -1 | \ -- 2.30.2