Mercurial > fife-parpg
diff 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 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/build/linux2-config.py Mon Jan 11 23:34:52 2010 +0000 @@ -0,0 +1,67 @@ +import sys +import os + +pythonversion = 'python' + str(os.sys.version_info[0]) + '.' + str(os.sys.version_info[1]) + +def initEnvironment(env): + + rootpath = env.Dir('#.').srcnode().abspath + extincludepath = os.path.join(rootpath, 'ext', 'install', 'include') + extlibpath = os.path.join(rootpath, 'ext', 'install', 'lib') + + env.Append(CPPPATH = [os.path.join('/', 'opt', 'include'), + os.path.join('/', 'usr', 'include', 'vorbis'), + os.path.join('/', 'usr', 'include', 'SDL'), + os.path.join('/', 'usr', 'include', pythonversion), + extincludepath]) + + env.Append(LIBPATH = [os.path.join('/', 'opt', 'lib'), + extlibpath]) + + env.AppendENVPath('LD_RUN_PATH', os.path.join('..', '..', '..', extlibpath)) + + return env + +def addExtras(env, opengl): + env.Append(LIBS = pythonversion) + + if opengl: + env.Append(LIBS = ['stdc++', 'GL', 'GLU']) + env.Append(LIBPATH = os.path.join('/', 'usr', 'X11R6', 'lib')) + + return env + +def getRequiredHeaders(opengl): + return None + +def getRequiredLibs(opengl): + # libs is a list of tuples that have the form: + # (libname, headers) + # libname - may be a single library or a tuple of libraries + # headers - may be a single header or a list of headers + # + # This list is somewhat order dependent + # guichan_sdl - depends on at least the SDL libs and guichan prior in the list + # guichan_opengl - depends on at least guichan prior in the list + libs = [('vorbisfile', 'vorbisfile.h'), + ('openal', 'AL/al.h'), + ('SDL', 'SDL.h'), + ('SDL_ttf', 'SDL_ttf.h'), + ('SDL_image', 'SDL_image.h'), + ('guichan', 'guichan.hpp'), + ('guichan_sdl', ''), + (('boost_filesystem', 'boost_filesystem-gcc', 'boost_filesystem-gcc41', 'boost_filesystem-mt'), 'boost/filesystem.hpp'), + (('boost_regex', 'boost_regex-gcc', 'boost_regex-gcc41', 'boost_regex-mt'), 'boost/regex.hpp'), + ('png', 'png.h'), + (('xcursor', 'Xcursor'), '')] + + if (opengl): + libs.append(('guichan_opengl', '')) + + return libs + +def getOptionalLibs(opengl): + return None + +# vim: set filetype=python: +