summaryrefslogtreecommitdiffstats
path: root/media/libcubeb/src/moz.build
diff options
context:
space:
mode:
authorMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
committerMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
commit5f8de423f190bbb79a62f804151bc24824fa32d8 (patch)
tree10027f336435511475e392454359edea8e25895d /media/libcubeb/src/moz.build
parent49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff)
downloadUXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip
Add m-esr52 at 52.6.0
Diffstat (limited to 'media/libcubeb/src/moz.build')
-rw-r--r--media/libcubeb/src/moz.build98
1 files changed, 98 insertions, 0 deletions
diff --git a/media/libcubeb/src/moz.build b/media/libcubeb/src/moz.build
new file mode 100644
index 000000000..781214620
--- /dev/null
+++ b/media/libcubeb/src/moz.build
@@ -0,0 +1,98 @@
+# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
+# vim: set filetype=python:
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+DEFINES['CUBEB_GECKO_BUILD'] = True
+
+Library('cubeb')
+
+SOURCES += [
+ 'cubeb.c',
+ 'cubeb_panner.cpp'
+]
+
+if CONFIG['MOZ_ALSA']:
+ SOURCES += [
+ 'cubeb_alsa.c',
+ ]
+ DEFINES['USE_ALSA'] = True
+
+if CONFIG['MOZ_PULSEAUDIO'] or CONFIG['MOZ_JACK']:
+ SOURCES += [
+ 'cubeb_resampler.cpp',
+ ]
+
+if CONFIG['MOZ_PULSEAUDIO']:
+ SOURCES += [
+ 'cubeb_pulse.c',
+ ]
+ DEFINES['USE_PULSE'] = True
+ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk':
+ DEFINES['DISABLE_LIBPULSE_DLOPEN'] = True
+
+if CONFIG['MOZ_JACK']:
+ SOURCES += [
+ 'cubeb_jack.cpp',
+ ]
+ USE_LIBS += [
+ 'speex',
+ ]
+ DEFINES['USE_JACK'] = True
+
+if CONFIG['OS_ARCH'] == 'OpenBSD':
+ SOURCES += [
+ 'cubeb_sndio.c',
+ ]
+ DEFINES['USE_SNDIO'] = True
+
+if CONFIG['OS_TARGET'] == 'Darwin':
+ SOURCES += [
+ 'cubeb_audiounit.cpp',
+ 'cubeb_resampler.cpp'
+ ]
+ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
+ SOURCES += [
+ 'cubeb_osx_run_loop.c',
+ ]
+ DEFINES['USE_AUDIOUNIT'] = True
+
+if CONFIG['OS_TARGET'] == 'WINNT':
+ SOURCES += [
+ 'cubeb_resampler.cpp',
+ 'cubeb_wasapi.cpp',
+ 'cubeb_winmm.c',
+ ]
+ DEFINES['USE_WINMM'] = True
+ DEFINES['USE_WASAPI'] = True
+ if CONFIG['_MSC_VER']:
+ CXXFLAGS += ['-wd4005'] # C4005: '_USE_MATH_DEFINES' : macro redefinition
+
+if CONFIG['OS_TARGET'] == 'Android':
+ SOURCES += ['cubeb_opensl.c']
+ SOURCES += ['cubeb_resampler.cpp']
+ DEFINES['USE_OPENSL'] = True
+ if CONFIG['MOZ_WIDGET_TOOLKIT'] != 'gonk':
+ SOURCES += [
+ 'cubeb_audiotrack.c',
+ ]
+ DEFINES['USE_AUDIOTRACK'] = True
+
+FINAL_LIBRARY = 'gkmedias'
+
+if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk':
+ if CONFIG['ANDROID_VERSION'] >= '17':
+ LOCAL_INCLUDES += [
+ '%' + '%s/frameworks/wilhelm/include' % CONFIG['ANDROID_SOURCE'],
+ ]
+ else:
+ LOCAL_INCLUDES += [
+ '%' + '%s/system/media/wilhelm/include' % CONFIG['ANDROID_SOURCE'],
+ ]
+
+CFLAGS += CONFIG['MOZ_ALSA_CFLAGS']
+CFLAGS += CONFIG['MOZ_PULSEAUDIO_CFLAGS']
+
+# We allow warnings for third-party code that can be updated from upstream.
+ALLOW_COMPILER_WARNINGS = True