-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.am
234 lines (221 loc) · 10.6 KB
/
Makefile.am
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = pal.pc
EXTRA_DIST = $(pkgconfig_DATA)
if BUILDSYSTEM_OPENWRT
h_sources = ./stream/inc/Stream.h \
./stream/inc/StreamCompress.h \
./stream/inc/StreamPCM.h \
./stream/inc/StreamACDB.h \
./stream/inc/StreamSoundTrigger.h \
./stream/inc/StreamUltraSound.h \
./device/inc/Device.h \
./device/inc/Speaker.h \
./device/inc/Bluetooth.h \
./plugins/codecs/bt_plugin_intf.h \
./device/inc/Headphone.h \
./device/inc/USBAudio.h \
./device/inc/SpeakerMic.h \
./device/inc/HeadsetMic.h \
./device/inc/Handset.h \
./device/inc/HandsetMic.h \
./device/inc/HandsetVaMic.h \
./device/inc/UltrasoundDevice.h \
./session/inc/Session.h \
./session/inc/PayloadBuilder.h \
./session/inc/kvh2xml.h \
./session/inc/SessionGsl.h \
./session/inc/SessionAlsaUtils.h \
./session/inc/SessionAlsaPcm.h \
./session/inc/SessionAlsaCompress.h \
./session/inc/SessionAlsaVoice.h \
./session/inc/SoundTriggerEngine.h \
./session/inc/SoundTriggerEngineGsl.h \
./session/inc/SoundTriggerEngineCapi.h \
./resource_manager/inc/ResourceManager.h \
./PalDefs.h \
./PalApi.h \
./PalAudioRoute.h \
./PalCommon.h \
./utils/inc/PalRingBuffer.h \
./utils/inc/SoundTriggerUtils.h
AM_CPPFLAGS := -I ./stream/inc
AM_CPPFLAGS += -I ./device/inc
AM_CPPFLAGS += -I ./session/inc
AM_CPPFLAGS += -I ./resource_manager/inc
AM_CPPFLAGS += -I ./utils/inc
AM_CPPFLAGS += -I ./
pal_sources = ./stream/src/Stream.cpp \
./stream/src/StreamCompress.cpp \
./stream/src/StreamPCM.cpp \
./stream/src/StreamSoundTrigger.cpp \
./stream/src/StreamUltraSound.cpp \
./device/src/Device.cpp \
./device/src/Speaker.cpp \
./device/src/Headphone.cpp \
./device/inc/USBAudio.cpp \
./device/src/SpeakerMic.cpp \
./device/src/Bluetooth.cpp \
./device/src/HeadsetMic.cpp \
./device/src/HandsetMic.cpp \
./device/src/HandsetVaMic.cpp \
./device/src/Handset.cpp \
./device/src/UltrasoundDevice.cpp \
./session/src/Session.cpp \
./session/src/PayloadBuilder.cpp \
./session/src/SessionAlsaUtils.cpp \
./session/src/SessionAlsaPcm.cpp \
./session/src/SessionAlsaCompress.cpp\
./session/src/SessionAlsaVoice.cpp\
./session/src/SoundTriggerEngine.cpp \
./session/src/SoundTriggerEngineGsl.cpp \
./session/src/SoundTriggerEngineCapi.cpp \
./resource_manager/src/ResourceManager.cpp \
./Pal.cpp \
./utils/src/PalRingBuffer.cpp \
./utils/src/SoundTriggerUtils.cpp
else
h_sources = ${top_srcdir}/stream/inc/Stream.h \
${top_srcdir}/stream/inc/StreamCompress.h \
${top_srcdir}/stream/inc/StreamInCall.h \
${top_srcdir}/stream/inc/StreamPCM.h \
${top_srcdir}/stream/inc/StreamSoundTrigger.h \
${top_srcdir}/stream/inc/StreamUltraSound.h \
${top_srcdir}/device/inc/Device.h \
${top_srcdir}/device/inc/Speaker.h \
${top_srcdir}/device/inc/Headphone.h \
${top_srcdir}/device/inc/Bluetooth.h \
${top_srcdir}/plugins/codecs/bt_intf.h \
${top_srcdir}/device/inc/USBAudio.h \
${top_srcdir}/device/inc/SpeakerMic.h \
${top_srcdir}/device/inc/HeadsetMic.h \
${top_srcdir}/device/inc/Handset.h \
${top_srcdir}/device/inc/HandsetMic.h \
${top_srcdir}/device/inc/HandsetVaMic.h \
${top_srcdir}/device/inc/DisplayPort.h \
${top_srcdir}/device/inc/UltrasoundDevice.h \
${top_srcdir}/device/inc/RTProxy.h \
${top_srcdir}/device/inc/SpeakerProtection.h \
${top_srcdir}/session/inc/ACDEngine.h \
${top_srcdir}/session/inc/Session.h \
${top_srcdir}/session/inc/PayloadBuilder.h \
$(top_srcdir)/session/inc/kvh2xml.h \
${top_srcdir}/session/inc/SessionGsl.h \
${top_srcdir}/session/inc/SessionAlsaPcm.h \
${top_srcdir}/session/inc/SessionAlsaCompress.h \
${top_srcdir}/session/inc/SessionAlsaVoice.h \
${top_srcdir}/session/inc/SessionAlsaUtils.h \
${top_srcdir}/session/inc/SoundTriggerEngine.h \
${top_srcdir}/session/inc/SoundTriggerEngineGsl.h \
${top_srcdir}/session/inc/SoundTriggerEngineCapi.h \
${top_srcdir}/resource_manager/inc/ResourceManager.h \
${top_srcdir}/resource_manager/inc/SndCardMonitor.h \
${top_srcdir}/PalDefs.h \
${top_srcdir}/PalApi.h \
${top_srcdir}/PalAudioRoute.h \
${top_srcdir}/PalCommon.h \
${top_srcdir}/utils/inc/PalRingBuffer.h \
${top_srcdir}/utils/inc/SoundTriggerUtils.h \
${top_srcdir}/utils/inc/SoundTriggerPlatformInfo.h \
${top_srcdir}/utils/inc/ChargerListener.h \
${top_srcdir}/context_manager/inc/ContextManager.h
AM_CPPFLAGS := -I $(top_srcdir)/stream/inc
AM_CPPFLAGS += -I $(top_srcdir)/device/inc
AM_CPPFLAGS += -I $(top_srcdir)/session/inc
AM_CPPFLAGS += -I $(top_srcdir)/resource_manager/inc
AM_CPPFLAGS += -I $(top_srcdir)/utils/inc
AM_CPPFLAGS += -I $(top_srcdir)/plugins/codecs
AM_CPPFLAGS += -I $(top_srcdir)/context_manager/inc
AM_CPPFLAGS += -I $(top_srcdir)/
AM_CPPFLAGS += @AGM_CFLAGS@
AM_CPPFLAGS += @SPF_CFLAGS@
AM_CPPFLAGS += @MMHEADERS_CFLAGS@
AM_CPPFLAGS += -Wno-sign-compare -Wno-unused-result
AM_CPPFLAGS += -D__unused=__attribute__\(\(__unused__\)\) -DLINUX_ENABLED
AM_CPPFLAGS += -DSND_AUDIOCODEC_ALAC=0x00000020 -DSND_AUDIOCODEC_APE=0x00000021
AM_CPPFLAGS += $(GECKO_CFLAGS)
AM_CPPFLAGS += -DCONFIG_GSL
pal_sources = ${top_srcdir}/stream/src/Stream.cpp \
${top_srcdir}/stream/src/StreamCompress.cpp \
${top_srcdir}/stream/src/StreamInCall.cpp \
${top_srcdir}/stream/src/StreamPCM.cpp \
${top_srcdir}/stream/src/StreamSoundTrigger.cpp \
${top_srcdir}/stream/src/StreamUltraSound.cpp \
${top_srcdir}/stream/src/StreamSensorPCMData.cpp \
${top_srcdir}/device/src/Device.cpp \
${top_srcdir}/device/src/Speaker.cpp \
${top_srcdir}/device/src/Headphone.cpp \
${top_srcdir}/device/src/SpeakerMic.cpp \
${top_srcdir}/device/src/Bluetooth.cpp \
${top_srcdir}/device/src/HeadsetMic.cpp \
${top_srcdir}/device/src/Handset.cpp \
${top_srcdir}/device/src/HandsetMic.cpp \
${top_srcdir}/device/src/HandsetVaMic.cpp \
${top_srcdir}/device/src/DisplayPort.cpp \
${top_srcdir}/device/src/UltrasoundDevice.cpp \
${top_srcdir}/device/src/RTProxy.cpp \
${top_srcdir}/device/src/SpeakerProtection.cpp \
${top_srcdir}/device/src/USBAudio.cpp \
${top_srcdir}/device/src/ExtEC.cpp \
${top_srcdir}/session/src/Session.cpp \
${top_srcdir}/session/src/PayloadBuilder.cpp \
${top_srcdir}/session/src/SessionAlsaUtils.cpp \
${top_srcdir}/session/src/SessionAlsaPcm.cpp \
${top_srcdir}/session/src/SessionAlsaCompress.cpp \
${top_srcdir}/session/src/SessionAlsaVoice.cpp \
${top_srcdir}/session/src/SoundTriggerEngine.cpp \
${top_srcdir}/session/src/SoundTriggerEngineGsl.cpp \
${top_srcdir}/session/src/SoundTriggerEngineCapi.cpp \
${top_srcdir}/resource_manager/src/ResourceManager.cpp \
${top_srcdir}/resource_manager/src/SndCardMonitor.cpp \
${top_srcdir}/Pal.cpp \
${top_srcdir}/utils/src/PalRingBuffer.cpp \
${top_srcdir}/utils/src/SoundTriggerUtils.cpp \
${top_srcdir}/utils/src/SoundTriggerPlatformInfo.cpp \
${top_srcdir}/context_manager/src/ContextManager.cpp \
${top_srcdir}/stream/src/StreamNonTunnel.cpp \
${top_srcdir}/stream/src/StreamACD.cpp \
${top_srcdir}/stream/src/StreamCommon.cpp \
${top_srcdir}/stream/src/StreamContextProxy.cpp \
${top_srcdir}/device/src/FMDevice.cpp \
${top_srcdir}/device/src/HapticsDev.cpp \
${top_srcdir}/session/src/SessionAgm.cpp \
${top_srcdir}/session/src/ContextDetectionEngine.cpp \
${top_srcdir}/session/src/ACDEngine.cpp \
${top_srcdir}/utils/src/ACDPlatformInfo.cpp \
${top_srcdir}/utils/src/VoiceUIPlatformInfo.cpp \
${top_srcdir}/device/src/HeadsetVaMic.cpp
acl_sources = ${top_srcdir}/utils/src/ChargerListener.cpp
endif
library_include_HEADERS = $(h_sources)
library_includedir = $(includedir)/pal
lib_LTLIBRARIES = libpal.la
libpal_la_SOURCES = $(pal_sources)
libpal_la_LIBADD = @GLIB_LIBS@ -ltinyalsa -laudioroute -lar_osal -lspf -lexpat -ltinycompress -lagmclientwrapper
libpal_la_CPPFLAGS := $(AM_CPPFLAGS)
libpal_la_CPPFLAGS += -std=c++14
libpal_la_LDFLAGS = -shared -avoid-version
libpal_la_CPPFLAGS += @GLIB_CFLAGS@ -Dstrlcpy=g_strlcpy -Dstrlcat=g_strlcat -include glib.h
libpal_la_CPPFLAGS += -DACD_SM_FILEPATH=\"/etc/models/acd/\"
libpal_la_list = ./configs/$(MACHINE_ENABLED)/kvh2xml.xml \
./configs/$(MACHINE_ENABLED)/mixer_paths_kona_mtp.xml \
./configs/$(MACHINE_ENABLED)/resourcemanager_kona_mtp.xml \
./configs/$(MACHINE_ENABLED)/usecaseKvManager.xml
if BUILDSYSTEM_OPENWRT
libpal_la_LIBADD += -lglib-2.0
endif
if COMPILE_COMPRESS
libpal_la_CPPFLAGS += -DSND_COMPRESS_DEC_HDR
endif
lib_LTLIBRARIES += libaudiocl.la
libaudiocl_la_SOURCES = $(acl_sources)
libaudiocl_la_LIBADD = @GLIB_LIBS@
libaudiocl_la_CPPFLAGS := $(AM_CPPFLAGS)
libaudiocl_la_LDFLAGS = -shared -avoid-version -lcutils -llog
# install essential xml files under /etc
root_etcdir = "/etc"
root_etc_SCRIPTS = $(libpal_la_list)
install-data-hook:
chmod go+r $(DESTDIR)$(root_etcdir)/kvh2xml.xml
chmod go+r $(DESTDIR)$(root_etcdir)/mixer_paths_kona_mtp.xml
chmod go+r $(DESTDIR)$(root_etcdir)/resourcemanager_kona_mtp.xml
chmod go+r $(DESTDIR)$(root_etcdir)/usecaseKvManager.xml