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)
190 adaptor_internal_src_files += $(adaptor_x11_tizen_internal_src_files) \
191 $(adaptor_common_internal_egl_extension_src_files)
194 endif # MOBILE_PROFILE
199 adaptor_internal_src_files += $(adaptor_common_internal_src_files) \
200 $(adaptor_common_internal_mobile_profile_src_files) \
201 $(adaptor_tizen_internal_src_files) \
202 $(static_libraries_libunibreak_src_files)
206 adaptor_internal_src_files += $(adaptor_ecore_wayland_tizen_internal_src_files)
208 adaptor_internal_src_files += $(adaptor_wayland_tizen_internal_src_files)
209 endif # USE_ECORE_WAYLAND
211 adaptor_internal_src_files += $(adaptor_tizen_internal_egl_extension_src_files) \
212 $(adaptor_tizen_internal_native_image_src_files) \
213 $(adaptor_internal_wearable_profile_src_files)
215 adaptor_internal_src_files += $(adaptor_x11_tizen_internal_src_files) \
216 $(adaptor_common_internal_egl_extension_src_files)
225 adaptor_internal_src_files += $(adaptor_common_internal_src_files) \
226 $(adaptor_common_internal_tv_profile_src_files) \
227 $(adaptor_tizen_internal_src_files) \
228 $(adaptor_tizen_internal_non_mobile_src_files) \
229 $(static_libraries_libunibreak_src_files)
233 adaptor_internal_src_files += $(adaptor_ecore_wayland_tizen_internal_src_files)
235 adaptor_internal_src_files += $(adaptor_wayland_tizen_internal_src_files)
236 endif # USE_ECORE_WAYLAND
238 adaptor_internal_src_files += $(adaptor_tizen_internal_egl_extension_src_files) \
239 $(adaptor_tizen_internal_native_image_src_files)
241 adaptor_internal_src_files += $(adaptor_x11_tv_internal_src_files) \
242 $(adaptor_x11_internal_tv_profile_key_src_files) \
243 $(adaptor_common_internal_egl_extension_src_files)
251 adaptor_internal_src_files += $(adaptor_common_internal_src_files) \
252 $(adaptor_common_internal_mobile_profile_src_files) \
253 $(adaptor_tizen_internal_src_files) \
254 $(static_libraries_libunibreak_src_files)
259 adaptor_internal_src_files += $(adaptor_ecore_wayland_tizen_internal_src_files)
261 adaptor_internal_src_files += $(adaptor_wayland_tizen_internal_src_files)
262 endif # USE_ECORE_WAYLAND
264 adaptor_internal_src_files += $(adaptor_tizen_internal_egl_extension_src_files) \
265 $(adaptor_tizen_internal_native_image_src_files)
267 adaptor_internal_src_files += $(adaptor_x11_tizen_internal_src_files) \
268 $(adaptor_common_internal_egl_extension_src_files)
275 # Node JS support for using an external libuv main loop. If not enabled then just use e-core as normal
276 # Used for things like callbacks, file-monintors, x input handling
278 main_loop_integration_src_files = $(adaptor_common_internal_uv_src_files)
279 input_event_handler_src_files = $(adaptor_uv_x_event_handler_internal_src_files)
281 main_loop_integration_src_files = $(adaptor_common_internal_ecore_src_files)
282 input_event_handler_src_files = $(adaptor_ecore_x_event_handler_internal_src_files)
285 if ENABLE_VECTOR_BASED_TEXT_RENDERING
286 adaptor_internal_src_files += $(static_libraries_glyphy_src_files)
287 DALI_ADAPTOR_CFLAGS += -DENABLE_VECTOR_BASED_TEXT_RENDERING
290 pkgconfigdir = $(libdir)/pkgconfig
291 pkgconfig_DATA = dali-adaptor.pc dali-adaptor-integration.pc
293 lib_LTLIBRARIES = libdali-adaptor.la
295 libdali_adaptor_la_SOURCES = \
296 $(base_adaptor_src_files) \
297 $(main_loop_integration_src_files) \
298 $(tizen_platform_abstraction_src_files) \
299 $(text_abstraction_src_files) \
300 $(devel_api_src_files) \
301 $(public_api_src_files) \
302 $(adaptor_internal_src_files) \
303 $(input_event_handler_src_files)
306 if ENABLE_NETWORK_LOGGING
307 libdali_adaptor_la_SOURCES += \
308 $(base_adaptor_networking_src_files)
311 libdali_adaptor_la_DEPENDENCIES =
313 # List include directories with more platform-specific (tizen) before portable root:
314 libdali_adaptor_la_includes = \
316 -I../../../platform-abstractions/tizen \
317 -I../../../platform-abstractions/tizen/resource-loader \
318 -I../../../platform-abstractions/portable \
319 -I../../../platform-abstractions/ \
320 -I../../../adaptors/public-api \
321 -I../../../adaptors/integration-api \
322 -I../../../adaptors/public-api/adaptor-framework \
323 -I../../../adaptors/devel-api/adaptor-framework \
324 -I../../../adaptors/common \
325 -I../../../adaptors/base/interfaces \
326 -I../../../adaptors/ \
328 -I../../../text/dali/internal/libunibreak
331 libdali_adaptor_la_includes += -I../../../adaptors/integration-api/wayland
334 libdali_adaptor_la_includes += \
335 -I../../../adaptors/ecore/common \
336 -I../../../adaptors/ecore/wayland
338 libdali_adaptor_la_includes += -I../../../adaptors/wayland \
339 -I../../../adaptors/wayland/input/text/imf \
340 -I../../../adaptors/wayland/clipboard
341 endif # USE_ECORE_WAYLADN
343 libdali_adaptor_la_includes += \
344 -I../../../adaptors/tizen
346 libdali_adaptor_la_includes += \
347 -I../../../adaptors/ecore/common \
348 -I../../../adaptors/x11 \
349 -I../../../adaptors/integration-api/x11
353 libdali_adaptor_la_includes += \
354 -I../../../adaptors/ubuntu
356 libdali_adaptor_la_includes += \
357 -I../../../adaptors/tizen
360 daliDefaultThemeDir = ${dataReadWriteDir}/theme/
361 daliShaderbinCacheDir = ${dataReadOnlyDir}/core/shaderbin/
363 libdali_adaptor_la_CXXFLAGS = \
364 -DDALI_DATA_RW_DIR="\"${daliReadWriteDir}\"" \
365 -DDALI_DATA_RO_DIR="\"${daliReadOnlyDir}\"" \
366 -DDALI_DEFAULT_FONT_CACHE_DIR="\"${daliDefaultFontCacheDir}\"" \
367 -DDALI_USER_FONT_CACHE_DIR="\"${daliUserFontCacheDir}\"" \
368 -DDALI_SHADERBIN_DIR="\"${daliShaderbinCacheDir}\"" \
369 -DDALI_DEFAULT_THEME_DIR="\"${daliDefaultThemeDir}\"" \
370 -DFONT_PRELOADED_PATH="\"${fontPreloadedPath}\"" \
371 -DFONT_DOWNLOADED_PATH="\"${fontDownloadedPath}\"" \
372 -DFONT_APPLICATION_PATH="\"${fontApplicationPath}\"" \
373 -DFONT_CONFIGURATION_FILE="\"${fontConfigurationFile}\"" \
374 -DNON_POWER_OF_TWO_TEXTURES \
375 -DDALI_COMPILATION -DDALI_ADAPTOR_COMPILATION \
376 -Werror -Wall -lgcc \
377 $(libdali_adaptor_la_includes) \
378 $(DALI_ADAPTOR_CFLAGS) \
380 $(OPENGLES20_CFLAGS) \
382 $(FONTCONFIG_CFLAGS) \
389 $(CAPI_SYSTEM_SENSOR_CFLAGS) \
393 $(TPKP_CURL_CFLAGS) \
396 # Todo, as soon as common repos are updated on build server remove this.
398 libdali_adaptor_la_CXXFLAGS += -DWAYLAND_EXTENSIONS_SUPPORTED
401 libdali_adaptor_la_CFLAGS = $(libdali_adaptor_la_CXXFLAGS)
403 libdali_adaptor_la_LIBADD = \
413 $(CAPI_SYSTEM_SENSOR_LIBS) \
420 $(APPCORE_WATCH_LIBS) \
427 # EVAS used indicator
428 libdali_adaptor_la_CXXFLAGS += $(ELEMENTARY_CFLAGS) \
431 $(ECORE_IPC_CFLAGS) \
436 libdali_adaptor_la_LIBADD += $(ELEMENTARY_LIBS) \
444 libdali_adaptor_la_CXXFLAGS += $(CAPI_APPFW_APPLICATION_CFLAGS) \
445 $(CAPI_SYSTEM_SYSTEM_SETTINGS_CFLAGS) \
446 $(CAPI_SYSTEM_INFO_CFLAGS) \
450 libdali_adaptor_la_LIBADD += $(CAPI_APPFW_APPLICATION_LIBS) \
451 $(CAPI_SYSTEM_SYSTEM_SETTINGS_LIBS) \
452 $(CAPI_SYSTEM_INFO_LIBS) \
458 # This is to avoid having to include wayland-egl.h everywhere
459 libdali_adaptor_la_CXXFLAGS += -DWL_EGL_PLATFORM
460 libdali_adaptor_la_CXXFLAGS += $(WAYLAND_CFLAGS)
461 libdali_adaptor_la_LIBADD += $(WAYLAND_LIBS)
463 libdali_adaptor_la_CXXFLAGS += $(X11_CFLAGS)
464 libdali_adaptor_la_LIBADD += $(X11_LIBS)
465 libdali_adaptor_la_LIBADD += $(ECORE_X_LIBS)
469 libdali_adaptor_la_CXXFLAGS += $(HAPTIC_CFLAGS)
473 libdali_adaptor_la_CXXFLAGS += \
475 $(EFL_ASSIST_CFLAGS) \
476 $(NATIVE_BUFFER_CFLAGS) \
477 $(NATIVE_BUFFER_POOL_CFLAGS)
479 libdali_adaptor_la_LIBADD += \
481 $(NATIVE_BUFFER_LIBS) \
482 $(NATIVE_BUFFER_POOL_LIBS)
486 libdali_adaptor_la_CXXFLAGS += \
492 libdali_adaptor_la_CXXFLAGS += $(HAPTIC_CFLAGS)
493 libdali_adaptor_la_LIBADD +=
497 libdali_adaptor_la_CXXFLAGS += \
499 $(EFL_ASSIST_CFLAGS) \
500 $(NATIVE_BUFFER_CFLAGS) \
501 $(NATIVE_BUFFER_POOL_CFLAGS)
503 libdali_adaptor_la_LIBADD += \
505 $(NATIVE_BUFFER_LIBS) \
506 $(NATIVE_BUFFER_POOL_LIBS)
510 libdali_adaptor_la_LIBADD += -ljpeg
518 libdali_adaptor_la_CXXFLAGS += $(UTILX_CFLAGS)
519 libdali_adaptor_la_LIBADD += $(UTILX_LIBS)
523 tizenadaptorpublicapidir = $(devincludepath)/dali/public-api
524 tizenadaptorpublicapi_HEADERS = $(public_api_header_files)
526 tizenadaptordevelapidir= $(devincludepath)/dali/devel-api
528 tizenadaptorintegrationapidir = $(devincludepath)/dali/integration-api/adaptors
529 tizenadaptorintegrationapi_HEADERS = $(adaptor_integration_api_header_files)
532 tizenadaptorintegrationwaylandapidir = $(devincludepath)/dali/integration-api/adaptors
533 tizenadaptorintegrationwaylandapi_HEADERS = $(adaptor_integration_wayland_api_header_files)
535 tizenadaptorintegrationx11apidir = $(devincludepath)/dali/integration-api/adaptors
536 tizenadaptorintegrationx11api_HEADERS = $(adaptor_integration_x11_api_header_files)
539 tizenadaptorframeworkpublicapidir = $(tizenadaptorpublicapidir)/adaptor-framework
540 tizenadaptorframeworkpublicapi_HEADERS = $(public_api_adaptor_framework_header_files)
542 tizenadaptorframeworkdevelapidir = $(tizenadaptordevelapidir)/adaptor-framework
543 tizenadaptorframeworkdevelapi_HEADERS = $(devel_api_adaptor_framework_header_files)
545 tizentextabstractiondevelapidir = $(tizenadaptordevelapidir)/text-abstraction
546 tizentextabstractiondevelapi_HEADERS = $(text_abstraction_header_files)
549 tizenadaptorframeworkpublicapi_HEADERS += $(public_api_adaptor_tizen_header_files)
552 tizenadaptorframeworkdevelapi_HEADERS += $(devel_api_adaptor_tizen_x11_header_files)
555 endif # NOT UBUNTU_PROFILE
557 tizenadaptordaliheaderdir = $(devincludepath)/dali
558 tizenadaptordaliheader_HEADERS = $(adaptor_dali_header_file)
561 tizenadaptorpublicapi_HEADERS += $(adaptor_dali_wearable_header_file)
563 tizenwatchpublicapidir = $(tizenadaptorpublicapidir)/watch
564 tizenwatchpublicapi_HEADERS = $(public_dali_watch_header_files)
568 $(MKDIR_P) ${DESTDIR}/${daliUserFontCacheDir} ${DESTDIR}/${daliShaderbinCacheDir}
570 # Install resource log analyzer script
571 bin_SCRIPTS = ../../../adaptors/scripts/dalireslog.sh
573 # package doxygen file (contains doxygen grouping information)
574 packagedoxydir = $(devincludepath)/dali/doc
575 packagedoxy_HEADERS = $(package_doxy_files)
579 # turn off the linker test if were building for libuv
580 # We can't link to LibUV becase it is statically linked to Node.JS (by default)
581 if !LIB_UV_EVENT_LOOP
582 noinst_PROGRAMS = linker.test
583 endif # NOT LIB_UV_EVENT_LOOP
585 linker_test_SOURCES = linker-test.cpp
587 linker_test_CXXFLAGS = \
588 -DDALI_ADAPTOR_COMPILATION \
589 -I../../../adaptors/common \
590 -I../../../adaptors/public-api \
591 -I../../../adaptors/integration-api \
592 -I../../../adaptors/base/interfaces \
593 -I../../../adaptors/public-api/adaptor-framework \
594 -I../../../adaptors/devel-api/adaptor-framework \
595 $(DALI_ADAPTOR_CFLAGS) \
602 linker_test_CXXFLAGS += \
603 -I../../../adaptors/integration-api/wayland
606 linker_test_CXXFLAGS += \
607 -I../../../adaptors/integration-api/x11
611 linker_test_DEPENDENCIES = libdali-adaptor.la
612 linker_test_LDADD = \