• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2022 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
14import("//build/ohos.gni")
15
16config("alsa_lib_config") {
17  cflags = [
18    "-Wno-sign-compare",
19    "-Wno-implicit-function-declaration",
20    "-Wno-parentheses",
21    "-Wno-string-conversion",
22    "-Wno-string-plus-int",
23    "-Wno-asm-operand-widths",
24    "-Wno-pointer-sign",
25    "-Wno-deprecated-declarations",
26    "-Wno-implicit-int",
27    "-Wno-switch",
28    "-Wno-incompatible-pointer-types-discards-qualifiers",
29    "-Wno-int-conversion",
30    "-Wno-absolute-value",
31    "-Wno-unused-function",
32    "-Wno-unused-label",
33    "-Wno-unused-const-variable",
34    "-Wno-visibility",
35    "-Wno-incompatible-pointer-types",
36    "-Wno-sometimes-uninitialized",
37    "-Wno-format",
38    "-Wno-tautological-constant-out-of-range-compare",
39    "-Wno-implicit-fallthrough",
40    "-Wno-error",
41    "-D_GNU_SOURCE",
42    "-DHAVE_CONFIG_H",
43  ]
44
45  if (use_musl) {
46    cflags += [ "-Wno-bool-operation" ]
47  }
48}
49
50ohos_source_set("alsa_lib_dynamic") {
51  sources = [
52    "//third_party/alsa-lib/src/async.c",
53    "//third_party/alsa-lib/src/conf.c",
54    "//third_party/alsa-lib/src/confeval.c",
55    "//third_party/alsa-lib/src/confmisc.c",
56    "//third_party/alsa-lib/src/control/cards.c",
57    "//third_party/alsa-lib/src/control/control.c",
58    "//third_party/alsa-lib/src/control/control_empty.c",
59    "//third_party/alsa-lib/src/control/control_ext.c",
60    "//third_party/alsa-lib/src/control/control_hw.c",
61    "//third_party/alsa-lib/src/control/control_plugin.c",
62    "//third_party/alsa-lib/src/control/control_remap.c",
63    "//third_party/alsa-lib/src/control/control_shm.c",
64    "//third_party/alsa-lib/src/control/control_symbols.c",
65    "//third_party/alsa-lib/src/control/ctlparse.c",
66    "//third_party/alsa-lib/src/control/hcontrol.c",
67    "//third_party/alsa-lib/src/control/namehint.c",
68    "//third_party/alsa-lib/src/control/setup.c",
69    "//third_party/alsa-lib/src/control/tlv.c",
70    "//third_party/alsa-lib/src/dlmisc.c",
71    "//third_party/alsa-lib/src/error.c",
72    "//third_party/alsa-lib/src/hwdep/hwdep.c",
73    "//third_party/alsa-lib/src/hwdep/hwdep_hw.c",
74    "//third_party/alsa-lib/src/hwdep/hwdep_symbols.c",
75    "//third_party/alsa-lib/src/input.c",
76    "//third_party/alsa-lib/src/mixer/bag.c",
77    "//third_party/alsa-lib/src/mixer/mixer.c",
78    "//third_party/alsa-lib/src/mixer/simple.c",
79    "//third_party/alsa-lib/src/mixer/simple_abst.c",
80    "//third_party/alsa-lib/src/mixer/simple_none.c",
81    "//third_party/alsa-lib/src/names.c",
82    "//third_party/alsa-lib/src/output.c",
83    "//third_party/alsa-lib/src/pcm/interval.c",
84    "//third_party/alsa-lib/src/pcm/mask.c",
85    "//third_party/alsa-lib/src/pcm/pcm.c",
86    "//third_party/alsa-lib/src/pcm/pcm_adpcm.c",
87    "//third_party/alsa-lib/src/pcm/pcm_alaw.c",
88    "//third_party/alsa-lib/src/pcm/pcm_asym.c",
89    "//third_party/alsa-lib/src/pcm/pcm_copy.c",
90    "//third_party/alsa-lib/src/pcm/pcm_direct.c",
91    "//third_party/alsa-lib/src/pcm/pcm_dmix.c",
92    "//third_party/alsa-lib/src/pcm/pcm_dshare.c",
93    "//third_party/alsa-lib/src/pcm/pcm_dsnoop.c",
94    "//third_party/alsa-lib/src/pcm/pcm_empty.c",
95    "//third_party/alsa-lib/src/pcm/pcm_extplug.c",
96    "//third_party/alsa-lib/src/pcm/pcm_file.c",
97    "//third_party/alsa-lib/src/pcm/pcm_generic.c",
98    "//third_party/alsa-lib/src/pcm/pcm_hooks.c",
99    "//third_party/alsa-lib/src/pcm/pcm_hw.c",
100    "//third_party/alsa-lib/src/pcm/pcm_iec958.c",
101    "//third_party/alsa-lib/src/pcm/pcm_ioplug.c",
102    "//third_party/alsa-lib/src/pcm/pcm_ladspa.c",
103    "//third_party/alsa-lib/src/pcm/pcm_lfloat.c",
104    "//third_party/alsa-lib/src/pcm/pcm_linear.c",
105    "//third_party/alsa-lib/src/pcm/pcm_meter.c",
106    "//third_party/alsa-lib/src/pcm/pcm_misc.c",
107    "//third_party/alsa-lib/src/pcm/pcm_mmap.c",
108    "//third_party/alsa-lib/src/pcm/pcm_mmap_emul.c",
109    "//third_party/alsa-lib/src/pcm/pcm_mulaw.c",
110    "//third_party/alsa-lib/src/pcm/pcm_multi.c",
111    "//third_party/alsa-lib/src/pcm/pcm_null.c",
112    "//third_party/alsa-lib/src/pcm/pcm_params.c",
113    "//third_party/alsa-lib/src/pcm/pcm_plug.c",
114    "//third_party/alsa-lib/src/pcm/pcm_plugin.c",
115    "//third_party/alsa-lib/src/pcm/pcm_rate.c",
116    "//third_party/alsa-lib/src/pcm/pcm_rate_linear.c",
117    "//third_party/alsa-lib/src/pcm/pcm_route.c",
118    "//third_party/alsa-lib/src/pcm/pcm_share.c",
119    "//third_party/alsa-lib/src/pcm/pcm_shm.c",
120    "//third_party/alsa-lib/src/pcm/pcm_simple.c",
121    "//third_party/alsa-lib/src/pcm/pcm_softvol.c",
122    "//third_party/alsa-lib/src/pcm/pcm_symbols.c",
123    "//third_party/alsa-lib/src/rawmidi/rawmidi.c",
124    "//third_party/alsa-lib/src/rawmidi/rawmidi_hw.c",
125    "//third_party/alsa-lib/src/rawmidi/rawmidi_symbols.c",
126    "//third_party/alsa-lib/src/rawmidi/rawmidi_virt.c",
127    "//third_party/alsa-lib/src/seq/seq.c",
128    "//third_party/alsa-lib/src/seq/seq_event.c",
129    "//third_party/alsa-lib/src/seq/seq_hw.c",
130    "//third_party/alsa-lib/src/seq/seq_midi_event.c",
131    "//third_party/alsa-lib/src/seq/seq_old.c",
132    "//third_party/alsa-lib/src/seq/seq_symbols.c",
133    "//third_party/alsa-lib/src/seq/seqmid.c",
134    "//third_party/alsa-lib/src/shmarea.c",
135    "//third_party/alsa-lib/src/socket.c",
136    "//third_party/alsa-lib/src/timer/timer.c",
137    "//third_party/alsa-lib/src/timer/timer_hw.c",
138    "//third_party/alsa-lib/src/timer/timer_query.c",
139    "//third_party/alsa-lib/src/timer/timer_query_hw.c",
140    "//third_party/alsa-lib/src/timer/timer_symbols.c",
141    "//third_party/alsa-lib/src/ucm/main.c",
142    "//third_party/alsa-lib/src/ucm/parser.c",
143    "//third_party/alsa-lib/src/ucm/ucm_cond.c",
144    "//third_party/alsa-lib/src/ucm/ucm_exec.c",
145    "//third_party/alsa-lib/src/ucm/ucm_include.c",
146    "//third_party/alsa-lib/src/ucm/ucm_regex.c",
147    "//third_party/alsa-lib/src/ucm/ucm_subs.c",
148    "//third_party/alsa-lib/src/ucm/utils.c",
149    "//third_party/alsa-lib/src/userfile.c",
150  ]
151
152  include_dirs = [
153    "//third_party/alsa-lib/include",
154    "//third_party/alsa-lib/include/sound",
155    "//third_party/alsa-lib/include/uapi",
156    "//third_party/alsa-lib/src/pcm",
157    "//third_party/alsa-lib/src/ucm",
158    "//third_party/alsa-lib/src/mixer",
159    "//third_party/alsa-lib/src/seq",
160    "//third_party/alsa-lib/src/hwdep",
161    "//third_party/alsa-lib/src/rawmidi",
162    "//third_party/alsa-lib/src/control",
163    "//third_party/alsa-lib/src/timer",
164    "{target_gen_dir}/include/",
165  ]
166
167  configs = [ ":alsa_lib_config" ]
168}
169
170ohos_shared_library("libasound") {
171  deps = [
172    ":alsa_lib_dynamic",
173
174    # conf files
175    "src/conf:alsa-lib-prebuilt-all",
176  ]
177  license_file = "./COPYING"
178  output_extension = "so"
179  install_images = [ chipset_base_dir ]
180  install_enable = true
181  part_name = "alsa-lib"
182  subsystem_name = "thirdparty"
183}
184