1# 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
19
20LOCAL_SRC_FILES:= \
21    RadioService.cpp
22
23LOCAL_SHARED_LIBRARIES:= \
24    liblog \
25    libutils \
26    libbinder \
27    libcutils \
28    libaudioclient \
29    libhardware \
30    libradio \
31    libradio_metadata
32
33ifeq ($(USE_LEGACY_LOCAL_AUDIO_HAL),true)
34# libhardware configuration
35LOCAL_SRC_FILES +=               \
36    RadioHalLegacy.cpp
37else
38# Treble configuration
39
40LOCAL_SRC_FILES += \
41    HidlUtils.cpp \
42    RadioHalHidl.cpp
43
44LOCAL_SHARED_LIBRARIES += \
45    libhwbinder \
46    libhidlbase \
47    libhidltransport \
48    libbase \
49    libaudiohal \
50    android.hardware.broadcastradio@1.0
51endif
52
53LOCAL_CFLAGS += -Wall -Wextra -Werror
54
55LOCAL_MULTILIB := $(AUDIOSERVER_MULTILIB)
56
57LOCAL_MODULE:= libradioservice
58
59include $(BUILD_SHARED_LIBRARY)
60