Commit 096c4eb7 authored by Eric Petit's avatar Eric Petit
Browse files

Quick compile fix for OS X / Intel

 Optimizations are disabled at the moment. In order to get them to
 work, we'd need either nasm to be able to output Mach-O object files,
 or we should convert the assembly code to something OS X can handle,
 like gas.


git-svn-id: svn://svn.videolan.org/x264/trunk@400 df754926-b1dd-0310-bc7b-ec298dee348c
parent 743ad597
......@@ -15,6 +15,9 @@ ifeq ($(VIS),yes)
SRCS += common/visualize.c common/display-x11.c
endif
# No optims on OS X / Intel yet because of nasm limitations
ifneq ($(SYS),MACOSX)
# MMX/SSE optims
ifeq ($(ARCH),X86)
SRCS += common/i386/mc-c.c common/i386/dct-c.c common/i386/predict.c
......@@ -38,6 +41,8 @@ OBJASM = $(ASMSRC:%.asm=%.o)
ASFLAGS += -Icommon/amd64
endif
endif # SYS_MACOSX
# AltiVec optims
ifeq ($(ARCH),PPC)
SRCS += common/ppc/mc.c common/ppc/pixel.c common/ppc/dct.c
......
......@@ -33,6 +33,12 @@
#include "x264.h"
#include "cpu.h"
/* XXX
No nasm on OS X / Intel yet */
#if defined(ARCH_X86) && defined(SYS_MACOSX)
#undef ARCH_X86
#endif
#if defined(ARCH_X86) || defined(ARCH_X86_64)
extern int x264_cpu_cpuid_test( void );
extern uint32_t x264_cpu_cpuid( uint32_t op, uint32_t *eax, uint32_t *ebx, uint32_t *ecx, uint32_t *edx );
......
......@@ -116,7 +116,11 @@ UNAMEM="`uname -m`"
case "$UNAMEM" in
i386|i486|i586|i686|BePC)
ARCH="X86"
CFLAGS="$CFLAGS -DHAVE_MMXEXT -DHAVE_SSE2"
if [ $SYS != MACOSX ]
then
# No optims on OS X / Intel yet because of nasm limitations
CFLAGS="$CFLAGS -DHAVE_MMXEXT -DHAVE_SSE2"
fi
;;
x86_64)
ARCH="X86_64"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment