summaryrefslogtreecommitdiff
path: root/Makerules
diff options
context:
space:
mode:
authorTor Andersson <tor@ghostscript.com>2010-07-02 01:59:00 +0200
committerTor Andersson <tor@ghostscript.com>2010-07-02 01:59:00 +0200
commitf34c2ff2d42214413f1b85b1314c8dd8bb92aa41 (patch)
treeace3e6e6935e6fa9942d4ae6033888a6df61243b /Makerules
parentce7a64fc489b2e632e099896ce2207e94f591da8 (diff)
downloadmupdf-f34c2ff2d42214413f1b85b1314c8dd8bb92aa41.tar.xz
Test if we're on an x86 machine before adding x86 specific compiler flags.
Diffstat (limited to 'Makerules')
-rw-r--r--Makerules8
1 files changed, 5 insertions, 3 deletions
diff --git a/Makerules b/Makerules
index 6fa2de8f..64863d85 100644
--- a/Makerules
+++ b/Makerules
@@ -25,9 +25,11 @@ X11LIBS := -lX11 -lXext
PDFVIEW_EXE = $(X11VIEW_EXE)
ifeq "$(build)" "release"
-CFLAGS += -mmmx -ftree-vectorize -msse -msse2 -march=k8 -DARCH_X86
+ifeq "$(shell uname -m)" "i686"
+CFLAGS += -ffast-math -mmmx -msse -msse2 -march=k8 -DARCH_X86
DRAW_ARCH_SRC := archx86.c
endif
+endif
endif
@@ -49,9 +51,9 @@ endif
ifeq "$(build)" "release"
ifeq "$(arch)" "amd64"
-CFLAGS += -DARCH_X86_64
+CFLAGS += -ffast-math -mmmx -msse -msse2 -DARCH_X86_64
else
-CFLAGS += -DARCH_X86
+CFLAGS += -ffast-math -mmmx -msse -msse2 -DARCH_X86
endif
DRAW_ARCH_SRC := archx86.c
endif