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