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