Get rid of a number of unnecessary env.Clones.

Use SCons' convenient # shorthand for the root of our tree.
 
Also various minor cleanup of SConscripts.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5915 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Soren Jorvang
2010-07-19 03:42:37 +00:00
parent 4ecfa3b7a2
commit a2b1f829cb
29 changed files with 222 additions and 346 deletions
+1 -1
View File
@@ -1,4 +1,4 @@
# -*- python -*-
# -*- python -*-
Import('env')
import sys
+1 -1
View File
@@ -1,4 +1,4 @@
# -*- python -*-
# -*- python -*-
Import('env')
+34 -34
View File
@@ -1,44 +1,44 @@
# -*- python -*-
# -*- python -*-
import sys
Import('env')
import sys
luaenv = env.Clone()
if not sys.platform == 'win32':
luaenv['CPPDEFINES'].append('LUA_USE_LINUX') # Also works for OS X
luaenv['CPPDEFINES'].append('LUA_USE_LINUX') # Also works for OS X
files = [
'lapi.c',
'lauxlib.c',
'lbaselib.c',
'lcode.c',
'ldblib.c',
'ldebug.c',
'ldo.c',
'ldump.c',
'lfunc.c',
'lgc.c',
'linit.c',
'liolib.c',
'llex.c',
'lmathlib.c',
'lmem.c',
'loadlib.c',
'lobject.c',
'lopcodes.c',
'loslib.c',
'lparser.c',
'lstate.c',
'lstring.c',
'lstrlib.c',
'ltable.c',
'ltablib.c',
'ltm.c',
'lundump.c',
'lvm.c',
'lzio.c',
'print.c',
]
'lapi.c',
'lauxlib.c',
'lbaselib.c',
'lcode.c',
'ldblib.c',
'ldebug.c',
'ldo.c',
'ldump.c',
'lfunc.c',
'lgc.c',
'linit.c',
'liolib.c',
'llex.c',
'lmathlib.c',
'lmem.c',
'loadlib.c',
'lobject.c',
'lopcodes.c',
'loslib.c',
'lparser.c',
'lstate.c',
'lstring.c',
'lstrlib.c',
'ltable.c',
'ltablib.c',
'ltm.c',
'lundump.c',
'lvm.c',
'lzio.c',
'print.c',
]
luaenv.StaticLibrary(env['local_libs'] + "lua", files)
+3 -16
View File
@@ -1,14 +1,13 @@
# -*- python -*-
Import('env')
import sys
if not env['HAVE_WX']:
Return()
wxenv = env.Clone()
files = [
'src/mcmMain.cpp',
'src/MCMdebug.cpp',
]
libs = [
@@ -16,18 +15,6 @@ libs = [
'common',
]
if wxenv['HAVE_WX']:
files += [
'src/mcmMain.cpp',
'src/MCMdebug.cpp',
]
LIBS = libs
wxenv.Append(
LIBS = libs
)
exeGUI = env['binary_dir'] + 'MemcardManager'
wxenv.Program(exeGUI, files)
env.Program(exeGUI, files, LIBS = env['LIBS'] + libs)
+2 -43
View File
@@ -1,54 +1,13 @@
# -*- python -*-
# -*- python -*-
import sys
Import('env')
import sys
files = [
'src/SDL.c',
'src/SDL_error.c',
'src/SDL_fatal.c',
#'src/audio/SDL_audio.c',
#'src/audio/SDL_audiocvt.c',
#'src/audio/SDL_audiodev.c',
#'src/audio/SDL_mixer.c',
#'src/audio/SDL_mixer_MMX.c',
#'src/audio/SDL_mixer_MMX_VC.c',
#'src/audio/SDL_mixer_m68k.c',
#'src/audio/SDL_wave.c',
#'src/cdrom/SDL_cdrom.c',
#'src/cpuinfo/SDL_cpuinfo.c',
#'src/events/SDL_active.c',
#'src/events/SDL_events.c',
#'src/events/SDL_expose.c',
#'src/events/SDL_keyboard.c',
#'src/events/SDL_mouse.c',
#'src/events/SDL_quit.c',
#'src/events/SDL_resize.c',
#'src/file/SDL_rwops.c',
'src/joystick/SDL_joystick.c',
#'src/stdlib/SDL_getenv.c',
#'src/stdlib/SDL_iconv.c',
#'src/stdlib/SDL_malloc.c',
#'src/stdlib/SDL_qsort.c',
#'src/stdlib/SDL_stdlib.c',
#'src/thread/SDL_thread.c',
#'src/timer/SDL_timer.c',
#'src/video/SDL_RLEaccel.c',
#'src/video/SDL_blit.c',
#'src/video/SDL_blit_0.c',
#'src/video/SDL_blit_1.c',
#'src/video/SDL_blit_A.c',
#'src/video/SDL_blit_N.c',
#'src/video/SDL_bmp.c',
#'src/video/SDL_cursor.c',
#'src/video/SDL_gamma.c',
#'src/video/SDL_pixels.c',
#'src/video/SDL_stretch.c',
#'src/video/SDL_surface.c',
#'src/video/SDL_video.c',
#'src/video/SDL_yuv.c',
#'src/video/SDL_yuv_mmx.c',
#'src/video/SDL_yuv_sw.c',
]
if sys.platform == 'darwin':
+2 -3
View File
@@ -1,9 +1,8 @@
# -*- python -*-
# -*- python -*-
Import('env')
import sys
files = [
files = [
"SFML/Network/Ftp.cpp",
"SFML/Network/Http.cpp",
"SFML/Network/IPAddress.cpp",
+1 -1
View File
@@ -1,6 +1,6 @@
# -*- python -*-
Import('env')
import sys
files = [
'image_DXT.c',
+23 -19
View File
@@ -1,24 +1,28 @@
# -*- python -*-
# -*- python -*-
import sys
Import('env')
import sys
if (sys.platform == 'linux2' and env['HAVE_BLUEZ'] != 1):
env['HAVE_WIIUSE'] = 0
Return()
files = [
"io.c",
"ir.c",
"wiiuse.c",
]
if sys.platform == 'linux2' and env['HAVE_BLUEZ']:
files += [ "io_nix.c", ]
if sys.platform == 'darwin':
files += [ "io_osx.m", ]
env.StaticLibrary(env['local_libs'] + "wiiuse", files)
if (sys.platform == 'linux2' and not env['HAVE_BLUEZ']) or \
(not sys.platform == 'darwin' and
not sys.platform == 'linux2' and
not sys.platform == 'win32'):
env['HAVE_WIIUSE'] = 0
Return()
env['HAVE_WIIUSE'] = 1
files = [
"io.c",
"ir.c",
"wiiuse.c",
]
if sys.platform == 'darwin':
files += [ "io_osx.m" ]
elif sys.platform == 'linux2':
files += [ "io_nix.c" ]
elif sys.platform == 'win32':
files += [ "io_win.c" ]
env.StaticLibrary(env['local_libs'] + "wiiuse", files)
+1 -1
View File
@@ -1,4 +1,4 @@
# -*- python -*-
# -*- python -*-
Import('env')
+24 -30
View File
@@ -34,24 +34,22 @@ cppDefines = [
'GCC_HASCLASSVISIBILITY',
]
basedir = os.getcwd() + '/'
include_paths = [
basedir + 'Source/Core/Common/Src',
basedir + 'Source/Core/DiscIO/Src',
basedir + 'Source/PluginSpecs',
basedir + 'Source/Core/Core/Src',
basedir + 'Source/Core/DebuggerWX/Src',
basedir + 'Externals/Bochs_disasm',
basedir + 'Externals/Lua',
basedir + 'Externals/WiiUseSrc/Src',
basedir + 'Source/Core/VideoCommon/Src',
basedir + 'Source/Core/InputCommon/Src',
basedir + 'Source/Core/InputUICommon/Src',
basedir + 'Source/Core/AudioCommon/Src',
basedir + 'Source/Core/DebuggerUICommon/Src',
basedir + 'Source/Core/DolphinWX/Src',
basedir + 'Source/Core/DSPCore/Src',
'#Source/Core/Common/Src',
'#Source/Core/DiscIO/Src',
'#Source/PluginSpecs',
'#Source/Core/Core/Src',
'#Source/Core/DebuggerWX/Src',
'#Externals/Bochs_disasm',
'#Externals/Lua',
'#Externals/WiiUseSrc/Src',
'#Source/Core/VideoCommon/Src',
'#Source/Core/InputCommon/Src',
'#Source/Core/InputUICommon/Src',
'#Source/Core/AudioCommon/Src',
'#Source/Core/DebuggerUICommon/Src',
'#Source/Core/DolphinWX/Src',
'#Source/Core/DSPCore/Src',
]
dirs = [
@@ -80,7 +78,6 @@ dirs = [
'Source/UnitTests',
]
builders = {}
if sys.platform == 'darwin':
from plistlib import writePlist
@@ -214,15 +211,12 @@ tests = {'CheckWXConfig' : wxconfig.CheckWXConfig,
}
# Object files
env['build_dir'] = os.path.join(basedir, 'Build',
env['build_dir'] = os.path.join('#Build',
platform.system() + '-' + platform.machine() + '-' + env['flavor'] + os.sep)
# Static libs go here
env['local_libs'] = env['build_dir'] + os.sep + 'libs' + os.sep
# Where do we run from
env['base_dir'] = os.getcwd()+ '/'
# Install paths
extra=''
if flavour == 'debug':
@@ -237,7 +231,7 @@ if sys.platform == 'linux2' and env['install'] == 'global':
env['plugin_dir'] = env['prefix'] + 'lib/dolphin-emu/'
env['data_dir'] = env['prefix'] + "share/dolphin-emu/"
else:
env['prefix'] = os.path.join(env['base_dir'] + 'Binary',
env['prefix'] = os.path.join('#Binary',
platform.system() + '-' + platform.machine() + extra + os.sep)
env['binary_dir'] = env['prefix']
env['plugin_dir'] = env['prefix'] + 'plugins/'
@@ -412,23 +406,23 @@ if not sys.platform == 'win32' and not sys.platform == 'darwin':
env['LIBPATH'].insert(0, env['local_libs'])
if not shared['glew']:
env['CPPPATH'] += [basedir + 'Externals/GLew/include']
env['CPPPATH'] += ['#Externals/GLew/include']
dirs += ['Externals/GLew']
if not shared['lzo']:
env['CPPPATH'] += [basedir + 'Externals/LZO']
env['CPPPATH'] += ['#Externals/LZO']
dirs += ['Externals/LZO']
if not shared['sdl']:
env['CPPPATH'] += [basedir + 'Externals/SDL']
env['CPPPATH'] += [basedir + 'Externals/SDL/include']
env['CPPPATH'] += ['#Externals/SDL']
env['CPPPATH'] += ['#Externals/SDL/include']
dirs += ['Externals/SDL']
if not shared['soil']:
env['CPPPATH'] += [basedir + 'Externals/SOIL']
env['CPPPATH'] += ['#Externals/SOIL']
dirs += ['Externals/SOIL']
if not shared['sfml']:
env['CPPPATH'] += [basedir + 'Externals/SFML/include']
env['CPPPATH'] += ['#Externals/SFML/include']
dirs += ['Externals/SFML/src']
if not shared['zlib']:
env['CPPPATH'] += [basedir + 'Externals/zlib']
env['CPPPATH'] += ['#Externals/zlib']
dirs += ['Externals/zlib']
rev = utils.GenerateRevFile(env['flavor'],
+17 -18
View File
@@ -4,25 +4,24 @@ Import('env')
import sys
files = [
'AudioCommonConfig.cpp',
'WaveFile.cpp',
'Mixer.cpp',
'AudioCommon.cpp',
]
if sys.platform == 'win32':
files += [ 'DSoundStream.cpp' ]
'AudioCommonConfig.cpp',
'WaveFile.cpp',
'Mixer.cpp',
'AudioCommon.cpp',
]
if sys.platform == 'darwin':
files += [ 'CoreAudioSoundStream.cpp' ]
files += [ 'CoreAudioSoundStream.cpp' ]
else:
if env['HAVE_ALSA']:
files += [ 'AlsaSoundStream.cpp' ]
if env['HAVE_AO']:
files += [ 'AOSoundStream.cpp' ]
if env['HAVE_OPENAL'] or sys.platform == 'win32':
files += [ 'OpenALStream.cpp', 'aldlist.cpp' ]
if env['HAVE_PULSEAUDIO']:
files += [ 'PulseAudioStream.cpp' ]
if env['HAVE_ALSA']:
files += [ 'AlsaSoundStream.cpp' ]
if env['HAVE_AO']:
files += [ 'AOSoundStream.cpp' ]
if env['HAVE_OPENAL'] or sys.platform == 'win32':
files += [ 'OpenALStream.cpp', 'aldlist.cpp' ]
if env['HAVE_PULSEAUDIO']:
files += [ 'PulseAudioStream.cpp' ]
if sys.platform == 'win32':
files += [ 'DSoundStream.cpp' ]
env.StaticLibrary(env['local_libs'] + 'audiocommon', files)
+5
View File
@@ -57,6 +57,7 @@ extern const char *netplay_dolphin_ver;
#undef STACKALIGN
#define STACKALIGN __attribute__((__force_align_arg_pointer__))
#endif
#define HAVE_WIIUSE 1
// We use wxWidgets on OS X only if it is version 2.9+ with Cocoa support.
#ifdef __WXOSX_COCOA__
#define HAVE_WX 1
@@ -114,6 +115,10 @@ extern const char *netplay_dolphin_ver;
#include "Config.h" // SCons autoconfiguration defines
#endif
#if defined __linux__ && HAVE_BLUEZ
#define HAVE_WIIUSE 1
#endif
// Windows compatibility
#ifndef _WIN32
#include <limits.h>
@@ -71,6 +71,7 @@ void Jit64::regimmop(int d, int a, bool binary, u32 value, Operation doop, void
{
// a == 0, which for these instructions imply value = 0
gpr.SetImmediate32(d, value);
// XXX soren
gpr.StoreFromX64(d);
}
else
+4 -5
View File
@@ -126,16 +126,15 @@ files = [
if sys.platform == 'win32':
files += [ "HW/BBA-TAP/TAP_Win32.cpp", "stdafx.cpp" ]
elif sys.platform == 'darwin':
files += [ "HW/BBA-TAP/TAP_Apple.cpp"]
files += [ "HW/BBA-TAP/TAP_Apple.cpp" ]
else:
files += [ "HW/BBA-TAP/TAP_Unix.cpp"]
files += [ "HW/BBA-TAP/TAP_Unix.cpp" ]
libs = [
'bdisasm',
'inputcommon',
'lua',
'sfml-network'
'sfml-network',
]
env_core = env.Clone();
env_core.StaticLibrary(env['local_libs'] + 'core', files, LIBS=libs)
env.StaticLibrary(env['local_libs'] + 'core', files, LIBS = libs)
+24 -24
View File
@@ -3,29 +3,29 @@
Import('env')
files = [
"assemble.cpp",
"disassemble.cpp",
"DSPAccelerator.cpp",
"DSPIntCCUtil.cpp",
"DSPIntExtOps.cpp",
"DSPHWInterface.cpp",
"DSPMemoryMap.cpp",
"DSPStacks.cpp",
"DSPAnalyzer.cpp",
"DspIntArithmetic.cpp",
"DspIntBranch.cpp",
"DspIntLoadStore.cpp",
"DspIntMisc.cpp",
"DspIntMultiplier.cpp",
"DSPEmitter.cpp",
"DSPCodeUtil.cpp",
"LabelMap.cpp",
"DSPInterpreter.cpp",
"DSPCore.cpp",
"DSPTables.cpp",
"Jit/DSPJitExtOps.cpp",
"Jit/DSPJitUtil.cpp",
"Jit/DSPJitMisc.cpp",
]
"assemble.cpp",
"disassemble.cpp",
"DSPAccelerator.cpp",
"DSPIntCCUtil.cpp",
"DSPIntExtOps.cpp",
"DSPHWInterface.cpp",
"DSPMemoryMap.cpp",
"DSPStacks.cpp",
"DSPAnalyzer.cpp",
"DspIntArithmetic.cpp",
"DspIntBranch.cpp",
"DspIntLoadStore.cpp",
"DspIntMisc.cpp",
"DspIntMultiplier.cpp",
"DSPEmitter.cpp",
"DSPCodeUtil.cpp",
"LabelMap.cpp",
"DSPInterpreter.cpp",
"DSPCore.cpp",
"DSPTables.cpp",
"Jit/DSPJitExtOps.cpp",
"Jit/DSPJitUtil.cpp",
"Jit/DSPJitMisc.cpp",
]
env.StaticLibrary(env['local_libs'] + 'dspcore', files)
@@ -1,7 +1,6 @@
# -*- python -*-
Import('env')
import sys
if not env['HAVE_WX']:
Return()
+15 -15
View File
@@ -3,24 +3,24 @@
Import('env')
if not env['HAVE_WX']:
Return()
Return()
files = [
"BreakpointDlg.cpp",
"BreakpointView.cpp",
"BreakpointWindow.cpp",
"CodeWindow.cpp",
"CodeWindowFunctions.cpp",
"MemoryCheckDlg.cpp",
"MemoryWindow.cpp",
"RegisterWindow.cpp",
"RegisterView.cpp",
"JitWindow.cpp",
]
"BreakpointDlg.cpp",
"BreakpointView.cpp",
"BreakpointWindow.cpp",
"CodeWindow.cpp",
"CodeWindowFunctions.cpp",
"MemoryCheckDlg.cpp",
"MemoryWindow.cpp",
"RegisterWindow.cpp",
"RegisterView.cpp",
"JitWindow.cpp",
]
libs = [
'common',
'debugger_ui_util'
]
'common',
'debugger_ui_util'
]
env.StaticLibrary(env['local_libs'] + "debwx", files, LIBS = libs)
+2 -1
View File
@@ -20,7 +20,7 @@ files = [
'VolumeGC.cpp',
'VolumeWad.cpp',
'VolumeWiiCrypted.cpp',
'FileMonitor.cpp',
'FileMonitor.cpp',
'NANDContentLoader.cpp',
'WiiWad.cpp',
'AES/aes_cbc.c',
@@ -30,4 +30,5 @@ files = [
libs = [
'common'
]
env.StaticLibrary(env['local_libs'] + 'discio', files, LIBS = libs)
+14 -19
View File
@@ -4,8 +4,6 @@ Import('env')
import os
import sys
wxenv = env.Clone()
files = [
'BootManager.cpp',
]
@@ -15,14 +13,13 @@ libs = [
'inputcommon', 'common', 'lua', 'z', 'sfml-network',
]
if wxenv['HAVE_WX']:
if env['HAVE_WX']:
memcardfiles = [
'MemcardManager.cpp',
'MemoryCards/GCMemcard.cpp',
'WxUtils.cpp',
]
]
files += memcardfiles
files += [
'AboutDolphin.cpp',
'ARCodeAddEdit.cpp',
@@ -38,6 +35,7 @@ if wxenv['HAVE_WX']:
'ISOProperties.cpp',
'PatchAddEdit.cpp',
'CheatsWindow.cpp',
'Main.cpp',
'MemoryCards/WiiSaveCrypted.cpp',
'NetPlay.cpp',
'NetPlayClient.cpp',
@@ -45,28 +43,29 @@ if wxenv['HAVE_WX']:
'NetWindow.cpp',
]
libs = [ 'debwx', 'debugger_ui_util', 'inputuicommon'] + libs
wxlibs = [ 'debwx', 'debugger_ui_util', 'inputuicommon', 'memcard' ]
else:
files+= [
'MainNoGUI.cpp',
'cmdline.c',
]
if sys.platform == 'win32':
files += [ "stdafx.cpp" ]
elif sys.platform == 'darwin' and not wxenv['HAVE_WX']:
elif sys.platform == 'darwin' and not env['HAVE_WX']:
files += [ 'cocoaApp.m' ]
exeNoGUI = env['binary_dir'] + 'DolphinNoGUI'
elif sys.platform == 'darwin' and wxenv['HAVE_WX']:
elif sys.platform == 'darwin' and env['HAVE_WX']:
exeGUI = env['binary_dir'] + 'Dolphin.app/Contents/MacOS/Dolphin'
wxenv.Install(env['binary_dir'] + 'Dolphin.app/Contents/' +
env.Install(env['binary_dir'] + 'Dolphin.app/Contents/' +
'Library/Frameworks/Cg.framework',
'#Externals/Cg/Cg.framework/Cg')
wxenv.Install(env['binary_dir'] + 'Dolphin.app/Contents/Resources/',
env.Install(env['binary_dir'] + 'Dolphin.app/Contents/Resources/',
'#Source/Core/DolphinWX/resources/Dolphin.icns')
wxenv.Plist(
env.Plist(
env['binary_dir'] + 'Dolphin.app/Contents/Info.plist',
Value(dict(
CFBundleExecutable = 'Dolphin',
@@ -85,12 +84,8 @@ else:
exeGUI = env['binary_dir'] + 'dolphin-emu'
exeNoGUI = env['binary_dir'] + 'dolphin-emu-nogui'
wxenv.Append(
LIBS = libs
)
if wxenv['HAVE_WX']:
wxenv.Program(exeGUI, files + [ 'Main.cpp' ])
wxenv.StaticLibrary(env['local_libs'] + 'memcard', memcardfiles)
if env['HAVE_WX']:
env.StaticLibrary(env['local_libs'] + 'memcard', memcardfiles)
env.Program(exeGUI, files, LIBS = env['LIBS'] + wxlibs + libs)
else:
wxenv.Program(exeNoGUI, files + [ 'MainNoGUI.cpp' ])
env.Program(exeNoGUI, files, LIBS = env['LIBS'] + libs)
-1
View File
@@ -1,7 +1,6 @@
# -*- python -*-
Import('env')
import sys
if not env['HAVE_WX']:
Return()

Some files were not shown because too many files have changed in this diff Show More