2 # Copyright (c) 2014 Samsung Electronics Co., Ltd.
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
8 # http://www.apache.org/licenses/LICENSE-2.0
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.
17 # Build the Dali Adaptor library
20 ############# INCLUDE FILE LISTS #############
23 base_adaptor_src_dir = ../../../adaptors/base
24 include ../../../adaptors/base/file.list
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
32 text_src_dir = ../../../text
33 include ../../../text/file.list
36 adaptor_integration_api_dir = ../../../adaptors/integration-api
37 include ../../../adaptors/integration-api/file.list
40 adaptor_common_dir = ../../../adaptors/common
41 include ../../../adaptors/common/file.list
45 adaptor_ecore_common_dir = ../../../adaptors/ecore/common
46 include ../../../adaptors/ecore/common/file.list
48 # If we're not using any EFL, then we need to use libuv mainloop
50 adaptor_libuv_dir = ../../../adaptors/libuv
51 include ../../../adaptors/libuv/file.list
58 adaptor_ecore_wayland_dir = ../../../adaptors/ecore/wayland
59 include ../../../adaptors/ecore/wayland/file.list
62 adaptor_wayland_dir = ../../../adaptors/wayland
63 include ../../../adaptors/wayland/file.list
67 adaptor_x11_dir = ../../../adaptors/x11
68 include ../../../adaptors/x11/file.list
73 adaptor_ubuntu_dir = ../../../adaptors/ubuntu
74 include ../../../adaptors/ubuntu/file.list
77 adaptor_tizen_dir = ../../../adaptors/tizen
78 include ../../../adaptors/tizen/file.list
82 adaptor_mobile_dir = ../../../adaptors/mobile
83 include ../../../adaptors/mobile/file.list
87 adaptor_wearable_dir = ../../../adaptors/wearable
88 include ../../../adaptors/wearable/file.list
93 adaptor_tv_dir = ../../../adaptors/tv
94 include ../../../adaptors/tv/file.list
98 adaptor_public_api_dir = ../../../adaptors/public-api
99 include ../../../adaptors/public-api/file.list
101 # Devel API ( for use by Toolkit)
102 adaptor_devel_api_dir = ../../../adaptors/devel-api
103 include ../../../adaptors/devel-api/file.list
107 static_libraries_libunibreak_src_dir = ../../../text/dali/internal/libunibreak
108 include ../../../text/dali/internal/libunibreak/file.list
110 static_libraries_glyphy_src_dir = ../../../text/dali/internal/glyphy
111 include ../../../text/dali/internal/glyphy/file.list
114 package_doxy_dir = ../../../doc
115 include ../../../doc/file.list
117 ############# source files #############
119 # FRAMEWORK FILES for adaptor
120 # Either use ecore mainloop + appcore / uiman
121 # Or libuv main loop with no appcore / uimain
123 adaptor_internal_src_files = $(adaptor_tizen_framework_efl_src_files) \
124 $(adaptor_ecore_common_internal_src_files)
126 adaptor_internal_src_files = $(adaptor_tizen_framework_libuv_src_files)
132 adaptor_internal_src_files += $(adaptor_common_internal_src_files) \
133 $(adaptor_common_internal_default_profile_src_files) \
134 $(adaptor_tizen_internal_src_files) \
135 $(adaptor_tizen_internal_non_mobile_src_files) \
136 $(static_libraries_libunibreak_src_files)
141 adaptor_internal_src_files += $(adaptor_ecore_wayland_tizen_internal_src_files) \
142 $(adaptor_ecore_wayland_internal_default_profile_src_files)
144 adaptor_internal_src_files += $(adaptor_wayland_tizen_internal_src_files)
145 endif # USE_ECORE_WAYLAND
147 adaptor_internal_src_files += $(adaptor_tizen_internal_egl_extension_src_files) \
148 $(adaptor_tizen_internal_native_image_src_files)
150 adaptor_internal_src_files += $(adaptor_x11_tizen_internal_src_files) \
151 $(adaptor_common_internal_egl_extension_src_files) \
152 $(adaptor_x11_internal_default_profile_src_files)
154 endif # COMMON_PROFILE
160 adaptor_internal_src_files += $(adaptor_common_internal_src_files) \
161 $(adaptor_common_internal_default_profile_src_files) \
162 $(adaptor_ubuntu_internal_src_files) \
163 $(adaptor_x11_ubuntu_internal_src_files) \
164 $(adaptor_x11_internal_default_profile_src_files) \
165 $(static_libraries_libunibreak_src_files) \
166 $(adaptor_common_internal_egl_extension_src_files)
168 endif # UBUNTU_PROFILE
174 adaptor_internal_src_files += $(adaptor_common_internal_src_files) \
175 $(adaptor_common_internal_mobile_profile_src_files) \
176 $(adaptor_tizen_internal_src_files) \
177 $(static_libraries_libunibreak_src_files)
182 adaptor_internal_src_files += $(adaptor_ecore_wayland_tizen_internal_src_files)
184 adaptor_internal_src_files += $(adaptor_wayland_tizen_internal_src_files)
185 endif # USE_ECORE_WAYLAND
187 adaptor_internal_src_files += $(adaptor_tizen_internal_egl_extension_src_files) \
188 $(adaptor_tizen_internal_native_image_src_files) \
189 $(adaptor_common_internal_wayland_mobile_profile_src_files)
191 adaptor_internal_src_files += $(adaptor_x11_tizen_internal_src_files) \
192 $(adaptor_common_internal_egl_extension_src_files) \
193 $(adaptor_common_internal_x_mobile_profile_src_files)
196 endif # MOBILE_PROFILE
201 adaptor_internal_src_files += $(adaptor_common_internal_src_files) \
202 $(adaptor_common_internal_mobile_profile_src_files) \
203 $(adaptor_tizen_internal_src_files) \
204 $(static_libraries_libunibreak_src_files)
208 adaptor_internal_src_files += $(adaptor_ecore_wayland_tizen_internal_src_files)
210 adaptor_internal_src_files += $(adaptor_wayland_tizen_internal_src_files)
211 endif # USE_ECORE_WAYLAND
213 adaptor_internal_src_files += $(adaptor_tizen_internal_egl_extension_src_files) \
214 $(adaptor_tizen_internal_native_image_src_files) \
215 $(adaptor_internal_wearable_profile_src_files) \
216 $(adaptor_common_internal_wayland_mobile_profile_src_files)
218 adaptor_internal_src_files += $(adaptor_x11_tizen_internal_src_files) \
219 $(adaptor_common_internal_egl_extension_src_files) \
220 $(adaptor_common_internal_x_mobile_profile_src_files)
229 adaptor_internal_src_files += $(adaptor_common_internal_src_files) \
230 $(adaptor_common_internal_tv_profile_src_files) \
231 $(adaptor_tizen_internal_src_files) \
232 $(adaptor_tizen_internal_non_mobile_src_files) \
233 $(static_libraries_libunibreak_src_files)
237 adaptor_internal_src_files += $(adaptor_ecore_wayland_tizen_internal_src_files)
239 adaptor_internal_src_files += $(adaptor_wayland_tizen_internal_src_files)
240 endif # USE_ECORE_WAYLAND
242 adaptor_internal_src_files += $(adaptor_tizen_internal_egl_extension_src_files) \
243 $(adaptor_tizen_internal_native_image_src_files)
245 adaptor_internal_src_files += $(adaptor_x11_tv_internal_src_files) \
246 $(adaptor_x11_internal_tv_profile_key_src_files) \
247 $(adaptor_common_internal_egl_extension_src_files)
255 adaptor_internal_src_files += $(adaptor_common_internal_src_files) \
256 $(adaptor_common_internal_mobile_profile_src_files) \
257 $(adaptor_tizen_internal_src_files) \
258 $(static_libraries_libunibreak_src_files)
263 adaptor_internal_src_files += $(adaptor_ecore_wayland_tizen_internal_src_files)
265 adaptor_internal_src_files += $(adaptor_wayland_tizen_internal_src_files)
266 endif # USE_ECORE_WAYLAND
268 adaptor_internal_src_files += $(adaptor_tizen_internal_egl_extension_src_files) \
269 $(adaptor_tizen_internal_native_image_src_files)
271 adaptor_internal_src_files += $(adaptor_x11_tizen_internal_src_files) \
272 $(adaptor_common_internal_egl_extension_src_files)
279 # Node JS support for using an external libuv main loop. If not enabled then just use e-core as normal
280 # Used for things like callbacks, file-monintors, x input handling
282 main_loop_integration_src_files = $(adaptor_common_internal_uv_src_files)
283 input_event_handler_src_files = $(adaptor_uv_x_event_handler_internal_src_files)
285 main_loop_integration_src_files = $(adaptor_common_internal_ecore_src_files)
286 input_event_handler_src_files = $(adaptor_ecore_x_event_handler_internal_src_files)
289 if ENABLE_VECTOR_BASED_TEXT_RENDERING
290 adaptor_internal_src_files += $(static_libraries_glyphy_src_files)
291 DALI_ADAPTOR_CFLAGS += -DENABLE_VECTOR_BASED_TEXT_RENDERING
294 pkgconfigdir = $(libdir)/pkgconfig
295 pkgconfig_DATA = dali-adaptor.pc dali-adaptor-integration.pc
297 lib_LTLIBRARIES = libdali-adaptor.la
299 libdali_adaptor_la_SOURCES = \
300 $(base_adaptor_src_files) \
301 $(main_loop_integration_src_files) \
302 $(tizen_platform_abstraction_src_files) \
303 $(text_abstraction_src_files) \
304 $(devel_api_src_files) \
305 $(public_api_src_files) \
306 $(adaptor_internal_src_files) \
307 $(input_event_handler_src_files)
310 if ENABLE_NETWORK_LOGGING
311 libdali_adaptor_la_SOURCES += \
312 $(base_adaptor_networking_src_files)
315 libdali_adaptor_la_DEPENDENCIES =
317 # List include directories with more platform-specific (tizen) before portable root:
318 libdali_adaptor_la_includes = \
320 -I../../../platform-abstractions/tizen \
321 -I../../../platform-abstractions/tizen/resource-loader \
322 -I../../../platform-abstractions/portable \
323 -I../../../platform-abstractions/ \
324 -I../../../adaptors/public-api \
325 -I../../../adaptors/integration-api \
326 -I../../../adaptors/public-api/adaptor-framework \
327 -I../../../adaptors/devel-api/adaptor-framework \
328 -I../../../adaptors/common \
329 -I../../../adaptors/base/interfaces \
330 -I../../../adaptors/ \
332 -I../../../text/dali/internal/libunibreak
335 libdali_adaptor_la_includes += -I../../../adaptors/integration-api/wayland
338 libdali_adaptor_la_includes += \
339 -I../../../adaptors/ecore/common \
340 -I../../../adaptors/ecore/wayland
342 libdali_adaptor_la_includes += -I../../../adaptors/wayland \
343 -I../../../adaptors/wayland/input/text/imf \
344 -I../../../adaptors/wayland/clipboard
345 endif # USE_ECORE_WAYLADN
347 libdali_adaptor_la_includes += \
348 -I../../../adaptors/tizen
350 libdali_adaptor_la_includes += \
351 -I../../../adaptors/ecore/common \
352 -I../../../adaptors/x11 \
353 -I../../../adaptors/integration-api/x11
357 libdali_adaptor_la_includes += \
358 -I../../../adaptors/ubuntu
360 libdali_adaptor_la_includes += \
361 -I../../../adaptors/tizen
364 daliDefaultThemeDir = ${dataReadWriteDir}/theme/
365 daliShaderbinCacheDir = ${dataReadOnlyDir}/core/shaderbin/
367 libdali_adaptor_la_CXXFLAGS = \
368 -DDALI_DATA_RW_DIR="\"${daliReadWriteDir}\"" \
369 -DDALI_DATA_RO_DIR="\"${daliReadOnlyDir}\"" \
370 -DDALI_DEFAULT_FONT_CACHE_DIR="\"${daliDefaultFontCacheDir}\"" \
371 -DDALI_USER_FONT_CACHE_DIR="\"${daliUserFontCacheDir}\"" \
372 -DDALI_SHADERBIN_DIR="\"${daliShaderbinCacheDir}\"" \
373 -DDALI_DEFAULT_THEME_DIR="\"${daliDefaultThemeDir}\"" \
374 -DFONT_PRELOADED_PATH="\"${fontPreloadedPath}\"" \
375 -DFONT_DOWNLOADED_PATH="\"${fontDownloadedPath}\"" \
376 -DFONT_APPLICATION_PATH="\"${fontApplicationPath}\"" \
377 -DFONT_CONFIGURATION_FILE="\"${fontConfigurationFile}\"" \
378 -DTIZEN_PLATFORM_CONFIG_SUPPORTED=${tizenPlatformConfigSupported} \
379 -DNON_POWER_OF_TWO_TEXTURES \
380 -DDALI_COMPILATION -DDALI_ADAPTOR_COMPILATION \
381 -Werror -Wall -lgcc \
382 $(libdali_adaptor_la_includes) \
383 $(DALI_ADAPTOR_CFLAGS) \
385 $(OPENGLES20_CFLAGS) \
387 $(FONTCONFIG_CFLAGS) \
394 $(CAPI_SYSTEM_SENSOR_CFLAGS) \
398 $(TPKP_CURL_CFLAGS) \
401 # Todo, as soon as common repos are updated on build server remove this.
403 libdali_adaptor_la_CXXFLAGS += -DWAYLAND_EXTENSIONS_SUPPORTED
406 libdali_adaptor_la_CFLAGS = $(libdali_adaptor_la_CXXFLAGS)
408 libdali_adaptor_la_LIBADD = \
418 $(CAPI_SYSTEM_SENSOR_LIBS) \
425 $(APPCORE_WATCH_LIBS) \
432 # EVAS used indicator
433 libdali_adaptor_la_CXXFLAGS += $(ELEMENTARY_CFLAGS) \
436 $(ECORE_IPC_CFLAGS) \
441 libdali_adaptor_la_LIBADD += $(ELEMENTARY_LIBS) \
449 libdali_adaptor_la_CXXFLAGS += $(CAPI_APPFW_APPLICATION_CFLAGS) \
450 $(CAPI_SYSTEM_SYSTEM_SETTINGS_CFLAGS) \
451 $(CAPI_SYSTEM_INFO_CFLAGS) \
455 libdali_adaptor_la_LIBADD += $(CAPI_APPFW_APPLICATION_LIBS) \
456 $(CAPI_SYSTEM_SYSTEM_SETTINGS_LIBS) \
457 $(CAPI_SYSTEM_INFO_LIBS) \
463 # This is to avoid having to include wayland-egl.h everywhere
464 libdali_adaptor_la_CXXFLAGS += -DWL_EGL_PLATFORM
465 libdali_adaptor_la_CXXFLAGS += $(WAYLAND_CFLAGS)
466 libdali_adaptor_la_LIBADD += $(WAYLAND_LIBS)
468 libdali_adaptor_la_CXXFLAGS += $(X11_CFLAGS)
469 libdali_adaptor_la_LIBADD += $(X11_LIBS)
470 libdali_adaptor_la_LIBADD += $(ECORE_X_LIBS)
474 libdali_adaptor_la_CXXFLAGS += $(HAPTIC_CFLAGS)
478 libdali_adaptor_la_CXXFLAGS += \
480 $(EFL_ASSIST_CFLAGS) \
481 $(NATIVE_BUFFER_CFLAGS) \
482 $(NATIVE_BUFFER_POOL_CFLAGS)
484 libdali_adaptor_la_LIBADD += \
486 $(NATIVE_BUFFER_LIBS) \
487 $(NATIVE_BUFFER_POOL_LIBS)
491 libdali_adaptor_la_CXXFLAGS += \
497 libdali_adaptor_la_CXXFLAGS += $(HAPTIC_CFLAGS)
498 libdali_adaptor_la_LIBADD +=
502 libdali_adaptor_la_CXXFLAGS += \
504 $(EFL_ASSIST_CFLAGS) \
505 $(NATIVE_BUFFER_CFLAGS) \
506 $(NATIVE_BUFFER_POOL_CFLAGS)
508 libdali_adaptor_la_LIBADD += \
510 $(NATIVE_BUFFER_LIBS) \
511 $(NATIVE_BUFFER_POOL_LIBS)
515 libdali_adaptor_la_LIBADD += -ljpeg
523 libdali_adaptor_la_CXXFLAGS += $(UTILX_CFLAGS)
524 libdali_adaptor_la_LIBADD += $(UTILX_LIBS)
528 tizenadaptorpublicapidir = $(devincludepath)/dali/public-api
529 tizenadaptorpublicapi_HEADERS = $(public_api_header_files)
531 tizenadaptordevelapidir= $(devincludepath)/dali/devel-api
533 tizenadaptorintegrationapidir = $(devincludepath)/dali/integration-api/adaptors
534 tizenadaptorintegrationapi_HEADERS = $(adaptor_integration_api_header_files)
537 tizenadaptorintegrationwaylandapidir = $(devincludepath)/dali/integration-api/adaptors
538 tizenadaptorintegrationwaylandapi_HEADERS = $(adaptor_integration_wayland_api_header_files)
539 tizenadaptorintegrationwaylandapi_HEADERS += $(adaptor_integration_ecore_wayland_api_header_files)
541 tizenadaptorintegrationx11apidir = $(devincludepath)/dali/integration-api/adaptors
542 tizenadaptorintegrationx11api_HEADERS = $(adaptor_integration_x11_api_header_files)
545 tizenadaptorframeworkpublicapidir = $(tizenadaptorpublicapidir)/adaptor-framework
546 tizenadaptorframeworkpublicapi_HEADERS = $(public_api_adaptor_framework_header_files)
548 tizenadaptorframeworkdevelapidir = $(tizenadaptordevelapidir)/adaptor-framework
549 tizenadaptorframeworkdevelapi_HEADERS = $(devel_api_adaptor_framework_header_files)
551 tizentextabstractiondevelapidir = $(tizenadaptordevelapidir)/text-abstraction
552 tizentextabstractiondevelapi_HEADERS = $(text_abstraction_header_files)
555 tizenadaptorframeworkpublicapi_HEADERS += $(public_api_adaptor_tizen_header_files)
558 tizenadaptorframeworkdevelapi_HEADERS += $(devel_api_adaptor_tizen_x11_header_files)
561 endif # NOT UBUNTU_PROFILE
563 tizenadaptordaliheaderdir = $(devincludepath)/dali
564 tizenadaptordaliheader_HEADERS = $(adaptor_dali_header_file)
567 tizenadaptorpublicapi_HEADERS += $(adaptor_dali_wearable_header_file)
569 tizenwatchpublicapidir = $(tizenadaptorpublicapidir)/watch
570 tizenwatchpublicapi_HEADERS = $(public_dali_watch_header_files)
574 $(MKDIR_P) ${DESTDIR}/${daliUserFontCacheDir} ${DESTDIR}/${daliShaderbinCacheDir}
576 # Install resource log analyzer script
577 bin_SCRIPTS = ../../../adaptors/scripts/dalireslog.sh
579 # package doxygen file (contains doxygen grouping information)
580 packagedoxydir = $(devincludepath)/dali/doc
581 packagedoxy_HEADERS = $(package_doxy_files)
585 # turn off the linker test if were building for libuv
586 # We can't link to LibUV becase it is statically linked to Node.JS (by default)
587 if !LIB_UV_EVENT_LOOP
588 noinst_PROGRAMS = linker.test
589 endif # NOT LIB_UV_EVENT_LOOP
591 linker_test_SOURCES = linker-test.cpp
593 linker_test_CXXFLAGS = \
594 -DDALI_ADAPTOR_COMPILATION \
595 -I../../../adaptors/common \
596 -I../../../adaptors/public-api \
597 -I../../../adaptors/integration-api \
598 -I../../../adaptors/base/interfaces \
599 -I../../../adaptors/public-api/adaptor-framework \
600 -I../../../adaptors/devel-api/adaptor-framework \
601 $(DALI_ADAPTOR_CFLAGS) \
608 linker_test_CXXFLAGS += \
609 -I../../../adaptors/integration-api/wayland
612 linker_test_CXXFLAGS += \
613 -I../../../adaptors/integration-api/x11
617 linker_test_DEPENDENCIES = libdali-adaptor.la
618 linker_test_LDADD = \