Browse code

Place flags for dependency generation in DEPFLAGS

This avoids duplicating the full DEPEND_CMD line only to change some
flags.

Originally committed as revision 19419 to svn://svn.ffmpeg.org/ffmpeg/trunk

Måns Rullgård authored on 2009/07/13 07:28:24
Showing 1 changed files
... ...
@@ -1277,7 +1277,8 @@ target_path='.'
1277 1277
 
1278 1278
 # gcc stupidly only outputs the basename of targets with -MM, but we need the
1279 1279
 # full relative path for objects in subdirectories for non-recursive Make.
1280
-DEPEND_CMD='$(DEPCC) $(CPPFLAGS) $(CFLAGS) -MM $< | sed -e "/^\#.*/d" -e "s,^[[:space:]]*$(*F)\\.o,$(@D)/$(*F).o,"'
1280
+DEPEND_CMD='$(DEPCC) $(DEPFLAGS) $< | sed -e "/^\#.*/d" -e "s,^[[:space:]]*$(*F)\\.o,$(@D)/$(*F).o,"'
1281
+DEPFLAGS='$(CPPFLAGS) $(CFLAGS) -MM'
1281 1282
 
1282 1283
 # find source path
1283 1284
 source_path="$(dirname "$0")"
... ...
@@ -1474,7 +1475,7 @@ elif $cc -v 2>&1 | grep -q xlc; then
1474 1474
     cc_type=xlc
1475 1475
 elif $cc -V 2>/dev/null | grep -q Compaq; then
1476 1476
     cc_type=ccc
1477
-    DEPEND_CMD='$(CC) $(CPPFLAGS) -M $< | sed -e "/^\#.*/d" -e "s,^[[:space:]]*$(*F)\\.o,$(@D)/$(*F).o,"'
1477
+    DEPFLAGS='$(CPPFLAGS) $(CFLAGS) -M'
1478 1478
     debuglevel=3
1479 1479
     add_ldflags -Wl,-z,now # calls to libots crash without this
1480 1480
 elif $cc --vsn 2>/dev/null | grep -q RVCT; then
... ...
@@ -2525,6 +2526,7 @@ echo "SLIBSUF=$SLIBSUF" >> config.mak
2525 2525
 echo "EXESUF=$EXESUF" >> config.mak
2526 2526
 echo "EXTRA_VERSION=$extra_version" >> config.mak
2527 2527
 echo "DEPEND_CMD=$DEPEND_CMD" >> config.mak
2528
+echo "DEPFLAGS=$DEPFLAGS" >> config.mak
2528 2529
 echo "HOSTCC=$host_cc" >> config.mak
2529 2530
 echo "HOSTCFLAGS=$host_cflags" >> config.mak
2530 2531
 echo "HOSTEXESUF=$HOSTEXESUF" >> config.mak