Prepare for the release of Xcode 4, which has working LTO

with static libraries.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7280 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Soren Jorvang 2011-03-03 04:35:03 +00:00
parent 4b8ed4f2c8
commit 540238cf79
26 changed files with 92 additions and 144 deletions

View File

@ -15,4 +15,4 @@ if sys.platform == 'win32':
files += [ "stdafx.cpp" ]
env['CPPPATH'] += ['#Externals/Bochs_disasm']
env['LIBS'] += env.StaticObject(files)
env['LIBS'] += env.StaticLibrary('bdisasm', files)

View File

@ -14,4 +14,4 @@ files = [
]
env['CPPPATH'] += ['#Externals/CLRun/include']
env['LIBS'] += env.StaticObject(files)
env['LIBS'] += env.StaticLibrary('clrun', files)

View File

@ -13,7 +13,7 @@ else:
libs = ['GL', 'GLU']
frames = []
glew = env.StaticObject('src/glew.c')
glew = env.StaticLibrary('GLEW', 'src/glew.c')
libs += glew
env.Program('glewinfo', 'src/glewinfo.c', LIBS = libs, FRAMEWORKS = frames)
env.Program('visualinfo', 'src/visualinfo.c', LIBS = libs, FRAMEWORKS = frames)

View File

@ -6,4 +6,4 @@ if env.has_key('shared_lzo') and env['shared_lzo']:
Return()
env['CPPPATH'] += ['#Externals/LZO']
env['LIBS'] += env.StaticObject('minilzo.c')
env['LIBS'] += env.StaticLibrary('lzo2', 'minilzo.c')

View File

@ -42,4 +42,4 @@ else:
]
env['CPPPATH'] += ['#Externals/SDL', '#Externals/SDL/include']
env['LIBS'] += env.StaticObject(files)
env['LIBS'] += env.StaticLibrary('SDL', files)

20
Externals/SFML/SConscript vendored Normal file
View File

@ -0,0 +1,20 @@
# -*- python -*-
Import('env')
if env.has_key('shared_sfml') and env['shared_sfml']:
Return()
files = [
'src/SFML/Network/Ftp.cpp',
'src/SFML/Network/Http.cpp',
'src/SFML/Network/IPAddress.cpp',
'src/SFML/Network/Packet.cpp',
'src/SFML/Network/SelectorBase.cpp',
'src/SFML/Network/SocketTCP.cpp',
'src/SFML/Network/SocketUDP.cpp',
'src/SFML/Network/Unix/SocketHelper.cpp',
]
env['CPPPATH'] += ['#Externals/SFML/include']
env['LIBS'] += env.StaticLibrary('sfml-network', files)

View File

@ -1,21 +0,0 @@
# -*- python -*-
Import('env')
if env.has_key('shared_sfml') and env['shared_sfml']:
env['LIBS'] += 'sfml-network'
Return()
files = [
"SFML/Network/Ftp.cpp",
"SFML/Network/Http.cpp",
"SFML/Network/IPAddress.cpp",
"SFML/Network/Packet.cpp",
"SFML/Network/SelectorBase.cpp",
"SFML/Network/SocketTCP.cpp",
"SFML/Network/SocketUDP.cpp",
"SFML/Network/Unix/SocketHelper.cpp",
]
env['CPPPATH'] += ['#Externals/SFML/include']
env['LIBS'] += env.StaticObject(files)

View File

@ -13,4 +13,4 @@ files = [
]
env['CPPPATH'] += ['#Externals/SOIL']
env['LIBS'] += env.StaticObject(files)
env['LIBS'] += env.StaticLibrary('SOIL', files)

View File

@ -6,7 +6,7 @@ import sys
if env.has_key('shared_png') and env['shared_png']:
Return()
if env['HAVE_WX']:
if env.has_key('HAVE_WX') and env['HAVE_WX']:
Return() # Currently using libwxpng
files = [
@ -28,4 +28,4 @@ files = [
]
env['CPPPATH'] += ['#Externals/libpng']
env['LIBS'] += env.StaticObject(files)
env['LIBS'] += env.StaticLibrary('png', files)

View File

@ -3,11 +3,13 @@
Import('env')
import sys
if env['HAVE_WX'] or env['nowx']:
if env['nowx']:
Return()
if env.has_key('HAVE_WX') and env['HAVE_WX']:
Return()
env['CPPPATH'] += ['#Externals/wxWidgets3', '#Externals/wxWidgets3/include']
env['HAVE_WX'] = 1
wxenv = env.Clone()
@ -15,7 +17,7 @@ wxenv['CCFLAGS'] += ['-Wno-deprecated-declarations']
wxenv['CCFLAGS'] += ['-Wno-shadow', '-Wno-sign-compare']
wxenv['CPPDEFINES'] += ['WXBUILDING']
# gtk, msw, osx and shared files as of r66858
# gtk, msw, osx and shared files as of r67106
aui = [
'src/aui/auibar.cpp',
@ -162,6 +164,7 @@ common = [
'src/common/listctrlcmn.cpp',
'src/common/log.cpp',
'src/common/longlong.cpp',
#'src/common/markupparser.cpp',
'src/common/matrix.cpp',
#'src/common/mediactrlcmn.cpp',
#'src/common/memory.cpp',
@ -320,6 +323,7 @@ generic = [
'src/generic/listbkg.cpp',
'src/generic/listctrl.cpp',
'src/generic/logg.cpp',
#'src/generic/markuptext.cpp',
#'src/generic/mask.cpp',
'src/generic/mdig.cpp',
'src/generic/msgdlgg.cpp',
@ -1241,36 +1245,13 @@ zlib = [
'src/zlib/zutil.c',
]
env['LIBS'] += wxenv.StaticObject(aui)
env['LIBS'] += wxenv.StaticObject(common)
env['LIBS'] += wxenv.StaticObject(generic)
files = aui + common + generic
if sys.platform == 'darwin':
env['LIBS'] += wxenv.StaticObject(genericosx)
env['LIBS'] += wxenv.StaticObject(osx)
env['LIBS'] += wxenv.StaticObject(unix)
elif sys.platform == 'win32':
env['LIBS'] += wxenv.StaticObject(msw)
if sys.platform == 'win32':
files += msw
elif sys.platform == 'darwin':
files += genericosx + osx + unix
else:
env['LIBS'] += wxenv.StaticObject(genericgtk)
env['LIBS'] += wxenv.StaticObject(gtk)
env['LIBS'] += wxenv.StaticObject(unix)
env['LIBS'] += wxenv.StaticObject(unixgtk)
files += genericgtk + gtk + unix + unixgtk
#env['LIBS'] += wxenv.StaticObject(html)
#env['LIBS'] += wxenv.StaticObject(propgrid)
#env['LIBS'] += wxenv.StaticObject(ribbon)
#env['LIBS'] += wxenv.StaticObject(richtext)
#env['LIBS'] += wxenv.StaticObject(xrc)
#wxenv['CPPPATH'] += ['#Externals/wxWidgets3/src/regex']
#env['LIBS'] += wxenv.StaticObject(regex)
#wxenv['CPPPATH'] += ['#Externals/wxWidgets3/src/png']
#env['LIBS'] += wxenv.StaticObject(png)
#wxenv['CPPPATH'] += ['#Externals/wxWidgets3/src/jpeg']
#env['LIBS'] += wxenv.StaticObject(jpeg)
#wxenv['CPPDEFINES'] += ['__WX__', 'SCI_LEXER', 'LINK_LEXERS']
#wxenv['CPPPATH'] += ['#Externals/wxWidgets3/src/stc/scintilla/include']
#env['LIBS'] += wxenv.StaticObject(stc)
#wxenv['CPPPATH'] += ['#Externals/wxWidgets3/src/tiff/libtiff']
#env['LIBS'] += wxenv.StaticObject(tiff)
#env['LIBS'] += wxenv.StaticObject(zlib)
env['LIBS'] += wxenv.StaticLibrary('wx', files)

View File

@ -7,3 +7,5 @@
#else
#include "wx/wxgtk.h"
#endif
#define wxUSE_MARKUP 0

View File

@ -28,4 +28,4 @@ files = [
]
env['CPPPATH'] += ['#Externals/zlib']
env['LIBS'] += env.StaticObject(files)
env['LIBS'] += env.StaticLibrary('z', files)

View File

@ -126,8 +126,6 @@ if sys.platform == 'darwin':
env['CC'] = '/Developer/usr/bin/llvm-gcc'
env['CXX'] = '/Developer/usr/bin/llvm-g++'
env['CXXFLAGS'] += ['-x', 'objective-c++']
env['FRAMEWORKS'] += ['ApplicationServices', 'AudioUnit', 'Cocoa']
env['FRAMEWORKS'] += ['IOBluetooth', 'IOKit', 'OpenGL']
env['LINKFLAGS'] += ccld
env['LINKFLAGS'] += ['-Wl,-dead_strip,-dead_strip_dylibs']
env['LINKFLAGS'] += ['-Wl,-pagezero_size,0x1000']
@ -160,11 +158,10 @@ if sys.platform == 'darwin':
print '\nwxWidgets r66814 or newer is required to build Dolphin.'
print 'See http://code.google.com/p/dolphin-emu/wiki/MacOSX_Build'
print 'for instructions on building and installing wxWidgets.\n'
env['wxconfiglibs'] = []
else:
wxconfig.ParseWXConfig(wxenv)
env['CPPPATH'] += wxenv['CPPPATH']
env['wxconfiglibs'] = wxenv['LIBS']
env['LIBS'] += wxenv['LIBS']
env['data_dir'] = '#' + env['prefix'] + '/Dolphin.app/Contents/Resources'
@ -329,27 +326,27 @@ else:
env.Alias('install', env['prefix'])
dirs = [
'Source/Core/Core/Src',
'Source/Core/Common/Src',
'Source/Core/DiscIO/Src',
'Source/Core/DolphinWX/Src',
'Source/Plugins/Plugin_VideoOGL/Src',
'Source/Plugins/Plugin_VideoSoftware/Src',
'Source/Core/AudioCommon/Src',
'Source/Core/InputCommon/Src',
'Source/Core/VideoCommon/Src',
'Source/DSPTool/Src',
'Source/UnitTests',
'Externals/Bochs_disasm',
'Externals/CLRun',
'Externals/GLew',
'Externals/LZO',
'Externals/SDL',
'Externals/SOIL',
'Externals/SFML/src',
'Externals/SFML',
'Externals/libpng',
'Externals/wxWidgets3',
'Externals/zlib',
'Source/Core/AudioCommon/Src',
'Source/Core/Common/Src',
'Source/Core/Core/Src',
'Source/Core/DiscIO/Src',
'Source/Core/DolphinWX/Src',
'Source/Core/InputCommon/Src',
'Source/Core/VideoCommon/Src',
'Source/DSPTool/Src',
'Source/Plugins/Plugin_VideoOGL/Src',
'Source/Plugins/Plugin_VideoSoftware/Src',
'Source/UnitTests',
]
# Now that platform configuration is done, propagate it to modules

View File

@ -13,6 +13,9 @@ files = [
if sys.platform == 'darwin':
files += [ 'CoreAudioSoundStream.cpp' ]
elif sys.platform == 'win32':
files += [ 'DSoundStream.cpp' ]
files += [ 'XAudio2Stream.cpp' ]
else:
if env['HAVE_ALSA']:
files += [ 'AlsaSoundStream.cpp' ]
@ -22,8 +25,5 @@ else:
files += [ 'OpenALStream.cpp', 'aldlist.cpp' ]
if env['HAVE_PULSEAUDIO']:
files += [ 'PulseAudioStream.cpp' ]
if sys.platform == 'win32':
files += [ 'DSoundStream.cpp' ]
files += [ 'XAudio2Stream.cpp' ]
env['LIBS'] += env.StaticObject(files)
env['LIBS'] += env.StaticLibrary('audiocommon', files)

View File

@ -38,7 +38,7 @@ files = [
"Thunk.cpp",
"Timer.cpp",
"Version.cpp",
#"VideoBackendBase.cpp",
"VideoBackendBase.cpp",
"x64Emitter.cpp",
"x64Analyzer.cpp",
"Crypto/aes_cbc.cpp",
@ -53,7 +53,5 @@ if sys.platform == 'win32':
files += [ "ExtendedTrace.cpp" ]
files += [ "stdafx.cpp" ]
env['common'] = env.StaticObject(files)
env['CPPPATH'] += ['.']
env['LIBS'] += env['common']
env['LIBS'] += env.StaticObject('VideoBackendBase.cpp')
env['LIBS'] += env.StaticLibrary('common', files)

View File

@ -22,9 +22,9 @@
// Call sequence: This file has one of the first function called when a game is booted,
// the boot sequence in the code is:
// DolphinWX: GameListCtrl.cpp OnActivated
// BootManager.cpp BootCore
// Core Core.cpp Init Thread creation
// DolphinWX: FrameTools.cpp StartGame
// Core BootManager.cpp BootCore
// Core.cpp Init Thread creation
// EmuThread Calls CBoot::BootUp
// Boot.cpp CBoot::BootUp()
// CBoot::EmulatedBS2_Wii() / GC() or Load_BS2()

View File

@ -235,7 +235,7 @@ void PrintObject(const T &Obj)
CompileTimeAssert<sizeof(ZeldaVoicePB) == 0x180> ensure_zpb_size_correct;
(void)ensure_zpb_size_correct;
for(int i = 0; i < sizeof(T); i++) {
for (size_t i = 0; i < sizeof(T); i++) {
if((i > 0) && ((i & 1) == 0))
ss << " ";

View File

@ -32,9 +32,6 @@ files = [
"Debugger/Debugger_SymbolMap.cpp",
"Debugger/Dump.cpp",
"Debugger/PPCDebugInterface.cpp",
]
dspcorefiles = [
"DSP/assemble.cpp",
"DSP/disassemble.cpp",
"DSP/DSPAccelerator.cpp",
@ -64,9 +61,6 @@ dspcorefiles = [
"DSP/Jit/DSPJitMultiplier.cpp",
"DSP/Jit/DSPJitMisc.cpp",
"DSP/Jit/DSPJitRegCache.cpp",
]
files += [
"GeckoCode.cpp",
"GeckoCodeConfig.cpp",
"HLE/HLE.cpp",
@ -206,6 +200,4 @@ elif sys.platform == 'linux2' and env['HAVE_BLUEZ']:
else:
files += [ "HW/BBA-TAP/TAP_Unix.cpp", "HW/WiimoteReal/IODummy.cpp" ]
env['dspcore'] = env.StaticObject(dspcorefiles)
env['LIBS'] += env.StaticObject(files)
env['LIBS'] += env['dspcore']
env['LIBS'] += env.StaticLibrary('core', files)

View File

@ -26,4 +26,4 @@ files = [
'WiiWad.cpp',
]
env['LIBS'] += env.StaticObject(files)
env['LIBS'] += env.StaticLibrary('discio', files)

View File

@ -5,13 +5,10 @@ import os
import sys
from SconsTests import utils
files = []
frameworksflags = []
if not env['HAVE_WX']:
files += ['MainNoGUI.cpp']
if env['nowx']:
files = ['MainNoGUI.cpp']
else:
files += [
files = [
'AboutDolphin.cpp',
'ARCodeAddEdit.cpp',
'GeckoCodeDiag.cpp',
@ -63,20 +60,18 @@ if sys.platform == 'win32':
elif sys.platform == 'darwin':
env['CPPPATH'] += ['#Externals']
env['FRAMEWORKPATH'] += ['Externals/Cg']
env['FRAMEWORKS'] += ['ApplicationServices', 'Carbon', 'Cocoa']
env['FRAMEWORKS'] += ['AudioUnit', 'IOBluetooth', 'IOKit', 'OpenGL']
env['FRAMEWORKSFLAGS'] = ['-Wl,-weak_framework,Cg']
env['FRAMEWORKSFLAGS'] += ['-Wl,-weak_framework,OpenCL']
env['LIBS'] += ['iconv', 'z']
frameworksflags += ['-Wl,-weak_framework,Cg']
frameworksflags += ['-Wl,-weak_framework,OpenCL']
# XXX
env['FRAMEWORKSFLAGS'] += ['-Wl,-weak_framework,QuickTime']
env['FRAMEWORKSFLAGS'] += ['-Wl,-no_arch_warnings']
exe = '#' + env['prefix'] + '/Dolphin.app/Contents/MacOS/Dolphin'
if env['HAVE_WX']:
env['LIBS'] += env['wxconfiglibs']
frameworksflags += ['-Wl,-weak_framework,AudioToolbox']
frameworksflags += ['-Wl,-weak_framework,Carbon']
frameworksflags += ['-Wl,-weak_framework,QuickTime']
frameworksflags += ['-Wl,-weak_framework,WebKit']
frameworksflags += ['-Wl,-no_arch_warnings']
else:
if env['nowx']:
exe += 'NoGUI'
env.Install('#' + env['prefix'] + '/Dolphin.app/Contents/' +
@ -134,7 +129,7 @@ elif sys.platform == 'darwin':
else:
files += ['X11Utils.cpp']
exe = env['binary_dir'] + '/dolphin-emu'
if not env['HAVE_WX']:
if env['nowx']:
exe += '-nogui'
env.InstallAs(env['data_dir'] + '/sys', '#Data/Sys')
env.InstallAs(env['data_dir'] + '/user', '#Data/User')
@ -142,4 +137,4 @@ else:
env.Command('dummy', '#' + env['prefix'],
"find $SOURCES -name .svn -exec rm -rf {} +")
env.Program(exe, files, FRAMEWORKSFLAGS = frameworksflags)
env.Program(exe, files)

View File

@ -30,4 +30,4 @@ elif env['HAVE_X11']:
'ControllerInterface/Xlib/Xlib.cpp',
]
env['LIBS'] += env.StaticObject(files)
env['LIBS'] += env.StaticLibrary('inputcommon', files)

View File

@ -8,6 +8,7 @@ files = [
'BPStructs.cpp',
'CPMemory.cpp',
'CommandProcessor.cpp',
'Debugger.cpp',
'DLCache.cpp',
'Fifo.cpp',
'FramebufferManagerBase.cpp',
@ -44,7 +45,4 @@ files = [
'memcpy_amd.cpp',
]
if env['HAVE_WX']:
files += ['Debugger.cpp']
env['LIBS'] += env.StaticObject(files)
env['LIBS'] += env.StaticLibrary('videocommon', files)

View File

@ -3,13 +3,4 @@
Import('env')
import sys
files = [
'DSPTool.cpp',
]
libs = [
env['common'],
env['dspcore'],
]
env.Program('dsptool', files, LIBS = libs)
env.Program('dsptool', 'DSPTool.cpp')

View File

@ -19,4 +19,4 @@ files = [
'GLUtil.cpp'
]
env['LIBS'] += env.StaticObject(files)
env['LIBS'] += env.StaticLibrary('videoogl', files)

View File

@ -29,10 +29,10 @@ files = [
'XFMemLoader.cpp',
]
if env['HAVE_WX']:
if not env['nowx']:
files += [ 'VideoConfigDialog.cpp' ]
if sys.platform == 'win32':
files += [ 'Win32.cpp' ]
env['LIBS'] += env.StaticObject(files)
env['LIBS'] += env.StaticLibrary('videosoftware', files)

View File

@ -9,9 +9,4 @@ files = [
"UnitTests.cpp",
]
libs = [
env['common'],
env['dspcore'],
]
env.Program('tester', files, LIBS = libs)
env.Program('tester', files)