changeset 30984:ccf1dec0fce2

Generate dependency information as a sideeffect of compilation. This speeds up compilation times, simplifies the code and fixes dependency file generation in libav*.
author diego
date Tue, 06 Apr 2010 10:08:19 +0000
parents 8b6727d2d479
children 76e1dd50dccf
files Makefile configure
diffstat 2 files changed, 1 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/Makefile	Tue Apr 06 09:46:47 2010 +0000
+++ b/Makefile	Tue Apr 06 10:08:19 2010 +0000
@@ -831,15 +831,6 @@
 
 all: $(ALL_PRG-yes)
 
-%.d: %.c
-	$(MPDEPEND_CMD) > $@
-
-%.d: %.cpp
-	$(MPDEPEND_CMD_CXX) > $@
-
-%.d: %.m
-	$(MPDEPEND_CMD) > $@
-
 %.ho: %.h
 	$(CC) $(CFLAGS) -Wno-unused -c -o $@ -x c $<
 
--- a/configure	Tue Apr 06 09:46:47 2010 +0000
+++ b/configure	Tue Apr 06 10:08:19 2010 +0000
@@ -2513,6 +2513,7 @@
 fi
 
 cc_check -mno-omit-leaf-frame-pointer && cflags_no_omit_leaf_frame_pointer="-mno-omit-leaf-frame-pointer"
+cc_check -MD -MP && CFLAGS="-MD -MP $CFLAGS"
 
 
 if test -n "$LDFLAGS" ; then
@@ -8472,9 +8473,6 @@
 EXTRALIBS_MPLAYER  = $libs_mplayer
 EXTRALIBS_MENCODER = $libs_mencoder
 
-MPDEPEND_CMD     = \$(CC) -MM -MP \$(CFLAGS)   \$(filter-out %.xpm,\$(filter-out %.h,$^)) | sed -e "s,[0-9a-z._-]*: \([a-z0-9/]*/\)[^/]* ,\1&," -e "s,\(.*\)\.o: ,\1.d &,"
-MPDEPEND_CMD_CXX = \$(CC) -MM -MP \$(CXXFLAGS) \$(filter-out  %.hh,\$(filter-out %.h,$^)) | sed -e "s,[0-9a-z._-]*: \([a-z0-9/]*/\)[^/]* ,\1&," -e "s,\(.*\)\.o: ,\1.d &,"
-
 GETCH = $_getch
 HELP_FILE = $_mp_help
 TIMER = $_timer