projects
/
litex.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
598498e
)
software/common.mak: support changing source directory
author
Sebastien Bourdeauducq
<sebastien@milkymist.org>
Fri, 25 May 2012 20:29:15 +0000
(22:29 +0200)
committer
Sebastien Bourdeauducq
<sebastien@milkymist.org>
Fri, 25 May 2012 20:29:15 +0000
(22:29 +0200)
software/common.mak
patch
|
blob
|
history
diff --git
a/software/common.mak
b/software/common.mak
index 168dba84ffecd280b8a3835fb274e74440d6b707..2b238a51352c06d3e1c534eeb463b79e2680f927 100644
(file)
--- 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 | \