1# Copyright (C) 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
17######################################################
18# Library used by both policy manager and the audioHAL
19######################################################
20include $(CLEAR_VARS)
21
22LOCAL_SRC_FILES := \
23    alsa_utils.cpp \
24    AudioHardwareOutput.cpp \
25    AudioOutput.cpp \
26    AudioStreamOut.cpp \
27    HDMIAudioOutput.cpp \
28    AudioHardwareInput.cpp \
29    AudioStreamIn.cpp \
30    AudioHotplugThread.cpp
31
32LOCAL_C_INCLUDES := \
33    external/tinyalsa/include \
34    $(call include-path-for, audio-utils)
35
36LOCAL_SHARED_LIBRARIES := \
37    libcommon_time_client \
38    libcutils \
39    liblog \
40    libutils \
41    libmedia \
42    libbinder \
43    libtinyalsa \
44    libaudiospdif \
45    libaudioutils
46
47# until remotecontrolservice is added to PDK, don't include
48# this in aosp_fugu builds.  only use in regular fugu builds.
49ifeq ($(TARGET_PRODUCT),fugu)
50LOCAL_C_INCLUDES += \
51    vendor/google_athome/services/RemoteControlService/include
52
53LOCAL_SHARED_LIBRARIES += \
54    libremotecontrolservice
55
56LOCAL_CFLAGS += -DREMOTE_CONTROL_INTERFACE
57endif
58
59LOCAL_STATIC_LIBRARIES += libmedia_helper
60
61LOCAL_MODULE := libatv_audio
62LOCAL_MODULE_TAGS := optional
63
64include $(BUILD_SHARED_LIBRARY)
65
66
67##################################
68# audioHAL
69##################################
70include $(CLEAR_VARS)
71
72LOCAL_SRC_FILES := \
73    audio_hal_hooks.c \
74    audio_hal_thunks.cpp \
75
76LOCAL_C_INCLUDES := \
77    external/tinyalsa/include \
78    $(call include-path-for, audio-utils)
79
80LOCAL_SHARED_LIBRARIES := \
81    libcutils \
82    liblog \
83    libutils \
84    libmedia \
85    libatv_audio
86
87LOCAL_MODULE := audio.primary.fugu
88LOCAL_MODULE_PATH := $(TARGET_OUT_SHARED_LIBRARIES)/hw
89LOCAL_MODULE_TAGS := optional
90
91include $(BUILD_SHARED_LIBRARY)
92
93##################################
94# Audio Policy Manager
95##################################
96include $(CLEAR_VARS)
97
98LOCAL_SRC_FILES := \
99    ATVAudioPolicyManager.cpp
100
101LOCAL_SHARED_LIBRARIES := \
102    libcutils \
103    liblog \
104    libutils \
105    libmedia \
106    libatv_audio \
107    libbinder \
108    libaudiopolicymanagerdefault
109
110LOCAL_C_INCLUDES := \
111    external/tinyalsa/include \
112    $(TOPDIR)frameworks/av/services/audiopolicy \
113    $(TOPDIR)frameworks/av/services/audiopolicy/common/include \
114    $(TOPDIR)frameworks/av/services/audiopolicy/common/managerdefinitions/include \
115    $(TOPDIR)frameworks/av/services/audiopolicy/engine/interface
116
117ifeq ($(TARGET_PRODUCT),fugu)
118LOCAL_C_INCLUDES += \
119    vendor/google_athome/services/RemoteControlService/include
120
121LOCAL_SHARED_LIBRARIES += \
122    libremotecontrolservice
123
124LOCAL_CFLAGS += -DREMOTE_CONTROL_INTERFACE
125endif
126
127LOCAL_MODULE := libaudiopolicymanager
128LOCAL_MODULE_TAGS := optional
129
130include $(BUILD_SHARED_LIBRARY)
131