Skip to content

Commit

Permalink
Prepare for the release of Xcode 4, which has working LTO
Browse files Browse the repository at this point in the history
with static libraries.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7280 8ced0084-cf51-0410-be5f-012b33b47a6e
  • Loading branch information
sorenjorvang committed Mar 3, 2011
1 parent 4b8ed4f commit 540238c
Show file tree
Hide file tree
Showing 26 changed files with 92 additions and 144 deletions.
2 changes: 1 addition & 1 deletion Externals/Bochs_disasm/SConscript
Original file line number Diff line number Diff line change
Expand Up @@ -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)
2 changes: 1 addition & 1 deletion Externals/CLRun/SConscript
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ files = [
]

env['CPPPATH'] += ['#Externals/CLRun/include']
env['LIBS'] += env.StaticObject(files)
env['LIBS'] += env.StaticLibrary('clrun', files)
2 changes: 1 addition & 1 deletion Externals/GLew/SConscript
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion Externals/LZO/SConscript
Original file line number Diff line number Diff line change
Expand Up @@ -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')
2 changes: 1 addition & 1 deletion Externals/SDL/SConscript
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,4 @@ else:
]

env['CPPPATH'] += ['#Externals/SDL', '#Externals/SDL/include']
env['LIBS'] += env.StaticObject(files)
env['LIBS'] += env.StaticLibrary('SDL', files)
20 changes: 20 additions & 0 deletions Externals/SFML/SConscript
Original file line number Diff line number Diff line change
@@ -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)
21 changes: 0 additions & 21 deletions Externals/SFML/src/SConscript

This file was deleted.

2 changes: 1 addition & 1 deletion Externals/SOIL/SConscript
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ files = [
]

env['CPPPATH'] += ['#Externals/SOIL']
env['LIBS'] += env.StaticObject(files)
env['LIBS'] += env.StaticLibrary('SOIL', files)
4 changes: 2 additions & 2 deletions Externals/libpng/SConscript
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [
Expand All @@ -28,4 +28,4 @@ files = [
]

env['CPPPATH'] += ['#Externals/libpng']
env['LIBS'] += env.StaticObject(files)
env['LIBS'] += env.StaticLibrary('png', files)
47 changes: 14 additions & 33 deletions Externals/wxWidgets3/SConscript
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,21 @@
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()

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',
Expand Down Expand Up @@ -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',
Expand Down Expand Up @@ -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',
Expand Down Expand Up @@ -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)
2 changes: 2 additions & 0 deletions Externals/wxWidgets3/wx/setup.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@
#else
#include "wx/wxgtk.h"
#endif

#define wxUSE_MARKUP 0
2 changes: 1 addition & 1 deletion Externals/zlib/SConscript
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ files = [
]

env['CPPPATH'] += ['#Externals/zlib']
env['LIBS'] += env.StaticObject(files)
env['LIBS'] += env.StaticLibrary('z', files)
29 changes: 13 additions & 16 deletions SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -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']
Expand Down Expand Up @@ -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'

Expand Down Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions Source/Core/AudioCommon/Src/SConscript
Original file line number Diff line number Diff line change
Expand Up @@ -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' ]
Expand All @@ -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)
6 changes: 2 additions & 4 deletions Source/Core/Common/Src/SConscript
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ files = [
"Thunk.cpp",
"Timer.cpp",
"Version.cpp",
#"VideoBackendBase.cpp",
"VideoBackendBase.cpp",
"x64Emitter.cpp",
"x64Analyzer.cpp",
"Crypto/aes_cbc.cpp",
Expand All @@ -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)
6 changes: 3 additions & 3 deletions Source/Core/Core/Src/BootManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 << " ";

Expand Down
10 changes: 1 addition & 9 deletions Source/Core/Core/Src/SConscript
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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)
2 changes: 1 addition & 1 deletion Source/Core/DiscIO/Src/SConscript
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ files = [
'WiiWad.cpp',
]

env['LIBS'] += env.StaticObject(files)
env['LIBS'] += env.StaticLibrary('discio', files)
Loading

0 comments on commit 540238c

Please sign in to comment.