Only use "-fPIC" for compiling objects that will be part of dynamic libs. Make SConscripts inherit the compile flags from the top level instead of overriding them.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@329 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
0ebba1bde0
commit
59974dfb5b
|
@ -1,11 +1,12 @@
|
||||||
Import('env')
|
Import('env')
|
||||||
|
|
||||||
files = ["dis_decode.cpp",
|
files = [
|
||||||
|
"dis_decode.cpp",
|
||||||
"dis_groups.cpp",
|
"dis_groups.cpp",
|
||||||
"resolve.cpp",
|
"resolve.cpp",
|
||||||
"syntax.cpp",
|
"syntax.cpp",
|
||||||
"PowerPCDisasm.cpp",
|
"PowerPCDisasm.cpp",
|
||||||
]
|
]
|
||||||
|
|
||||||
env_bochs = env.Copy(CXXFLAGS = " -fPIC ")
|
env_bochs = env.Copy()
|
||||||
env_bochs.StaticLibrary("bdisasm", files)
|
env_bochs.StaticLibrary("bdisasm", files)
|
||||||
|
|
|
@ -19,7 +19,6 @@ compileFlags = [
|
||||||
'-g',
|
'-g',
|
||||||
'-O3',
|
'-O3',
|
||||||
'-fno-strict-aliasing',
|
'-fno-strict-aliasing',
|
||||||
'-fPIC',
|
|
||||||
'-msse2',
|
'-msse2',
|
||||||
'-D_FILE_OFFSET_BITS=64',
|
'-D_FILE_OFFSET_BITS=64',
|
||||||
'-D_LARGEFILE_SOURCE',
|
'-D_LARGEFILE_SOURCE',
|
||||||
|
@ -72,8 +71,8 @@ lib_paths = include_paths
|
||||||
env = Environment(
|
env = Environment(
|
||||||
CC = "gcc",
|
CC = "gcc",
|
||||||
CXX = "g++",
|
CXX = "g++",
|
||||||
CCFLAGS = compileFlags,
|
CCFLAGS = ' '.join(compileFlags),
|
||||||
CXXFLAGS = compileFlags,
|
CXXFLAGS = ' '.join(compileFlags),
|
||||||
CPPPATH = include_paths,
|
CPPPATH = include_paths,
|
||||||
LIBPATH = lib_paths,
|
LIBPATH = lib_paths,
|
||||||
ENV = {
|
ENV = {
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
Import('env')
|
Import('env')
|
||||||
|
|
||||||
files = ["ABI.cpp",
|
files = [
|
||||||
|
"ABI.cpp",
|
||||||
"Common.cpp",
|
"Common.cpp",
|
||||||
"ChunkFile.cpp",
|
"ChunkFile.cpp",
|
||||||
"CPUDetect.cpp",
|
"CPUDetect.cpp",
|
||||||
|
@ -26,5 +27,5 @@ files = ["ABI.cpp",
|
||||||
]
|
]
|
||||||
|
|
||||||
env_common = env.Copy()
|
env_common = env.Copy()
|
||||||
env_common.Append(CXXFLAGS = [ '-fPIC' ])
|
env_common.Append(CXXFLAGS = ' ' + ' '.join([ '-fPIC' ]))
|
||||||
env_common.StaticLibrary("common", files)
|
env_common.StaticLibrary("common", files)
|
||||||
|
|
|
@ -15,7 +15,17 @@ files = ["LogWindow.cpp",
|
||||||
"RegisterView.cpp",
|
"RegisterView.cpp",
|
||||||
"JitWindow.cpp",
|
"JitWindow.cpp",
|
||||||
]
|
]
|
||||||
wxenv = env.Copy(CXXFLAGS = "`wx-config --cppflags` -DUSE_XPM_BITMAPS -DwxNEEDS_CHARPP",
|
wxenv = env.Copy()
|
||||||
LINKFLAGS = "-L/usr/local/lib -pthread `wx-config --libs --debug`")
|
wxenv.Append(
|
||||||
|
CXXFLAGS = ' ' + ' '.join([
|
||||||
|
'`wx-config --cppflags`',
|
||||||
|
'-DUSE_XPM_BITMAPS',
|
||||||
|
'-DwxNEEDS_CHARPP'
|
||||||
|
]),
|
||||||
|
LINKFLAGS = ' ' + ' '.join([
|
||||||
|
'-L/usr/local/lib',
|
||||||
|
'-pthread',
|
||||||
|
'`wx-config --libs --debug`'
|
||||||
|
])
|
||||||
|
)
|
||||||
wxenv.StaticLibrary("debwx", files, LIBS = [ "common" ])
|
wxenv.StaticLibrary("debwx", files, LIBS = [ "common" ])
|
||||||
|
|
|
@ -17,14 +17,26 @@ files = ["BootManager.cpp",
|
||||||
"stdafx.cpp",
|
"stdafx.cpp",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
wxenv = env.Copy()
|
||||||
wxenv = env.Copy(CXXFLAGS = "`wx-config --cppflags` -DUSE_XPM_BITMAPS -DwxNEEDS_CHARPP `sdl-config --cflags`",
|
wxenv.Append(
|
||||||
LINKFLAGS = "-L/usr/local/lib -pthread `wx-config --libs` `sdl-config --libs`")
|
CXXFLAGS = ' ' + ' '.join([
|
||||||
|
'`wx-config --cppflags`',
|
||||||
|
'-DUSE_XPM_BITMAPS',
|
||||||
|
'-DwxNEEDS_CHARPP',
|
||||||
|
'`sdl-config --cflags`',
|
||||||
|
]),
|
||||||
|
LINKFLAGS = ' ' + ' '.join([
|
||||||
|
'-L/usr/local/lib',
|
||||||
|
'-pthread',
|
||||||
|
'`wx-config --libs`',
|
||||||
|
'`sdl-config --libs`'
|
||||||
|
])
|
||||||
|
)
|
||||||
|
|
||||||
if sys.platform == 'darwin':
|
if sys.platform == 'darwin':
|
||||||
icon = 'Dolphin'
|
icon = 'Dolphin'
|
||||||
version = "svn"
|
version = 'svn'
|
||||||
wxenv.Program("../../../../Binary/mac/Dolphin.app/Contents/MacOS/Dolphin", files, LIBS = ["debwx", "discio", "core", "bdisasm", "videocommon", "common" , "z"])
|
wxenv.Program('../../../../Binary/mac/Dolphin.app/Contents/MacOS/Dolphin', files, LIBS = ["debwx", "discio", "core", "bdisasm", "videocommon", "common" , "z"])
|
||||||
wxenv.Plist("../../../../Binary/mac/Dolphin.app/Contents/Info.plist", Value(dict(
|
wxenv.Plist("../../../../Binary/mac/Dolphin.app/Contents/Info.plist", Value(dict(
|
||||||
CFAppleHelpAnchor = 'index',
|
CFAppleHelpAnchor = 'index',
|
||||||
CFBundleExecutable = 'Dolphin',
|
CFBundleExecutable = 'Dolphin',
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
Import('env')
|
Import('env')
|
||||||
|
|
||||||
files = ["BPMemory.cpp",
|
files = [
|
||||||
|
"BPMemory.cpp",
|
||||||
"CPMemory.cpp",
|
"CPMemory.cpp",
|
||||||
"LookUpTables.cpp",
|
"LookUpTables.cpp",
|
||||||
"TextureDecoder.cpp",
|
"TextureDecoder.cpp",
|
||||||
|
@ -9,5 +10,6 @@ files = ["BPMemory.cpp",
|
||||||
"Fifo.cpp",
|
"Fifo.cpp",
|
||||||
]
|
]
|
||||||
|
|
||||||
env_common = env.Copy(CXXFLAGS = " -fPIC ")
|
env_common = env.Copy()
|
||||||
|
env_common.Append(CXXFLAGS = ' ' + ' '.join([ '-fPIC' ]))
|
||||||
env_common.StaticLibrary("videocommon", files)
|
env_common.StaticLibrary("videocommon", files)
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
Import('env')
|
Import('env')
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
files = ["DSPHandler.cpp",
|
files = [
|
||||||
|
"DSPHandler.cpp",
|
||||||
"MailHandler.cpp",
|
"MailHandler.cpp",
|
||||||
"main.cpp",
|
"main.cpp",
|
||||||
"Config.cpp",
|
"Config.cpp",
|
||||||
|
@ -16,7 +17,12 @@ files = ["DSPHandler.cpp",
|
||||||
"UCodes/UCodes.cpp",
|
"UCodes/UCodes.cpp",
|
||||||
"UCodes/UCode_Zelda.cpp",
|
"UCodes/UCode_Zelda.cpp",
|
||||||
]
|
]
|
||||||
dspenv=env.Copy(LINKFLAGS = "`pkg-config --libs ao` ")
|
|
||||||
|
dspenv = env.Copy()
|
||||||
|
dspenv.Append(
|
||||||
|
CXXFLAGS = ' ' + ' '.join([ '-fPIC', '`pkg-config --cflags ao`' ]),
|
||||||
|
LINKFLAGS = ' ' + ' '.join([ '`pkg-config --libs ao`' ])
|
||||||
|
)
|
||||||
|
|
||||||
if sys.platform == 'darwin':
|
if sys.platform == 'darwin':
|
||||||
dspenv.SharedLibrary("../../../../Binary/mac/Plugins/dsphle.so", files, LIBS = ["common"])
|
dspenv.SharedLibrary("../../../../Binary/mac/Plugins/dsphle.so", files, LIBS = ["common"])
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
Import('env')
|
Import('env')
|
||||||
output = "../../../../Binary/linux/Plugins/dsplle.so"
|
output = "../../../../Binary/linux/Plugins/dsplle.so"
|
||||||
files = ["AOSoundStream.cpp",
|
|
||||||
|
files = [
|
||||||
|
"AOSoundStream.cpp",
|
||||||
"disassemble.cpp",
|
"disassemble.cpp",
|
||||||
"gdsp_aram.cpp",
|
"gdsp_aram.cpp",
|
||||||
"gdsp_ext_op.cpp",
|
"gdsp_ext_op.cpp",
|
||||||
|
@ -14,5 +16,10 @@ files = ["AOSoundStream.cpp",
|
||||||
"Tools.cpp",
|
"Tools.cpp",
|
||||||
"main.cpp",
|
"main.cpp",
|
||||||
]
|
]
|
||||||
env.Append(LINKFLAGS = " `pkg-config --libs ao`")
|
|
||||||
env.SharedLibrary(output, files, LIBS = ["common"])
|
dspenv = env.Copy()
|
||||||
|
dspenv.Append(
|
||||||
|
CXXFLAGS = ' ' + ' '.join([ '-fPIC', '`pkg-config --cflags ao`' ]),
|
||||||
|
LINKFLAGS = ' ' + ' '.join([ '`pkg-config --libs ao`' ])
|
||||||
|
)
|
||||||
|
dspenv.SharedLibrary(output, files, LIBS = ["common"])
|
||||||
|
|
|
@ -6,7 +6,13 @@ if sys.platform == 'darwin':
|
||||||
else:
|
else:
|
||||||
output = "../../../../Binary/linux/Plugins/padsimple.so"
|
output = "../../../../Binary/linux/Plugins/padsimple.so"
|
||||||
|
|
||||||
files = ["main.cpp",
|
files = [
|
||||||
|
"main.cpp",
|
||||||
]
|
]
|
||||||
padenv=env.Copy(CXXFLAGS = " `pkg-config --cflags sdl`", LINKFLAGS = " `pkg-config --libs sdl`")
|
|
||||||
|
padenv = env.Copy()
|
||||||
|
padenv.Append(
|
||||||
|
CXXFLAGS = ' ' + ' '.join([ '-fPIC', '`pkg-config --cflags sdl`' ]),
|
||||||
|
LINKFLAGS = ' ' + ' '.join([ '`pkg-config --libs sdl`' ])
|
||||||
|
)
|
||||||
padenv.SharedLibrary(output, files, LIBS=["common"])
|
padenv.SharedLibrary(output, files, LIBS=["common"])
|
||||||
|
|
|
@ -23,6 +23,7 @@ files = [
|
||||||
'GUI/ConfigDlg.cpp',
|
'GUI/ConfigDlg.cpp',
|
||||||
]
|
]
|
||||||
compileFlags = [
|
compileFlags = [
|
||||||
|
'-fPIC',
|
||||||
'`wx-config --cppflags`',
|
'`wx-config --cppflags`',
|
||||||
]
|
]
|
||||||
linkFlags = [
|
linkFlags = [
|
||||||
|
@ -58,9 +59,10 @@ if useSDL:
|
||||||
compileFlags += [ '`sdl-config --cflags`', '-DUSE_SDL=1' ]
|
compileFlags += [ '`sdl-config --cflags`', '-DUSE_SDL=1' ]
|
||||||
linkFlags += [ '`sdl-config --libs`' ]
|
linkFlags += [ '`sdl-config --libs`' ]
|
||||||
|
|
||||||
gfxenv = env.Copy(
|
gfxenv = env.Copy()
|
||||||
CXXFLAGS = ' '.join(compileFlags),
|
gfxenv.Append(
|
||||||
LINKFLAGS = ' '.join(linkFlags),
|
CXXFLAGS = ' ' + ' '.join(compileFlags),
|
||||||
|
LINKFLAGS = ' ' + ' '.join(linkFlags)
|
||||||
)
|
)
|
||||||
gfxenv.SharedLibrary(
|
gfxenv.SharedLibrary(
|
||||||
'../../../../Binary/%s/Plugins/zeroogl.so' % platform,
|
'../../../../Binary/%s/Plugins/zeroogl.so' % platform,
|
||||||
|
|
|
@ -6,9 +6,19 @@ if sys.platform == 'darwin':
|
||||||
else:
|
else:
|
||||||
output = "../../../../Binary/linux/Plugins/Plugin_nJoy_SDL.so"
|
output = "../../../../Binary/linux/Plugins/Plugin_nJoy_SDL.so"
|
||||||
|
|
||||||
files = [ "nJoy.cpp",
|
files = [
|
||||||
|
"nJoy.cpp",
|
||||||
"GUI/AboutBox.cpp",
|
"GUI/AboutBox.cpp",
|
||||||
"GUI/ConfigBox.cpp",
|
"GUI/ConfigBox.cpp",
|
||||||
]
|
]
|
||||||
padenv=env.Copy(CXXFLAGS = " `wx-config --cppflags` `pkg-config --cflags sdl`", LINKFLAGS = "`wx-config --libs` `pkg-config --libs sdl` ")
|
|
||||||
|
padenv = env.Copy()
|
||||||
|
padenv.Append(
|
||||||
|
CXXFLAGS = ' ' + ' '.join([
|
||||||
|
'-fPIC', '`wx-config --cppflags`', '`pkg-config --cflags sdl`'
|
||||||
|
]),
|
||||||
|
LINKFLAGS = ' ' + ' '.join([
|
||||||
|
'`wx-config --libs`', '`pkg-config --libs sdl`'
|
||||||
|
])
|
||||||
|
)
|
||||||
padenv.SharedLibrary(output, files, LIBS = [ "common" ])
|
padenv.SharedLibrary(output, files, LIBS = [ "common" ])
|
||||||
|
|
Loading…
Reference in New Issue