more scons build fixups

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2960 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
nakeee 2009-04-12 21:30:22 +00:00
parent 0fa8d7683a
commit 5f862cf297
12 changed files with 55 additions and 47 deletions

View File

@ -19,4 +19,4 @@ env_bochs = env.Clone(
CXXFLAGS = env.filterWarnings(env['CXXFLAGS']), CXXFLAGS = env.filterWarnings(env['CXXFLAGS']),
) )
env_bochs.StaticLibrary("bdisasm", files) env_bochs.StaticLibrary(env['local_libs'] + "bdisasm", files)

View File

@ -10,4 +10,4 @@ env_lzo = env.Clone(
CCFLAGS = env.filterWarnings(env['CCFLAGS']), CCFLAGS = env.filterWarnings(env['CCFLAGS']),
CXXFLAGS = env.filterWarnings(env['CXXFLAGS']), CXXFLAGS = env.filterWarnings(env['CXXFLAGS']),
) )
env_lzo.StaticLibrary("minilzo", files) env_lzo.StaticLibrary(env['local_libs'] + "minilzo", files)

View File

@ -41,20 +41,21 @@ cppDefines = [
'GCC_HASCLASSVISIBILITY', 'GCC_HASCLASSVISIBILITY',
] ]
basedir = os.getcwd()+ '/'
include_paths = [ include_paths = [
'../../../Core/Common/Src', basedir + 'Source/Core/Common/Src',
'../../../Core/DiscIO/Src', basedir + 'Source/Core/DiscIO/Src',
'../../../PluginSpecs', basedir + 'Source/PluginSpecs',
'../../../', basedir + 'Source/Core/Core/Src',
'../../../Core/Core/Src', basedir + 'Source/Core/DebuggerWX/Src',
'../../../Core/DebuggerWX/Src', basedir + 'Externals/Bochs_disasm',
'../../../../Externals/Bochs_disasm', basedir + 'Externals/LZO',
'../../../../Externals/LZO', basedir + 'Externals/WiiUseSrc/Src',
'../../../../Externals/WiiUseSrc/Src', basedir + 'Source/Core/VideoCommon/Src',
'../../../Core/VideoCommon/Src', basedir + 'Source/Core/InputCommon/Src',
'../../../Core/InputCommon/Src', basedir + 'Source/Core/AudioCommon/Src',
'../../../Core/AudioCommon/Src', basedir + 'Source/Core/DSPCore/Src',
'../../../Core/DSPCore/Src',
] ]
dirs = [ dirs = [
@ -68,7 +69,7 @@ dirs = [
'Source/Core/InputCommon/Src', 'Source/Core/InputCommon/Src',
'Source/Core/AudioCommon/Src', 'Source/Core/AudioCommon/Src',
'Source/Core/DSPCore/Src', 'Source/Core/DSPCore/Src',
'Source/DSPTool/', 'Source/DSPTool/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',
@ -92,8 +93,6 @@ if sys.platform == 'darwin':
writePlist(properties, str(dstNode)) writePlist(properties, str(dstNode))
builders['Plist'] = Builder(action = createPlist) builders['Plist'] = Builder(action = createPlist)
lib_paths = include_paths
# handle command line options # handle command line options
vars = Variables('args.cache') vars = Variables('args.cache')
@ -122,9 +121,9 @@ vars.AddVariables(
if sys.platform == 'win32': if sys.platform == 'win32':
env = Environment( env = Environment(
CPPPATH = include_paths, CPPPATH = include_paths,
LIBPATH = lib_paths,
RPATH = [], RPATH = [],
LIBS = [], LIBS = [],
LIBPATH = [],
tools = [ 'mingw' ], tools = [ 'mingw' ],
variables = vars, variables = vars,
ENV = os.environ, ENV = os.environ,
@ -138,10 +137,10 @@ if sys.platform == 'win32':
else: else:
env = Environment( env = Environment(
CPPPATH = include_paths, CPPPATH = include_paths,
LIBPATH = lib_paths,
RPATH = [], RPATH = [],
LIBS = [], LIBS = [],
variables = vars, LIBPATH = [],
variables = vars,
ENV = { ENV = {
'PATH' : os.environ['PATH'], 'PATH' : os.environ['PATH'],
'HOME' : os.environ['HOME'] 'HOME' : os.environ['HOME']
@ -215,8 +214,11 @@ tests = {'CheckWXConfig' : wxconfig.CheckWXConfig,
'CheckPortaudio' : utils.CheckPortaudio, 'CheckPortaudio' : utils.CheckPortaudio,
} }
build_dir = os.path.join('Build', platform.system() + '-' + platform.machine() + '-' + env['flavor'] + os.sep) #object files
VariantDir(build_dir, '.', duplicate=0) env['build_dir'] = os.path.join(basedir, 'Build', platform.system() + '-' + platform.machine() + '-' + env['flavor'] + os.sep)
VariantDir(env['build_dir'], '.', duplicate=0)
conf = env.Configure(custom_tests = tests, conf = env.Configure(custom_tests = tests,
config_h="Source/Core/Common/Src/Config.h") config_h="Source/Core/Common/Src/Config.h")
@ -342,7 +344,7 @@ else:
env.AddMethod(utils.filterWarnings) env.AddMethod(utils.filterWarnings)
# Where do we run from # Where do we run from
env['base_dir'] = os.getcwd()+ '/'; env['base_dir'] = os.getcwd()+ '/'
# install paths # install paths
extra='' extra=''
@ -367,6 +369,10 @@ env['data_dir'] = env['prefix']
env['RPATH'].append(env['libs_dir']) env['RPATH'].append(env['libs_dir'])
# static libs goes here
env['local_libs'] = env['build_dir'] + os.sep + 'libs' + os.sep
env['LIBPATH'].append(env['local_libs'])
env['LIBPATH'].append(env['libs_dir']) env['LIBPATH'].append(env['libs_dir'])
@ -390,7 +396,7 @@ Export('env')
for subdir in dirs: for subdir in dirs:
SConscript( SConscript(
subdir + os.sep + 'SConscript', subdir + os.sep + 'SConscript',
variant_dir = build_dir + subdir + os.sep, variant_dir = env[ 'build_dir' ] + subdir + os.sep,
duplicate=0 duplicate=0
) )

View File

@ -18,4 +18,4 @@ if acenv['HAVE_OPENAL']:
if acenv['HAVE_AO']: if acenv['HAVE_AO']:
files += [ 'AOSoundStream.cpp' ] files += [ 'AOSoundStream.cpp' ]
acenv.StaticLibrary('audiocommon', files) acenv.StaticLibrary(env['local_libs'] + 'audiocommon', files)

View File

@ -42,4 +42,4 @@ if sys.platform == 'win32':
env_common = env.Clone() env_common = env.Clone()
env_common.Append(CXXFLAGS = [ '-fPIC' ]) env_common.Append(CXXFLAGS = [ '-fPIC' ])
env_common.StaticLibrary("common", files) env_common.StaticLibrary(env['local_libs'] + "common", files)

View File

@ -129,4 +129,4 @@ libs = [
] ]
env_core = env.Clone(); env_core = env.Clone();
env_core.StaticLibrary('core', files, LIBS=libs) env_core.StaticLibrary(env['local_libs'] + 'core', files, LIBS=libs)

View File

@ -3,22 +3,24 @@
Import('env') Import('env')
files = [ files = [
"disassemble.cpp", "assemble.cpp",
"gdsp_aram.cpp", "disassemble.cpp",
"gdsp_condition_codes.cpp", "gdsp_aram.cpp",
"gdsp_ext_op.cpp", "gdsp_condition_codes.cpp",
"gdsp_interface.cpp", "gdsp_ext_op.cpp",
"gdsp_interpreter.cpp", "gdsp_interface.cpp",
"gdsp_memory.cpp", "gdsp_interpreter.cpp",
"gdsp_registers.cpp", "gdsp_memory.cpp",
"DSPAnalyzer.cpp", "gdsp_registers.cpp",
"DSPInterpreter.cpp", "DSPAnalyzer.cpp",
"DSPJit.cpp", "DSPInterpreter.cpp",
# "DSPHost.cpp", "DSPJit.cpp",
"DSPTables.cpp", "DSPCodeUtil.cpp",
# "DSPHost.cpp",
"DSPTables.cpp",
] ]
acenv = env.Clone() acenv = env.Clone()
acenv.Append(CXXFLAGS = [ '-fPIC' ]) acenv.Append(CXXFLAGS = [ '-fPIC' ])
acenv.StaticLibrary('dspcore', files) acenv.StaticLibrary(env['local_libs'] + 'dspcore', files, LIBS = [ 'common'] )

View File

@ -34,4 +34,4 @@ libs = [
'common' 'common'
] ]
wxenv.StaticLibrary("debwx", files, LIBS = libs) wxenv.StaticLibrary(env['local_libs'] + "debwx", files, LIBS = libs)

View File

@ -24,4 +24,4 @@ files = [
libs = [ libs = [
'common' 'common'
] ]
env.StaticLibrary('discio', files, LIBS = libs) env.StaticLibrary(env['local_libs'] + 'discio', files, LIBS = libs)

View File

@ -11,4 +11,4 @@ files = [
env_inputcommon = env.Clone() env_inputcommon = env.Clone()
env_inputcommon.Append(CXXFLAGS = [ '-fPIC' ]) env_inputcommon.Append(CXXFLAGS = [ '-fPIC' ])
env_inputcommon.StaticLibrary("inputcommon", files) env_inputcommon.StaticLibrary(env['local_libs'] + "inputcommon", files)

View File

@ -34,4 +34,4 @@ files = [
env_common = env.Clone() env_common = env.Clone()
env_common.Append(CXXFLAGS = [ '-fPIC' ]) env_common.Append(CXXFLAGS = [ '-fPIC' ])
env_common.StaticLibrary("videocommon", files) env_common.StaticLibrary(env['local_libs'] + "videocommon", files)

View File

@ -9,8 +9,8 @@ files = [
] ]
libs = [ libs = [
'common',
'dspcore', 'dspcore',
'common',
] ]