michael@0: # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*- michael@0: # vim: set filetype=python: michael@0: # This Source Code Form is subject to the terms of the Mozilla Public michael@0: # License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: # file, You can obtain one at http://mozilla.org/MPL/2.0/. michael@0: michael@0: LIBRARY_NAME = 'cubeb' michael@0: michael@0: SOURCES += [ michael@0: 'cubeb.c', michael@0: ] michael@0: michael@0: if CONFIG['MOZ_ALSA']: michael@0: SOURCES += [ michael@0: 'cubeb_alsa.c', michael@0: ] michael@0: DEFINES['USE_ALSA'] = True michael@0: michael@0: if CONFIG['MOZ_PULSEAUDIO']: michael@0: SOURCES += [ michael@0: 'cubeb_pulse.c', michael@0: ] michael@0: DEFINES['USE_PULSE'] = True michael@0: if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk': michael@0: DEFINES['DISABLE_LIBPULSE_DLOPEN'] = True michael@0: michael@0: if CONFIG['OS_ARCH'] == 'OpenBSD': michael@0: SOURCES += [ michael@0: 'cubeb_sndio.c', michael@0: ] michael@0: DEFINES['USE_SNDIO'] = True michael@0: michael@0: if CONFIG['OS_TARGET'] == 'Darwin': michael@0: SOURCES += [ michael@0: 'cubeb_audiounit.c', michael@0: ] michael@0: DEFINES['USE_AUDIOUNIT'] = True michael@0: michael@0: if CONFIG['OS_TARGET'] == 'WINNT': michael@0: SOURCES += [ michael@0: 'cubeb_wasapi.cpp', michael@0: 'cubeb_winmm.c', michael@0: ] michael@0: DEFINES['USE_WINMM'] = True michael@0: DEFINES['USE_WASAPI'] = True michael@0: michael@0: if CONFIG['OS_TARGET'] == 'Android': michael@0: SOURCES += ['cubeb_opensl.c'] michael@0: SOURCES['cubeb_opensl.c'].flags += ['-Wno-declaration-after-statement'] michael@0: DEFINES['USE_OPENSL'] = True michael@0: if CONFIG['MOZ_WIDGET_TOOLKIT'] != 'gonk': michael@0: SOURCES += [ michael@0: 'cubeb_audiotrack.c', michael@0: ] michael@0: DEFINES['USE_AUDIOTRACK'] = True michael@0: michael@0: MSVC_ENABLE_PGO = True michael@0: michael@0: if CONFIG['GKMEDIAS_SHARED_LIBRARY']: michael@0: NO_VISIBILITY_FLAGS = True michael@0: michael@0: FINAL_LIBRARY = 'gkmedias' michael@0: michael@0: if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk': michael@0: CFLAGS += [ michael@0: '-I%s/%s' % (CONFIG['ANDROID_SOURCE'], d) for d in [ michael@0: 'frameworks/wilhelm/include', michael@0: 'system/media/wilhelm/include', michael@0: ] michael@0: ]