]> git.sesse.net Git - x264/blobdiff - Jamfile
Altivec functions for MC using the cached halfpel planes.
[x264] / Jamfile
diff --git a/Jamfile b/Jamfile
index 7084c5249d9ff967c0542a36f425f1f8f1f7a42e..c17c2e939f09b02bbcd07cbe85406cec001b8b7e 100644 (file)
--- a/Jamfile
+++ b/Jamfile
@@ -11,49 +11,69 @@ AS = nasm ;
 CCFLAGS = -g -Wall -W ;
 
 # Globals defines
-DEFINES = DEBUG __X264__ ;
+DEFINES = DEBUG __X264__ ARCH_$(OSPLAT) SYS_$(OS) ;
 
 # Optims
 OPTIM = -O3 -funroll-loops ;
 
 # Headers rep
-HDRS = . core core/i366 decoder encoder ;
+HDRS = . common common/i386 decoder encoder ;
 
-SOURCES_C = core/mc.c core/predict.c core/pixel.c core/macroblock.c
-            core/frame.c core/dct.c core/cpu.c core/cabac.c
-            core/common.c core/mdate.c core/csp.c
+SOURCES_C = common/mc.c common/predict.c common/pixel.c common/macroblock.c
+            common/frame.c common/dct.c common/cpu.c common/cabac.c
+            common/common.c common/mdate.c common/csp.c
             encoder/analyse.c encoder/me.c encoder/ratecontrol.c
             encoder/set.c encoder/macroblock.c encoder/cabac.c encoder/cavlc.c
-            encoder/encoder.c ;
+            encoder/encoder.c encoder/eval.c ;
 
-SOURCES_X86 = core/i386/cpu.asm ;
-SOURCES_MMX = core/i386/mc-c.c core/i386/dct-c.c core/i386/predict.c core/i386/dct.asm core/i386/pixel.asm core/i386/mc.asm ;
+SOURCES_X86 = common/i386/cpu-a.asm ;
+SOURCES_MMX = common/i386/mc-c.c common/i386/dct-c.c common/i386/predict.c common/i386/dct-a.asm common/i386/pixel-a.asm common/i386/mc-a.asm ;
 
-SOURCES_ALTIVEC = core/ppc/mc.c core/ppc/pixel.c ;
+SOURCES_ALTIVEC = common/ppc/mc.c common/ppc/pixel.c ;
 
 # libx264
 SOURCES_X264 = $(SOURCES_C) ;
-if $(OS) = LINUX
+if $(OSPLAT) = X86
 {
-    DEFINES      += ARCH_X86 HAVE_MMXEXT HAVE_SSE2 HAVE_MALLOC_H ;
+    DEFINES      += HAVE_MMXEXT HAVE_SSE2 ;
     SOURCES_X264 += $(SOURCES_MMX) ;
     SOURCES_X264 += $(SOURCES_X86) ;
-    ASFLAGS = -f elf ;
+    ASFLAGS       = -f elf ;
 
-    # Don't ask why
+    if $(OS) != BEOS
+    {
+        DEFINES += HAVE_STDINT_H ;
+    }
+    if $(OS) != FREEBSD
+    {
+        DEFINES += HAVE_MALLOC_H ;
+    }
+
+    # Don't ask
     NOARUPDATE = false ;
 }
-if $(OS) = MACOSX
+if $(OSPLAT) = PPC
 {
-    DEFINES      += HAVE_ALTIVEC ;
+    DEFINES      += HAVE_STDINT_H ;
     SOURCES_X264 += $(SOURCES_ALTIVEC) ;
-    CCFLAGS      += -faltivec ;
-#    OPTIM        += -falign-loops=16 ;
+    OPTIM        += -falign-loops=16 ;
+
+    if $(OS) = MACOSX
+    {
+        CCFLAGS += -faltivec ;
+    }
+    if $(OS) = LINUX
+    {
+        CCFLAGS += -maltivec -mabi=altivec ;
+    }
 }
 Library libx264 : $(SOURCES_X264) ;
 
 # x264
-LINKLIBS += -lm ;
+if $(OS) != BEOS
+{
+    LINKLIBS += -lm ;
+}
 LinkLibraries x264 : libx264.a ;
 Main x264 : x264.c ;