]> git.tdb.fi Git - ext/openal.git/blob - Build
Tweak some types to work around an MSVC compile error
[ext/openal.git] / Build
1 package "openal"
2 {
3         if_arch "windows"
4         {
5                 feature "winmm" "Enable WinMM backend"
6                 {
7                         default "yes";
8                 };
9                 if_feature "winmm"
10                 {
11                         build_info
12                         {
13                                 library "winmm";
14                         };
15                 };
16
17                 feature "dsound" "Enable DirectSound backend"
18                 {
19                         default "yes";
20                 };
21
22                 feature "wasapi" "Enable WASAPI backend"
23                 {
24                         default "yes";
25                 };
26         };
27
28         feature "wave" "Enable WaveFile backend"
29         {
30                 default "yes";
31         };
32
33         build_info
34         {
35                 incpath ".";
36                 incpath "common";
37                 define "HAVE_MALLOC_H" "1";
38                 define "HAVE_PTHREAD_SETSCHEDPARAM" "1";
39                 define "RESTRICT" " ";
40         };
41
42         if_arch "linux"
43         {
44                 define "HAVE_PTHREAD_SETNAME_NP" "1";
45                 build_info
46                 {
47                         library "dl";
48                 };
49         };
50
51         if_arch "windows"
52         {
53                 build_info
54                 {
55                         define "NOMINMAX" "1";
56                         define "HAVE__ALIGNED_MALLOC" "1";
57                         define "HAVE_INTRIN_H" "1";
58                         define "HAVE_CPUID_INTRINSIC" "1";
59                         define "HAVE_GUIDDEF_H" "1";
60                         define "HAVE_INITGUID_H" "1";
61                         define "AL_API" "__declspec(dllexport)";
62                         define "ALC_API" "__declspec(dllexport)";
63                         library "ole32";
64                         library "shell32";
65                         library "user32";
66                 };
67         };
68
69         if_arch "gcc"
70         {
71                 build_info
72                 {
73                         define "HAVE_CPUID_H" "1";
74                         define "HAVE_GCC_GET_CPUID" "1";
75                         define "AL_API" "__attribute__((visibility(\"default\")))";
76                         define "ALC_API" "__attribute__((visibility(\"default\")))";
77                 };
78         };
79
80         if_arch "msvc"
81         {
82                 build_info
83                 {
84                         fatal_warnings false;
85                 };
86         };
87
88         if_arch "!windows"
89         {
90                 build_info
91                 {
92                         define "HAVE_POSIX_MEMALIGN" "1";
93                         define "HAVE_DLFCN_H" "1";
94                 };
95         };
96
97         library "openal"
98         {
99                 source "common/albit.h";
100                 source "common/albyte.h";
101                 source "common/alcomplex.cpp";
102                 source "common/alcomplex.h";
103                 source "common/aldeque.h";
104                 source "common/alfstream.cpp";
105                 source "common/alfstream.h";
106                 source "common/almalloc.cpp";
107                 source "common/almalloc.h";
108                 source "common/alnumbers.h";
109                 source "common/alnumeric.h";
110                 source "common/aloptional.h";
111                 source "common/alspan.h";
112                 source "common/alstring.cpp";
113                 source "common/alstring.h";
114                 source "common/altraits.h";
115                 source "common/atomic.h";
116                 source "common/comptr.h";
117                 source "common/dynload.cpp";
118                 source "common/dynload.h";
119                 source "common/intrusive_ptr.h";
120                 source "common/opthelpers.h";
121                 source "common/phase_shifter.h";
122                 source "common/polyphase_resampler.cpp";
123                 source "common/polyphase_resampler.h";
124                 source "common/pragmadefs.h";
125                 source "common/ringbuffer.cpp";
126                 source "common/ringbuffer.h";
127                 source "common/strutils.cpp";
128                 source "common/strutils.h";
129                 source "common/threads.cpp";
130                 source "common/threads.h";
131                 source "common/vecmat.h";
132                 source "common/vector.h";
133
134                 source "core/ambdec.cpp";
135                 source "core/ambdec.h";
136                 source "core/ambidefs.cpp";
137                 source "core/ambidefs.h";
138                 source "core/async_event.h";
139                 source "core/bformatdec.cpp";
140                 source "core/bformatdec.h";
141                 source "core/bs2b.cpp";
142                 source "core/bs2b.h";
143                 source "core/bsinc_defs.h";
144                 source "core/bsinc_tables.cpp";
145                 source "core/bsinc_tables.h";
146                 source "core/bufferline.h";
147                 source "core/buffer_storage.cpp";
148                 source "core/buffer_storage.h";
149                 source "core/context.cpp";
150                 source "core/context.h";
151                 source "core/converter.cpp";
152                 source "core/converter.h";
153                 source "core/cpu_caps.cpp";
154                 source "core/cpu_caps.h";
155                 source "core/cubic_defs.h";
156                 source "core/cubic_tables.cpp";
157                 source "core/cubic_tables.h";
158                 source "core/devformat.cpp";
159                 source "core/devformat.h";
160                 source "core/device.cpp";
161                 source "core/device.h";
162                 source "core/effects/base.h";
163                 source "core/effectslot.cpp";
164                 source "core/effectslot.h";
165                 source "core/except.cpp";
166                 source "core/except.h";
167                 source "core/filters/biquad.h";
168                 source "core/filters/biquad.cpp";
169                 source "core/filters/nfc.cpp";
170                 source "core/filters/nfc.h";
171                 source "core/filters/splitter.cpp";
172                 source "core/filters/splitter.h";
173                 source "core/fmt_traits.cpp";
174                 source "core/fmt_traits.h";
175                 source "core/fpu_ctrl.cpp";
176                 source "core/fpu_ctrl.h";
177                 source "core/front_stablizer.h";
178                 source "core/helpers.cpp";
179                 source "core/helpers.h";
180                 source "core/hrtf.cpp";
181                 source "core/hrtf.h";
182                 source "core/logging.cpp";
183                 source "core/logging.h";
184                 source "core/mastering.cpp";
185                 source "core/mastering.h";
186                 source "core/mixer.cpp";
187                 source "core/mixer.h";
188                 source "core/resampler_limits.h";
189                 source "core/uhjfilter.cpp";
190                 source "core/uhjfilter.h";
191                 source "core/uiddefs.cpp";
192                 source "core/voice.cpp";
193                 source "core/voice.h";
194                 source "core/voice_change.h";
195
196                 source "core/mixer/defs.h";
197                 source "core/mixer/hrtfbase.h";
198                 source "core/mixer/hrtfdefs.h";
199                 source "core/mixer/mixer_c.cpp";
200
201                 source "al/auxeffectslot.cpp";
202                 source "al/auxeffectslot.h";
203                 source "al/buffer.cpp";
204                 source "al/buffer.h";
205                 source "al/effect.cpp";
206                 source "al/effect.h";
207                 source "al/effects/autowah.cpp";
208                 source "al/effects/chorus.cpp";
209                 source "al/effects/compressor.cpp";
210                 source "al/effects/convolution.cpp";
211                 source "al/effects/dedicated.cpp";
212                 source "al/effects/distortion.cpp";
213                 source "al/effects/echo.cpp";
214                 source "al/effects/effects.cpp";
215                 source "al/effects/effects.h";
216                 source "al/effects/equalizer.cpp";
217                 source "al/effects/fshifter.cpp";
218                 source "al/effects/modulator.cpp";
219                 source "al/effects/null.cpp";
220                 source "al/effects/pshifter.cpp";
221                 source "al/effects/reverb.cpp";
222                 source "al/effects/vmorpher.cpp";
223                 source "al/error.cpp";
224                 source "al/event.cpp";
225                 source "al/event.h";
226                 source "al/extension.cpp";
227                 source "al/filter.cpp";
228                 source "al/filter.h";
229                 source "al/listener.cpp";
230                 source "al/listener.h";
231                 source "al/source.cpp";
232                 source "al/source.h";
233                 source "al/state.cpp";
234
235                 source "alc/alc.cpp";
236                 source "alc/alu.cpp";
237                 source "alc/alu.h";
238                 source "alc/alconfig.cpp";
239                 source "alc/alconfig.h";
240                 source "alc/context.cpp";
241                 source "alc/context.h";
242                 source "alc/device.cpp";
243                 source "alc/device.h";
244                 source "alc/effects/base.h";
245                 source "alc/effects/autowah.cpp";
246                 source "alc/effects/chorus.cpp";
247                 source "alc/effects/compressor.cpp";
248                 source "alc/effects/convolution.cpp";
249                 source "alc/effects/dedicated.cpp";
250                 source "alc/effects/distortion.cpp";
251                 source "alc/effects/echo.cpp";
252                 source "alc/effects/equalizer.cpp";
253                 source "alc/effects/fshifter.cpp";
254                 source "alc/effects/modulator.cpp";
255                 source "alc/effects/null.cpp";
256                 source "alc/effects/pshifter.cpp";
257                 source "alc/effects/reverb.cpp";
258                 source "alc/effects/vmorpher.cpp";
259                 source "alc/inprogext.h";
260                 source "alc/panning.cpp";
261
262                 if_arch "x86-64"
263                 {
264                         source "core/mixer/mixer_sse2.cpp";
265                         build_info
266                         {
267                                 define "HAVE_SSE2" "1";
268                                 define "HAVE_SSE_INTRINSICS" "1";
269                         };
270                 };
271
272                 source "alc/backends/base.cpp";
273                 source "alc/backends/base.h";
274                 source "alc/backends/loopback.cpp";
275                 source "alc/backends/loopback.h";
276                 source "alc/backends/null.cpp";
277                 source "alc/backends/null.h";
278
279                 if_feature "winmm"
280                 {
281                         source "alc/backends/winmm.cpp";
282                         source "alc/backends/winmm.h";
283                 };
284
285                 if_feature "dsound"
286                 {
287                         source "alc/backends/dsound.cpp";
288                         source "alc/backends/dsound.h";
289                 };
290
291                 if_feature "wasapi"
292                 {
293                         source "alc/backends/wasapi.cpp";
294                         source "alc/backends/wasapi.h";
295                 };
296
297                 if_feature "wave"
298                 {
299                         source "alc/backends/wave.cpp";
300                         source "alc/backends/wave.h";
301                 };
302
303                 build_info
304                 {
305                         define "AL_BUILD_LIBRARY" "1";
306                         define "AL_ALEXT_PROTOTYPES" "1";
307                 };
308
309                 install true;
310                 install_headers false;
311         };
312
313         install "include/AL"
314         {
315                 source "include/AL";
316         };
317 };