mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-11 16:49:12 +01:00
b47f349c96
Default plugins are now in Paths.h Important note for scons users, plugin names now match the one on windows!!! make sure to remove the old ones!! and update your .ini!! git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1131 8ced0084-cf51-0410-be5f-012b33b47a6e
118 lines
2.3 KiB
Python
118 lines
2.3 KiB
Python
# -*- python -*-
|
|
|
|
Import('env')
|
|
# can we import path in one place?
|
|
import sys
|
|
sys.path.append('../../../SconsTests')
|
|
import utils
|
|
|
|
name = "Plugin_VideoOGL.so"
|
|
|
|
files = [
|
|
'BPStructs.cpp',
|
|
'Globals.cpp',
|
|
'GLUtil.cpp',
|
|
'main.cpp',
|
|
'Config.cpp',
|
|
'memcpy_amd.cpp',
|
|
'OpcodeDecoding.cpp',
|
|
'PixelShaderManager.cpp',
|
|
'rasterfont.cpp',
|
|
'Render.cpp',
|
|
'TextureMngr.cpp',
|
|
'ImageWrite.cpp',
|
|
'NativeVertexFormat.cpp',
|
|
'VertexManager.cpp',
|
|
'VertexLoader.cpp',
|
|
'VertexLoader_Normal.cpp',
|
|
'VertexLoaderManager.cpp',
|
|
'VertexShaderManager.cpp',
|
|
'TextureConverter.cpp',
|
|
'XFB.cpp',
|
|
'Logging/Console.cpp',
|
|
'Logging/Logging.cpp',
|
|
]
|
|
compileFlags = [
|
|
'-fPIC',
|
|
]
|
|
linkFlags = [
|
|
]
|
|
libs = [
|
|
'videocommon', 'common', 'GLEW',
|
|
]
|
|
|
|
gfxenv = env.Clone()
|
|
|
|
if not gfxenv['osx64']:
|
|
files += [
|
|
'GUI/ConfigDlg.cpp',
|
|
'Debugger/Debugger.cpp',
|
|
'Debugger/PBView.cpp',
|
|
]
|
|
|
|
if gfxenv['osx64']:
|
|
files += [ 'cocoaGL.m' ]
|
|
compileFlags += [
|
|
'-x',
|
|
'objective-c++',
|
|
]
|
|
linkFlags += [
|
|
'-framework',
|
|
'cocoa',
|
|
'-arch',
|
|
'x86_64'
|
|
]
|
|
|
|
if sys.platform == 'darwin':
|
|
# SDL is currently the only way to get video on Mac OS X.
|
|
if gfxenv['osx64']:
|
|
useSDL = False
|
|
else:
|
|
useSDL = True
|
|
# TODO: clean it up (use incpath and libpath)
|
|
# 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 += [
|
|
'-Wl,-framework,%s' % framework
|
|
for framework in [ 'OpenGL', 'Cg' ]
|
|
]
|
|
else:
|
|
# By default, GLX is used on Linux to setup OpenGL, but you can select SDL
|
|
# instead if you like, by changing the line below.
|
|
tests = {'CheckPKG' : utils.CheckPKG}
|
|
|
|
conf = gfxenv.Configure(custom_tests = tests)
|
|
|
|
if not conf.CheckPKG('x11'):
|
|
Exit(1)
|
|
|
|
if not conf.CheckPKG('xxf86vm'):
|
|
Exit(1)
|
|
|
|
gfxenv = conf.Finish()
|
|
|
|
useSDL = False
|
|
gfxenv.ParseConfig("pkg-config x11 --cflags --libs")
|
|
gfxenv.ParseConfig("pkg-config xxf86vm --cflags --libs")
|
|
|
|
# Libraries without pkg-config support.
|
|
libs += [ 'GL', 'Cg', 'CgGL' ]
|
|
|
|
|
|
|
|
if useSDL:
|
|
compileFlags += [ '-DUSE_SDL=1' ]
|
|
|
|
gfxenv.Append(
|
|
CXXFLAGS = compileFlags,
|
|
LINKFLAGS = linkFlags,
|
|
)
|
|
|
|
gfxenv.SharedLibrary(
|
|
'../../../../'+env['plugin_dir']+name,
|
|
files,
|
|
LIBS = libs + gfxenv['LIBS']
|
|
)
|