dolphin/Source/Plugins/Plugin_VideoOGL/Src/SConscript
Soren Jorvang 30e437f9e3 Fix some cases of variables being used uninitialized. Also some unused
variables, writeable strings and dangerously shadowed variables.

index(), gamma(), exp() and y0() are POSIX functions and using those
names can cause namespace confusion.

A number of C files were missing the final newline required by ANSI C
and some versions of GCC are pedantic enough to complain about this.

These changes simply the scons build, allowing us to get rid of
filterWarnings which is simply more trouble than it's worth.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5574 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-06-02 20:35:12 +00:00

116 lines
2.5 KiB
Python

# -*- python -*-
Import('env')
# can we import path in one place?
import sys
sys.path.append(env['base_dir']+'SconsTests')
import utils
import platform
name = "Plugin_VideoOGL"
files = [
'BPFunctions.cpp',
'DLCache.cpp',
'RasterFont.cpp',
'Render.cpp',
'TextureMngr.cpp',
'NativeVertexFormat.cpp',
'PixelShaderCache.cpp',
'VertexShaderCache.cpp',
'TextureConverter.cpp',
'VertexManager.cpp',
'VertexLoaderManager.cpp',
'XFB.cpp',
'PostProcessing.cpp',
'FramebufferManager.cpp',
]
compileFlags = [
]
linkFlags = [
]
libs = [
'videocommon', 'SOIL', 'common'
]
gfxenv = env.Clone()
files += [
'main.cpp',
'GLUtil.cpp',
]
if sys.platform != 'darwin':
if gfxenv['HAVE_OPENCL']:
libs += [ 'OpenCL']
if gfxenv['HAVE_WX']:
files += [
'GUI/ConfigDlg.cpp',
'Debugger/Debugger.cpp',
]
if gfxenv['HAVE_COCOA']:
files += [ 'cocoaGL.m' ]
compileFlags += [
'-x',
'objective-c++',
]
if sys.platform == 'win32':
files += [ 'OS/Win32.cpp' ]
tests = {'CheckPKG' : utils.CheckPKG}
conf = gfxenv.Configure(custom_tests = tests,
config_h=env['base_dir']+"Source/Core/Common/Src/Config.h")
if sys.platform == 'darwin':
gfxenv['FRAMEWORKS'] = ['CoreFoundation', 'System', 'OpenGL', 'Cocoa', 'Cg']
if gfxenv['HAVE_OPENCL']:
gfxenv['FRAMEWORKS'] += ['OpenCL']
conf.CheckPKG('OpenGL')
if not conf.CheckPKG('Cg'):
print name + " must have Cg framework from nvidia to be build"
Return()
elif sys.platform == 'win32':
print name + " is assuming that you have opengl, glu, cg, and cggl"
else:
if not (conf.CheckPKG('GL') and conf.CheckPKG('GLU')):
print name + " must have opengl and glu to be build"
Return()
if not conf.CheckPKG('Cg') or not conf.CheckPKG('CgGL'):
print name + " must have cg and cggl to be build"
Return()
if sys.platform == 'win32':
print name + " is assuming that you have glew"
else:
if not conf.CheckPKG('GLEW'):
print name + " must have glew to be build"
Return()
if sys.platform == 'win32':
files += [
'OS/Win32.cpp'
]
libs += [
env['base_dir'] + '/Externals/Cg/'
]
gfxenv['CPPPATH'] += libs
conf.Finish()
# Sanity check
if gfxenv['USE_WX'] and not gfxenv['HAVE_WX']:
print "Must have wx to use wxgl"
Return()
gfxenv.Append(
CXXFLAGS = compileFlags,
LINKFLAGS = linkFlags,
)
gfxenv.SharedLibrary(
env['plugin_dir']+name,
files,
LIBS = libs + gfxenv['LIBS']
)