summaryrefslogtreecommitdiff
path: root/Makerules
diff options
context:
space:
mode:
authorTor Andersson <tor@ghostscript.com>2010-06-29 23:35:28 +0200
committerTor Andersson <tor@ghostscript.com>2010-06-29 23:35:28 +0200
commit9b36c63c9c25c7f6c7c99ff30385a29bc51703c5 (patch)
treea880d34515fd9627ece2466a6f8e9e6760176a5b /Makerules
parent53412f194d075056a2d513ce37d77f966cd377dd (diff)
downloadmupdf-9b36c63c9c25c7f6c7c99ff30385a29bc51703c5.tar.xz
Allow both 32 and 64-bit builds on Mac OS X by passing arch
Diffstat (limited to 'Makerules')
-rw-r--r--Makerules12
1 files changed, 12 insertions, 0 deletions
diff --git a/Makerules b/Makerules
index b6ddb126..6fa2de8f 100644
--- a/Makerules
+++ b/Makerules
@@ -39,8 +39,20 @@ LDFLAGS += -L/usr/X11R6/lib
X11LIBS := -lX11 -lXext
PDFVIEW_EXE = $(X11VIEW_EXE)
+ifeq "$(arch)" "amd64"
+CFLAGS += -m64
+LDFLAGS += -m64
+else
+CFLAGS += -m32
+LDFLAGS += -m32
+endif
+
ifeq "$(build)" "release"
+ifeq "$(arch)" "amd64"
CFLAGS += -DARCH_X86_64
+else
+CFLAGS += -DARCH_X86
+endif
DRAW_ARCH_SRC := archx86.c
endif