diff options
author | Steven Noonan <steven@uplinklabs.net> | 2009-10-11 02:54:31 -0700 |
---|---|---|
committer | Steven Noonan <steven@uplinklabs.net> | 2009-10-11 02:59:35 -0700 |
commit | 6cbf8553105b78a769cdaf87253c58eb11311695 (patch) | |
tree | c04bea332cedd253ec767382fdcc7984fbe85a4e /crawl-ref/source/rltiles/makefile.unix | |
parent | c3d83c65b910f87cf901652c72ef5ac81d581924 (diff) | |
download | crawl-ref-6cbf8553105b78a769cdaf87253c58eb11311695.tar.gz crawl-ref-6cbf8553105b78a769cdaf87253c58eb11311695.zip |
makefiles: on Mac OS X, use the same frameworks the Xcode project uses
Before, I had it use the MacPorts libs, but this isn't the best way to do
it, even with a development build. Ideally, for debugging purposes, we
really want to be using the same libraries we'd use for a release build.
This also adds some command-line options to set the type of build:
ARCHS: This can be set to something like "-arch i386 -arch ppc" for
a 32-bit universal build.
SDK_VER: The Mac OS X SDK version (i.e. 10.4, 10.5, etc)
GCC_VER: The GCC version to compile with. For 10.4, you must use
version 4.0, but for 10.5 and above, you may use 4.2.
Signed-off-by: Steven Noonan <steven@uplinklabs.net>
Diffstat (limited to 'crawl-ref/source/rltiles/makefile.unix')
-rw-r--r-- | crawl-ref/source/rltiles/makefile.unix | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/crawl-ref/source/rltiles/makefile.unix b/crawl-ref/source/rltiles/makefile.unix index 095e6c8f30..0d35c801ff 100644 --- a/crawl-ref/source/rltiles/makefile.unix +++ b/crawl-ref/source/rltiles/makefile.unix @@ -1,4 +1,19 @@ +ifeq ($(shell uname -s),Darwin) +SDL_CFLAGS := -I/Library/Frameworks/SDL.framework/Headers -I/Library/Frameworks/SDL_image.framework/Headers +SDL_LDFLAGS := -framework SDL -framework SDL_image + +PNG_CFLAGS := -I/Library/Frameworks/libpng.framework/Headers +PNG_LDFLAGS := -framework libpng + +CFLAGS := -F/Library/Frameworks $(SDL_CFLAGS) $(PNG_CFLAGS) +LDFLAGS := -F/Library/Frameworks $(SDL_LDFLAGS) $(PNG_LDFLAGS) + +# FIXME: We need 32-bit until SDL 1.2.14 comes out +CXX ?= g++ -m32 + +else + SDL_CFLAGS := $(shell sdl-config --cflags) SDL_LDFLAGS := $(shell sdl-config --libs) @@ -10,6 +25,8 @@ LDFLAGS := $(SDL_LDFLAGS) $(PNGLIB) -lSDL_image -lpng CXX ?= g++ +endif + DELETE = rm -f TOOLDIR := tool |