tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

moz.build (2559B)


      1 # -*- Mode: python; 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 DEFINES['CUBEB_GECKO_BUILD'] = True
      8 
      9 Library('cubeb')
     10 
     11 SOURCES += [
     12     'cubeb.c',
     13     'cubeb_log.cpp',
     14     'cubeb_mixer.cpp',
     15     'cubeb_strings.c',
     16     'cubeb_utils.cpp'
     17 ]
     18 
     19 if CONFIG['MOZ_ALSA']:
     20     SOURCES += [
     21         'cubeb_alsa.c',
     22     ]
     23     DEFINES['USE_ALSA'] = True
     24 
     25 if CONFIG['MOZ_SUNAUDIO']:
     26     SOURCES += [
     27         'cubeb_sun.c',
     28     ]
     29     DEFINES['USE_SUN'] = True
     30 
     31 if (
     32     CONFIG["MOZ_PULSEAUDIO"]
     33     or CONFIG["MOZ_JACK"]
     34     or CONFIG["MOZ_AAUDIO"]
     35     or CONFIG["MOZ_OPENSL"]
     36     or CONFIG["MOZ_AUDIOUNIT_RUST"]
     37     or CONFIG["MOZ_WASAPI"]
     38 ):
     39     SOURCES += [
     40         'cubeb_resampler.cpp',
     41     ]
     42 
     43 if CONFIG['MOZ_PULSEAUDIO']:
     44     DEFINES['USE_PULSE_RUST'] = True
     45 
     46 if CONFIG['MOZ_JACK']:
     47     SOURCES += [
     48         'cubeb_jack.cpp',
     49     ]
     50     USE_LIBS += [
     51         'speex',
     52     ]
     53     DEFINES['USE_JACK'] = True
     54 
     55 if CONFIG['MOZ_OSS']:
     56     SOURCES += [
     57         'cubeb_oss.c',
     58     ]
     59     DEFINES['USE_OSS'] = True
     60 
     61 if CONFIG['MOZ_SNDIO']:
     62     SOURCES += [
     63         'cubeb_sndio.c',
     64     ]
     65     DEFINES['USE_SNDIO'] = True
     66     if CONFIG['OS_ARCH'] == 'OpenBSD':
     67         DEFINES['DISABLE_LIBSNDIO_DLOPEN'] = True
     68 
     69 if CONFIG['MOZ_AUDIOUNIT_RUST']:
     70     SOURCES += [
     71         'cubeb_audiounit.cpp',
     72     ]
     73     if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
     74         SOURCES += [
     75             'cubeb_osx_run_loop.c',
     76         ]
     77         DEFINES['USE_AUDIOUNIT_RUST'] = True
     78     DEFINES['USE_AUDIOUNIT'] = True
     79 
     80 if CONFIG['MOZ_WASAPI']:
     81     SOURCES += [
     82         'cubeb_wasapi.cpp',
     83         'cubeb_winmm.c',
     84     ]
     85     DEFINES['UNICODE'] = True
     86     DEFINES['USE_WINMM'] = True
     87     DEFINES['USE_WASAPI'] = True
     88     OS_LIBS += [
     89       "avrt",
     90       "ksuser",
     91     ]
     92 
     93 if CONFIG['MOZ_AAUDIO'] or CONFIG['MOZ_OPENSL']:
     94     SOURCES += ['cubeb-jni.cpp']
     95 
     96 if CONFIG['MOZ_AAUDIO']:
     97     SOURCES += ['cubeb_aaudio.cpp']
     98     SOURCES['cubeb_aaudio.cpp'].flags += ['-Wno-unguarded-availability']
     99     DEFINES['USE_AAUDIO'] = True
    100 
    101 if CONFIG['MOZ_OPENSL']:
    102     SOURCES += ['cubeb_opensl.cpp']
    103     DEFINES['USE_OPENSL'] = True
    104 
    105 FINAL_LIBRARY = 'xul'
    106 
    107 if CONFIG['MOZ_ALSA']:
    108     CFLAGS += CONFIG['MOZ_ALSA_CFLAGS']
    109 
    110 CFLAGS += CONFIG['MOZ_JACK_CFLAGS']
    111 CFLAGS += CONFIG['MOZ_PULSEAUDIO_CFLAGS']
    112 
    113 # We allow warnings for third-party code that can be updated from upstream.
    114 AllowCompilerWarnings()