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 sys
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",
# "TextureDecoder.cpp",
"TextureMngr.cpp",
"VertexLoader.cpp",
"VertexLoader_Normal.cpp",
"VertexShader.cpp",
"VertexShaderManager.cpp",
"XFB.cpp",
# "Linux/Conf.cpp",
# "Linux/Linux.cpp",
"GUI/ConfigDlg.cpp",
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 = [
'`wx-config --cppflags`',
]
linkFlags = [
'`wx-config --libs`',
]
libs = [
'videocommon', 'common', 'GLEW', 'jpeg',
]
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 ")
gfxenv.SharedLibrary("../../../../Binary/mac/Plugins/zeroogl.so", files, LIBS=["videocommon", "common", "GLEW", "jpeg"])
platform = 'mac'
# 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:
gfxenv=env.Copy(CXXFLAGS = " `wx-config --cppflags` `pkg-config --cflags xxf86vm` ", LINKFLAGS = "`wx-config --libs` `pkg-config --libs xxf86vm` ")
gfxenv.SharedLibrary("../../../../Binary/linux/Plugins/zeroogl.so", files, LIBS=["videocommon", "common", "cairo", "GL", "GLU", "GLEW", "CgGL", "Cg", "X11"])
platform = 'linux'
# 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
)