# -*- python -*-

Import('env')
import os
import sys

name = os.sep + "Plugin_WiimoteNew"

files = [
	'WiimoteEmu/WiimoteEmu.cpp',
	'WiimoteEmu/Attachment/Classic.cpp',
	'WiimoteEmu/Attachment/Attachment.cpp',
	'WiimoteEmu/Attachment/Nunchuk.cpp',
	'WiimoteEmu/Attachment/Drums.cpp',
	'WiimoteEmu/Attachment/Guitar.cpp',
	'WiimoteEmu/EmuSubroutines.cpp',
	'WiimoteEmu/Encryption.cpp',
	'WiimoteEmu/Speaker.cpp',
	'WiimoteNew.cpp'
	]

libs = [ 'inputcommon', 'common' ]

if not sys.platform == 'darwin':
	libs += [ 'SDL' ]

if env['HAVE_WX']:
	libs = [ 'inputuicommon' ] + libs
	files += [ 'WiimoteConfigDiag.cpp' ]

if env['HAVE_WIIUSE']:
	files += [ 'WiimoteReal/WiimoteReal.cpp' ]
	libs += [ 'wiiuse' ]

env.SharedLibrary(env['plugin_dir'] + name, files, LIBS = env['LIBS'] + libs)
