(requires review for windows/mac)

Fix up so that various libraries wont be fatal for build with scons
wiiuse lib is used only if HAVE_WIIUSE is defined to 1 
made major cleanup for darwin and osx64


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1404 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
nakeee
2008-12-05 13:46:19 +00:00
parent be3094b6b3
commit 064d45024c
13 changed files with 156 additions and 113 deletions

View File

@ -3,6 +3,7 @@
Import('env')
import sys
wmenv = env.Clone()
name = "Plugin_Wiimote"
files = [
@ -16,21 +17,20 @@ files = [
"Encryption.cpp",
"FillReport.cpp",
"main.cpp",
"wiimote_real.cpp",
]
wiimoteenv = env.Clone()
libs = [ 'common' ]
if wiimoteenv['osx64']:
wiimoteenv.Append(
CXXFLAGS = [ '-arch', 'x86_64' ],
LINKFLAGS = [ '-arch', 'x86_64' ],
LIBS = [ 'common' ],
)
else:
wiimoteenv.Append(
CXXFLAGS = [ '-fPIC' ],
LIBS = [ 'common', 'wiiuse' ],
)
cxxflags = [ '-fPIC' ]
wiimoteenv.SharedLibrary(env['plugin_dir']+name, files)
if wmenv['HAVE_WIIUSE']:
libs += [ 'wiiuse' ]
files += [ "wiimote_real.cpp" ]
cxxflags += ['-DHAVE_WIIUSE']
wmenv.Append(
CXXFLAGS = cxxflags,
LIBS = libs,
)
wmenv.SharedLibrary(env['plugin_dir']+name, files)