Mercurial > fife-parpg
annotate build/darwin-config-dist.py @ 346:66db8ce5dfa2
Removed some leftover print statement.
author | phoku@33b003aa-7bff-0310-803a-e67f0ece8222 |
---|---|
date | Tue, 25 Aug 2009 14:45:14 +0000 |
parents | e25cfb3fe58e |
children |
rev | line source |
---|---|
175
ea04dfe54aae
* Buildscripts have been modified to work with different python versions.
nihathrael@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
0
diff
changeset
|
1 import os, sys |
0
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
2 |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
3 def initEnvironment(env): |
268
281159a9672c
* Mac OS X build script fixes; wiki article is planned to be updated according to it
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
175
diff
changeset
|
4 env.Append(ENV={'PATH' : os.environ['PATH']}) |
281159a9672c
* Mac OS X build script fixes; wiki article is planned to be updated according to it
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
175
diff
changeset
|
5 env.Prepend(CXXFLAGS = '-DUSE_COCOA') |
281159a9672c
* Mac OS X build script fixes; wiki article is planned to be updated according to it
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
175
diff
changeset
|
6 return env |
0
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
7 |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
8 def addExtras(context): |
268
281159a9672c
* Mac OS X build script fixes; wiki article is planned to be updated according to it
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
175
diff
changeset
|
9 context.env.Append(LIBPATH = ['/System/Library','/opt/local/lib']) |
281159a9672c
* Mac OS X build script fixes; wiki article is planned to be updated according to it
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
175
diff
changeset
|
10 context.env.Append(SHLINKFLAGS='-F/opt/local/Library/Frameworks') |
281159a9672c
* Mac OS X build script fixes; wiki article is planned to be updated according to it
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
175
diff
changeset
|
11 context.env.Append(SHLINKFLAGS='-framework OpenAL') |
281159a9672c
* Mac OS X build script fixes; wiki article is planned to be updated according to it
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
175
diff
changeset
|
12 context.env.Append(SHLINKFLAGS='-framework Cocoa') |
281159a9672c
* Mac OS X build script fixes; wiki article is planned to be updated according to it
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
175
diff
changeset
|
13 context.env.Append(SHLINKFLAGS='-framework CoreFoundation') |
281159a9672c
* Mac OS X build script fixes; wiki article is planned to be updated according to it
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
175
diff
changeset
|
14 context.env.Append(SHLINKFLAGS='-framework OpenGL') |
305
e25cfb3fe58e
* Mac build script patch by Prock
fife@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
287
diff
changeset
|
15 #context.env.Append(SHLINKFLAGS='-lGL') |
e25cfb3fe58e
* Mac build script patch by Prock
fife@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
287
diff
changeset
|
16 #context.env.Append(SHLINKFLAGS='-lGLU') |
e25cfb3fe58e
* Mac build script patch by Prock
fife@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
287
diff
changeset
|
17 #context.env.Append(SHLINKFLAGS='-lglut') |
268
281159a9672c
* Mac OS X build script fixes; wiki article is planned to be updated according to it
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
175
diff
changeset
|
18 context.env.Append(SHLINKFLAGS='-framework Python') |
281159a9672c
* Mac OS X build script fixes; wiki article is planned to be updated according to it
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
175
diff
changeset
|
19 context.env.Append(SHLINKFLAGS='-lpng') |
305
e25cfb3fe58e
* Mac build script patch by Prock
fife@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
287
diff
changeset
|
20 context.env.Append(SHLINKFLAGS='-lSDL') |
e25cfb3fe58e
* Mac build script patch by Prock
fife@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
287
diff
changeset
|
21 context.env.Append(SHLINKFLAGS='-lSDL_image') |
e25cfb3fe58e
* Mac build script patch by Prock
fife@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
287
diff
changeset
|
22 context.env.Append(SHLINKFLAGS='-lSDL_ttf') |
268
281159a9672c
* Mac OS X build script fixes; wiki article is planned to be updated according to it
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
175
diff
changeset
|
23 context.env['SHLIBSUFFIX']='.so' |
0
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
24 |
268
281159a9672c
* Mac OS X build script fixes; wiki article is planned to be updated according to it
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
175
diff
changeset
|
25 include_dirs = ['/opt/local/include', |
281159a9672c
* Mac OS X build script fixes; wiki article is planned to be updated according to it
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
175
diff
changeset
|
26 '/usr/local/include', |
281159a9672c
* Mac OS X build script fixes; wiki article is planned to be updated according to it
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
175
diff
changeset
|
27 '/usr/X11/include', |
305
e25cfb3fe58e
* Mac build script patch by Prock
fife@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
287
diff
changeset
|
28 '/opt/local/include/SDL', |
e25cfb3fe58e
* Mac build script patch by Prock
fife@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
287
diff
changeset
|
29 '/opt/local/include/guichan', |
268
281159a9672c
* Mac OS X build script fixes; wiki article is planned to be updated according to it
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
175
diff
changeset
|
30 '/opt/local/include/boost', |
281159a9672c
* Mac OS X build script fixes; wiki article is planned to be updated according to it
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
175
diff
changeset
|
31 '/System/Library/Frameworks/OpenAL.framework/Headers', |
281159a9672c
* Mac OS X build script fixes; wiki article is planned to be updated according to it
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
175
diff
changeset
|
32 '/opt/local/include/vorbis/', |
305
e25cfb3fe58e
* Mac build script patch by Prock
fife@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
287
diff
changeset
|
33 '/usr/include/python%s'%sys.version[:3]] |
0
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
34 |
268
281159a9672c
* Mac OS X build script fixes; wiki article is planned to be updated according to it
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
175
diff
changeset
|
35 context.env.Append(CPPPATH = include_dirs) |
281159a9672c
* Mac OS X build script fixes; wiki article is planned to be updated according to it
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
175
diff
changeset
|
36 |
305
e25cfb3fe58e
* Mac build script patch by Prock
fife@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
287
diff
changeset
|
37 lib_dirs = ['/opt/local/lib','/usr/local/lib','/usr/X11/lib'] |
268
281159a9672c
* Mac OS X build script fixes; wiki article is planned to be updated according to it
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
175
diff
changeset
|
38 context.env.Append(LIBPATH = lib_dirs) |
281159a9672c
* Mac OS X build script fixes; wiki article is planned to be updated according to it
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
175
diff
changeset
|
39 |
281159a9672c
* Mac OS X build script fixes; wiki article is planned to be updated according to it
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
175
diff
changeset
|
40 context.env.Append(CPPFLAGS='-D_THREAD_SAFE -F/opt/local/Library/Frameworks') |
0
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
41 |
268
281159a9672c
* Mac OS X build script fixes; wiki article is planned to be updated according to it
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
175
diff
changeset
|
42 context.CheckHeader('SDL/SDL_image.h') |
281159a9672c
* Mac OS X build script fixes; wiki article is planned to be updated according to it
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
175
diff
changeset
|
43 context.CheckHeader('SDL/SDL_ttf.h') |
287
fdb1e98fd8b6
* Create an autorelease pool, so autoreleased SDL objects don't leak (Mac OS X specific issue)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
286
diff
changeset
|
44 context.checkSimpleLib(['objc']) |
268
281159a9672c
* Mac OS X build script fixes; wiki article is planned to be updated according to it
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
175
diff
changeset
|
45 context.checkSimpleLib(['vorbisfile'], 'vorbisfile.h') |
281159a9672c
* Mac OS X build script fixes; wiki article is planned to be updated according to it
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
175
diff
changeset
|
46 context.checkSimpleLib(['guichan']) |
281159a9672c
* Mac OS X build script fixes; wiki article is planned to be updated according to it
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
175
diff
changeset
|
47 context.checkSimpleLib(['guichan_sdl']) |
281159a9672c
* Mac OS X build script fixes; wiki article is planned to be updated according to it
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
175
diff
changeset
|
48 context.checkSimpleLib(['z'], 'zlib.h') |
281159a9672c
* Mac OS X build script fixes; wiki article is planned to be updated according to it
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
175
diff
changeset
|
49 context.checkSimpleLib(['boost_filesystem-mt']) |
281159a9672c
* Mac OS X build script fixes; wiki article is planned to be updated according to it
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
175
diff
changeset
|
50 context.checkSimpleLib(['boost_system-mt']) |
281159a9672c
* Mac OS X build script fixes; wiki article is planned to be updated according to it
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
175
diff
changeset
|
51 context.checkSimpleLib(['boost_regex-mt']) |
281159a9672c
* Mac OS X build script fixes; wiki article is planned to be updated according to it
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
175
diff
changeset
|
52 |
281159a9672c
* Mac OS X build script fixes; wiki article is planned to be updated according to it
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
175
diff
changeset
|
53 if context.env['opengl']: |
281159a9672c
* Mac OS X build script fixes; wiki article is planned to be updated according to it
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
175
diff
changeset
|
54 context.checkSimpleLib(['guichan_opengl'], ['guichan/opengl.hpp'], 'cxx') |
281159a9672c
* Mac OS X build script fixes; wiki article is planned to be updated according to it
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
175
diff
changeset
|
55 context.env.Append(SHLINKFLAGS='-framework OpenGL') |