blob: ad3666e427f303d5bcf199109c6bedba62a3dbdf [file] [log] [blame]
Eric Laurentb7a11d82014-04-18 17:40:41 -07001# Copyright 2014 The Android Open Source Project
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
15LOCAL_PATH:= $(call my-dir)
16
17include $(CLEAR_VARS)
18
Eric Laurentb7a11d82014-04-18 17:40:41 -070019ifeq ($(SOUND_TRIGGER_USE_STUB_MODULE), 1)
Mikhail Naganov49ad5522017-04-13 11:00:06 -070020 ifneq ($(USE_LEGACY_LOCAL_AUDIO_HAL), true)
21 $(error Requires building with USE_LEGACY_LOCAL_AUDIO_HAL=true)
22 endif
Eric Laurentb7a11d82014-04-18 17:40:41 -070023 LOCAL_CFLAGS += -DSOUND_TRIGGER_USE_STUB_MODULE
24endif
25
26LOCAL_SRC_FILES:= \
27 SoundTriggerHwService.cpp
28
29LOCAL_SHARED_LIBRARIES:= \
Eric Laurentb7a11d82014-04-18 17:40:41 -070030 liblog \
31 libutils \
32 libbinder \
33 libcutils \
34 libhardware \
Eric Laurentdf3dc7e2014-07-27 18:39:40 -070035 libsoundtrigger \
Marco Nelissen538ec5e2016-11-02 13:21:22 -070036 libaudioclient \
Eric Laurent8ba53d82014-08-01 23:15:05 +000037 libserviceutility
Eric Laurentb7a11d82014-04-18 17:40:41 -070038
Eric Laurent7a544b42016-08-05 19:01:13 -070039
Mikhail Naganov9dc17472017-01-11 11:15:28 -080040ifeq ($(USE_LEGACY_LOCAL_AUDIO_HAL),true)
41# libhardware configuration
42LOCAL_SRC_FILES += \
43 SoundTriggerHalLegacy.cpp
44else
Eric Laurent7a544b42016-08-05 19:01:13 -070045# Treble configuration
Eric Laurent7a544b42016-08-05 19:01:13 -070046LOCAL_SRC_FILES += \
47 SoundTriggerHalHidl.cpp
48
49LOCAL_SHARED_LIBRARIES += \
Mikhail Naganov9dc17472017-01-11 11:15:28 -080050 libhwbinder \
51 libhidlbase \
Mikhail Naganov6f9f1e22018-01-05 14:09:32 -080052 libhidlmemory \
Mikhail Naganov9dc17472017-01-11 11:15:28 -080053 libhidltransport \
54 libbase \
Mikhail Naganovd621ac82017-01-12 17:17:45 -080055 libaudiohal \
Kevin Rocard7588ff42018-01-08 11:11:30 -080056 libaudiohal_deathhandler \
Mikhail Naganov9dc17472017-01-11 11:15:28 -080057 android.hardware.soundtrigger@2.0 \
Mikhail Naganov6f9f1e22018-01-05 14:09:32 -080058 android.hardware.soundtrigger@2.1 \
59 android.hardware.audio.common@2.0 \
60 android.hidl.allocator@1.0 \
61 android.hidl.memory@1.0
Eric Laurent7a544b42016-08-05 19:01:13 -070062endif
63
64
Eric Laurent8ba53d82014-08-01 23:15:05 +000065LOCAL_C_INCLUDES += \
YOUNG HO CHA2ee7aab2017-05-25 23:16:51 +090066 frameworks/av/services/audioflinger
Eric Laurentb7a11d82014-04-18 17:40:41 -070067
Andy Hung8fa26972016-03-03 13:19:27 -080068LOCAL_MULTILIB := $(AUDIOSERVER_MULTILIB)
69
Eric Laurent7a544b42016-08-05 19:01:13 -070070LOCAL_CFLAGS += -Wall -Werror
Glenn Kastenfcddb0b2016-07-08 17:19:25 -070071
Eric Laurentb7a11d82014-04-18 17:40:41 -070072LOCAL_MODULE:= libsoundtriggerservice
73
74include $(BUILD_SHARED_LIBRARY)