1cc_library_static {
2    name: "libOpenSLESUT",
3
4    srcs: [
5        "assert.cpp",
6        "ut/OpenSLESUT.c",
7        "ut/slesutResult.c",
8    ],
9
10    header_libs: ["libOpenSLES_headers"],
11    export_header_lib_headers: ["libOpenSLES_headers"],
12    export_include_dirs: ["ut"],
13
14    cflags: [
15        "-fvisibility=hidden",
16        "-UNDEBUG",
17
18        "-Wall",
19        "-Werror",
20    ],
21}
22
23cc_library_static {
24    name: "libopensles_helper",
25
26    header_libs: ["libOpenSLES_headers"],
27    export_header_lib_headers: ["libOpenSLES_headers"],
28
29    cflags: [
30        "-Wno-initializer-overrides",
31        //"-Wno-missing-field-initializers",
32        // optional, see comments in MPH_to.c:
33        //"-DUSE_DESIGNATED_INITIALIZERS",
34        //"-S",
35        // and also see ../tools/mphgen/Makefile
36        "-DUSE_DESIGNATED_INITIALIZERS",
37        "-UNDEBUG",
38
39        "-Wall",
40        "-Werror",
41    ],
42
43    srcs: [
44        "assert.cpp",
45        "MPH_to.c",
46        "handlers.c",
47    ],
48}
49
50
51cc_library_shared {
52    name: "libwilhelm",
53
54    cflags: [
55        // do not claim support for any OpenSL ES or OpenMAX AL profiles
56        "-DUSE_PROFILES=0",
57
58        // enable API logging; details are set separately by SL_TRACE_DEFAULT below
59        // or -UUSE_TRACE to disable API logging
60        "-DUSE_TRACE",
61
62        // see Configuration.h for USE_DEBUG
63
64        // enable assert() to do runtime checking
65        // or -DNDEBUG for no runtime checking
66        "-UNDEBUG",
67
68        // select the level of log messages
69        // or -DUSE_LOG=SLAndroidLogLevel_Verbose for verbose logging
70        "-DUSE_LOG=SLAndroidLogLevel_Info",
71
72        // log all API entries and exits (also requires Debug or Verbose log level)
73        // (otherwise a warning log on error results only)
74        //"-DSL_TRACE_DEFAULT=SL_TRACE_ALL",
75
76        // Reduce size of .so and hide internal global symbols
77        "-fvisibility=hidden",
78        "-DLI_API=__attribute__((visibility(\"default\")))",
79
80        "-Wno-multichar",
81        "-Wno-invalid-offsetof",
82
83        "-Wall",
84        "-Wextra",
85        "-Wno-unused-parameter",
86        "-Werror",
87    ],
88
89    ldflags: [
90        "-Wl,--exclude-libs,ALL",
91    ],
92
93    product_variables: {
94        platform_sdk_version: {
95            // API level
96            cflags: ["-DPLATFORM_SDK_VERSION=%d"],
97        },
98    },
99
100    srcs: [
101        "OpenSLES_IID.cpp",
102        "assert.cpp",
103        "classes.cpp",
104        "data.cpp",
105        "devices.cpp",
106        "entry.cpp",
107        "handler_bodies.cpp",
108        "trace.cpp",
109        "locks.cpp",
110        "sles.cpp",
111        "sl_iid.cpp",
112        "sllog.cpp",
113        "ThreadPool.cpp",
114        "android/AudioPlayer_to_android.cpp",
115        "android/AudioRecorder_to_android.cpp",
116        "android/MediaPlayer_to_android.cpp",
117        "android/OutputMix_to_android.cpp",
118        "android/VideoCodec_to_android.cpp",
119        "android/BufferQueueSource.cpp",
120        "android/CallbackProtector.cpp",
121        "android/AacBqToPcmCbRenderer.cpp",
122        "android/android_AudioSfDecoder.cpp",
123        "android/android_AudioToCbRenderer.cpp",
124        "android/android_GenericMediaPlayer.cpp",
125        "android/android_GenericPlayer.cpp",
126        "android/android_LocAVPlayer.cpp",
127        "android/android_StreamPlayer.cpp",
128        "android/android_Effect.cpp",
129        "android/util/AacAdtsExtractor.cpp",
130        "android/channels.cpp",
131        "autogen/IID_to_MPH.cpp",
132        "objects/C3DGroup.cpp",
133        "objects/CAudioPlayer.cpp",
134        "objects/CAudioRecorder.cpp",
135        "objects/CEngine.cpp",
136        "objects/COutputMix.cpp",
137        "objects/CMediaPlayer.cpp",
138        "itf/IAndroidBufferQueue.cpp",
139        "itf/IAndroidConfiguration.cpp",
140        "itf/IAndroidEffect.cpp",
141        "itf/IAndroidEffectCapabilities.cpp",
142        "itf/IAndroidEffectSend.cpp",
143        "itf/IAcousticEchoCancellation.cpp",
144        "itf/IAutomaticGainControl.cpp",
145        "itf/IBassBoost.cpp",
146        "itf/IBufferQueue.cpp",
147        "itf/IDynamicInterfaceManagement.cpp",
148        "itf/IEffectSend.cpp",
149        "itf/IEngine.cpp",
150        "itf/IEngineCapabilities.cpp",
151        "itf/IEnvironmentalReverb.cpp",
152        "itf/IEqualizer.cpp",
153        "itf/IMetadataExtraction.cpp",
154        "itf/INoiseSuppression.cpp",
155        "itf/IMuteSolo.cpp",
156        "itf/IObject.cpp",
157        "itf/IOutputMix.cpp",
158        "itf/IPlay.cpp",
159        "itf/IPlaybackRate.cpp",
160        "itf/IPrefetchStatus.cpp",
161        "itf/IPresetReverb.cpp",
162        "itf/IRecord.cpp",
163        "itf/ISeek.cpp",
164        "itf/IStreamInformation.cpp",
165        "itf/IVideoDecoderCapabilities.cpp",
166        "itf/IVirtualizer.cpp",
167        "itf/IVolume.cpp",
168
169        /* unused source files:
170        "sync.cpp",
171        "itf/I3DCommit.cpp",
172        "itf/I3DDoppler.cpp",
173        "itf/I3DGrouping.cpp",
174        "itf/I3DLocation.cpp",
175        "itf/I3DMacroscopic.cpp",
176        "itf/I3DSource.cpp",
177        "itf/IAudioDecoderCapabilities.cpp",
178        "itf/IAudioEncoder.cpp",
179        "itf/IAudioEncoderCapabilities.cpp",
180        "itf/IAudioIODeviceCapabilities.cpp",
181        "itf/IDeviceVolume.cpp",
182        "itf/IDynamicSource.cpp",
183        "itf/ILEDArray.cpp",
184        "itf/IMIDIMessage.cpp",
185        "itf/IMIDIMuteSolo.cpp",
186        "itf/IMIDITempo.cpp",
187        "itf/IMIDITime.cpp",
188        "itf/IMetadataTraversal.cpp",
189        "itf/IPitch.cpp",
190        "itf/IRatePitch.cpp",
191        "itf/IThreadSync.cpp",
192        "itf/IVibra.cpp",
193        "itf/IVisualization.cpp",
194        */
195    ],
196
197    header_libs: [
198        "libOpenSLES_headers",
199        "media_plugin_headers",
200    ],
201
202    export_header_lib_headers: [
203        "libOpenSLES_headers",
204        "media_plugin_headers",
205    ],
206
207    static_libs: [
208        "libopensles_helper",
209        "libOpenSLESUT",
210        "libstagefright_metadatautils",
211    ],
212
213    shared_libs: [
214        "liblog",
215        "libutils",
216        "libmedia",
217        "libmedia_omx",
218        "libaudioclient",
219        "libaudiomanager",
220        "libbinder",
221        "libstagefright",
222        "libstagefright_foundation",
223        "libgui",
224        "libdl",
225        "libandroid_runtime",
226
227        "libstagefright_http_support",
228    ],
229
230    include_dirs: [
231        "frameworks/av/media/libstagefright/mpeg2ts",
232    ],
233
234    export_shared_lib_headers: [
235        "libmedia",
236        "libstagefright",
237        "libaudioclient",
238    ],
239}
240
241cc_library_shared {
242    name: "libOpenSLES",
243
244    srcs: [
245        "sl_entry.cpp",
246        "sl_iid.cpp",
247        "assert.cpp",
248    ],
249    include_dirs: [
250        "frameworks/native/include/media/openmax",
251    ],
252
253    export_shared_lib_headers: ["libwilhelm"],
254    cflags: [
255        "-DLI_API=",
256        "-fvisibility=hidden",
257        "-UNDEBUG",
258        "-DSL_API=__attribute__((visibility(\"default\")))",
259
260        "-Wall",
261        "-Werror",
262    ],
263    shared_libs: [
264        "libwilhelm",
265        "liblog",
266        "libnativewindow",
267    ],
268    version_script: "libOpenSLES.map.txt",
269}
270
271cc_library_shared {
272    name: "libOpenMAXAL",
273
274    srcs: [
275        "xa_entry.cpp",
276        "xa_iid.cpp",
277        "assert.cpp",
278    ],
279    include_dirs: [
280        "frameworks/native/include/media/openmax",
281    ],
282
283    export_shared_lib_headers: ["libwilhelm"],
284    cflags: [
285        "-DLI_API=",
286        "-fvisibility=hidden",
287        "-UNDEBUG",
288        "-DXA_API=__attribute__((visibility(\"default\")))",
289
290        "-Wall",
291        "-Werror",
292    ],
293    shared_libs: [
294        "libwilhelm",
295        "liblog",
296        "libnativewindow",
297    ],
298    version_script: "libOpenMAXAL.map.txt",
299}
300