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 = [
|
|
|
|
"classic.c",
|
|
|
|
"dynamics.c",
|
|
|
|
"events.c",
|
|
|
|
"io.c",
|
|
|
|
"ir.c",
|
|
|
|
"nunchuk.c",
|
|
|
|
"guitar_hero_3.c",
|
2009-06-08 08:08:32 +00:00
|
|
|
"wiiboard.c",
|
2008-11-19 10:22:29 +00:00
|
|
|
"wiiuse.c",
|
|
|
|
]
|
|
|
|
|
2009-02-16 21:12:00 +00:00
|
|
|
if env['HAVE_BLUEZ']:
|
|
|
|
files += [ "io_nix.c", ]
|
|
|
|
|
|
|
|
if sys.platform == 'darwin':
|
|
|
|
files += [ "io_osx.c", ]
|
|
|
|
|
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
|