scons osx cleanup
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1485 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
761dfca9ed
commit
900407c1fe
30
SConstruct
30
SConstruct
|
@ -40,9 +40,6 @@ cppDefines = [
|
||||||
'GCC_HASCLASSVISIBILITY',
|
'GCC_HASCLASSVISIBILITY',
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
include_paths = [
|
include_paths = [
|
||||||
'../../../Core/Common/Src',
|
'../../../Core/Common/Src',
|
||||||
'../../../Core/DiscIO/Src',
|
'../../../Core/DiscIO/Src',
|
||||||
|
@ -92,21 +89,26 @@ lib_paths = include_paths
|
||||||
|
|
||||||
# handle command line options
|
# handle command line options
|
||||||
vars = Variables('args.cache')
|
vars = Variables('args.cache')
|
||||||
|
|
||||||
vars.AddVariables(
|
vars.AddVariables(
|
||||||
BoolVariable('verbose', 'Set for compilation line', False),
|
BoolVariable('verbose', 'Set for compilation line', False),
|
||||||
BoolVariable('bundle', 'Set to create bundle', False),
|
BoolVariable('bundle', 'Set to create bundle', False),
|
||||||
BoolVariable('lint', 'Set for lint build (extra warnings)', False),
|
BoolVariable('lint', 'Set for lint build (extra warnings)', False),
|
||||||
BoolVariable('nowx', 'Set For Building with no WX libs (WIP)', False),
|
BoolVariable('nowx', 'Set For Building with no WX libs (WIP)', False),
|
||||||
BoolVariable('osx64', 'Set For Building for osx in 64 bits (WIP)', False),
|
|
||||||
EnumVariable('flavor', 'Choose a build flavor', 'release',
|
EnumVariable('flavor', 'Choose a build flavor', 'release',
|
||||||
allowed_values = ('release', 'devel', 'debug'),
|
allowed_values = ('release', 'devel', 'debug'),
|
||||||
ignorecase = 2
|
ignorecase = 2
|
||||||
),
|
),
|
||||||
|
EnumVariable('osx', 'Choose a backend (WIP)', '32coca',
|
||||||
|
allowed_values = ('32x11', '32coca', '64coca'),
|
||||||
|
ignorecase = 2
|
||||||
|
),
|
||||||
PathVariable('wxconfig', 'Path to the wxconfig', None),
|
PathVariable('wxconfig', 'Path to the wxconfig', None),
|
||||||
('CC', 'The c compiler', 'gcc'),
|
('CC', 'The c compiler', 'gcc'),
|
||||||
('CXX', 'The c++ compiler', 'g++'),
|
('CXX', 'The c++ compiler', 'g++'),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
env = Environment(
|
env = Environment(
|
||||||
CPPPATH = include_paths,
|
CPPPATH = include_paths,
|
||||||
LIBPATH = lib_paths,
|
LIBPATH = lib_paths,
|
||||||
|
@ -188,16 +190,17 @@ env['HAVE_AO'] = conf.CheckPKG('ao')
|
||||||
env['HAVE_WX'] = conf.CheckWXConfig('2.8', ['gl', 'adv', 'core', 'base'],
|
env['HAVE_WX'] = conf.CheckWXConfig('2.8', ['gl', 'adv', 'core', 'base'],
|
||||||
0) #env['flavor'] == 'debug')
|
0) #env['flavor'] == 'debug')
|
||||||
|
|
||||||
# X11 detection
|
|
||||||
env['HAVE_X11'] = conf.CheckPKG('x11')
|
|
||||||
|
|
||||||
#osx 64 specifics
|
#osx 64 specifics
|
||||||
if env['osx64']:
|
if sys.platform == 'darwin':
|
||||||
# SDL and WX are broken on osx 64
|
if env['osx'] == '64coca':
|
||||||
# env['HAVE_SDL'] = 0
|
compileFlags += ['-arch' , 'x86_64', '-DOSX64']
|
||||||
# env['HAVE_WX'] = 0;
|
if env['osx'] == '64coca' or env['osx'] == '32coca':
|
||||||
compileFlags += ['-arch' , 'x86_64', '-DOSX64']
|
env['HAVE_X11'] = 0
|
||||||
|
env['HAVE_COCOA'] = conf.CheckPKG('cocoa')
|
||||||
|
else:
|
||||||
|
env['HAVE_X11'] = conf.CheckPKG('x11')
|
||||||
|
env['HAVE_COCOA'] = 0
|
||||||
|
|
||||||
# Gui less build
|
# Gui less build
|
||||||
if env['nowx']:
|
if env['nowx']:
|
||||||
env['HAVE_WX'] = 0;
|
env['HAVE_WX'] = 0;
|
||||||
|
@ -208,6 +211,7 @@ conf.Define('HAVE_BLUEZ', env['HAVE_BLUEZ'])
|
||||||
conf.Define('HAVE_AO', env['HAVE_AO'])
|
conf.Define('HAVE_AO', env['HAVE_AO'])
|
||||||
conf.Define('HAVE_WX', env['HAVE_WX'])
|
conf.Define('HAVE_WX', env['HAVE_WX'])
|
||||||
conf.Define('HAVE_X11', env['HAVE_X11'])
|
conf.Define('HAVE_X11', env['HAVE_X11'])
|
||||||
|
conf.Define('HAVE_COCOA', env['HAVE_COCOA'])
|
||||||
|
|
||||||
# After all configuration tests are done
|
# After all configuration tests are done
|
||||||
conf.Finish()
|
conf.Finish()
|
||||||
|
|
|
@ -123,10 +123,11 @@ CFrame::CFrame(wxFrame* parent,
|
||||||
const wxSize& size,
|
const wxSize& size,
|
||||||
long style)
|
long style)
|
||||||
: wxFrame(parent, id, title, pos, size, style)
|
: wxFrame(parent, id, title, pos, size, style)
|
||||||
, m_Panel(NULL)
|
|
||||||
, m_pStatusBar(NULL)
|
, m_pStatusBar(NULL)
|
||||||
, m_pMenuBar(NULL)
|
|
||||||
, HaveLeds(false), HaveSpeakers(false)
|
, HaveLeds(false), HaveSpeakers(false)
|
||||||
|
, m_Panel(NULL)
|
||||||
|
, m_pMenuBar(NULL)
|
||||||
|
|
||||||
{
|
{
|
||||||
InitBitmaps();
|
InitBitmaps();
|
||||||
|
|
||||||
|
|
|
@ -20,16 +20,8 @@ files = [
|
||||||
]
|
]
|
||||||
|
|
||||||
dspenv = env.Clone()
|
dspenv = env.Clone()
|
||||||
if not dspenv['osx64']:
|
dspenv.Append(
|
||||||
dspenv.Append(
|
CXXFLAGS = [ '-fPIC' ],
|
||||||
CXXFLAGS = [ '-fPIC' ],
|
LIBS = [ 'common' ],
|
||||||
LIBS = [ 'common' ],
|
)
|
||||||
)
|
|
||||||
else:
|
|
||||||
dspenv.Append(
|
|
||||||
CXXFLAGS = [ '-fPIC','-arch', 'x86_64' ],
|
|
||||||
LINKFLAGS = [ '-arch', 'x86_64' ],
|
|
||||||
LIBS = [ 'common' ],
|
|
||||||
)
|
|
||||||
|
|
||||||
dspenv.SharedLibrary(env['plugin_dir']+name, files)
|
dspenv.SharedLibrary(env['plugin_dir']+name, files)
|
||||||
|
|
|
@ -14,7 +14,7 @@ files = [
|
||||||
]
|
]
|
||||||
padenv = env.Clone()
|
padenv = env.Clone()
|
||||||
|
|
||||||
if not padenv['osx64']:
|
if not padenv['HAVE_WX']:
|
||||||
files += [
|
files += [
|
||||||
"GUI/ConfigDlg.cpp",
|
"GUI/ConfigDlg.cpp",
|
||||||
"XInputBase.cpp",
|
"XInputBase.cpp",
|
||||||
|
@ -22,10 +22,4 @@ if not padenv['osx64']:
|
||||||
|
|
||||||
padenv.Append(LIBS = [ 'common' ])
|
padenv.Append(LIBS = [ 'common' ])
|
||||||
|
|
||||||
if padenv['osx64']:
|
|
||||||
padenv.Append(
|
|
||||||
CXXFLAGS = [ '-arch', 'x86_64' ],
|
|
||||||
LINKFLAGS = [ '-arch', 'x86_64' ],
|
|
||||||
)
|
|
||||||
|
|
||||||
padenv.SharedLibrary(env['plugin_dir']+name, files)
|
padenv.SharedLibrary(env['plugin_dir']+name, files)
|
||||||
|
|
|
@ -54,14 +54,12 @@ if gfxenv['HAVE_WX']:
|
||||||
'Debugger/PBView.cpp',
|
'Debugger/PBView.cpp',
|
||||||
]
|
]
|
||||||
|
|
||||||
if gfxenv['osx64']:
|
if gfxenv['HAVE_COCOA']:
|
||||||
files += [ 'cocoaGL.m' ]
|
files += [ 'cocoaGL.m' ]
|
||||||
compileFlags += [
|
compileFlags += [
|
||||||
'-x',
|
'-x',
|
||||||
'objective-c++',
|
'objective-c++',
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
tests = {'CheckPKG' : utils.CheckPKG}
|
tests = {'CheckPKG' : utils.CheckPKG}
|
||||||
conf = gfxenv.Configure(custom_tests = tests,
|
conf = gfxenv.Configure(custom_tests = tests,
|
||||||
|
@ -72,24 +70,27 @@ if sys.platform == 'darwin':
|
||||||
# Use libraries from MacPorts.
|
# Use libraries from MacPorts.
|
||||||
compileFlags.append('-I/opt/local/include')
|
compileFlags.append('-I/opt/local/include')
|
||||||
linkFlags.append('-L/opt/local/lib')
|
linkFlags.append('-L/opt/local/lib')
|
||||||
conf.CheckPKG('cocoa')
|
|
||||||
conf.CheckPKG('OpenGL')
|
conf.CheckPKG('OpenGL')
|
||||||
|
if not conf.CheckPKG('Cg'):
|
||||||
|
print name + " must have Cg from nvidia to be build"
|
||||||
|
|
||||||
else:
|
else:
|
||||||
if not (conf.CheckPKG('GL') and conf.CheckPKG('GLU')):
|
if not (conf.CheckPKG('GL') and conf.CheckPKG('GLU')):
|
||||||
print name + " must have opengl and glu to be build"
|
print name + " must have opengl and glu to be build"
|
||||||
Return()
|
Return()
|
||||||
|
|
||||||
if not conf.CheckPKG('Cg') or not conf.CheckPKG('CgGL'):
|
if not conf.CheckPKG('Cg') or not conf.CheckPKG('CgGL'):
|
||||||
print name + " must have cg and cggl to be build"
|
print name + " must have cg and cggl to be build"
|
||||||
Return()
|
Return()
|
||||||
|
|
||||||
if not conf.CheckPKG('GLEW'):
|
if not conf.CheckPKG('GLEW'):
|
||||||
print name + " must have glew to be build"
|
print name + " must have glew to be build"
|
||||||
Return()
|
Return()
|
||||||
|
|
||||||
# check for xxf86vm
|
# check for xxf86vm
|
||||||
|
|
||||||
|
gfxenv['HAVE_XXF86VM'] = gfxenv['HAVE_X11'] and conf.CheckPKG('xxf86vm')
|
||||||
|
|
||||||
gfxenv['HAVE_XXF86VM'] = conf.CheckPKG('xxf86vm')
|
|
||||||
conf.Define('HAVE_XXF86VM', gfxenv['HAVE_XXF86VM'])
|
conf.Define('HAVE_XXF86VM', gfxenv['HAVE_XXF86VM'])
|
||||||
|
|
||||||
conf.Finish()
|
conf.Finish()
|
||||||
|
|
|
@ -20,5 +20,5 @@ padenv.Append(
|
||||||
CXXFLAGS = [ '-fPIC' ],
|
CXXFLAGS = [ '-fPIC' ],
|
||||||
LIBS = [ 'common' ],
|
LIBS = [ 'common' ],
|
||||||
)
|
)
|
||||||
if not env['osx64']:
|
|
||||||
padenv.SharedLibrary(env['plugin_dir']+name, files)
|
padenv.SharedLibrary(env['plugin_dir']+name, files)
|
||||||
|
|
Loading…
Reference in New Issue