summaryrefslogtreecommitdiff
path: root/common.mak
diff options
context:
space:
mode:
authorDiego Biurrun <diego@biurrun.de>2008-03-09 18:29:41 +0000
committerDiego Biurrun <diego@biurrun.de>2008-03-09 18:29:41 +0000
commit88855b51cdba35c2e7daf8351645d91cf85cb8af (patch)
treeb04430cbfe70e047aa132aed3a0e58cb9e455cd0 /common.mak
parent38dae9c3a63c0c5a189d0a8e2739c1635b09b547 (diff)
Work around gcc stupidity: With -MM gcc outputs just the basename of files as
target name. This breaks when compiling targets in subdirectories, so prepend the subdirectory name to the target name. Originally committed as revision 12398 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'common.mak')
-rw-r--r--common.mak3
1 files changed, 2 insertions, 1 deletions
diff --git a/common.mak b/common.mak
index 780f61e8d0..46cac9f6d8 100644
--- a/common.mak
+++ b/common.mak
@@ -61,8 +61,9 @@ $(SLIBNAME_WITH_MAJOR): $(OBJS)
ALLHEADERS = $(subst $(LIBSRC)/,,$(wildcard $(LIBSRC)/*.h))
checkheaders: $(filter-out %_template.ho,$(ALLHEADERS:.h=.ho))
+# gcc stupidly only outputs the basename of targets with -MM
depend dep: $(SRCS)
- $(CC) -MM $(CFLAGS) $^ 1>.depend
+ $(CC) -MM $(CFLAGS) $^ | sed 's,[0-9a-z._-]*: \([a-z0-9]*/\).*,\1&,' 1>.depend
clean::
rm -f *.o *~ *.a *.lib *.so *.so.* *.dylib *.dll \