2008-07-12 17:40:22 +00:00
|
|
|
Import('env')
|
2008-08-06 21:07:31 +00:00
|
|
|
import sys
|
2008-07-12 17:40:22 +00:00
|
|
|
|
2008-08-26 00:18:00 +00:00
|
|
|
files = [
|
|
|
|
'BPStructs.cpp',
|
|
|
|
'DataReader.cpp',
|
|
|
|
'Globals.cpp',
|
|
|
|
'GLInit.cpp',
|
|
|
|
'main.cpp',
|
|
|
|
'memcpy_amd.cpp',
|
|
|
|
'OpcodeDecoding.cpp',
|
|
|
|
# 'OpcodeReaders.cpp', # outdated
|
|
|
|
'PixelShader.cpp',
|
|
|
|
'PixelShaderManager.cpp',
|
|
|
|
'rasterfont.cpp',
|
|
|
|
'Render.cpp',
|
|
|
|
'TextureMngr.cpp',
|
|
|
|
'VertexLoader.cpp',
|
|
|
|
'VertexLoader_Normal.cpp',
|
|
|
|
'VertexShader.cpp',
|
|
|
|
'VertexShaderManager.cpp',
|
|
|
|
'XFB.cpp',
|
|
|
|
'GUI/ConfigDlg.cpp',
|
|
|
|
]
|
|
|
|
compileFlags = [
|
2008-08-26 22:28:42 +00:00
|
|
|
'-fPIC',
|
2008-09-20 17:31:54 +00:00
|
|
|
env['WXCPPFLAGS'],
|
2008-08-26 00:18:00 +00:00
|
|
|
]
|
|
|
|
linkFlags = [
|
2008-09-20 17:31:54 +00:00
|
|
|
env['WXLIBFLAGS'],
|
2008-08-26 00:18:00 +00:00
|
|
|
]
|
|
|
|
libs = [
|
2008-08-29 09:55:17 +00:00
|
|
|
'videocommon', 'common', 'GLEW',
|
2008-08-26 00:18:00 +00:00
|
|
|
]
|
|
|
|
if sys.platform == 'darwin':
|
|
|
|
platform = 'mac'
|
2008-08-26 00:57:16 +00:00
|
|
|
# SDL is currently the only way to get video on Mac OS X.
|
|
|
|
useSDL = True
|
2008-08-26 00:18:00 +00:00
|
|
|
# Use libraries from MacPorts.
|
|
|
|
compileFlags.append('-I/opt/local/include')
|
|
|
|
linkFlags.append('-L/opt/local/lib')
|
|
|
|
# Use frameworks instead of plain libs, when possible.
|
|
|
|
linkFlags += [
|
|
|
|
'-framework %s' % framework
|
|
|
|
for framework in [ 'OpenGL', 'Cg' ]
|
|
|
|
]
|
2008-08-06 21:07:31 +00:00
|
|
|
else:
|
2008-08-26 00:18:00 +00:00
|
|
|
platform = 'linux'
|
2008-08-26 00:57:16 +00:00
|
|
|
# By default, GLX is used on Linux to setup OpenGL, but you can select SDL
|
|
|
|
# instead if you like, by changing the line below.
|
|
|
|
useSDL = False
|
2008-08-26 00:18:00 +00:00
|
|
|
# Libraries with pkg-config support.
|
|
|
|
compileFlags.append('`pkg-config --cflags xxf86vm`')
|
|
|
|
linkFlags.append('`pkg-config --libs xxf86vm`')
|
|
|
|
# Libraries without pkg-config support.
|
|
|
|
libs += [ 'GL', 'Cg', 'CgGL', 'X11' ]
|
|
|
|
|
2008-08-26 00:57:16 +00:00
|
|
|
if useSDL:
|
|
|
|
compileFlags += [ '`sdl-config --cflags`', '-DUSE_SDL=1' ]
|
|
|
|
linkFlags += [ '`sdl-config --libs`' ]
|
|
|
|
|
2008-09-16 16:50:09 +00:00
|
|
|
gfxenv = env.Clone()
|
2008-08-26 22:28:42 +00:00
|
|
|
gfxenv.Append(
|
|
|
|
CXXFLAGS = ' ' + ' '.join(compileFlags),
|
|
|
|
LINKFLAGS = ' ' + ' '.join(linkFlags)
|
2008-08-26 00:18:00 +00:00
|
|
|
)
|
|
|
|
gfxenv.SharedLibrary(
|
|
|
|
'../../../../Binary/%s/Plugins/zeroogl.so' % platform,
|
|
|
|
files,
|
|
|
|
LIBS = libs
|
|
|
|
)
|