[FFmpeg-cvslog] build: Consistently handle conditional compilation for all optimization OBJS.

Diego Biurrun git at videolan.org
Fri Apr 13 00:55:56 CEST 2012


ffmpeg | branch: master | Diego Biurrun <diego at biurrun.de> | Tue Mar 27 23:10:02 2012 +0200| [7bb3a302feeff37d14a2abb7c7316efa43f8dd5c] | committer: Diego Biurrun

build: Consistently handle conditional compilation for all optimization OBJS.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=7bb3a302feeff37d14a2abb7c7316efa43f8dd5c
---

 Makefile                  |    3 ++-
 arch.mak                  |   13 +++++++++++++
 common.mak                |    2 +-
 libavcodec/arm/Makefile   |   13 +++++--------
 libavcodec/mips/Makefile  |    6 +++---
 libavcodec/ppc/Makefile   |    3 +--
 libavcodec/sparc/Makefile |    4 ++--
 libavcodec/x86/Makefile   |    5 ++---
 libswscale/Makefile       |    8 ++++----
 9 files changed, 33 insertions(+), 24 deletions(-)

diff --git a/Makefile b/Makefile
index b5f8ad8..2d9e435 100644
--- a/Makefile
+++ b/Makefile
@@ -100,7 +100,8 @@ config.h: .config
 
 SUBDIR_VARS := CLEANFILES EXAMPLES FFLIBS HOSTPROGS TESTPROGS TOOLS      \
                ARCH_HEADERS BUILT_HEADERS SKIPHEADERS                    \
-               ALTIVEC-OBJS ARMV6-OBJS MMX-OBJS NEON-OBJS YASM-OBJS      \
+               ALTIVEC-OBJS ARMV5TE-OBJS ARMV6-OBJS ARMVFP-OBJS MMI-OBJS \
+               MMX-OBJS NEON-OBJS VIS-OBJS YASM-OBJS                     \
                OBJS TESTOBJS
 
 define RESET
diff --git a/arch.mak b/arch.mak
new file mode 100644
index 0000000..33018f3
--- /dev/null
+++ b/arch.mak
@@ -0,0 +1,13 @@
+OBJS-$(HAVE_ARMV5TE) += $(ARMV5TE-OBJS) $(ARMV5TE-OBJS-yes)
+OBJS-$(HAVE_ARMV6)   += $(ARMV6-OBJS)   $(ARMV6-OBJS-yes)
+OBJS-$(HAVE_ARMVFP)  += $(ARMVFP-OBJS)  $(ARMVFP-OBJS-yes)
+OBJS-$(HAVE_NEON)    += $(NEON-OBJS)    $(NEON-OBJS-yes)
+
+OBJS-$(HAVE_MMI)     += $(MMI-OBJS)     $(MMI-OBJS-yes)
+
+OBJS-$(HAVE_ALTIVEC) += $(ALTIVEC-OBJS) $(ALTIVEC-OBJS-yes)
+
+OBJS-$(HAVE_VIS)     += $(VIS-OBJS)     $(VIS-OBJS-yes)
+
+OBJS-$(HAVE_MMX)     += $(MMX-OBJS)     $(MMX-OBJS-yes)
+OBJS-$(HAVE_YASM)    += $(YASM-OBJS)    $(YASM-OBJS-yes)
diff --git a/common.mak b/common.mak
index d781ced..7f2c367 100644
--- a/common.mak
+++ b/common.mak
@@ -5,7 +5,7 @@
 # first so "all" becomes default target
 all: all-yes
 
-OBJS-$(HAVE_MMX) +=  $(MMX-OBJS-yes)
+include $(SRC_PATH)/arch.mak
 
 OBJS      += $(OBJS-yes)
 FFLIBS    := $(FFLIBS-yes) $(FFLIBS)
diff --git a/libavcodec/arm/Makefile b/libavcodec/arm/Makefile
index 2f5cea7..e6d9218 100644
--- a/libavcodec/arm/Makefile
+++ b/libavcodec/arm/Makefile
@@ -27,21 +27,19 @@ OBJS                                   += arm/dsputil_init_arm.o        \
                                           arm/mpegvideo_arm.o           \
                                           arm/simple_idct_arm.o         \
 
-OBJS-$(HAVE_ARMV5TE)                   += arm/dsputil_init_armv5te.o    \
+ARMV5TE-OBJS                           += arm/dsputil_init_armv5te.o    \
                                           arm/mpegvideo_armv5te.o       \
                                           arm/mpegvideo_armv5te_s.o     \
                                           arm/simple_idct_armv5te.o     \
 
-OBJS-$(HAVE_ARMV6)                     += arm/dsputil_init_armv6.o      \
+ARMV6-OBJS                             += arm/dsputil_init_armv6.o      \
                                           arm/dsputil_armv6.o           \
                                           arm/simple_idct_armv6.o       \
-                                          $(ARMV6-OBJS-yes)
 
-VFP-OBJS-$(HAVE_ARMV6)                 += arm/fmtconvert_vfp.o          \
+ARMVFP-OBJS-$(HAVE_ARMV6)              += arm/fmtconvert_vfp.o
 
-OBJS-$(HAVE_ARMVFP)                    += arm/dsputil_vfp.o             \
+ARMVFP-OBJS                            += arm/dsputil_vfp.o             \
                                           arm/dsputil_init_vfp.o        \
-                                          $(VFP-OBJS-yes)
 
 NEON-OBJS-$(CONFIG_FFT)                += arm/fft_neon.o                \
                                           arm/fft_fixed_neon.o          \
@@ -83,10 +81,9 @@ NEON-OBJS-$(CONFIG_VP6_DECODER)        += arm/vp56dsp_neon.o            \
 
 NEON-OBJS-$(CONFIG_VP8_DECODER)        += arm/vp8dsp_neon.o
 
-OBJS-$(HAVE_NEON)                      += arm/dsputil_init_neon.o       \
+NEON-OBJS                              += arm/dsputil_init_neon.o       \
                                           arm/dsputil_neon.o            \
                                           arm/fmtconvert_neon.o         \
                                           arm/int_neon.o                \
                                           arm/mpegvideo_neon.o          \
                                           arm/simple_idct_neon.o        \
-                                          $(NEON-OBJS-yes)
diff --git a/libavcodec/mips/Makefile b/libavcodec/mips/Makefile
index 0066176..37899b1 100644
--- a/libavcodec/mips/Makefile
+++ b/libavcodec/mips/Makefile
@@ -1,3 +1,3 @@
-OBJS-$(HAVE_MMI) += mips/dsputil_mmi.o                                  \
-                    mips/idct_mmi.o                                     \
-                    mips/mpegvideo_mmi.o                                \
+MMI-OBJS += mips/dsputil_mmi.o                                          \
+            mips/idct_mmi.o                                             \
+            mips/mpegvideo_mmi.o                                        \
diff --git a/libavcodec/ppc/Makefile b/libavcodec/ppc/Makefile
index d15fe2a..31f4fb8 100644
--- a/libavcodec/ppc/Makefile
+++ b/libavcodec/ppc/Makefile
@@ -11,7 +11,7 @@ ALTIVEC-OBJS-$(CONFIG_VP5_DECODER)     += ppc/vp3dsp_altivec.o
 ALTIVEC-OBJS-$(CONFIG_VP6_DECODER)     += ppc/vp3dsp_altivec.o
 ALTIVEC-OBJS-$(CONFIG_VP8_DECODER)     += ppc/vp8dsp_altivec.o
 
-OBJS-$(HAVE_ALTIVEC)                   += ppc/dsputil_altivec.o         \
+ALTIVEC-OBJS                           += ppc/dsputil_altivec.o         \
                                           ppc/fdct_altivec.o            \
                                           ppc/float_altivec.o           \
                                           ppc/fmtconvert_altivec.o      \
@@ -19,4 +19,3 @@ OBJS-$(HAVE_ALTIVEC)                   += ppc/dsputil_altivec.o         \
                                           ppc/idct_altivec.o            \
                                           ppc/int_altivec.o             \
                                           ppc/mpegvideo_altivec.o       \
-                                          $(ALTIVEC-OBJS-yes)
diff --git a/libavcodec/sparc/Makefile b/libavcodec/sparc/Makefile
index d42bed0..1b6ac81 100644
--- a/libavcodec/sparc/Makefile
+++ b/libavcodec/sparc/Makefile
@@ -1,2 +1,2 @@
-OBJS-$(HAVE_VIS) += sparc/dsputil_vis.o                                 \
-                    sparc/simple_idct_vis.o                             \
+VIS-OBJS += sparc/dsputil_vis.o                                         \
+            sparc/simple_idct_vis.o                                     \
diff --git a/libavcodec/x86/Makefile b/libavcodec/x86/Makefile
index 89d6bae..6602cce 100644
--- a/libavcodec/x86/Makefile
+++ b/libavcodec/x86/Makefile
@@ -2,7 +2,7 @@ OBJS-$(CONFIG_MLP_DECODER)             += x86/mlpdsp.o
 OBJS-$(CONFIG_TRUEHD_DECODER)          += x86/mlpdsp.o
 OBJS-$(CONFIG_XMM_CLOBBER_TEST)        += x86/w64xmmtest.o
 
-OBJS-$(HAVE_MMX)                       += x86/dsputil_mmx.o             \
+MMX-OBJS                               += x86/dsputil_mmx.o             \
                                           x86/fdct_mmx.o                \
                                           x86/fmtconvert_mmx.o          \
                                           x86/idct_mmx_xvid.o           \
@@ -66,7 +66,6 @@ YASM-OBJS-$(CONFIG_VP6_DECODER)        += x86/vp3dsp.o                  \
                                           x86/vp56dsp.o
 YASM-OBJS-$(CONFIG_VP8_DECODER)        += x86/vp8dsp.o
 
-MMX-OBJS-$(HAVE_YASM)                  += x86/dsputil_yasm.o            \
+YASM-OBJS                              += x86/dsputil_yasm.o            \
                                           x86/deinterlace.o             \
                                           x86/fmtconvert.o              \
-                                          $(YASM-OBJS-yes)
diff --git a/libswscale/Makefile b/libswscale/Makefile
index 7301646..94c6efb 100644
--- a/libswscale/Makefile
+++ b/libswscale/Makefile
@@ -15,14 +15,14 @@ OBJS = input.o                                          \
 OBJS-$(ARCH_BFIN)          +=  bfin/internal_bfin.o     \
                                bfin/swscale_bfin.o      \
                                bfin/yuv2rgb_bfin.o
-OBJS-$(HAVE_ALTIVEC)       +=  ppc/swscale_altivec.o    \
+ALTIVEC-OBJS               +=  ppc/swscale_altivec.o    \
                                ppc/yuv2rgb_altivec.o    \
                                ppc/yuv2yuv_altivec.o
-OBJS-$(HAVE_MMX)           +=  x86/rgb2rgb.o            \
+MMX-OBJS                   +=  x86/rgb2rgb.o            \
                                x86/swscale_mmx.o        \
                                x86/yuv2rgb_mmx.o
-OBJS-$(HAVE_VIS)           +=  sparc/yuv2rgb_vis.o
-MMX-OBJS-$(HAVE_YASM)      +=  x86/input.o              \
+VIS-OBJS                   +=  sparc/yuv2rgb_vis.o
+YASM-OBJS                  +=  x86/input.o              \
                                x86/output.o             \
                                x86/scale.o
 



More information about the ffmpeg-cvslog mailing list