SCons build system files added.
[blender-staging.git] / intern / SoundSystem / SConscript
1 # TODO: Add the options for building with fmod and/or OpenAL
2 import sys
3
4 soundsys_env = Environment()
5
6 # Import the C flags set in the SConstruct file
7 Import ('cflags')
8 Import ('cxxflags')
9 Import ('defines')
10 Import ('use_openal')
11 Import ('use_fmod')
12 Import ('extra_includes')
13
14 soundsys_env.Append (CCFLAGS = cflags)
15 soundsys_env.Append (CXXFLAGS = cxxflags)
16 soundsys_env.Append (CPPDEFINES = defines)
17
18 source_files = ['dummy/SND_DummyDevice.cpp',
19                 'intern/SND_AudioDevice.cpp',
20                 'intern/SND_C-api.cpp',
21                 'intern/SND_CDObject.cpp',
22                 'intern/SND_DeviceManager.cpp',
23                 'intern/SND_IdObject.cpp',
24                 'intern/SND_Scene.cpp',
25                 'intern/SND_SoundListener.cpp',
26                 'intern/SND_SoundObject.cpp',
27                 'intern/SND_Utils.cpp',
28                 'intern/SND_WaveCache.cpp',
29                 'intern/SND_WaveSlot.cpp']
30
31 soundsys_env.Append (CPPPATH = ['.',
32                                 'intern',
33                                 '../moto/include',
34                                 '../string',
35                                 'dummy',
36                                 'openal'])
37
38 if use_openal == 'true':
39     source_files += ['openal/SND_OpenALDevice.cpp',
40                      'openal/pthread_cancel.cpp']
41     if sys.platform=='win32':
42         cflags += ' /D_LIB'
43
44 if use_fmod == 'true':
45     source_files += ['fmod/SND_FmodDevice.cpp']
46
47 if use_openal == 'false' and use_fmod == 'false':
48     soundsys_env.Append (CPPDEFINES = 'NO_SOUND')
49
50 soundsys_env.Append (CPPPATH = extra_includes)
51
52 soundsys_env.Library (target='#/lib/soundsystem', source=source_files)