2008-11-19 10:22:29 +00:00
|
|
|
# -*- python -*-
|
|
|
|
|
2009-02-16 21:12:00 +00:00
|
|
|
import sys
|
2008-11-19 10:22:29 +00:00
|
|
|
Import('env')
|
|
|
|
|
2009-02-16 21:12:00 +00:00
|
|
|
if not (env['HAVE_BLUEZ'] or sys.platform == 'darwin'):
|
2008-12-05 13:46:19 +00:00
|
|
|
env['HAVE_WIIUSE'] = 0
|
|
|
|
Return()
|
|
|
|
|
2008-11-19 10:22:29 +00:00
|
|
|
files = [
|
2009-07-07 14:04:56 +00:00
|
|
|
"classic.cpp",
|
|
|
|
"dynamics.cpp",
|
|
|
|
"events.cpp",
|
|
|
|
"io.cpp",
|
|
|
|
"ir.cpp",
|
|
|
|
"nunchuk.cpp",
|
|
|
|
"guitar_hero_3.cpp",
|
|
|
|
"wiiboard.cpp",
|
|
|
|
"wiiuse.cpp",
|
2008-11-19 10:22:29 +00:00
|
|
|
]
|
|
|
|
|
2009-02-16 21:12:00 +00:00
|
|
|
if env['HAVE_BLUEZ']:
|
2009-07-07 15:12:52 +00:00
|
|
|
files += [ "io_nix.cpp", ]
|
2009-02-16 21:12:00 +00:00
|
|
|
|
|
|
|
if sys.platform == 'darwin':
|
2009-07-07 15:12:52 +00:00
|
|
|
files += [ "io_osx.cpp", ]
|
2009-02-16 21:12:00 +00:00
|
|
|
|
2009-04-30 14:23:45 +00:00
|
|
|
if sys.platform == 'darwin':
|
|
|
|
env_wiiuse = env.Clone(
|
|
|
|
CCFLAGS = env.filterWarnings(env['CCFLAGS']) + ' -fvisibility=default -x objective-c++',
|
|
|
|
CXXFLAGS = env.filterWarnings(env['CXXFLAGS']) + ' -x objective-c++',
|
|
|
|
)
|
|
|
|
else:
|
|
|
|
env_wiiuse = env.Clone(
|
|
|
|
CCFLAGS = env.filterWarnings(env['CCFLAGS']) + ' -fvisibility=default',
|
|
|
|
CXXFLAGS = env.filterWarnings(env['CXXFLAGS']),
|
|
|
|
)
|
2008-11-19 10:22:29 +00:00
|
|
|
|
|
|
|
libs = [
|
2008-12-04 15:15:21 +00:00
|
|
|
'm',
|
2008-11-19 10:22:29 +00:00
|
|
|
]
|
2008-12-05 13:46:19 +00:00
|
|
|
|
2009-02-26 07:24:50 +00:00
|
|
|
if sys.platform == 'darwin':
|
|
|
|
env_wiiuse.StaticLibrary(env['libs_dir']+"wiiuse", files, LIBS=libs)
|
|
|
|
else:
|
|
|
|
env_wiiuse.SharedLibrary(env['libs_dir']+"wiiuse", files, LIBS=libs)
|
2008-12-05 13:46:19 +00:00
|
|
|
|
|
|
|
env['HAVE_WIIUSE'] = 1
|