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
26
SConstruct
26
SConstruct
|
@ -40,9 +40,6 @@ cppDefines = [
|
|||
'GCC_HASCLASSVISIBILITY',
|
||||
]
|
||||
|
||||
|
||||
|
||||
|
||||
include_paths = [
|
||||
'../../../Core/Common/Src',
|
||||
'../../../Core/DiscIO/Src',
|
||||
|
@ -92,21 +89,26 @@ lib_paths = include_paths
|
|||
|
||||
# handle command line options
|
||||
vars = Variables('args.cache')
|
||||
|
||||
vars.AddVariables(
|
||||
BoolVariable('verbose', 'Set for compilation line', False),
|
||||
BoolVariable('bundle', 'Set to create bundle', False),
|
||||
BoolVariable('lint', 'Set for lint build (extra warnings)', 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',
|
||||
allowed_values = ('release', 'devel', 'debug'),
|
||||
ignorecase = 2
|
||||
),
|
||||
EnumVariable('osx', 'Choose a backend (WIP)', '32coca',
|
||||
allowed_values = ('32x11', '32coca', '64coca'),
|
||||
ignorecase = 2
|
||||
),
|
||||
PathVariable('wxconfig', 'Path to the wxconfig', None),
|
||||
('CC', 'The c compiler', 'gcc'),
|
||||
('CXX', 'The c++ compiler', 'g++'),
|
||||
)
|
||||
|
||||
|
||||
env = Environment(
|
||||
CPPPATH = include_paths,
|
||||
LIBPATH = lib_paths,
|
||||
|
@ -188,15 +190,16 @@ env['HAVE_AO'] = conf.CheckPKG('ao')
|
|||
env['HAVE_WX'] = conf.CheckWXConfig('2.8', ['gl', 'adv', 'core', 'base'],
|
||||
0) #env['flavor'] == 'debug')
|
||||
|
||||
# X11 detection
|
||||
env['HAVE_X11'] = conf.CheckPKG('x11')
|
||||
|
||||
#osx 64 specifics
|
||||
if env['osx64']:
|
||||
# SDL and WX are broken on osx 64
|
||||
# env['HAVE_SDL'] = 0
|
||||
# env['HAVE_WX'] = 0;
|
||||
if sys.platform == 'darwin':
|
||||
if env['osx'] == '64coca':
|
||||
compileFlags += ['-arch' , 'x86_64', '-DOSX64']
|
||||
if env['osx'] == '64coca' or env['osx'] == '32coca':
|
||||
env['HAVE_X11'] = 0
|
||||
env['HAVE_COCOA'] = conf.CheckPKG('cocoa')
|
||||
else:
|
||||
env['HAVE_X11'] = conf.CheckPKG('x11')
|
||||
env['HAVE_COCOA'] = 0
|
||||
|
||||
# Gui less build
|
||||
if env['nowx']:
|
||||
|
@ -208,6 +211,7 @@ conf.Define('HAVE_BLUEZ', env['HAVE_BLUEZ'])
|
|||
conf.Define('HAVE_AO', env['HAVE_AO'])
|
||||
conf.Define('HAVE_WX', env['HAVE_WX'])
|
||||
conf.Define('HAVE_X11', env['HAVE_X11'])
|
||||
conf.Define('HAVE_COCOA', env['HAVE_COCOA'])
|
||||
|
||||
# After all configuration tests are done
|
||||
conf.Finish()
|
||||
|
|
|
@ -123,10 +123,11 @@ CFrame::CFrame(wxFrame* parent,
|
|||
const wxSize& size,
|
||||
long style)
|
||||
: wxFrame(parent, id, title, pos, size, style)
|
||||
, m_Panel(NULL)
|
||||
, m_pStatusBar(NULL)
|
||||
, m_pMenuBar(NULL)
|
||||
, HaveLeds(false), HaveSpeakers(false)
|
||||
, m_Panel(NULL)
|
||||
, m_pMenuBar(NULL)
|
||||
|
||||
{
|
||||
InitBitmaps();
|
||||
|
||||
|
|
|
@ -20,16 +20,8 @@ files = [
|
|||
]
|
||||
|
||||
dspenv = env.Clone()
|
||||
if not dspenv['osx64']:
|
||||
dspenv.Append(
|
||||
dspenv.Append(
|
||||
CXXFLAGS = [ '-fPIC' ],
|
||||
LIBS = [ 'common' ],
|
||||
)
|
||||
else:
|
||||
dspenv.Append(
|
||||
CXXFLAGS = [ '-fPIC','-arch', 'x86_64' ],
|
||||
LINKFLAGS = [ '-arch', 'x86_64' ],
|
||||
LIBS = [ 'common' ],
|
||||
)
|
||||
|
||||
dspenv.SharedLibrary(env['plugin_dir']+name, files)
|
||||
|
|
|
@ -14,7 +14,7 @@ files = [
|
|||
]
|
||||
padenv = env.Clone()
|
||||
|
||||
if not padenv['osx64']:
|
||||
if not padenv['HAVE_WX']:
|
||||
files += [
|
||||
"GUI/ConfigDlg.cpp",
|
||||
"XInputBase.cpp",
|
||||
|
@ -22,10 +22,4 @@ if not padenv['osx64']:
|
|||
|
||||
padenv.Append(LIBS = [ 'common' ])
|
||||
|
||||
if padenv['osx64']:
|
||||
padenv.Append(
|
||||
CXXFLAGS = [ '-arch', 'x86_64' ],
|
||||
LINKFLAGS = [ '-arch', 'x86_64' ],
|
||||
)
|
||||
|
||||
padenv.SharedLibrary(env['plugin_dir']+name, files)
|
||||
|
|
|
@ -54,15 +54,13 @@ if gfxenv['HAVE_WX']:
|
|||
'Debugger/PBView.cpp',
|
||||
]
|
||||
|
||||
if gfxenv['osx64']:
|
||||
if gfxenv['HAVE_COCOA']:
|
||||
files += [ 'cocoaGL.m' ]
|
||||
compileFlags += [
|
||||
'-x',
|
||||
'objective-c++',
|
||||
]
|
||||
|
||||
|
||||
|
||||
tests = {'CheckPKG' : utils.CheckPKG}
|
||||
conf = gfxenv.Configure(custom_tests = tests,
|
||||
config_h="Source/Core/Common/Src/Config.h")
|
||||
|
@ -72,14 +70,16 @@ if sys.platform == 'darwin':
|
|||
# Use libraries from MacPorts.
|
||||
compileFlags.append('-I/opt/local/include')
|
||||
linkFlags.append('-L/opt/local/lib')
|
||||
conf.CheckPKG('cocoa')
|
||||
conf.CheckPKG('OpenGL')
|
||||
if not conf.CheckPKG('Cg'):
|
||||
print name + " must have Cg from nvidia to be build"
|
||||
|
||||
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'):
|
||||
if not conf.CheckPKG('Cg') or not conf.CheckPKG('CgGL'):
|
||||
print name + " must have cg and cggl to be build"
|
||||
Return()
|
||||
|
||||
|
@ -89,7 +89,8 @@ if not conf.CheckPKG('GLEW'):
|
|||
|
||||
# check for xxf86vm
|
||||
|
||||
gfxenv['HAVE_XXF86VM'] = conf.CheckPKG('xxf86vm')
|
||||
gfxenv['HAVE_XXF86VM'] = gfxenv['HAVE_X11'] and conf.CheckPKG('xxf86vm')
|
||||
|
||||
conf.Define('HAVE_XXF86VM', gfxenv['HAVE_XXF86VM'])
|
||||
|
||||
conf.Finish()
|
||||
|
|
|
@ -20,5 +20,5 @@ padenv.Append(
|
|||
CXXFLAGS = [ '-fPIC' ],
|
||||
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