Mercurial > fife-parpg
comparison build/darwin-config-dist.py @ 268:281159a9672c
* Mac OS X build script fixes; wiki article is planned to be updated according to it
author | mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222 |
---|---|
date | Sun, 14 Jun 2009 14:45:25 +0000 |
parents | ea04dfe54aae |
children | bbabe4942150 |
comparison
equal
deleted
inserted
replaced
267:8eec4c078223 | 268:281159a9672c |
---|---|
1 import os, sys | 1 import os, sys |
2 | 2 |
3 def initEnvironment(env): | 3 def initEnvironment(env): |
4 env.Append(ENV={'PATH' : os.environ['PATH']}) | 4 env.Append(ENV={'PATH' : os.environ['PATH']}) |
5 env.Prepend(CXXFLAGS = '-DUSE_COCOA') | 5 env.Prepend(CXXFLAGS = '-DUSE_COCOA') |
6 return env | 6 return env |
7 | 7 |
8 def addExtras(context): | 8 def addExtras(context): |
9 context.env.Append(LIBPATH = ['/System/Library']) | 9 context.env.Append(LIBPATH = ['/System/Library','/opt/local/lib']) |
10 context.env.Append(SHLINKFLAGS='-framework OpenAL') | 10 context.env.Append(SHLINKFLAGS='-F/opt/local/Library/Frameworks') |
11 context.env.Append(SHLINKFLAGS='-framework Cocoa') | 11 context.env.Append(SHLINKFLAGS='-framework OpenAL') |
12 context.env.Append(SHLINKFLAGS='-framework CoreFoundation') | 12 context.env.Append(SHLINKFLAGS='-framework Cocoa') |
13 context.env.Append(SHLINKFLAGS='-framework OpenGL') | 13 context.env.Append(SHLINKFLAGS='-framework CoreFoundation') |
14 context.env.Append(SHLINKFLAGS='-framework SDL') | 14 context.env.Append(SHLINKFLAGS='-framework OpenGL') |
15 context.env.Append(SHLINKFLAGS='-framework SDL_image') | 15 context.env.Append(SHLINKFLAGS='-framework SDL') |
16 context.env.Append(SHLINKFLAGS='-framework SDL_ttf') | 16 context.env.Append(SHLINKFLAGS='-framework SDL_image') |
17 context.env.Append(SHLINKFLAGS='-framework Python') | 17 context.env.Append(SHLINKFLAGS='-framework SDL_ttf') |
18 context.env.Append(SHLINKFLAGS='-lpng') | 18 context.env.Append(SHLINKFLAGS='-framework Python') |
19 context.env['SHLIBSUFFIX']='.so' | 19 context.env.Append(SHLINKFLAGS='-lpng') |
20 context.env['SHLIBSUFFIX']='.so' | |
20 | 21 |
21 include_dirs = ['/opt/local/include', '/usr/local/include', '/usr/X11/include', '/Library/Frameworks/SDL.framework/Headers', | 22 include_dirs = ['/opt/local/include', |
22 '/Library/Frameworks/SDL_image.framework/Headers', '/Library/Frameworks/SDL_ttf.framework/Headers', | 23 '/usr/local/include', |
23 '/opt/local/include/boost', '/System/Library/Frameworks/OpenAL.framework/Headers', '/opt/local/include/vorbis/', | 24 '/usr/X11/include', |
24 '/usr/include/python%s'%sys.version[:3], '/opt/local/include/guichan', 'ext/install/include', '../ext/install/include', '../ext/install/include/guichan'] | 25 '/Library/Frameworks/SDL.framework/Headers', |
25 context.env.Append(CPPPATH = include_dirs) | 26 '/opt/local/Library/Frameworks/SDL.framework/Headers', |
27 '/Library/Frameworks/SDL_image.framework/Headers', | |
28 '/opt/local/Library/Frameworks/SDL_image.framework/Headers' | |
29 '/Library/Frameworks/SDL_ttf.framework/Headers', | |
30 '/opt/local/Library/Frameworks/SDL_ttf.framework/Headers', | |
31 '/opt/local/include/boost', | |
32 '/System/Library/Frameworks/OpenAL.framework/Headers', | |
33 '/opt/local/include/vorbis/', | |
34 '/usr/include/python%s'%sys.version[:3], | |
35 '/opt/local/include/guichan', | |
36 'ext/install/include', | |
37 '../ext/install/include', | |
38 '../ext/install/include/guichan'] | |
26 | 39 |
27 lib_dirs = ['/opt/local/lib','/usr/local/lib','/usr/X11/lib','ext/install/lib','../ext/install/lib'] | 40 context.env.Append(CPPPATH = include_dirs) |
28 context.env.Append(LIBPATH = lib_dirs) | |
29 | 41 |
30 context.env.Append(CPPFLAGS='-D_THREAD_SAFE') | 42 lib_dirs = ['/opt/local/lib','/usr/local/lib','/usr/X11/lib','ext/install/lib','../ext/install/lib'] |
43 context.env.Append(LIBPATH = lib_dirs) | |
31 | 44 |
32 context.CheckHeader('SDL_image.h') | 45 context.env.Append(CPPFLAGS='-D_THREAD_SAFE -F/opt/local/Library/Frameworks') |
33 context.CheckHeader('SDL_ttf.h') | |
34 context.checkSimpleLib(['vorbisfile'], 'vorbisfile.h') | |
35 context.checkSimpleLib(['guichan']) | |
36 context.checkSimpleLib(['guichan_sdl']) | |
37 context.checkSimpleLib(['z'], 'zlib.h') | |
38 context.checkSimpleLib(['boost_filesystem'], ['boost/filesystem/convenience.hpp'], 'cxx') | |
39 context.checkSimpleLib(['boost_regex'], ['boost/regex.hpp'], 'cxx') | |
40 | 46 |
41 if context.env['opengl']: | 47 context.CheckHeader('SDL/SDL_image.h') |
42 context.checkSimpleLib(['guichan_opengl'], ['guichan/opengl.hpp'], 'cxx') | 48 context.CheckHeader('SDL/SDL_ttf.h') |
43 context.env.Append(SHLINKFLAGS='-framework OpenGL') | 49 context.checkSimpleLib(['vorbisfile'], 'vorbisfile.h') |
50 context.checkSimpleLib(['guichan']) | |
51 context.checkSimpleLib(['guichan_sdl']) | |
52 context.checkSimpleLib(['z'], 'zlib.h') | |
53 context.checkSimpleLib(['boost_filesystem-mt']) | |
54 context.checkSimpleLib(['boost_system-mt']) | |
55 context.checkSimpleLib(['boost_regex-mt']) | |
56 | |
57 if context.env['opengl']: | |
58 context.checkSimpleLib(['guichan_opengl'], ['guichan/opengl.hpp'], 'cxx') | |
59 context.env.Append(SHLINKFLAGS='-framework OpenGL') |