build: Consistently handle conditional compilation for all optimization OBJS.

This commit is contained in:
Diego Biurrun 2012-03-27 23:10:02 +02:00
parent 2ef15b46e4
commit 7bb3a302fe
9 changed files with 33 additions and 24 deletions

View File

@ -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

13
arch.mak Normal file
View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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 \

View File

@ -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)

View File

@ -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 \

View File

@ -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)

View File

@ -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