Ensure TPKP related stuff is only built if the package is available
[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 tizen_platform_abstraction_src_dir = ../../../platform-abstractions/tizen
28 portable_platform_abstraction_src_dir = ../../../platform-abstractions/portable
29 include ../../../platform-abstractions/tizen/file.list
30
31 # Text Abstraction
32 text_src_dir = ../../../text
33 include ../../../text/file.list
34
35 # Integration
36 adaptor_integration_api_dir = ../../../adaptors/integration-api
37 include ../../../adaptors/integration-api/file.list
38
39 # Internal Common
40 adaptor_common_dir = ../../../adaptors/common
41 include ../../../adaptors/common/file.list
42
43 if USE_EFL
44 # ECore Common
45 adaptor_ecore_common_dir = ../../../adaptors/ecore/common
46 include ../../../adaptors/ecore/common/file.list
47 else
48 # If we're not using any EFL, then we need to use libuv mainloop
49 # for the frame work
50 adaptor_libuv_dir = ../../../adaptors/libuv
51 include ../../../adaptors/libuv/file.list
52 endif
53
54 # Wayland
55 if WAYLAND
56 if USE_EFL
57 ## Use ecore_wayland
58 adaptor_ecore_wayland_dir = ../../../adaptors/ecore/wayland
59 include ../../../adaptors/ecore/wayland/file.list
60 else
61 ## Use wayland
62 adaptor_wayland_dir = ../../../adaptors/wayland
63 include ../../../adaptors/wayland/file.list
64 endif
65 else
66 # X11
67 adaptor_x11_dir = ../../../adaptors/x11
68 include ../../../adaptors/x11/file.list
69 endif
70
71 # Ubuntu
72 if UBUNTU_PROFILE
73 adaptor_ubuntu_dir = ../../../adaptors/ubuntu
74 include ../../../adaptors/ubuntu/file.list
75 else
76 # Tizen
77 adaptor_tizen_dir = ../../../adaptors/tizen
78 include ../../../adaptors/tizen/file.list
79 endif
80
81 # Mobile
82 adaptor_mobile_dir = ../../../adaptors/mobile
83 include ../../../adaptors/mobile/file.list
84
85 # TV
86 if TV_PROFILE
87 adaptor_tv_dir = ../../../adaptors/tv
88 include ../../../adaptors/tv/file.list
89 endif
90
91 # Public API
92 adaptor_public_api_dir = ../../../adaptors/public-api
93 include ../../../adaptors/public-api/file.list
94
95 # Devel API ( for use by Toolkit)
96 adaptor_devel_api_dir = ../../../adaptors/devel-api
97 include ../../../adaptors/devel-api/file.list
98
99
100 # Static libraries
101 static_libraries_libunibreak_src_dir = ../../../text/dali/internal/libunibreak
102 include ../../../text/dali/internal/libunibreak/file.list
103
104 # Package doc
105 package_doxy_dir = ../../../doc
106 include ../../../doc/file.list
107
108 ############# source files #############
109
110 # FRAMEWORK FILES for adaptor
111 # Either use ecore mainloop +  appcore / uiman
112 # Or libuv main loop with no appcore / uimain
113 if USE_EFL
114 adaptor_internal_src_files = $(adaptor_tizen_framework_efl_src_files) \
115                              $(adaptor_ecore_common_internal_src_files)
116 else
117 adaptor_internal_src_files = $(adaptor_tizen_framework_libuv_src_files)
118 endif
119
120 # COMMON
121 if COMMON_PROFILE
122
123 adaptor_internal_src_files += $(adaptor_common_internal_src_files) \
124                               $(adaptor_common_internal_default_profile_src_files) \
125                               $(adaptor_tizen_internal_src_files) \
126                               $(adaptor_tizen_internal_non_mobile_src_files) \
127                               $(static_libraries_libunibreak_src_files)
128
129 if WAYLAND
130 if USE_ECORE_WAYLAND
131 adaptor_internal_src_files += $(adaptor_ecore_wayland_tizen_internal_src_files) \
132                               $(adaptor_ecore_wayland_internal_default_profile_src_files)
133 else
134 adaptor_internal_src_files += $(adaptor_wayland_tizen_internal_src_files)
135 endif
136 else
137 adaptor_internal_src_files += $(adaptor_x11_tizen_internal_src_files) \
138                               $(adaptor_x11_internal_default_profile_src_files)
139 endif # WAYLAND
140 endif # COMMON_PROFILE
141
142
143 # UBUNTU
144 if UBUNTU_PROFILE
145
146 adaptor_internal_src_files += $(adaptor_common_internal_src_files) \
147                              $(adaptor_common_internal_default_profile_src_files) \
148                              $(adaptor_ubuntu_internal_src_files) \
149                              $(adaptor_x11_ubuntu_internal_src_files) \
150                              $(adaptor_x11_internal_default_profile_src_files) \
151                              $(static_libraries_libunibreak_src_files)
152
153 endif # UBUNTU_PROFILE
154
155
156 # MOBILE
157 if MOBILE_PROFILE
158
159 adaptor_internal_src_files += $(adaptor_common_internal_src_files) \
160                              $(adaptor_common_internal_mobile_profile_src_files) \
161                              $(adaptor_tizen_internal_src_files) \
162                              $(static_libraries_libunibreak_src_files)
163
164 if WAYLAND
165 if USE_ECORE_WAYLAND
166 adaptor_internal_src_files += $(adaptor_ecore_wayland_tizen_internal_src_files)
167 else
168 adaptor_internal_src_files += $(adaptor_wayland_tizen_internal_src_files)
169 endif
170 else
171 adaptor_internal_src_files += $(adaptor_x11_tizen_internal_src_files)
172 endif # WAYLAND
173
174 endif # MOBILE_PROFILE
175
176 # WEARABLE
177 if WEARABLE_PROFILE
178
179 adaptor_internal_src_files += $(adaptor_common_internal_src_files) \
180                              $(adaptor_common_internal_mobile_profile_src_files) \
181                              $(adaptor_tizen_internal_src_files) \
182                              $(static_libraries_libunibreak_src_files)
183 if WAYLAND
184 if USE_ECORE_WAYLAND
185 adaptor_internal_src_files += $(adaptor_ecore_wayland_tizen_internal_src_files)
186 else
187 adaptor_internal_src_files += $(adaptor_wayland_tizen_internal_src_files)
188 endif
189 else
190 adaptor_internal_src_files += $(adaptor_x11_tizen_internal_src_files)
191 endif # WAYLAND
192
193 endif # WEARABLE
194
195
196 # TV
197 if TV_PROFILE
198
199 adaptor_internal_src_files += $(adaptor_common_internal_src_files) \
200                              $(adaptor_common_internal_tv_profile_src_files) \
201                              $(adaptor_tizen_internal_src_files) \
202                              $(adaptor_tizen_internal_non_mobile_src_files) \
203                              $(static_libraries_libunibreak_src_files)
204 if WAYLAND
205 if USE_ECORE_WAYLAND
206 adaptor_internal_src_files += $(adaptor_ecore_wayland_tizen_internal_src_files)
207 else
208 adaptor_internal_src_files += $(adaptor_wayland_tizen_internal_src_files)
209 endif
210 else
211 adaptor_internal_src_files += $(adaptor_x11_tv_internal_src_files) \
212                              $(adaptor_x11_internal_tv_profile_key_src_files)
213 endif # WAYLAND
214
215 endif
216
217 # Node JS support for using an external libuv main loop. If not enabled then just use e-core as normal
218 # Used for things like callbacks, file-monintors, x input handling
219 if LIB_UV_EVENT_LOOP
220 main_loop_integration_src_files = $(adaptor_common_internal_uv_src_files)
221 input_event_handler_src_files = $(adaptor_uv_x_event_handler_internal_src_files)
222 else
223 main_loop_integration_src_files = $(adaptor_common_internal_ecore_src_files)
224 input_event_handler_src_files = $(adaptor_ecore_x_event_handler_internal_src_files)
225 endif
226
227
228
229 pkgconfigdir = $(libdir)/pkgconfig
230 pkgconfig_DATA = dali-adaptor-integration.pc
231
232 lib_LTLIBRARIES = libdali-adaptor.la
233
234 libdali_adaptor_la_SOURCES = \
235                      $(base_adaptor_src_files) \
236                      $(main_loop_integration_src_files) \
237                      $(tizen_platform_abstraction_src_files) \
238                      $(text_abstraction_src_files) \
239                      $(devel_api_src_files) \
240                      $(public_api_src_files) \
241                      $(adaptor_internal_src_files) \
242                      $(input_event_handler_src_files)
243
244
245 if ENABLE_NETWORK_LOGGING
246 libdali_adaptor_la_SOURCES += \
247   $(base_adaptor_networking_src_files)
248 endif
249
250 libdali_adaptor_la_DEPENDENCIES =
251
252 # List include directories with more platform-specific (tizen) before portable root:
253 libdali_adaptor_la_includes = \
254                       -I../../.. \
255                       -I../../../platform-abstractions/tizen \
256                       -I../../../platform-abstractions/tizen/resource-loader \
257                       -I../../../platform-abstractions/portable \
258                       -I../../../platform-abstractions/ \
259                       -I../../../adaptors/public-api \
260                       -I../../../adaptors/integration-api \
261                       -I../../../adaptors/public-api/adaptor-framework \
262                       -I../../../adaptors/devel-api/adaptor-framework \
263                       -I../../../adaptors/common \
264                       -I../../../adaptors/base/interfaces \
265                       -I../../../adaptors/ \
266                       -I../../../text \
267                       -I../../../text/dali/internal/libunibreak
268
269 if WAYLAND
270 libdali_adaptor_la_includes += -I../../../adaptors/integration-api/wayland
271 if USE_ECORE_WAYLAND
272 libdali_adaptor_la_includes += \
273                       -I../../../adaptors/ecore/common \
274                       -I../../../adaptors/ecore/wayland
275 else
276 libdali_adaptor_la_includes += -I../../../adaptors/wayland \
277                                -I../../../adaptors/wayland/imf \
278                                -I../../../adaptors/wayland/clipboard \
279                                -I../../../adaptors/wayland/native-image
280 endif
281 else
282 libdali_adaptor_la_includes += \
283                       -I../../../adaptors/ecore/common \
284                       -I../../../adaptors/x11 \
285                       -I../../../adaptors/integration-api/x11
286 endif
287
288 if UBUNTU_PROFILE
289 libdali_adaptor_la_includes += \
290                       -I../../../adaptors/ubuntu
291 else
292 libdali_adaptor_la_includes += \
293                       -I../../../adaptors/tizen
294 endif
295
296 daliDefaultThemeDir  = ${dataReadWriteDir}/theme/
297 daliShaderbinCacheDir = ${dataReadOnlyDir}/core/shaderbin/
298
299 libdali_adaptor_la_CXXFLAGS = \
300                       -DDALI_DATA_RW_DIR="\"${daliReadWriteDir}\"" \
301                       -DDALI_DATA_RO_DIR="\"${daliReadOnlyDir}\"" \
302                       -DDALI_DEFAULT_FONT_CACHE_DIR="\"${daliDefaultFontCacheDir}\"" \
303                       -DDALI_USER_FONT_CACHE_DIR="\"${daliUserFontCacheDir}\"" \
304                       -DDALI_SHADERBIN_DIR="\"${daliShaderbinCacheDir}\"" \
305                       -DDALI_DEFAULT_THEME_DIR="\"${daliDefaultThemeDir}\"" \
306                       -DFONT_PRELOADED_PATH="\"${fontPreloadedPath}\"" \
307                       -DFONT_DOWNLOADED_PATH="\"${fontDownloadedPath}\"" \
308                       -DFONT_APPLICATION_PATH="\"${fontApplicationPath}\"" \
309                       -DFONT_CONFIGURATION_FILE="\"${fontConfigurationFile}\"" \
310                       -DNON_POWER_OF_TWO_TEXTURES \
311                       -DDALI_COMPILATION -DDALI_ADAPTOR_COMPILATION \
312                       -Werror -Wall -lgcc \
313                       $(libdali_adaptor_la_includes) \
314                       $(DALI_ADAPTOR_CFLAGS) \
315                       $(DALICORE_CFLAGS) \
316                       $(OPENGLES20_CFLAGS) \
317                       $(FREETYPE_CFLAGS) \
318                       $(FONTCONFIG_CFLAGS) \
319                       $(PNG_CFLAGS) \
320                       $(DLOG_CFLAGS) \
321                       $(VCONF_CFLAGS) \
322                       $(EXIF_CFLAGS) \
323                       $(MMFSOUND_CFLAGS) \
324                       $(TTS_CFLAGS) \
325                       $(LIBDRM_CFLAGS) \
326                       $(LIBEXIF_CFLAGS) \
327                       $(LIBCURL_CFLAGS) \
328                       $(TPKP_CURL_CFLAGS)
329
330 # Todo, as soon as common repos are updated on build server remove this.
331 if !COMMON_PROFILE
332 libdali_adaptor_la_CXXFLAGS += -DWAYLAND_EXTENSIONS_SUPPORTED
333 endif
334
335 libdali_adaptor_la_CFLAGS = $(libdali_adaptor_la_CXXFLAGS)
336
337 libdali_adaptor_la_LIBADD = \
338                       $(DALICORE_LIBS) \
339                       $(OPENGLES20_LIBS) \
340                       $(FREETYPE_LIBS) \
341                       $(FONTCONFIG_LIBS) \
342                       $(PNG_LIBS) \
343                       $(DLOG_LIBS) \
344                       $(VCONF_LIBS) \
345                       $(EXIF_LIBS) \
346                       $(TTS_LIBS) \
347                       $(LIBDRM_LIBS) \
348                       $(LIBEXIF_LIBS) \
349                       $(LIBCURL_LIBS) \
350                       $(HARFBUZZ_LIBS) \
351                       $(TPKP_CURL_LIBS) \
352                       -lgif \
353                       -lpthread \
354                       -lturbojpeg
355
356 if USE_EFL
357 # EVAS used indicator
358 libdali_adaptor_la_CXXFLAGS += $(ELEMENTARY_CFLAGS) \
359                                $(EVAS_CFLAGS) \
360                                $(ECORE_CFLAGS) \
361                                $(ECORE_IPC_CFLAGS) \
362                                $(ELDBUS_CFLAGS) \
363                                -DUSE_EFL
364
365
366 libdali_adaptor_la_LIBADD += $(ELEMENTARY_LIBS) \
367                              $(ECORE_IPC_LIBS) \
368                              $(ELDBUS_LIBS)
369
370 endif
371
372 if USE_APPFW
373
374 libdali_adaptor_la_CXXFLAGS += $(CAPI_APPFW_APPLICATION_CFLAGS) \
375                                $(CAPI_SYSTEM_SYSTEM_SETTINGS_CFLAGS) \
376                                $(CAPI_SYSTEM_INFO_CFLAGS) \
377                                $(TTS_CFLAGS) \
378                                $(SENSOR_CFLAGS)
379
380 libdali_adaptor_la_LIBADD += $(CAPI_APPFW_APPLICATION_LIBS) \
381                              $(CAPI_SYSTEM_SYSTEM_SETTINGS_LIBS) \
382                              $(CAPI_SYSTEM_INFO_LIBS) \
383                              $(TTS_LIBS) \
384                              $(SENSOR_LIBS)
385
386 endif
387 if WAYLAND
388 # This is to avoid having to include wayland-egl.h everywhere
389 libdali_adaptor_la_CXXFLAGS += -DWL_EGL_PLATFORM
390 libdali_adaptor_la_CXXFLAGS += $(WAYLAND_CFLAGS)
391 libdali_adaptor_la_LIBADD += $(WAYLAND_LIBS)
392 else
393 libdali_adaptor_la_CXXFLAGS += $(X11_CFLAGS)
394 libdali_adaptor_la_LIBADD += $(X11_LIBS)
395 libdali_adaptor_la_LIBADD += $(ECORE_X_LIBS)
396 endif
397
398 if COMMON_PROFILE
399 libdali_adaptor_la_CXXFLAGS += $(HAPTIC_CFLAGS)
400 endif
401
402 if MOBILE_PROFILE
403 libdali_adaptor_la_CXXFLAGS += \
404                       $(DEVICED_CFLAGS) \
405                       $(EFL_ASSIST_CFLAGS) \
406                       $(NATIVE_BUFFER_CFLAGS) \
407                       $(NATIVE_BUFFER_POOL_CFLAGS)
408
409 libdali_adaptor_la_LIBADD += \
410                       $(EFL_ASSIST_LIBS) \
411                       $(NATIVE_BUFFER_LIBS) \
412                       $(NATIVE_BUFFER_POOL_LIBS)
413 endif
414
415 if WEARABLE_PROFILE
416 libdali_adaptor_la_CXXFLAGS += \
417                       $(HAPTIC_CFLAGS) \
418                       $(EFL_ASSIST_CFLAGS)
419 endif
420
421 if TV_PROFILE
422 libdali_adaptor_la_CXXFLAGS += $(HAPTIC_CFLAGS)
423 libdali_adaptor_la_LIBADD +=
424 endif
425
426 if UBUNTU_PROFILE
427 libdali_adaptor_la_LIBADD += -ljpeg
428 CFLAGS += -fPIC
429 endif
430
431 tizenadaptorpublicapidir = $(devincludepath)/dali/public-api
432 tizenadaptorpublicapi_HEADERS = $(public_api_header_files)
433
434 tizenadaptordevelapidir= $(devincludepath)/dali/devel-api
435
436 tizenadaptorintegrationapidir = $(devincludepath)/dali/integration-api/adaptors
437 tizenadaptorintegrationapi_HEADERS = $(adaptor_integration_api_header_files)
438
439 if WAYLAND
440 tizenadaptorintegrationwaylandapidir = $(devincludepath)/dali/integration-api/adaptors
441 tizenadaptorintegrationwaylandapi_HEADERS = $(adaptor_integration_wayland_api_header_files)
442 else
443 tizenadaptorintegrationx11apidir = $(devincludepath)/dali/integration-api/adaptors
444 tizenadaptorintegrationx11api_HEADERS = $(adaptor_integration_x11_api_header_files)
445 endif
446
447 tizenadaptorframeworkpublicapidir = $(tizenadaptorpublicapidir)/adaptor-framework
448 tizenadaptorframeworkpublicapi_HEADERS = $(public_api_adaptor_framework_header_files)
449
450 tizenadaptorframeworkdevelapidir = $(tizenadaptordevelapidir)/adaptor-framework
451 tizenadaptorframeworkdevelapi_HEADERS = $(devel_api_adaptor_framework_header_files)
452
453 tizentextabstractiondevelapidir = $(tizenadaptordevelapidir)/text-abstraction
454 tizentextabstractiondevelapi_HEADERS = $(text_abstraction_header_files)
455
456 if !UBUNTU_PROFILE
457
458 if !WAYLAND
459 tizenadaptorframeworkdevelapi_HEADERS += $(devel_api_adaptor_tizen_x11_header_files)
460 endif # NOT WAYLAND
461
462 endif # NOT UBUNTU_PROFILE
463
464 tizenadaptordaliheaderdir = $(devincludepath)/dali
465 tizenadaptordaliheader_HEADERS = $(adaptor_dali_header_file)
466
467 install-data-local:
468         $(MKDIR_P) ${DESTDIR}/${daliUserFontCacheDir} ${DESTDIR}/${daliShaderbinCacheDir}
469
470 # Install resource log analyzer script
471 bin_SCRIPTS = ../../../adaptors/scripts/dalireslog.sh
472
473 # package doxygen file (contains doxygen grouping information)
474 packagedoxydir = $(devincludepath)/dali/doc
475 packagedoxy_HEADERS = $(package_doxy_files)
476
477 # linking test
478
479 # turn off the linker test if were building for libuv
480 # We can't link to LibUV becase it is statically linked to Node.JS (by default)
481 if !LIB_UV_EVENT_LOOP
482 noinst_PROGRAMS = linker.test
483 endif # NOT LIB_UV_EVENT_LOOP
484
485 linker_test_SOURCES = linker-test.cpp
486
487 linker_test_CXXFLAGS = \
488   -DDALI_ADAPTOR_COMPILATION \
489   -I../../../adaptors/common \
490   -I../../../adaptors/public-api \
491   -I../../../adaptors/integration-api \
492   -I../../../adaptors/base/interfaces \
493   -I../../../adaptors/public-api/adaptor-framework \
494   -I../../../adaptors/devel-api/adaptor-framework \
495   $(DALI_ADAPTOR_CFLAGS) \
496   $(DALICORE_CFLAGS) \
497   $(VCONF_CFLAGS) \
498   $(DALIX11_CFLAGS) \
499   -Werror -Wall
500
501 if WAYLAND
502 linker_test_CXXFLAGS += \
503   -I../../../adaptors/integration-api/wayland
504 else
505
506 linker_test_CXXFLAGS += \
507   -I../../../adaptors/integration-api/x11
508 endif
509
510
511 linker_test_DEPENDENCIES = libdali-adaptor.la
512 linker_test_LDADD = \
513   $(DALICORE_LIBS) \
514   $(VCONF_LIBS) \
515   libdali-adaptor.la \
516   $(HARFBUZZ_LIBS) \
517   -L${prefix}/lib