comparison build/linux2-config.py @ 378:64738befdf3b

bringing in the changes from the build_system_rework branch in preparation for the 0.3.0 release. This commit will require the Jan2010 devkit. Clients will also need to be modified to the new way to import fife.
author vtchill@33b003aa-7bff-0310-803a-e67f0ece8222
date Mon, 11 Jan 2010 23:34:52 +0000
parents
children 81641655bc38
comparison
equal deleted inserted replaced
377:fe6fb0e0ed23 378:64738befdf3b
1 import sys
2 import os
3
4 pythonversion = 'python' + str(os.sys.version_info[0]) + '.' + str(os.sys.version_info[1])
5
6 def initEnvironment(env):
7
8 rootpath = env.Dir('#.').srcnode().abspath
9 extincludepath = os.path.join(rootpath, 'ext', 'install', 'include')
10 extlibpath = os.path.join(rootpath, 'ext', 'install', 'lib')
11
12 env.Append(CPPPATH = [os.path.join('/', 'opt', 'include'),
13 os.path.join('/', 'usr', 'include', 'vorbis'),
14 os.path.join('/', 'usr', 'include', 'SDL'),
15 os.path.join('/', 'usr', 'include', pythonversion),
16 extincludepath])
17
18 env.Append(LIBPATH = [os.path.join('/', 'opt', 'lib'),
19 extlibpath])
20
21 env.AppendENVPath('LD_RUN_PATH', os.path.join('..', '..', '..', extlibpath))
22
23 return env
24
25 def addExtras(env, opengl):
26 env.Append(LIBS = pythonversion)
27
28 if opengl:
29 env.Append(LIBS = ['stdc++', 'GL', 'GLU'])
30 env.Append(LIBPATH = os.path.join('/', 'usr', 'X11R6', 'lib'))
31
32 return env
33
34 def getRequiredHeaders(opengl):
35 return None
36
37 def getRequiredLibs(opengl):
38 # libs is a list of tuples that have the form:
39 # (libname, headers)
40 # libname - may be a single library or a tuple of libraries
41 # headers - may be a single header or a list of headers
42 #
43 # This list is somewhat order dependent
44 # guichan_sdl - depends on at least the SDL libs and guichan prior in the list
45 # guichan_opengl - depends on at least guichan prior in the list
46 libs = [('vorbisfile', 'vorbisfile.h'),
47 ('openal', 'AL/al.h'),
48 ('SDL', 'SDL.h'),
49 ('SDL_ttf', 'SDL_ttf.h'),
50 ('SDL_image', 'SDL_image.h'),
51 ('guichan', 'guichan.hpp'),
52 ('guichan_sdl', ''),
53 (('boost_filesystem', 'boost_filesystem-gcc', 'boost_filesystem-gcc41', 'boost_filesystem-mt'), 'boost/filesystem.hpp'),
54 (('boost_regex', 'boost_regex-gcc', 'boost_regex-gcc41', 'boost_regex-mt'), 'boost/regex.hpp'),
55 ('png', 'png.h'),
56 (('xcursor', 'Xcursor'), '')]
57
58 if (opengl):
59 libs.append(('guichan_opengl', ''))
60
61 return libs
62
63 def getOptionalLibs(opengl):
64 return None
65
66 # vim: set filetype=python:
67