changeset 27404:778fac8c186f

Add separate variables for CFLAGS that are specific to internal libraries and only add them to CFLAGS when compiling objects from those libraries.
author diego
date Thu, 07 Aug 2008 21:46:06 +0000
parents e44346d95663
children 7bb23987c5f0
files Makefile configure
diffstat 2 files changed, 12 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/Makefile	Thu Aug 07 21:44:26 2008 +0000
+++ b/Makefile	Thu Aug 07 21:46:06 2008 +0000
@@ -783,8 +783,8 @@
 $(DEPS): help_mp.h
 
 dvdread/%.o dvdread/%.d: CFLAGS += -D__USE_UNIX98 -D_GNU_SOURCE -DHAVE_CONFIG_H $(CFLAGS_LIBDVDCSS_DVDREAD)
-libdvdcss/%.o libdvdcss/%.d: CFLAGS += -D__USE_UNIX98 -D_GNU_SOURCE -DVERSION=\"1.2.9\"
-libfaad2/%.o libfaad2/%.d: CFLAGS += -Ilibfaad2 -D_GNU_SOURCE -DHAVE_CONFIG_H
+libdvdcss/%.o libdvdcss/%.d: CFLAGS += -D__USE_UNIX98 -D_GNU_SOURCE -DVERSION=\"1.2.9\" $(CFLAGS_LIBDVDCSS)
+libfaad2/%.o libfaad2/%.d: CFLAGS += -Ilibfaad2 -D_GNU_SOURCE -DHAVE_CONFIG_H $(CFLAGS_FAAD_FIXED)
 
 loader/% loader/%: CFLAGS += -Iloader -fno-omit-frame-pointer $(CFLAGS_NO_OMIT_LEAF_FRAME_POINTER)
 #loader/%.o loader/%.d: CFLAGS += -Ddbg_printf=__vprintf -DTRACE=__vprintf -DDETAILED_OUT
@@ -792,6 +792,8 @@
 
 mp3lib/decode_i586.o: CFLAGS += -fomit-frame-pointer
 
+tremor/%.o tremor/%.d: CFLAGS += $(CFLAGS_TREMOR_LOW)
+
 vidix/%: CFLAGS += $(CFLAGS_DHAHELPER) $(CFLAGS_SVGALIB_HELPER)
 
 VIDIX_PCI_FILES = vidix/pci_dev_ids.c vidix/pci_ids.h vidix/pci_names.c \
--- a/configure	Thu Aug 07 21:44:26 2008 +0000
+++ b/configure	Thu Aug 07 21:46:06 2008 +0000
@@ -5494,11 +5494,11 @@
     _def_dvd_darwin='#define DARWIN_DVD_IOCTL'
     _ld_extra="$_ld_extra -framework IOKit"
   elif cygwin ; then
-    CFLAGS="$CFLAGS -DSYS_CYGWIN"
+    cflags_libdvdcss="-DSYS_CYGWIN"
   elif beos ; then
-    CFLAGS="$CFLAGS -DSYS_BEOS"
+    cflags_libdvdcss="-DSYS_BEOS"
   elif os2 ; then
-    CFLAGS="$CFLAGS -DSYS_OS2"
+    cflags_libdvdcss="-DSYS_OS2"
   fi
   cflags_libdvdcss_dvdread="-Ilibdvdcss -DHAVE_DVDCSS_DVDCSS_H"
   _inputmodules="libdvdcss(internal) $_inputmodules"
@@ -5925,7 +5925,7 @@
   _codecmodules="tremor(internal) $_codecmodules"
   _res_comment="internal Tremor"
   if test "$_tremor_low" = yes ; then
-    CFLAGS="$CFLAGS -D_LOW_ACCURACY_"
+    cflags_tremor_low="-D_LOW_ACCURACY_"
     _res_comment="internal low accuracy Tremor"
   fi
 elif test "$_tremor_external" = yes ; then
@@ -6181,7 +6181,7 @@
   if test "$_faad_fixed" = yes ; then
     # The FIXED_POINT implementation of FAAD2 improves performance
     # on some platforms, especially for SBR files.
-    CFLAGS="$CFLAGS -DFIXED_POINT"
+    cflags_faad_fixed="-DFIXED_POINT"
     _res_comment="internal fixed-point"
   fi
 elif test "$_faad_external" = yes ; then
@@ -7758,10 +7758,13 @@
 OPTFLAGS = $CFLAGS \$(EXTRA_INC)
 CXXFLAGS = $CXXFLAGS \$(EXTRAXX_INC)
 CFLAGS_DHAHELPER = $cflags_dhahelper
+CFLAGS_FAAD_FIXED = $cflags_faad_fixed
+CFLAGS_LIBDVDCSS = $cflags_libdvdcss
 CFLAGS_LIBDVDCSS_DVDREAD = $cflags_libdvdcss_dvdread
 CFLAGS_NO_OMIT_LEAF_FRAME_POINTER = $cflags_no_omit_leaf_frame_pointer
 CFLAGS_STACKREALIGN = $cflags_stackrealign
 CFLAGS_SVGALIB_HELPER = $cflags_svgalib_helper
+CFLAGS_TREMOR_LOW = $cflags_tremor_low
 
 EXTRALIBS = $_extra_libs
 EXTRA_LIB = $_ld_extra $_ld_static $_ld_lm