From b0e6125616c5f12b8705a8d2fbef86fb9da03d66 Mon Sep 17 00:00:00 2001 From: Philippe Houdoin Date: Thu, 16 Apr 2009 22:56:50 +0000 Subject: [PATCH] When $(TARGET_ARCH) is obvious, stop checking it, start assume it :-) git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30211 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- .../plugins/avcodec/libavcodec/ppc/Jamfile | 29 ++++++------------- .../plugins/avcodec/libavcodec/x86/Jamfile | 25 ++++------------ 2 files changed, 14 insertions(+), 40 deletions(-) diff --git a/src/add-ons/media/plugins/avcodec/libavcodec/ppc/Jamfile b/src/add-ons/media/plugins/avcodec/libavcodec/ppc/Jamfile index 84e01041c3..d3dede6b10 100644 --- a/src/add-ons/media/plugins/avcodec/libavcodec/ppc/Jamfile +++ b/src/add-ons/media/plugins/avcodec/libavcodec/ppc/Jamfile @@ -15,33 +15,22 @@ if $(HAIKU_GCC_VERSION[1]) >= 3 { SubDirCcFlags -fomit-frame-pointer -DPIC ; } +# Enable altivec support +SubDirCcFlags -faltivec -maltivec -mabi=altivec ; + local defines ; defines = HAVE_AV_CONFIG_H=1 ; - -if $(TARGET_ARCH) = x86 { - defines += ARCH_X86=1 ARCH_X86_32=1 ARCH_PPC=0 ARCH_SPARC=0 ; - defines += HAVE_AMD3DNOW=0 HAVE_AMD3DNOWEXT=0 ; - defines += HAVE_MMX=1 HAVE_MMX2=1 HAVE_SSE=0 HAVE_SSE3=1 ; - defines += HAVE_ALTIVEC=0 ; - defines += HAVE_VIS=0 ; -} else if $(TARGET_ARCH) = ppc { - defines += ARCH_X86=0 ARCH_X86_32=0 ARCH_PPC=1 ARCH_SPARC=0 ; - defines += HAVE_AMD3DNOW=0 HAVE_AMD3DNOWEXT=0 ; - defines += HAVE_MMX=0 HAVE_MMX2=0 HAVE_SSE=0 HAVE_SSE3=0 ; - defines += HAVE_ALTIVEC=1 ; - defines += HAVE_VIS=0 ; -} else if $(TARGET_ARCH) = sparc { - defines += ARCH_X86=0 ARCH_X86_32=0 ARCH_PPC=0 ARCH_SPARC=1 ; - defines += HAVE_AMD3DNOW=0 HAVE_AMD3DNOWEXT=0 ; - defines += HAVE_MMX=0 HAVE_MMX2=0 HAVE_SSE=0 HAVE_SSE3=0 ; - defines += HAVE_ALTIVEC=0 ; - defines += HAVE_VIS=1 ; -} +defines += ARCH_X86=0 ARCH_X86_32=0 ARCH_PPC=1 ARCH_SPARC=0 ; +defines += HAVE_AMD3DNOW=0 HAVE_AMD3DNOWEXT=0 ; +defines += HAVE_MMX=0 HAVE_MMX2=0 HAVE_SSE=0 HAVE_SSE3=0 ; +defines += HAVE_ALTIVEC=1 HAVE_ALTIVEC_H=0 ; +defines += HAVE_VIS=0 ; defines = [ FDefines $(defines) ] ; SubDirCcFlags $(defines) ; SubDirC++Flags $(defines) ; + StaticLibrary libavcodec_ppc.a : check_altivec.c float_altivec.c diff --git a/src/add-ons/media/plugins/avcodec/libavcodec/x86/Jamfile b/src/add-ons/media/plugins/avcodec/libavcodec/x86/Jamfile index 35a31e08f7..7249eb0276 100644 --- a/src/add-ons/media/plugins/avcodec/libavcodec/x86/Jamfile +++ b/src/add-ons/media/plugins/avcodec/libavcodec/x86/Jamfile @@ -17,26 +17,11 @@ if $(HAIKU_GCC_VERSION[1]) >= 3 { local defines ; defines = HAVE_AV_CONFIG_H=1 ; - -if $(TARGET_ARCH) = x86 { - defines += ARCH_X86=1 ARCH_X86_32=1 ARCH_PPC=0 ARCH_SPARC=0 ; - defines += HAVE_AMD3DNOW=0 HAVE_AMD3DNOWEXT=0 ; - defines += HAVE_MMX=1 HAVE_MMX2=1 HAVE_SSE=0 HAVE_SSE3=1 ; - defines += HAVE_ALTIVEC=0 ; - defines += HAVE_VIS=0 ; -} else if $(TARGET_ARCH) = ppc { - defines += ARCH_X86=0 ARCH_X86_32=0 ARCH_PPC=1 ARCH_SPARC=0 ; - defines += HAVE_AMD3DNOW=0 HAVE_AMD3DNOWEXT=0 ; - defines += HAVE_MMX=0 HAVE_MMX2=0 HAVE_SSE=0 HAVE_SSE3=0 ; - defines += HAVE_ALTIVEC=1 ; - defines += HAVE_VIS=0 ; -} else if $(TARGET_ARCH) = sparc { - defines += ARCH_X86=0 ARCH_X86_32=0 ARCH_PPC=0 ARCH_SPARC=1 ; - defines += HAVE_AMD3DNOW=0 HAVE_AMD3DNOWEXT=0 ; - defines += HAVE_MMX=0 HAVE_MMX2=0 HAVE_SSE=0 HAVE_SSE3=0 ; - defines += HAVE_ALTIVEC=0 ; - defines += HAVE_VIS=1 ; -} +defines += ARCH_X86=1 ARCH_X86_32=1 ARCH_PPC=0 ARCH_SPARC=0 ; +defines += HAVE_AMD3DNOW=0 HAVE_AMD3DNOWEXT=0 ; +defines += HAVE_MMX=1 HAVE_MMX2=1 HAVE_SSE=0 HAVE_SSE3=1 ; +defines += HAVE_ALTIVEC=0 ; +defines += HAVE_VIS=0 ; defines = [ FDefines $(defines) ] ; SubDirCcFlags $(defines) ;