Move tv-key-impl.cpp with X11 dependency to X11 build for tv profile with wayland
[platform/core/uifw/dali-adaptor.git] / build / tizen / adaptor / Makefile.am
1 #
2 # Copyright (c) 2014 Samsung Electronics Co., Ltd.
3 #
4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at
7 #
8 # http://www.apache.org/licenses/LICENSE-2.0
9 #
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
15 #
16
17 # Build the Dali Adaptor library
18
19
20 ############# INCLUDE FILE LISTS #############
21
22 # Base Adaptor
23 base_adaptor_src_dir = ../../../adaptors/base
24 include ../../../adaptors/base/file.list
25
26 # Platform Abstraction
27 slp_platform_abstraction_src_dir = ../../../platform-abstractions/slp
28 portable_platform_abstraction_src_dir = ../../../platform-abstractions/portable
29 include ../../../platform-abstractions/slp/file.list
30
31 # Internal Common
32 adaptor_common_dir = ../../../adaptors/common
33 include ../../../adaptors/common/file.list
34
35 # Wayland
36 if WAYLAND
37 adaptor_wayland_dir = ../../../adaptors/wayland
38 include ../../../adaptors/wayland/file.list
39 else
40 # X11
41 adaptor_x11_dir = ../../../adaptors/x11
42 include ../../../adaptors/x11/file.list
43 endif
44
45 # Ubuntu
46 if UBUNTU_PROFILE
47 adaptor_ubuntu_dir = ../../../adaptors/ubuntu
48 include ../../../adaptors/ubuntu/file.list
49 else
50 # Tizen
51 adaptor_tizen_dir = ../../../adaptors/tizen
52 include ../../../adaptors/tizen/file.list
53 endif
54
55 # Mobile
56 adaptor_mobile_dir = ../../../adaptors/mobile
57 include ../../../adaptors/mobile/file.list
58
59 # TV
60 if TV_PROFILE
61 adaptor_tv_dir = ../../../adaptors/tv
62 include ../../../adaptors/tv/file.list
63 endif
64
65 # Public API
66 adaptor_public_api_dir = ../../../adaptors/public-api
67 include ../../../adaptors/public-api/file.list
68
69
70 ############# source files #############
71
72 if ASSIMP_ENABLED
73 slp_platform_abstraction_src_files += $(slp_assimp_src_files)
74 else
75 slp_platform_abstraction_src_files += $(slp_assimp_stubs_src_files)
76 endif # ASSIMP_ENABLED
77
78 # COMMON
79 if COMMON_PROFILE
80
81 adaptor_internal_src_files = $(adaptor_common_internal_src_files) \
82                              $(adaptor_common_internal_default_profile_src_files) \
83                              $(adaptor_tizen_internal_src_files)
84
85 if WAYLAND
86 adaptor_internal_src_files += $(adaptor_wayland_tizen_internal_src_files) \
87                               $(adaptor_wayland_internal_default_profile_src_files)
88 else
89 adaptor_internal_src_files += $(adaptor_x11_tizen_internal_src_files) \
90                               $(adaptor_x11_internal_default_profile_src_files)
91 endif # WAYLAND
92 endif # COMMON_PROFILE
93
94
95 # UBUNTU
96 if UBUNTU_PROFILE
97
98 adaptor_internal_src_files = $(adaptor_common_internal_src_files) \
99                              $(adaptor_common_internal_default_profile_src_files) \
100                              $(adaptor_ubuntu_internal_src_files) \
101                              $(adaptor_x11_ubuntu_internal_src_files) \
102                              $(adaptor_x11_internal_default_profile_src_files)
103
104 endif # UBUNTU_PROFILE
105
106
107 # MOBILE
108 if MOBILE_PROFILE
109
110 adaptor_internal_src_files = $(adaptor_common_internal_src_files) \
111                              $(adaptor_common_internal_mobile_profile_src_files) \
112                              $(adaptor_tizen_internal_src_files)
113
114 if WAYLAND
115 adaptor_internal_src_files += $(adaptor_wayland_tizen_internal_src_files)
116 else
117 adaptor_internal_src_files += $(adaptor_x11_tizen_internal_src_files)
118 endif # WAYLAND
119
120 endif # MOBILE_PROFILE
121
122 # LITE
123 if LITE_PROFILE
124
125 adaptor_internal_src_files = $(adaptor_common_internal_src_files) \
126                              $(adaptor_common_internal_mobile_profile_src_files) \
127                              $(adaptor_tizen_internal_src_files) \
128                              $(adaptor_x11_tizen_internal_src_files)
129 endif
130
131
132 # WEARABLE
133 if WEARABLE_PROFILE
134
135 adaptor_internal_src_files = $(adaptor_common_internal_src_files) \
136                              $(adaptor_common_internal_mobile_profile_src_files) \
137                              $(adaptor_tizen_internal_src_files)
138 if WAYLAND
139 adaptor_internal_src_files += $(adaptor_wayland_tizen_internal_src_files)
140 else
141 adaptor_internal_src_files += $(adaptor_x11_tizen_internal_src_files)
142 endif # WAYLAND
143
144 endif # WEARABLE
145
146
147 # TV
148 if TV_PROFILE
149
150 adaptor_internal_src_files = $(adaptor_common_internal_src_files) \
151                              $(adaptor_common_internal_tv_profile_src_files) \
152                              $(adaptor_tizen_internal_src_files)
153 if WAYLAND
154 adaptor_internal_src_files += $(adaptor_wayland_tizen_internal_src_files)
155 else
156 adaptor_internal_src_files += $(adaptor_x11_tv_internal_src_files) \
157                              $(adaptor_x11_internal_tv_profile_key_src_files)
158 endif # WAYLAND
159
160 endif
161
162 # Feedback Plugin
163 if USE_FEEDBACK
164 plugin_themes_dir = ../../../adaptors/common/feedback
165 dali_plugin_theme_files = $(plugin_themes_dir)/default-feedback-theme.json
166 dalifeedbackthemedir = ${dataReadOnlyDir}/themes/feedback-themes/
167 dalifeedbacktheme_DATA = ${dali_plugin_theme_files}
168 endif
169
170 if TURBO_JPEG_IS_ON
171   slp_platform_abstraction_src_files += $(slp_turbo_jpeg_loader)
172 else
173   slp_platform_abstraction_src_files += $(slp_jpeg_loader)
174 endif
175
176 lib_LTLIBRARIES = libdali-adaptor.la
177
178 libdali_adaptor_la_SOURCES = \
179                      $(base_adaptor_src_files) \
180                      $(slp_platform_abstraction_src_files) \
181                      $(public_api_src_files) \
182                      $(adaptor_internal_src_files)
183
184 libdali_adaptor_la_DEPENDENCIES =
185
186 # List include directories with more platform-specific (slp) before portable root:
187 libdali_adaptor_la_includes = \
188                       -I../../.. \
189                       -I../../../platform-abstractions/slp \
190                       -I../../../platform-abstractions/slp/resource-loader \
191                       -I../../../platform-abstractions/portable \
192                       -I../../../platform-abstractions/ \
193                       -I../../../adaptors/public-api \
194                       -I../../../adaptors/public-api/adaptor-framework \
195                       -I../../../adaptors/common \
196                       -I../../../adaptors/
197 if WAYLAND
198 libdali_adaptor_la_includes += \
199                       -I../../../adaptors/wayland
200 else
201 libdali_adaptor_la_includes += \
202                       -I../../../adaptors/x11
203 endif
204
205 if UBUNTU_PROFILE
206 libdali_adaptor_la_includes += \
207                       -I../../../adaptors/ubuntu
208 else
209 libdali_adaptor_la_includes += \
210                       -I../../../adaptors/tizen
211 endif
212
213 daliDefaultFontCacheDir = ${dataReadOnlyDir}/glyphcache/
214 daliUserFontCacheDir = ${dataReadWriteDir}/glyphcache/
215 daliDefaultThemeDir  = ${dataReadWriteDir}/theme/
216 daliShaderbinCacheDir = ${dataReadOnlyDir}/core/shaderbin/
217
218 libdali_adaptor_la_CXXFLAGS = \
219                       -DDALI_DATA_RW_DIR="\"${daliReadWriteDir}\"" \
220                       -DDALI_DATA_RO_DIR="\"${daliReadOnlyDir}\"" \
221                       -DDALI_DEFAULT_FONT_CACHE_DIR="\"${daliDefaultFontCacheDir}\"" \
222                       -DDALI_USER_FONT_CACHE_DIR="\"${daliUserFontCacheDir}\"" \
223                       -DDALI_SHADERBIN_DIR="\"${daliShaderbinCacheDir}\"" \
224                       -DDALI_DEFAULT_THEME_DIR="\"${daliDefaultThemeDir}\"" \
225                       -DFONT_PRELOADED_PATH="\"${fontPreloadedPath}\"" \
226                       -DFONT_DOWNLOADED_PATH="\"${fontDownloadedPath}\"" \
227                       -DFONT_APPLICATION_PATH="\"${fontApplicationPath}\"" \
228                       -DFONT_CONFIGURATION_FILE_PATH="\"${fontConfigurationFilePath}\"" \
229                       -DDALI_FEEDBACK_THEME_DIR="\"${dalifeedbackthemedir}\"" \
230                       -DNON_POWER_OF_TWO_TEXTURES \
231                       -DDALI_COMPILATION -DDALI_ADAPTOR_COMPILATION \
232                       -Werror -Wall -lgcc \
233                       $(libdali_adaptor_la_includes) \
234                       $(DALI_ADAPTOR_CFLAGS) \
235                       $(DALICORE_CFLAGS) \
236                       $(OPENGLES20_CFLAGS) \
237                       $(FREETYPE_CFLAGS) \
238                       $(FONTCONFIG_CFLAGS) \
239                       $(PNG_CFLAGS) \
240                       $(CAPI_APPFW_APPLICATION_CFLAGS) \
241                       $(ELEMENTARY_CFLAGS) \
242                       $(EVAS_CFLAGS) \
243                       $(ECORE_CFLAGS) \
244                       $(ECORE_IPC_CFLAGS) \
245                       $(DLOG_CFLAGS) \
246                       $(XML_CFLAGS) \
247                       $(VCONF_CFLAGS) \
248                       $(EXIF_CFLAGS) \
249                       $(MMFSOUND_CFLAGS) \
250                       $(TTS_CFLAGS) \
251                       $(SENSOR_CFLAGS) \
252                       $(LIBDRM_CFLAGS) \
253                       $(LIBEXIF_CFLAGS) \
254                       $(LIBCURL_CFLAGS) \
255                       $(ASSIMP_CFLAGS) \
256                       $(CAPI_SYSTEM_SYSTEM_SETTINGS_CFLAGS)
257
258 libdali_adaptor_la_LIBADD = \
259                       $(DALICORE_LIBS) \
260                       $(OPENGLES20_LIBS) \
261                       $(FREETYPE_LIBS) \
262                       $(FONTCONFIG_LIBS) \
263                       $(PNG_LIBS) \
264                       $(ELEMENTARY_LIBS) \
265                       $(ECORE_IPC_LIBS) \
266                       $(DLOG_LIBS) \
267                       $(XML_LIBS) \
268                       $(VCONF_LIBS) \
269                       $(EXIF_LIBS) \
270                       $(TTS_LIBS) \
271                       $(SENSOR_LIBS) \
272                       $(LIBDRM_LIBS) \
273                       $(LIBEXIF_LIBS) \
274                       $(LIBCURL_LIBS) \
275                       $(CAPI_SYSTEM_SYSTEM_SETTINGS_LIBS) \
276                       $(CAPI_APPFW_APPLICATION_LIBS) \
277                       -lgif \
278                       -lboost_thread
279
280 if WAYLAND
281 libdali_adaptor_la_CXXFLAGS += $(WAYLAND_CFLAGS)
282 libdali_adaptor_la_LIBADD += $(WAYLAND_LIBS)
283 else
284 libdali_adaptor_la_CXXFLAGS += $(X11_CFLAGS)
285 libdali_adaptor_la_LIBADD += $(X11_LIBS)
286 libdali_adaptor_la_LIBADD += $(ECORE_X_LIBS)
287 endif
288
289 if COMMON_PROFILE
290 libdali_adaptor_la_CXXFLAGS += $(HAPTIC_CFLAGS)
291 endif
292
293 if MOBILE_PROFILE
294 libdali_adaptor_la_CXXFLAGS += \
295                       $(DEVICED_CFLAGS) \
296                       $(EFL_ASSIST_CFLAGS) \
297                       $(NATIVE_BUFFER_CFLAGS) \
298                       $(NATIVE_BUFFER_POOL_CFLAGS)
299
300 libdali_adaptor_la_LIBADD += \
301                       $(EFL_ASSIST_LIBS) \
302                       $(NATIVE_BUFFER_LIBS) \
303                       $(NATIVE_BUFFER_POOL_LIBS)
304 endif
305
306 if LITE_PROFILE
307 libdali_adaptor_la_CXXFLAGS += $(HAPTIC_CFLAGS)
308 endif
309
310 if WEARABLE_PROFILE
311 libdali_adaptor_la_CXXFLAGS += \
312                       $(HAPTIC_CFLAGS) \
313                       $(EFL_ASSIST_CFLAGS)
314 endif
315
316 if TV_PROFILE
317 libdali_adaptor_la_CXXFLAGS += $(HAPTIC_CFLAGS)
318 libdali_adaptor_la_LIBADD +=
319 endif
320
321 if TURBO_JPEG_IS_ON
322 libdali_adaptor_la_LIBADD += -lturbojpeg
323 CFLAGS += -D_TURBO_JPEG_LOADER
324 if UBUNTU_PROFILE
325 libdali_adaptor_la_LIBADD += -ljpeg
326 CFLAGS += -fPIC
327 endif
328 else
329 libdali_adaptor_la_LIBADD += -ljpeg
330 endif
331
332 tizenadaptorpublicapidir = $(devincludepath)/dali/public-api
333 tizenadaptorpublicapi_HEADERS = $(public_api_header_files)
334
335 tizenadaptorframeworkpublicapidir = $(tizenadaptorpublicapidir)/adaptor-framework
336 tizenadaptorframeworkpublicapi_HEADERS = $(public_api_adaptor_framework_header_files)
337
338 tizenadaptordaliheaderdir = $(devincludepath)/dali
339 tizenadaptordaliheader_HEADERS = $(adaptor_dali_header_file)
340
341 install-data-local:
342         $(MKDIR_P) ${DESTDIR}/${daliUserFontCacheDir} ${DESTDIR}/${daliShaderbinCacheDir}
343
344 # Install resource log analyzer script
345 bin_SCRIPTS = ../../../adaptors/scripts/dalireslog.sh
346
347 # linking test
348
349 noinst_PROGRAMS = linker.test
350
351 linker_test_SOURCES = linker-test.cpp
352
353 linker_test_CXXFLAGS = \
354   -I../../../adaptors/common \
355   -I../../../adaptors/public-api \
356   -I../../../adaptors/public-api/adaptor-framework \
357   $(DALI_ADAPTOR_CFLAGS) \
358   $(DALICORE_CFLAGS) \
359   $(VCONF_CFLAGS) \
360   $(DALIX11_CFLAGS) \
361   -Werror -Wall
362
363 linker_test_DEPENDENCIES = libdali-adaptor.la
364 linker_test_LDADD = \
365   $(DALICORE_LIBS) \
366   $(VCONF_LIBS) \
367   libdali-adaptor.la \
368   -L${prefix}/lib