2008-07-12 17:40:22 +00:00
|
|
|
import os
|
2008-07-30 09:12:52 +00:00
|
|
|
import sys
|
2008-07-12 17:40:22 +00:00
|
|
|
|
2008-08-12 23:17:29 +00:00
|
|
|
# TODO: What is the current Dolphin version?
|
|
|
|
dolphin_version = '1.04'
|
|
|
|
Export('dolphin_version')
|
|
|
|
|
2008-08-26 21:02:23 +00:00
|
|
|
warnings = [
|
|
|
|
'all',
|
|
|
|
'write-strings',
|
2008-08-27 12:01:18 +00:00
|
|
|
#'float-equal',
|
2008-08-26 21:02:23 +00:00
|
|
|
'shadow',
|
|
|
|
'pointer-arith',
|
|
|
|
'packed',
|
|
|
|
'no-conversion',
|
2008-09-01 12:11:08 +00:00
|
|
|
# 'error',
|
2008-08-26 21:02:23 +00:00
|
|
|
#'unreachable-code',
|
|
|
|
]
|
|
|
|
compileFlags = [
|
2008-09-10 16:42:29 +00:00
|
|
|
# '-g',
|
2008-08-26 21:02:23 +00:00
|
|
|
'-O3',
|
|
|
|
'-fno-strict-aliasing',
|
|
|
|
'-msse2',
|
|
|
|
'-D_FILE_OFFSET_BITS=64',
|
|
|
|
'-D_LARGEFILE_SOURCE',
|
2008-08-27 01:42:11 +00:00
|
|
|
'-DGCC_HASCLASSVISIBILITY',
|
|
|
|
'-fvisibility=hidden',
|
2008-08-26 21:02:23 +00: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 17:40:22 +00:00
|
|
|
|
2008-08-26 21:02:23 +00:00
|
|
|
include_paths = [
|
|
|
|
'../../../Core/Common/Src',
|
|
|
|
'../../../Core/DiscIO/Src',
|
|
|
|
'../../../PluginSpecs',
|
|
|
|
'../../../',
|
|
|
|
'../../../Core/Core/Src',
|
|
|
|
'../../../Core/DebuggerWX/src',
|
|
|
|
'../../../../Externals/Bochs_disasm',
|
2008-09-12 09:15:54 +00:00
|
|
|
'../../../../Externals/LZO',
|
2008-08-26 21:02:23 +00:00
|
|
|
'../../../Core/VideoCommon/Src',
|
|
|
|
]
|
2008-07-12 17:40:22 +00:00
|
|
|
|
2008-08-20 11:01:29 +00:00
|
|
|
dirs = [
|
|
|
|
"Source/Core/Common/Src",
|
|
|
|
"Externals/Bochs_disasm",
|
2008-09-12 09:15:54 +00:00
|
|
|
"Externals/LZO",
|
2008-08-20 11:01:29 +00:00
|
|
|
"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 21:02:23 +00:00
|
|
|
#"Source/Plugins/Plugin_DSP_LLE/Src",
|
2008-08-20 11:01:29 +00:00
|
|
|
"Source/Plugins/Plugin_PadSimple/Src",
|
|
|
|
"Source/Plugins/Plugin_nJoy_SDL/Src",
|
2008-09-08 06:39:17 +00:00
|
|
|
"Source/Core/DolphinWX/Src",
|
2008-08-20 11:01:29 +00:00
|
|
|
]
|
|
|
|
|
2008-08-12 23:17:29 +00:00
|
|
|
builders = {}
|
2008-08-26 21:02:23 +00:00
|
|
|
if sys.platform == 'darwin':
|
2008-08-12 23:17:29 +00:00
|
|
|
from plistlib import writePlist
|
2008-08-26 21:02:23 +00:00
|
|
|
def createPlist(target, source, env):
|
2008-08-12 23:17:29 +00:00
|
|
|
properties = {}
|
2008-08-26 21:02:23 +00: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 23:17:29 +00:00
|
|
|
|
2008-07-12 17:40:22 +00:00
|
|
|
lib_paths = include_paths
|
|
|
|
|
2008-08-26 21:02:23 +00:00
|
|
|
env = Environment(
|
|
|
|
CC = "gcc",
|
|
|
|
CXX = "g++",
|
2008-08-26 22:28:42 +00:00
|
|
|
CCFLAGS = ' '.join(compileFlags),
|
2008-08-27 11:52:28 +00:00
|
|
|
CXXFLAGS = ' '.join(compileFlags + [ '-fvisibility-inlines-hidden' ]),
|
2008-08-26 21:02:23 +00:00
|
|
|
CPPPATH = include_paths,
|
|
|
|
LIBPATH = lib_paths,
|
|
|
|
ENV = {
|
|
|
|
'PATH' : os.environ['PATH'],
|
|
|
|
'HOME' : os.environ['HOME']
|
|
|
|
},
|
|
|
|
BUILDERS = builders,
|
|
|
|
)
|
2008-07-12 17:40:22 +00:00
|
|
|
|
|
|
|
Export('env')
|
|
|
|
|
2008-08-26 21:02:23 +00:00
|
|
|
for subdir in dirs:
|
2008-07-12 17:40:22 +00:00
|
|
|
SConscript(
|
2008-08-26 21:02:23 +00:00
|
|
|
subdir + os.sep + 'SConscript',
|
2008-07-12 17:40:22 +00:00
|
|
|
duplicate = 0
|
|
|
|
)
|