Restructured main SCons file in the same way as the one for the GL plugin.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@328 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
93f45b773c
commit
0ebba1bde0
103
SConstruct
103
SConstruct
|
@ -5,29 +5,41 @@ import sys
|
||||||
dolphin_version = '1.04'
|
dolphin_version = '1.04'
|
||||||
Export('dolphin_version')
|
Export('dolphin_version')
|
||||||
|
|
||||||
warnings = ' -Wall -Wwrite-strings -Wfloat-equal -Wshadow -Wpointer-arith -Wpacked -Wno-conversion'
|
warnings = [
|
||||||
|
'all',
|
||||||
|
'write-strings',
|
||||||
|
'float-equal',
|
||||||
|
'shadow',
|
||||||
|
'pointer-arith',
|
||||||
|
'packed',
|
||||||
|
'no-conversion',
|
||||||
|
#'unreachable-code',
|
||||||
|
]
|
||||||
|
compileFlags = [
|
||||||
|
'-g',
|
||||||
|
'-O3',
|
||||||
|
'-fno-strict-aliasing',
|
||||||
|
'-fPIC',
|
||||||
|
'-msse2',
|
||||||
|
'-D_FILE_OFFSET_BITS=64',
|
||||||
|
'-D_LARGEFILE_SOURCE',
|
||||||
|
]
|
||||||
|
compileFlags += [ '-W' + warning for warning in warnings ]
|
||||||
|
#compileFlags += [ '-DLOGGING' ]
|
||||||
|
#compileFlags += [ '-fomit-frame-pointer' ]
|
||||||
|
if sys.platform == 'darwin':
|
||||||
|
compileFlags += [ '-I/opt/local/include' ]
|
||||||
|
|
||||||
nonactive_warnings = '-Wunreachable-code'
|
include_paths = [
|
||||||
|
'../../../Core/Common/Src',
|
||||||
ccflags = '-g -O3 -fno-strict-aliasing -fPIC -msse2 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE' + warnings
|
'../../../Core/DiscIO/Src',
|
||||||
#ccflags += ' -DLOGGING'
|
'../../../PluginSpecs',
|
||||||
|
'../../../',
|
||||||
if sys.platform == 'darwin':
|
'../../../Core/Core/Src',
|
||||||
ccflags += ' -I/opt/local/include'
|
'../../../Core/DebuggerWX/src',
|
||||||
|
'../../../../Externals/Bochs_disasm',
|
||||||
if False:
|
'../../../Core/VideoCommon/Src',
|
||||||
ccflags += ' -fomit-frame-pointer'
|
]
|
||||||
|
|
||||||
include_paths = ["../../../Core/Common/Src",
|
|
||||||
"../../../Core/DiscIO/Src",
|
|
||||||
"../../../PluginSpecs",
|
|
||||||
"../../../",
|
|
||||||
"../../../Core/Core/Src",
|
|
||||||
"../../../Core/DebuggerWX/src",
|
|
||||||
"../../../../Externals/Bochs_disasm",
|
|
||||||
"../../../Core/VideoCommon/Src",
|
|
||||||
# "../../../Plugins/Plugin_VideoOGL/Src/Windows",
|
|
||||||
]
|
|
||||||
|
|
||||||
dirs = [
|
dirs = [
|
||||||
"Source/Core/Common/Src",
|
"Source/Core/Common/Src",
|
||||||
|
@ -38,44 +50,43 @@ dirs = [
|
||||||
"Source/Core/VideoCommon/Src",
|
"Source/Core/VideoCommon/Src",
|
||||||
"Source/Plugins/Plugin_VideoOGL/Src",
|
"Source/Plugins/Plugin_VideoOGL/Src",
|
||||||
"Source/Plugins/Plugin_DSP_HLE/Src",
|
"Source/Plugins/Plugin_DSP_HLE/Src",
|
||||||
# "Source/Plugins/Plugin_DSP_LLE/Src",
|
#"Source/Plugins/Plugin_DSP_LLE/Src",
|
||||||
"Source/Plugins/Plugin_PadSimple/Src",
|
"Source/Plugins/Plugin_PadSimple/Src",
|
||||||
"Source/Plugins/Plugin_nJoy_SDL/Src",
|
"Source/Plugins/Plugin_nJoy_SDL/Src",
|
||||||
"Source/Core/DolphinWX/src",
|
"Source/Core/DolphinWX/src",
|
||||||
]
|
]
|
||||||
|
|
||||||
builders = {}
|
builders = {}
|
||||||
if sys.platform == 'darwin':
|
if sys.platform == 'darwin':
|
||||||
from plistlib import writePlist
|
from plistlib import writePlist
|
||||||
def create_plist(target, source, env):
|
def createPlist(target, source, env):
|
||||||
properties = {}
|
properties = {}
|
||||||
for src_node in source:
|
for srcNode in source:
|
||||||
properties.update(src_node.value)
|
properties.update(srcNode.value)
|
||||||
for dst_node in target:
|
for dstNode in target:
|
||||||
writePlist(properties, str(dst_node))
|
writePlist(properties, str(dstNode))
|
||||||
builders['Plist'] = Builder(action = create_plist)
|
builders['Plist'] = Builder(action = createPlist)
|
||||||
|
|
||||||
lib_paths = include_paths
|
lib_paths = include_paths
|
||||||
|
|
||||||
env = Environment(CC="gcc",
|
env = Environment(
|
||||||
CXX="g++",
|
CC = "gcc",
|
||||||
CCFLAGS=ccflags,
|
CXX = "g++",
|
||||||
CXXFLAGS=ccflags,
|
CCFLAGS = compileFlags,
|
||||||
CPPPATH=include_paths,
|
CXXFLAGS = compileFlags,
|
||||||
LIBPATH=lib_paths,
|
CPPPATH = include_paths,
|
||||||
ENV={'PATH' : os.environ['PATH'],
|
LIBPATH = lib_paths,
|
||||||
'HOME' : os.environ['HOME']},
|
ENV = {
|
||||||
BUILDERS = builders,
|
'PATH' : os.environ['PATH'],
|
||||||
)
|
'HOME' : os.environ['HOME']
|
||||||
|
},
|
||||||
|
BUILDERS = builders,
|
||||||
|
)
|
||||||
|
|
||||||
Export('env')
|
Export('env')
|
||||||
|
|
||||||
builddir = "build"
|
for subdir in dirs:
|
||||||
|
|
||||||
for dir in dirs:
|
|
||||||
SConscript(
|
SConscript(
|
||||||
dir + os.sep + "SConscript",
|
subdir + os.sep + 'SConscript',
|
||||||
# build_dir = builddir + os.sep + dir,
|
|
||||||
duplicate = 0
|
duplicate = 0
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -26,5 +26,5 @@ files = ["ABI.cpp",
|
||||||
]
|
]
|
||||||
|
|
||||||
env_common = env.Copy()
|
env_common = env.Copy()
|
||||||
env_common.Append(CXXFLAGS = " -fPIC ")
|
env_common.Append(CXXFLAGS = [ '-fPIC' ])
|
||||||
env_common.StaticLibrary("common", files)
|
env_common.StaticLibrary("common", files)
|
||||||
|
|
Loading…
Reference in New Issue