Cleanup and refactoring. Only the platform specific parts are in a platform specific block now, the rest is shared instead of duplicated.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@316 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Maarten ter Huurne 2008-08-26 00:18:00 +00:00
parent 236bb74c92
commit 6a426c1654
1 changed files with 59 additions and 28 deletions

View File

@ -1,32 +1,63 @@
Import('env') Import('env')
import sys import sys
files = ["BPStructs.cpp", files = [
"DataReader.cpp", 'BPStructs.cpp',
"Globals.cpp", 'DataReader.cpp',
"GLInit.cpp", 'Globals.cpp',
"main.cpp", 'GLInit.cpp',
"memcpy_amd.cpp", 'main.cpp',
"OpcodeDecoding.cpp", 'memcpy_amd.cpp',
# "OpcodeReaders.cpp", # outdated 'OpcodeDecoding.cpp',
"PixelShader.cpp", # 'OpcodeReaders.cpp', # outdated
"PixelShaderManager.cpp", 'PixelShader.cpp',
"rasterfont.cpp", 'PixelShaderManager.cpp',
"Render.cpp", 'rasterfont.cpp',
# "TextureDecoder.cpp", 'Render.cpp',
"TextureMngr.cpp", 'TextureMngr.cpp',
"VertexLoader.cpp", 'VertexLoader.cpp',
"VertexLoader_Normal.cpp", 'VertexLoader_Normal.cpp',
"VertexShader.cpp", 'VertexShader.cpp',
"VertexShaderManager.cpp", 'VertexShaderManager.cpp',
"XFB.cpp", 'XFB.cpp',
# "Linux/Conf.cpp", 'GUI/ConfigDlg.cpp',
# "Linux/Linux.cpp", ]
"GUI/ConfigDlg.cpp", compileFlags = [
'`wx-config --cppflags`',
]
linkFlags = [
'`wx-config --libs`',
]
libs = [
'videocommon', 'common', 'GLEW', 'jpeg',
] ]
if sys.platform == 'darwin': if sys.platform == 'darwin':
gfxenv=env.Copy(CXXFLAGS = " `sdl-config --cflags` `wx-config --cppflags` -I/opt/local/include ", LINKFLAGS = " -framework OpenGL -framework Cg `sdl-config --libs` `wx-config --libs` -L/opt/local/lib ") platform = 'mac'
gfxenv.SharedLibrary("../../../../Binary/mac/Plugins/zeroogl.so", files, LIBS=["videocommon", "common", "GLEW", "jpeg"]) # Use libraries from MacPorts.
compileFlags.append('-I/opt/local/include')
linkFlags.append('-L/opt/local/lib')
# Use SDL.
compileFlags.append('`sdl-config --cflags`')
linkFlags.append('`sdl-config --libs`')
# Use frameworks instead of plain libs, when possible.
linkFlags += [
'-framework %s' % framework
for framework in [ 'OpenGL', 'Cg' ]
]
else: else:
gfxenv=env.Copy(CXXFLAGS = " `wx-config --cppflags` `pkg-config --cflags xxf86vm` ", LINKFLAGS = "`wx-config --libs` `pkg-config --libs xxf86vm` ") platform = 'linux'
gfxenv.SharedLibrary("../../../../Binary/linux/Plugins/zeroogl.so", files, LIBS=["videocommon", "common", "cairo", "GL", "GLU", "GLEW", "CgGL", "Cg", "X11"]) # 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' ]
gfxenv = env.Copy(
CXXFLAGS = ' '.join(compileFlags),
LINKFLAGS = ' '.join(linkFlags),
)
gfxenv.SharedLibrary(
'../../../../Binary/%s/Plugins/zeroogl.so' % platform,
files,
LIBS = libs
)