[FFmpeg-cvslog] r19608 - in trunk: common.mak configure

mru subversion
Sat Aug 8 20:27:22 CEST 2009


Author: mru
Date: Sat Aug  8 20:27:22 2009
New Revision: 19608

Log:
Generate dependencies when object files are built

Modified:
   trunk/common.mak
   trunk/configure

Modified: trunk/common.mak
==============================================================================
--- trunk/common.mak	Sat Aug  8 01:57:52 2009	(r19607)
+++ trunk/common.mak	Sat Aug  8 20:27:22 2009	(r19608)
@@ -21,25 +21,16 @@ ALLFFLIBS = avcodec avdevice avfilter av
 CPPFLAGS := -DHAVE_AV_CONFIG_H -I$(BUILD_ROOT_REL) -I$(SRC_PATH) $(CPPFLAGS)
 
 %.o: %.c
+	$(DEPEND_CMD)
 	$(CC) $(CPPFLAGS) $(CFLAGS) $(LIBOBJFLAGS) -c $(CC_O) $<
 
 %.o: %.S
+	$(DEPEND_CMD)
 	$(AS) $(CPPFLAGS) $(ASFLAGS) $(LIBOBJFLAGS) -c -o $@ $<
 
 %.ho: %.h
 	$(CC) $(CPPFLAGS) $(CFLAGS) $(LIBOBJFLAGS) -Wno-unused -c -o $@ -x c $<
 
-%.d: %.c
-	$(DEPEND_CMD)
-
-%.d: %.S
-	$(DEPEND_CMD)
-
-%.d: %.cpp
-	$(DEPEND_CMD)
-
-%.o: %.d
-
 %$(EXESUF): %.c
 
 SVN_ENTRIES = $(SRC_PATH_BARE)/.svn/entries
@@ -83,4 +74,4 @@ CLEANSUFFIXES     = *.o *~ *.ho *.map
 DISTCLEANSUFFIXES = *.d *.pc
 LIBSUFFIXES       = *.a *.lib *.so *.so.* *.dylib *.dll *.def *.dll.a *.exp
 
--include $(DEPS)
+-include $(wildcard $(DEPS))

Modified: trunk/configure
==============================================================================
--- trunk/configure	Sat Aug  8 01:57:52 2009	(r19607)
+++ trunk/configure	Sat Aug  8 20:27:22 2009	(r19608)
@@ -1309,7 +1309,7 @@ target_path='.'
 
 # gcc stupidly only outputs the basename of targets with -MM, but we need the
 # full relative path for objects in subdirectories for non-recursive Make.
-DEPEND_CMD='$(DEPCC) $(DEPFLAGS) $< | sed -e "/^\#.*/d" -e "s,^[[:space:]]*$(*F)\\.o,$(@D)/$(*F).o," > $@'
+DEPEND_CMD='$(DEPCC) $(DEPFLAGS) $< | sed -e "/^\#.*/d" -e "s,^[[:space:]]*$(*F)\\.o,$(@D)/$(*F).o," > $(@:.o=.d)'
 DEPFLAGS='$(CPPFLAGS) $(CFLAGS) -MM'
 
 # find source path



More information about the ffmpeg-cvslog mailing list