1LOCAL_PATH:= $(call my-dir)
2
3include $(CLEAR_VARS)
4
5LOCAL_SRC_FILES:= \
6    service/AudioPolicyService.cpp \
7    service/AudioPolicyEffects.cpp
8
9ifeq ($(USE_LEGACY_AUDIO_POLICY), 1)
10LOCAL_SRC_FILES += \
11    service/AudioPolicyInterfaceImplLegacy.cpp \
12    service/AudioPolicyClientImplLegacy.cpp
13
14    LOCAL_CFLAGS += -DUSE_LEGACY_AUDIO_POLICY
15else
16LOCAL_SRC_FILES += \
17    service/AudioPolicyInterfaceImpl.cpp \
18    service/AudioPolicyClientImpl.cpp
19endif
20
21LOCAL_C_INCLUDES := \
22    $(TOPDIR)frameworks/av/services/audioflinger \
23    $(call include-path-for, audio-effects) \
24    $(call include-path-for, audio-utils) \
25    $(TOPDIR)frameworks/av/services/audiopolicy/common/include \
26    $(TOPDIR)frameworks/av/services/audiopolicy/engine/interface \
27    $(TOPDIR)frameworks/av/services/audiopolicy/utilities
28
29LOCAL_SHARED_LIBRARIES := \
30    libcutils \
31    libutils \
32    liblog \
33    libbinder \
34    libmedia \
35    libhardware \
36    libhardware_legacy \
37    libserviceutility
38
39ifneq ($(USE_LEGACY_AUDIO_POLICY), 1)
40LOCAL_SHARED_LIBRARIES += \
41    libaudiopolicymanager
42endif
43
44LOCAL_STATIC_LIBRARIES := \
45    libmedia_helper \
46    libaudiopolicycomponents
47
48LOCAL_MULTILIB := $(AUDIOSERVER_MULTILIB)
49
50LOCAL_MODULE:= libaudiopolicyservice
51
52LOCAL_CFLAGS += -fvisibility=hidden
53
54include $(BUILD_SHARED_LIBRARY)
55
56ifneq ($(USE_LEGACY_AUDIO_POLICY), 1)
57
58include $(CLEAR_VARS)
59
60LOCAL_SRC_FILES:= managerdefault/AudioPolicyManager.cpp
61
62LOCAL_SHARED_LIBRARIES := \
63    libcutils \
64    libutils \
65    liblog \
66    libsoundtrigger
67
68ifeq ($(USE_CONFIGURABLE_AUDIO_POLICY), 1)
69
70ifneq ($(USE_XML_AUDIO_POLICY_CONF), 1)
71$(error Configurable policy does not support legacy conf file)
72endif #ifneq ($(USE_XML_AUDIO_POLICY_CONF), 1)
73
74LOCAL_REQUIRED_MODULES := \
75    parameter-framework.policy \
76    audio_policy_criteria.conf \
77
78LOCAL_C_INCLUDES += $(TOPDIR)frameworks/av/services/audiopolicy/engineconfigurable/include
79
80LOCAL_SHARED_LIBRARIES += libaudiopolicyengineconfigurable
81
82else
83
84LOCAL_SHARED_LIBRARIES += libaudiopolicyenginedefault
85
86endif # ifeq ($(USE_CONFIGURABLE_AUDIO_POLICY), 1)
87
88LOCAL_C_INCLUDES += \
89    $(TOPDIR)frameworks/av/services/audiopolicy/common/include \
90    $(TOPDIR)frameworks/av/services/audiopolicy/engine/interface \
91    $(TOPDIR)frameworks/av/services/audiopolicy/utilities
92
93LOCAL_STATIC_LIBRARIES := \
94    libmedia_helper \
95    libaudiopolicycomponents
96
97ifeq ($(USE_XML_AUDIO_POLICY_CONF), 1)
98LOCAL_STATIC_LIBRARIES += libxml2
99
100LOCAL_SHARED_LIBRARIES += libicuuc
101
102LOCAL_CFLAGS += -DUSE_XML_AUDIO_POLICY_CONF
103endif #ifeq ($(USE_XML_AUDIO_POLICY_CONF), 1)
104
105LOCAL_MULTILIB := $(AUDIOSERVER_MULTILIB)
106
107LOCAL_MODULE:= libaudiopolicymanagerdefault
108
109include $(BUILD_SHARED_LIBRARY)
110
111ifneq ($(USE_CUSTOM_AUDIO_POLICY), 1)
112
113include $(CLEAR_VARS)
114
115LOCAL_SRC_FILES:= \
116    manager/AudioPolicyFactory.cpp
117
118LOCAL_SHARED_LIBRARIES := \
119    libaudiopolicymanagerdefault
120
121LOCAL_STATIC_LIBRARIES := \
122    libaudiopolicycomponents
123
124LOCAL_C_INCLUDES += \
125    $(TOPDIR)frameworks/av/services/audiopolicy/common/include \
126    $(TOPDIR)frameworks/av/services/audiopolicy/engine/interface
127
128LOCAL_MULTILIB := $(AUDIOSERVER_MULTILIB)
129
130LOCAL_MODULE:= libaudiopolicymanager
131
132include $(BUILD_SHARED_LIBRARY)
133
134endif
135endif
136
137#######################################################################
138# Recursive call sub-folder Android.mk
139#
140include $(call all-makefiles-under,$(LOCAL_PATH))
141