1# Copyright (C) 2024 Huawei Device Co., Ltd. 2# Licensed under the Apache License, Version 2.0 (the "License"); 3# you may not use this file except in compliance with the License. 4# You may obtain a copy of the License at 5# 6# http://www.apache.org/licenses/LICENSE-2.0 7# 8# Unless required by applicable law or agreed to in writing, software 9# distributed under the License is distributed on an "AS IS" BASIS, 10# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11# See the License for the specific language governing permissions and 12# limitations under the License. 13 14# lame build 15import("//build/ohos.gni") 16config("lame_config") { 17 include_dirs = [ "//third_party/lame/include" ] 18 19 cflags = [ 20 "-O2", 21 "-Wall", 22 "-Wno-sign-compare", 23 "-Wimplicit-function-declaration", 24 "-Wno-parentheses", 25 "-Wno-string-conversion", 26 "-Wno-string-plus-int", 27 "-Wno-asm-operand-widths", 28 "-Wno-pointer-sign", 29 "-Wno-deprecated-declarations", 30 "-Wno-implicit-int", 31 "-Wno-switch", 32 "-Wno-incompatible-pointer-types-discards-qualifiers", 33 "-Wno-int-conversion", 34 "-Wno-absolute-value", 35 "-Wno-unused-function", 36 "-Wno-unused-label", 37 "-Wno-unused-const-variable", 38 "-Wno-unused-variable", 39 "-Wno-visibility", 40 "-Wno-incompatible-pointer-types", 41 "-Wno-sometimes-uninitialized", 42 "-Wno-format", 43 "-Wno-tautological-constant-out-of-range-compare", 44 "-Wno-macro-redefined", 45 "-Wno-array-parameter", 46 "-Wno-deprecated-pragma", 47 "-DSTDC_HEADERS", 48 "-DHAVE_LIMITS_H", 49 "-Wno-shift-negative-value", 50 "-Wno-tautological-pointer-compare", 51 "-Wno-unused-but-set-variable", 52 ] 53 54 cflags_cc = [ 55 "-std=c++17", 56 "-fno-rtti", 57 ] 58} 59 60ohos_shared_library("lame") { 61 public_configs = [ ":lame_config" ] 62 63 sources = [ 64 "//third_party/lame/libmp3lame/VbrTag.c", 65 "//third_party/lame/libmp3lame/bitstream.c", 66 "//third_party/lame/libmp3lame/encoder.c", 67 "//third_party/lame/libmp3lame/fft.c", 68 "//third_party/lame/libmp3lame/gain_analysis.c", 69 "//third_party/lame/libmp3lame/id3tag.c", 70 "//third_party/lame/libmp3lame/lame.c", 71 "//third_party/lame/libmp3lame/mpglib_interface.c", 72 "//third_party/lame/libmp3lame/newmdct.c", 73 "//third_party/lame/libmp3lame/presets.c", 74 "//third_party/lame/libmp3lame/psymodel.c", 75 "//third_party/lame/libmp3lame/quantize.c", 76 "//third_party/lame/libmp3lame/quantize_pvt.c", 77 "//third_party/lame/libmp3lame/reservoir.c", 78 "//third_party/lame/libmp3lame/set_get.c", 79 "//third_party/lame/libmp3lame/tables.c", 80 "//third_party/lame/libmp3lame/takehiro.c", 81 "//third_party/lame/libmp3lame/util.c", 82 "//third_party/lame/libmp3lame/vbrquantize.c", 83 "//third_party/lame/libmp3lame/version.c", 84 ] 85 86 part_name = "lame" 87 subsystem_name = "thirdparty" 88} 89