Revert "[3.0] Fix ivi build error"
[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
131 if USE_ECORE_WAYLAND
132 adaptor_internal_src_files += $(adaptor_ecore_wayland_tizen_internal_src_files) \
133                               $(adaptor_ecore_wayland_internal_default_profile_src_files)
134 else
135 adaptor_internal_src_files += $(adaptor_wayland_tizen_internal_src_files)
136 endif # USE_ECORE_WAYLAND
137
138 adaptor_internal_src_files += $(adaptor_tizen_internal_egl_extension_src_files) \
139                               $(adaptor_tizen_internal_native_image_src_files)
140 else
141 adaptor_internal_src_files += $(adaptor_x11_tizen_internal_src_files) \
142                               $(adaptor_common_internal_egl_extension_src_files) \
143                               $(adaptor_x11_internal_default_profile_src_files)
144 endif # WAYLAND
145 endif # COMMON_PROFILE
146
147
148 # UBUNTU
149 if UBUNTU_PROFILE
150
151 adaptor_internal_src_files += $(adaptor_common_internal_src_files) \
152                              $(adaptor_common_internal_default_profile_src_files) \
153                              $(adaptor_ubuntu_internal_src_files) \
154                              $(adaptor_x11_ubuntu_internal_src_files) \
155                              $(adaptor_x11_internal_default_profile_src_files) \
156                              $(static_libraries_libunibreak_src_files) \
157                              $(adaptor_common_internal_egl_extension_src_files)
158
159 endif # UBUNTU_PROFILE
160
161
162 # MOBILE
163 if MOBILE_PROFILE
164
165 adaptor_internal_src_files += $(adaptor_common_internal_src_files) \
166                              $(adaptor_common_internal_mobile_profile_src_files) \
167                              $(adaptor_tizen_internal_src_files) \
168                              $(static_libraries_libunibreak_src_files)
169
170 if WAYLAND
171
172 if USE_ECORE_WAYLAND
173 adaptor_internal_src_files += $(adaptor_ecore_wayland_tizen_internal_src_files)
174 else
175 adaptor_internal_src_files += $(adaptor_wayland_tizen_internal_src_files)
176 endif # USE_ECORE_WAYLAND
177
178 adaptor_internal_src_files += $(adaptor_tizen_internal_egl_extension_src_files) \
179                               $(adaptor_tizen_internal_native_image_src_files)
180 else
181 adaptor_internal_src_files += $(adaptor_x11_tizen_internal_src_files) \
182                               $(adaptor_common_internal_egl_extension_src_files)
183 endif # WAYLAND
184
185 endif # MOBILE_PROFILE
186
187 # WEARABLE
188 if WEARABLE_PROFILE
189
190 adaptor_internal_src_files += $(adaptor_common_internal_src_files) \
191                              $(adaptor_common_internal_mobile_profile_src_files) \
192                              $(adaptor_tizen_internal_src_files) \
193                              $(static_libraries_libunibreak_src_files)
194 if WAYLAND
195
196 if USE_ECORE_WAYLAND
197 adaptor_internal_src_files += $(adaptor_ecore_wayland_tizen_internal_src_files)
198 else
199 adaptor_internal_src_files += $(adaptor_wayland_tizen_internal_src_files)
200 endif # USE_ECORE_WAYLAND
201
202 adaptor_internal_src_files += $(adaptor_tizen_internal_egl_extension_src_files) \
203                               $(adaptor_tizen_internal_native_image_src_files)
204 else
205 adaptor_internal_src_files += $(adaptor_x11_tizen_internal_src_files) \
206                               $(adaptor_common_internal_egl_extension_src_files)
207 endif # WAYLAND
208
209 endif # WEARABLE
210
211
212 # TV
213 if TV_PROFILE
214
215 adaptor_internal_src_files += $(adaptor_common_internal_src_files) \
216                              $(adaptor_common_internal_tv_profile_src_files) \
217                              $(adaptor_tizen_internal_src_files) \
218                              $(adaptor_tizen_internal_non_mobile_src_files) \
219                              $(static_libraries_libunibreak_src_files)
220 if WAYLAND
221
222 if USE_ECORE_WAYLAND
223 adaptor_internal_src_files += $(adaptor_ecore_wayland_tizen_internal_src_files)
224 else
225 adaptor_internal_src_files += $(adaptor_wayland_tizen_internal_src_files)
226 endif # USE_ECORE_WAYLAND
227
228 adaptor_internal_src_files += $(adaptor_tizen_internal_egl_extension_src_files) \
229                               $(adaptor_tizen_internal_native_image_src_files)
230 else
231 adaptor_internal_src_files += $(adaptor_x11_tv_internal_src_files) \
232                               $(adaptor_x11_internal_tv_profile_key_src_files) \
233                               $(adaptor_common_internal_egl_extension_src_files)
234 endif # WAYLAND
235
236 endif
237
238 # Node JS support for using an external libuv main loop. If not enabled then just use e-core as normal
239 # Used for things like callbacks, file-monintors, x input handling
240 if LIB_UV_EVENT_LOOP
241 main_loop_integration_src_files = $(adaptor_common_internal_uv_src_files)
242 input_event_handler_src_files = $(adaptor_uv_x_event_handler_internal_src_files)
243 else
244 main_loop_integration_src_files = $(adaptor_common_internal_ecore_src_files)
245 input_event_handler_src_files = $(adaptor_ecore_x_event_handler_internal_src_files)
246 endif
247
248
249
250 pkgconfigdir = $(libdir)/pkgconfig
251 pkgconfig_DATA = dali-adaptor.pc dali-adaptor-integration.pc
252
253 lib_LTLIBRARIES = libdali-adaptor.la
254
255 libdali_adaptor_la_SOURCES = \
256                      $(base_adaptor_src_files) \
257                      $(main_loop_integration_src_files) \
258                      $(tizen_platform_abstraction_src_files) \
259                      $(text_abstraction_src_files) \
260                      $(devel_api_src_files) \
261                      $(public_api_src_files) \
262                      $(adaptor_internal_src_files) \
263                      $(input_event_handler_src_files)
264
265
266 if ENABLE_NETWORK_LOGGING
267 libdali_adaptor_la_SOURCES += \
268   $(base_adaptor_networking_src_files)
269 endif
270
271 libdali_adaptor_la_DEPENDENCIES =
272
273 # List include directories with more platform-specific (tizen) before portable root:
274 libdali_adaptor_la_includes = \
275                       -I../../.. \
276                       -I../../../platform-abstractions/tizen \
277                       -I../../../platform-abstractions/tizen/resource-loader \
278                       -I../../../platform-abstractions/portable \
279                       -I../../../platform-abstractions/ \
280                       -I../../../adaptors/public-api \
281                       -I../../../adaptors/integration-api \
282                       -I../../../adaptors/public-api/adaptor-framework \
283                       -I../../../adaptors/devel-api/adaptor-framework \
284                       -I../../../adaptors/common \
285                       -I../../../adaptors/base/interfaces \
286                       -I../../../adaptors/ \
287                       -I../../../text \
288                       -I../../../text/dali/internal/libunibreak
289
290 if WAYLAND
291 libdali_adaptor_la_includes += -I../../../adaptors/integration-api/wayland
292
293 if USE_ECORE_WAYLAND
294 libdali_adaptor_la_includes += \
295                       -I../../../adaptors/ecore/common \
296                       -I../../../adaptors/ecore/wayland
297 else
298 libdali_adaptor_la_includes += -I../../../adaptors/wayland \
299                                -I../../../adaptors/wayland/imf \
300                                -I../../../adaptors/wayland/clipboard
301 endif # USE_ECORE_WAYLADN
302
303 libdali_adaptor_la_includes += \
304                       -I../../../adaptors/tizen
305 else
306 libdali_adaptor_la_includes += \
307                       -I../../../adaptors/ecore/common \
308                       -I../../../adaptors/x11 \
309                       -I../../../adaptors/integration-api/x11
310 endif # WAYLAND
311
312 if UBUNTU_PROFILE
313 libdali_adaptor_la_includes += \
314                       -I../../../adaptors/ubuntu
315 else
316 libdali_adaptor_la_includes += \
317                       -I../../../adaptors/tizen
318 endif
319
320 daliDefaultThemeDir  = ${dataReadWriteDir}/theme/
321 daliShaderbinCacheDir = ${dataReadOnlyDir}/core/shaderbin/
322
323 libdali_adaptor_la_CXXFLAGS = \
324                       -DDALI_DATA_RW_DIR="\"${daliReadWriteDir}\"" \
325                       -DDALI_DATA_RO_DIR="\"${daliReadOnlyDir}\"" \
326                       -DDALI_DEFAULT_FONT_CACHE_DIR="\"${daliDefaultFontCacheDir}\"" \
327                       -DDALI_USER_FONT_CACHE_DIR="\"${daliUserFontCacheDir}\"" \
328                       -DDALI_SHADERBIN_DIR="\"${daliShaderbinCacheDir}\"" \
329                       -DDALI_DEFAULT_THEME_DIR="\"${daliDefaultThemeDir}\"" \
330                       -DFONT_PRELOADED_PATH="\"${fontPreloadedPath}\"" \
331                       -DFONT_DOWNLOADED_PATH="\"${fontDownloadedPath}\"" \
332                       -DFONT_APPLICATION_PATH="\"${fontApplicationPath}\"" \
333                       -DFONT_CONFIGURATION_FILE="\"${fontConfigurationFile}\"" \
334                       -DNON_POWER_OF_TWO_TEXTURES \
335                       -DDALI_COMPILATION -DDALI_ADAPTOR_COMPILATION \
336                       -Werror -Wall -lgcc \
337                       $(libdali_adaptor_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                       $(UTILX_CFLAGS)
354
355 # Todo, as soon as common repos are updated on build server remove this.
356 if !COMMON_PROFILE
357 libdali_adaptor_la_CXXFLAGS += -DWAYLAND_EXTENSIONS_SUPPORTED
358 endif
359
360 libdali_adaptor_la_CFLAGS = $(libdali_adaptor_la_CXXFLAGS)
361
362 libdali_adaptor_la_LIBADD = \
363                       $(DALICORE_LIBS) \
364                       $(OPENGLES20_LIBS) \
365                       $(FREETYPE_LIBS) \
366                       $(FONTCONFIG_LIBS) \
367                       $(PNG_LIBS) \
368                       $(DLOG_LIBS) \
369                       $(VCONF_LIBS) \
370                       $(EXIF_LIBS) \
371                       $(TTS_LIBS) \
372                       $(LIBDRM_LIBS) \
373                       $(LIBEXIF_LIBS) \
374                       $(LIBCURL_LIBS) \
375                       $(HARFBUZZ_LIBS) \
376                       $(TPKP_CURL_LIBS) \
377                       $(UTILX_LIBS) \
378                       -lgif \
379                       -lpthread \
380                       -lturbojpeg \
381                       -ljpeg
382
383 if USE_EFL
384 # EVAS used indicator
385 libdali_adaptor_la_CXXFLAGS += $(ELEMENTARY_CFLAGS) \
386                                $(EVAS_CFLAGS) \
387                                $(ECORE_CFLAGS) \
388                                $(ECORE_IPC_CFLAGS) \
389                                $(ELDBUS_CFLAGS) \
390                                -DUSE_EFL
391
392
393 libdali_adaptor_la_LIBADD += $(ELEMENTARY_LIBS) \
394                              $(ECORE_IPC_LIBS) \
395                              $(ELDBUS_LIBS)
396
397 endif
398
399 if USE_APPFW
400
401 libdali_adaptor_la_CXXFLAGS += $(CAPI_APPFW_APPLICATION_CFLAGS) \
402                                $(CAPI_SYSTEM_SYSTEM_SETTINGS_CFLAGS) \
403                                $(CAPI_SYSTEM_INFO_CFLAGS) \
404                                $(TTS_CFLAGS) \
405                                $(SENSOR_CFLAGS)
406
407 libdali_adaptor_la_LIBADD += $(CAPI_APPFW_APPLICATION_LIBS) \
408                              $(CAPI_SYSTEM_SYSTEM_SETTINGS_LIBS) \
409                              $(CAPI_SYSTEM_INFO_LIBS) \
410                              $(TTS_LIBS) \
411                              $(SENSOR_LIBS)
412
413 endif
414 if WAYLAND
415 # This is to avoid having to include wayland-egl.h everywhere
416 libdali_adaptor_la_CXXFLAGS += -DWL_EGL_PLATFORM
417 libdali_adaptor_la_CXXFLAGS += $(WAYLAND_CFLAGS)
418 libdali_adaptor_la_LIBADD += $(WAYLAND_LIBS)
419 else
420 libdali_adaptor_la_CXXFLAGS += $(X11_CFLAGS)
421 libdali_adaptor_la_LIBADD += $(X11_LIBS)
422 libdali_adaptor_la_LIBADD += $(ECORE_X_LIBS)
423 endif
424
425 if COMMON_PROFILE
426 libdali_adaptor_la_CXXFLAGS += $(HAPTIC_CFLAGS)
427 endif
428
429 if MOBILE_PROFILE
430 libdali_adaptor_la_CXXFLAGS += \
431                       $(DEVICED_CFLAGS) \
432                       $(EFL_ASSIST_CFLAGS) \
433                       $(NATIVE_BUFFER_CFLAGS) \
434                       $(NATIVE_BUFFER_POOL_CFLAGS)
435
436 libdali_adaptor_la_LIBADD += \
437                       $(EFL_ASSIST_LIBS) \
438                       $(NATIVE_BUFFER_LIBS) \
439                       $(NATIVE_BUFFER_POOL_LIBS)
440 endif
441
442 if WEARABLE_PROFILE
443 libdali_adaptor_la_CXXFLAGS += \
444                       $(HAPTIC_CFLAGS) \
445                       $(EFL_ASSIST_CFLAGS)
446 endif
447
448 if TV_PROFILE
449 libdali_adaptor_la_CXXFLAGS += $(HAPTIC_CFLAGS)
450 libdali_adaptor_la_LIBADD +=
451 endif
452
453 if UBUNTU_PROFILE
454 libdali_adaptor_la_LIBADD += -ljpeg
455 CFLAGS += -fPIC
456 endif
457
458 if !UBUNTU_PROFILE
459 if WAYLAND
460 else
461 # X11
462 libdali_adaptor_la_CXXFLAGS += $(UTILX_CFLAGS)
463 libdali_adaptor_la_LIBADD += $(UTILX_LIBS)
464 endif
465 endif
466
467 tizenadaptorpublicapidir = $(devincludepath)/dali/public-api
468 tizenadaptorpublicapi_HEADERS = $(public_api_header_files)
469
470 tizenadaptordevelapidir= $(devincludepath)/dali/devel-api
471
472 tizenadaptorintegrationapidir = $(devincludepath)/dali/integration-api/adaptors
473 tizenadaptorintegrationapi_HEADERS = $(adaptor_integration_api_header_files)
474
475 if WAYLAND
476 tizenadaptorintegrationwaylandapidir = $(devincludepath)/dali/integration-api/adaptors
477 tizenadaptorintegrationwaylandapi_HEADERS = $(adaptor_integration_wayland_api_header_files)
478 else
479 tizenadaptorintegrationx11apidir = $(devincludepath)/dali/integration-api/adaptors
480 tizenadaptorintegrationx11api_HEADERS = $(adaptor_integration_x11_api_header_files)
481 endif
482
483 tizenadaptorframeworkpublicapidir = $(tizenadaptorpublicapidir)/adaptor-framework
484 tizenadaptorframeworkpublicapi_HEADERS = $(public_api_adaptor_framework_header_files)
485
486 tizenadaptorframeworkdevelapidir = $(tizenadaptordevelapidir)/adaptor-framework
487 tizenadaptorframeworkdevelapi_HEADERS = $(devel_api_adaptor_framework_header_files)
488
489 tizentextabstractiondevelapidir = $(tizenadaptordevelapidir)/text-abstraction
490 tizentextabstractiondevelapi_HEADERS = $(text_abstraction_header_files)
491
492 if !UBUNTU_PROFILE
493 tizenadaptorframeworkpublicapi_HEADERS += $(public_api_adaptor_tizen_header_files)
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.la
549 linker_test_LDADD = \
550   $(DALICORE_LIBS) \
551   $(VCONF_LIBS) \
552   libdali-adaptor.la \
553   $(HARFBUZZ_LIBS) \
554   -L${prefix}/lib