2008-07-12 11:40:22 -06:00
|
|
|
import os
|
2008-07-30 03:12:52 -06:00
|
|
|
import sys
|
2008-07-12 11:40:22 -06:00
|
|
|
|
2008-08-12 17:17:29 -06:00
|
|
|
# TODO: What is the current Dolphin version?
|
|
|
|
dolphin_version = '1.04'
|
|
|
|
Export('dolphin_version')
|
|
|
|
|
2008-08-26 15:02:23 -06:00
|
|
|
warnings = [
|
|
|
|
'all',
|
|
|
|
'write-strings',
|
|
|
|
'float-equal',
|
|
|
|
'shadow',
|
|
|
|
'pointer-arith',
|
|
|
|
'packed',
|
|
|
|
'no-conversion',
|
|
|
|
#'unreachable-code',
|
|
|
|
]
|
|
|
|
compileFlags = [
|
|
|
|
'-g',
|
|
|
|
'-O3',
|
|
|
|
'-fno-strict-aliasing',
|
|
|
|
'-msse2',
|
|
|
|
'-D_FILE_OFFSET_BITS=64',
|
|
|
|
'-D_LARGEFILE_SOURCE',
|
2008-08-26 19:42:11 -06:00
|
|
|
'-DGCC_HASCLASSVISIBILITY',
|
|
|
|
'-fvisibility=hidden',
|
|
|
|
'-fvisibility-inlines-hidden',
|
2008-08-26 15:02:23 -06:00
|
|
|
]
|
|
|
|
compileFlags += [ '-W' + warning for warning in warnings ]
|
|
|
|
#compileFlags += [ '-DLOGGING' ]
|
|
|
|
#compileFlags += [ '-fomit-frame-pointer' ]
|
|
|
|
if sys.platform == 'darwin':
|
|
|
|
compileFlags += [ '-I/opt/local/include' ]
|
2008-07-12 11:40:22 -06:00
|
|
|
|
2008-08-26 15:02:23 -06:00
|
|
|
include_paths = [
|
|
|
|
'../../../Core/Common/Src',
|
|
|
|
'../../../Core/DiscIO/Src',
|
|
|
|
'../../../PluginSpecs',
|
|
|
|
'../../../',
|
|
|
|
'../../../Core/Core/Src',
|
|
|
|
'../../../Core/DebuggerWX/src',
|
|
|
|
'../../../../Externals/Bochs_disasm',
|
|
|
|
'../../../Core/VideoCommon/Src',
|
|
|
|
]
|
2008-07-12 11:40:22 -06:00
|
|
|
|
2008-08-20 05:01:29 -06:00
|
|
|
dirs = [
|
|
|
|
"Source/Core/Common/Src",
|
|
|
|
"Externals/Bochs_disasm",
|
|
|
|
"Source/Core/Core/Src",
|
|
|
|
"Source/Core/DiscIO/Src",
|
|
|
|
"Source/Core/DebuggerWX/src",
|
|
|
|
"Source/Core/VideoCommon/Src",
|
|
|
|
"Source/Plugins/Plugin_VideoOGL/Src",
|
|
|
|
"Source/Plugins/Plugin_DSP_HLE/Src",
|
2008-08-26 15:02:23 -06:00
|
|
|
#"Source/Plugins/Plugin_DSP_LLE/Src",
|
2008-08-20 05:01:29 -06:00
|
|
|
"Source/Plugins/Plugin_PadSimple/Src",
|
|
|
|
"Source/Plugins/Plugin_nJoy_SDL/Src",
|
|
|
|
"Source/Core/DolphinWX/src",
|
|
|
|
]
|
|
|
|
|
2008-08-12 17:17:29 -06:00
|
|
|
builders = {}
|
2008-08-26 15:02:23 -06:00
|
|
|
if sys.platform == 'darwin':
|
2008-08-12 17:17:29 -06:00
|
|
|
from plistlib import writePlist
|
2008-08-26 15:02:23 -06:00
|
|
|
def createPlist(target, source, env):
|
2008-08-12 17:17:29 -06:00
|
|
|
properties = {}
|
2008-08-26 15:02:23 -06:00
|
|
|
for srcNode in source:
|
|
|
|
properties.update(srcNode.value)
|
|
|
|
for dstNode in target:
|
|
|
|
writePlist(properties, str(dstNode))
|
|
|
|
builders['Plist'] = Builder(action = createPlist)
|
2008-08-12 17:17:29 -06:00
|
|
|
|
2008-07-12 11:40:22 -06:00
|
|
|
lib_paths = include_paths
|
|
|
|
|
2008-08-26 15:02:23 -06:00
|
|
|
env = Environment(
|
|
|
|
CC = "gcc",
|
|
|
|
CXX = "g++",
|
2008-08-26 16:28:42 -06:00
|
|
|
CCFLAGS = ' '.join(compileFlags),
|
|
|
|
CXXFLAGS = ' '.join(compileFlags),
|
2008-08-26 15:02:23 -06:00
|
|
|
CPPPATH = include_paths,
|
|
|
|
LIBPATH = lib_paths,
|
|
|
|
ENV = {
|
|
|
|
'PATH' : os.environ['PATH'],
|
|
|
|
'HOME' : os.environ['HOME']
|
|
|
|
},
|
|
|
|
BUILDERS = builders,
|
|
|
|
)
|
2008-07-12 11:40:22 -06:00
|
|
|
|
|
|
|
Export('env')
|
|
|
|
|
2008-08-26 15:02:23 -06:00
|
|
|
for subdir in dirs:
|
2008-07-12 11:40:22 -06:00
|
|
|
SConscript(
|
2008-08-26 15:02:23 -06:00
|
|
|
subdir + os.sep + 'SConscript',
|
2008-07-12 11:40:22 -06:00
|
|
|
duplicate = 0
|
|
|
|
)
|