mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-14 21:37:52 -07:00
ee39265c1a
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@354 8ced0084-cf51-0410-be5f-012b33b47a6e
94 lines
2.0 KiB
Python
94 lines
2.0 KiB
Python
import os
|
|
import sys
|
|
|
|
# TODO: What is the current Dolphin version?
|
|
dolphin_version = '1.04'
|
|
Export('dolphin_version')
|
|
|
|
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',
|
|
'-DGCC_HASCLASSVISIBILITY',
|
|
'-fvisibility=hidden',
|
|
]
|
|
compileFlags += [ '-W' + warning for warning in warnings ]
|
|
#compileFlags += [ '-DLOGGING' ]
|
|
#compileFlags += [ '-fomit-frame-pointer' ]
|
|
if sys.platform == 'darwin':
|
|
compileFlags += [ '-I/opt/local/include' ]
|
|
|
|
include_paths = [
|
|
'../../../Core/Common/Src',
|
|
'../../../Core/DiscIO/Src',
|
|
'../../../PluginSpecs',
|
|
'../../../',
|
|
'../../../Core/Core/Src',
|
|
'../../../Core/DebuggerWX/src',
|
|
'../../../../Externals/Bochs_disasm',
|
|
'../../../Core/VideoCommon/Src',
|
|
]
|
|
|
|
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",
|
|
#"Source/Plugins/Plugin_DSP_LLE/Src",
|
|
"Source/Plugins/Plugin_PadSimple/Src",
|
|
"Source/Plugins/Plugin_nJoy_SDL/Src",
|
|
"Source/Core/DolphinWX/src",
|
|
]
|
|
|
|
builders = {}
|
|
if sys.platform == 'darwin':
|
|
from plistlib import writePlist
|
|
def createPlist(target, source, env):
|
|
properties = {}
|
|
for srcNode in source:
|
|
properties.update(srcNode.value)
|
|
for dstNode in target:
|
|
writePlist(properties, str(dstNode))
|
|
builders['Plist'] = Builder(action = createPlist)
|
|
|
|
lib_paths = include_paths
|
|
|
|
env = Environment(
|
|
CC = "gcc",
|
|
CXX = "g++",
|
|
CCFLAGS = ' '.join(compileFlags),
|
|
CXXFLAGS = ' '.join(compileFlags + [ '-fvisibility-inlines-hidden' ]),
|
|
CPPPATH = include_paths,
|
|
LIBPATH = lib_paths,
|
|
ENV = {
|
|
'PATH' : os.environ['PATH'],
|
|
'HOME' : os.environ['HOME']
|
|
},
|
|
BUILDERS = builders,
|
|
)
|
|
|
|
Export('env')
|
|
|
|
for subdir in dirs:
|
|
SConscript(
|
|
subdir + os.sep + 'SConscript',
|
|
duplicate = 0
|
|
)
|