Home | History | Annotate | Download | only in webrtc
      1 // Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
      2 //
      3 // Use of this source code is governed by a BSD-style license
      4 // that can be found in the LICENSE file in the root of the source
      5 // tree. An additional intellectual property rights grant can be found
      6 // in the file PATENTS.  All contributing project authors may
      7 // be found in the AUTHORS file in the root of the source tree.
      8 
      9 // These defines will apply to all source files
     10 // Think again before changing it
     11 cc_defaults {
     12     name: "webrtc_flags",
     13     vendor: true,
     14 
     15     cflags: [
     16         "-DWEBRTC_POSIX",
     17         "-DWEBRTC_LINUX",
     18         "-DWEBRTC_THREAD_RR",
     19         "-DWEBRTC_CLOCK_TYPE_REALTIME",
     20         "-DWEBRTC_ANDROID",
     21 
     22         // The following macros are used by modules,
     23         // we might need to re-organize them
     24         // "-DWEBRTC_ANDROID_OPENSLES", // [module audio_device]
     25         // "-DNETEQ_VOICEENGINE_CODECS", // [module audio_coding neteq]
     26         // "-DWEBRTC_MODULE_UTILITY_VIDEO", // [module media_file] [module utility]
     27 
     28         "-Wall",
     29         "-Werror",
     30         // The following warnings are disabled in most webrtc modules,
     31         // until we upgrade to newer cleaner upstream webrtc.
     32         "-Wno-missing-braces",
     33         "-Wno-missing-field-initializers",
     34         "-Wno-unused-parameter",
     35     ],
     36 
     37     header_libs: ["libwebrtc_headers"],
     38 
     39     arch: {
     40         arm: {
     41             instruction_set: "arm",
     42 
     43             cflags: [
     44                 "-DWEBRTC_ARCH_ARM",
     45                 // "-DWEBRTC_DETECT_ARM_NEON", // only used in a build configuration without Neon
     46                 // TODO(kma): figure out if the above define could be moved to NDK build only.
     47 
     48                 // The following upstram ARM_NEON and ARMV7A defintions do not work on AOSP yet.
     49                 // They should be fixed in the next merge from upstream.
     50                 //# TODO(kma): test if the code under next two macros works with generic GCC compilers
     51                 // "-DWEBRTC_ARCH_ARM_NEON",
     52                 // "-flax-vector-conversions",
     53                 // "-DWEBRTC_ARCH_ARM_V7A",
     54             ],
     55         },
     56     },
     57 
     58     // The following clang-tidy checks are disabled in most webrtc modules,
     59     // until we upgrade to newer cleaner upstream webrtc.
     60     tidy_checks: [
     61         "-cert-*",
     62         "-clang-analyzer-*",
     63         "-hicpp-*",
     64         "-llvm-*",
     65         "-google-build-namespaces",
     66         "-google-default-arguments",
     67         "-google-explicit-constructor",
     68         "-google-runtime-int",
     69         "-google-runtime-operator",
     70         "-misc-incorrect-roundings",
     71         "-misc-macro-parentheses",
     72         "-misc-misplaced-widening-cast",
     73         "-misc-noexcept-move-constructor",
     74         "-misc-suspicious-string-compare",
     75         "-misc-unused-parameters",
     76         "-misc-unused-using-decls",
     77         "-performance-type-promotion-in-math-fn",
     78         "-performance-unnecessary-copy-initialization",
     79         "-performance-unnecessary-value-param",
     80     ],
     81 }
     82 
     83 cc_library_shared {
     84     name: "libwebrtc_audio_preprocessing",
     85     vendor: true,
     86 
     87     whole_static_libs: [
     88         "libwebrtc_aec",
     89         "libwebrtc_aecm",
     90         "libwebrtc_agc",
     91         "libwebrtc_apm",
     92         "libwebrtc_apm_utility",
     93         "libwebrtc_apvad",
     94         "libwebrtc_base",
     95         "libwebrtc_beamformer",
     96         "libwebrtc_common",
     97         "libwebrtc_intell",
     98         "libwebrtc_isac",
     99         "libwebrtc_resampler",
    100         "libwebrtc_ns",
    101         "libwebrtc_spl",
    102         "libwebrtc_system_wrappers",
    103         "libwebrtc_transient",
    104         "libwebrtc_vad",
    105     ],
    106 
    107     shared_libs: [
    108         "liblog",
    109         "libcutils",
    110         "libdl",
    111         "libprotobuf-cpp-lite",
    112     ],
    113 
    114     arch: {
    115         arm: {
    116             instruction_set: "arm",
    117         },
    118     },
    119 }
    120 
    121 cc_library_shared {
    122     name: "libwebrtc_audio_coding",
    123     vendor: true,
    124 
    125     whole_static_libs: [
    126         "libwebrtc_base",
    127         "libwebrtc_common",
    128         "libwebrtc_intell",
    129         "libwebrtc_isac",
    130         "libwebrtc_isacfix",
    131         "libwebrtc_resampler",
    132         "libwebrtc_spl",
    133         "libwebrtc_system_wrappers",
    134     ],
    135 
    136     shared_libs: [
    137         "libprotobuf-cpp-lite",
    138         "liblog",
    139         "libcutils",
    140         "libdl",
    141     ],
    142 
    143     arch: {
    144         arm: {
    145             instruction_set: "arm",
    146         },
    147     },
    148 }
    149 
    150 cc_library_headers {
    151     name: "libwebrtc_headers",
    152     vendor: true,
    153     export_include_dirs: ["."],
    154 }
    155 
    156 subdirs = ["webrtc/*"]
    157