force C compiler to build 32 bit on OSX when 32 bit ghc is being used
This commit is contained in:
parent
25581b01c8
commit
927b53088f
1 changed files with 12 additions and 3 deletions
15
Makefile
15
Makefile
|
@ -3,20 +3,29 @@ mans=git-annex.1 git-annex-shell.1
|
|||
sources=Build/SysConfig.hs Utility/Touch.hs
|
||||
all=$(bins) $(mans) docs
|
||||
|
||||
CFLAGS=-Wall
|
||||
|
||||
OS:=$(shell uname | sed 's/[-_].*//')
|
||||
ifeq ($(OS),Linux)
|
||||
BASEFLAGS_OPTS+=-DWITH_INOTIFY
|
||||
BASEFLAGS_OPTS=-DWITH_INOTIFY
|
||||
clibs=Utility/libdiskfree.o
|
||||
else
|
||||
BASEFLAGS_OPTS+=-DWITH_KQUEUE
|
||||
# BSD system
|
||||
BASEFLAGS_OPTS=-DWITH_KQUEUE
|
||||
clibs=Utility/libdiskfree.o Utility/libkqueue.o
|
||||
ifeq ($(OS),Darwin)
|
||||
# Ensure OSX compiler builds for 32 bit when using 32 bit ghc
|
||||
GHCARCH:=$(shell ghc -e 'print System.Info.arch')
|
||||
ifeq ($(GHCARCH),i386)
|
||||
CFLAGS=-Wall -m32
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
PREFIX=/usr
|
||||
IGNORE=-ignore-package monads-fd -ignore-package monads-tf
|
||||
BASEFLAGS=-Wall $(IGNORE) -outputdir tmp -IUtility -DWITH_ASSISTANT -DWITH_S3 $(BASEFLAGS_OPTS)
|
||||
GHCFLAGS=-O2 $(BASEFLAGS)
|
||||
CFLAGS=-Wall
|
||||
|
||||
ifdef PROFILE
|
||||
GHCFLAGS=-prof -auto-all -rtsopts -caf-all -fforce-recomp $(BASEFLAGS)
|
||||
|
|
Loading…
Reference in a new issue