diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 15 |
1 files changed, 12 insertions, 3 deletions
@@ -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) |