# -*- python -*- 
 
Import('env')
import sys

name = "Plugin_Wiimote"

files = [
        "Config.cpp",
        "ConfigDlg.cpp",
        "Console.cpp",
        "DataReports.cpp",
        "EmuDefinitions.cpp",
        "EmuMain.cpp",
        "Encryption.cpp",
        "FillReport.cpp",
        "main.cpp",
        "wiimote_real.cpp",
	]

wiimoteenv = env.Clone()

if wiimoteenv['osx64']:
    wiimoteenv.Append(
        CXXFLAGS = [ '-arch', 'x86_64' ],
        LINKFLAGS = [ '-arch', 'x86_64' ],
        LIBS = [ 'common' ],
        )
else:
    wiimoteenv.Append(
        CXXFLAGS = [ '-fPIC' ],
        LIBS = [ 'common' ],
        )

wiimoteenv.SharedLibrary(env['plugin_dir']+name, files)