46 lines
880 B
Python
46 lines
880 B
Python
# -*- python -*-
|
|
|
|
Import('env')
|
|
import sys
|
|
|
|
if env.has_key('shared_sdl') and env['shared_sdl']:
|
|
Return()
|
|
|
|
if sys.platform == 'darwin':
|
|
Return()
|
|
|
|
files = [
|
|
'src/SDL.c',
|
|
'src/SDL_error.c',
|
|
'src/SDL_fatal.c',
|
|
'src/joystick/SDL_joystick.c',
|
|
]
|
|
|
|
if sys.platform.count('bsd'):
|
|
env['LIBS'] += ['usbhid']
|
|
files += [
|
|
'src/joystick/bsd/SDL_sysjoystick.c',
|
|
'src/stdlib/SDL_malloc.c',
|
|
'src/stdlib/SDL_string.c',
|
|
]
|
|
elif sys.platform == 'darwin':
|
|
files += [
|
|
'src/joystick/darwin/SDL_sysjoystick.c',
|
|
]
|
|
elif sys.platform == 'linux2':
|
|
files += [
|
|
'src/joystick/linux/SDL_sysjoystick.c',
|
|
'src/stdlib/SDL_string.c',
|
|
]
|
|
elif sys.platform == 'win32':
|
|
files += [
|
|
'src/joystick/win32/SDL_mmjoystick.c',
|
|
]
|
|
else:
|
|
files += [
|
|
'src/joystick/dummy/SDL_sysjoystick.c',
|
|
]
|
|
|
|
env['CPPPATH'] += ['#Externals/SDL', '#Externals/SDL/include']
|
|
env['LIBS'] += env.StaticObject(files)
|