[FFmpeg-cvslog] r12398 - trunk/common.mak

diego subversion
Sun Mar 9 19:29:42 CET 2008


Author: diego
Date: Sun Mar  9 19:29:41 2008
New Revision: 12398

Log:
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.


Modified:
   trunk/common.mak

Modified: trunk/common.mak
==============================================================================
--- trunk/common.mak	(original)
+++ trunk/common.mak	Sun Mar  9 19:29:41 2008
@@ -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 \




More information about the ffmpeg-cvslog mailing list