|
1 # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*- |
|
2 # vim: set filetype=python: |
|
3 # This Source Code Form is subject to the terms of the Mozilla Public |
|
4 # License, v. 2.0. If a copy of the MPL was not distributed with this |
|
5 # file, You can obtain one at http://mozilla.org/MPL/2.0/. |
|
6 |
|
7 LIBRARY_NAME = 'cubeb' |
|
8 |
|
9 SOURCES += [ |
|
10 'cubeb.c', |
|
11 ] |
|
12 |
|
13 if CONFIG['MOZ_ALSA']: |
|
14 SOURCES += [ |
|
15 'cubeb_alsa.c', |
|
16 ] |
|
17 DEFINES['USE_ALSA'] = True |
|
18 |
|
19 if CONFIG['MOZ_PULSEAUDIO']: |
|
20 SOURCES += [ |
|
21 'cubeb_pulse.c', |
|
22 ] |
|
23 DEFINES['USE_PULSE'] = True |
|
24 if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk': |
|
25 DEFINES['DISABLE_LIBPULSE_DLOPEN'] = True |
|
26 |
|
27 if CONFIG['OS_ARCH'] == 'OpenBSD': |
|
28 SOURCES += [ |
|
29 'cubeb_sndio.c', |
|
30 ] |
|
31 DEFINES['USE_SNDIO'] = True |
|
32 |
|
33 if CONFIG['OS_TARGET'] == 'Darwin': |
|
34 SOURCES += [ |
|
35 'cubeb_audiounit.c', |
|
36 ] |
|
37 DEFINES['USE_AUDIOUNIT'] = True |
|
38 |
|
39 if CONFIG['OS_TARGET'] == 'WINNT': |
|
40 SOURCES += [ |
|
41 'cubeb_wasapi.cpp', |
|
42 'cubeb_winmm.c', |
|
43 ] |
|
44 DEFINES['USE_WINMM'] = True |
|
45 DEFINES['USE_WASAPI'] = True |
|
46 |
|
47 if CONFIG['OS_TARGET'] == 'Android': |
|
48 SOURCES += ['cubeb_opensl.c'] |
|
49 SOURCES['cubeb_opensl.c'].flags += ['-Wno-declaration-after-statement'] |
|
50 DEFINES['USE_OPENSL'] = True |
|
51 if CONFIG['MOZ_WIDGET_TOOLKIT'] != 'gonk': |
|
52 SOURCES += [ |
|
53 'cubeb_audiotrack.c', |
|
54 ] |
|
55 DEFINES['USE_AUDIOTRACK'] = True |
|
56 |
|
57 MSVC_ENABLE_PGO = True |
|
58 |
|
59 if CONFIG['GKMEDIAS_SHARED_LIBRARY']: |
|
60 NO_VISIBILITY_FLAGS = True |
|
61 |
|
62 FINAL_LIBRARY = 'gkmedias' |
|
63 |
|
64 if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk': |
|
65 CFLAGS += [ |
|
66 '-I%s/%s' % (CONFIG['ANDROID_SOURCE'], d) for d in [ |
|
67 'frameworks/wilhelm/include', |
|
68 'system/media/wilhelm/include', |
|
69 ] |
|
70 ] |