Simplify the SCons build:

On OS X, build all code as Objective-C(++).

Centralize framework handling.

Cleanup.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5645 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Soren Jorvang
2010-06-10 14:18:21 +00:00
parent de45e015cd
commit 404c625622
26 changed files with 110 additions and 253 deletions

View File

@ -43,9 +43,9 @@ if wxenv['HAVE_WX']:
'NetWindow.cpp',
]
CPPDEFINES = [
'wxNEEDS_CHARPP',
],
CPPDEFINES = [
'wxNEEDS_CHARPP',
],
libs = [ 'debwx', 'debugger_ui_util'] + libs
else:
@ -54,34 +54,11 @@ else:
]
if sys.platform == 'darwin':
files += [ 'cocoaApp.m', ]
compileFlags = [
'-x',
'objective-c++',
]
wxenv.Append(
CXXFLAGS = compileFlags,
LINKFLAGS = [
'-pthread', '-framework', 'IOKit'
],
LIBS = libs
)
else:
wxenv.Append(
LINKFLAGS = [
'-pthread',
],
LIBS = libs
)
files += [ 'cocoaApp.m', ]
if sys.platform == 'darwin':
exeGUI = env['binary_dir'] + 'Dolphin.app/Contents/MacOS/Dolphin'
exeNoGUI = env['binary_dir'] + 'DolphinNoGUI'
wxenv['FRAMEWORKS'] = ['Cocoa', 'CoreFoundation', 'System']
wxenv.Plist(
env['binary_dir'] + 'Dolphin.app/Contents/Info.plist',
Value(dict(
@ -100,11 +77,13 @@ else:
exeGUI = env['binary_dir'] + 'dolphin-emu'
exeNoGUI = env['binary_dir'] + 'dolphin-emu-nogui'
wxenv.Append(
LIBS = libs
)
if wxenv['HAVE_X11']:
files += [ 'X11Utils.cpp' ]
#objects = [ wxenv.Object(srcFile) for srcFile in files ]
if wxenv['HAVE_WX']:
wxenv.Program(exeGUI, files + [ 'Main.cpp' ])
else: