532cd37f020d4c204288a7e4ee5b76e0e0cddbe3
[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 slp_platform_abstraction_src_dir = ../../../platform-abstractions/slp
28 portable_platform_abstraction_src_dir = ../../../platform-abstractions/portable
29 include ../../../platform-abstractions/slp/file.list
30
31 # Text Abstraction
32 text_src_dir = ../../../text
33 include ../../../text/file.list
34
35 # Internal Common
36 adaptor_common_dir = ../../../adaptors/common
37 include ../../../adaptors/common/file.list
38
39 # Wayland
40 if WAYLAND
41 adaptor_wayland_dir = ../../../adaptors/wayland
42 include ../../../adaptors/wayland/file.list
43 else
44 # X11
45 adaptor_x11_dir = ../../../adaptors/x11
46 include ../../../adaptors/x11/file.list
47 endif
48
49 # Ubuntu
50 if UBUNTU_PROFILE
51 adaptor_ubuntu_dir = ../../../adaptors/ubuntu
52 include ../../../adaptors/ubuntu/file.list
53 else
54 # Tizen
55 adaptor_tizen_dir = ../../../adaptors/tizen
56 include ../../../adaptors/tizen/file.list
57 endif
58
59 # Mobile
60 adaptor_mobile_dir = ../../../adaptors/mobile
61 include ../../../adaptors/mobile/file.list
62
63 # TV
64 if TV_PROFILE
65 adaptor_tv_dir = ../../../adaptors/tv
66 include ../../../adaptors/tv/file.list
67 endif
68
69 # Public API
70 adaptor_public_api_dir = ../../../adaptors/public-api
71 include ../../../adaptors/public-api/file.list
72
73 # Static libraries
74 static_libraries_libunibreak_src_dir = ../../../text/dali/internal/libunibreak
75 include ../../../text/dali/internal/libunibreak/file.list
76
77 ############# source files #############
78
79 if ASSIMP_ENABLED
80 slp_platform_abstraction_src_files += $(slp_assimp_src_files)
81 else
82 slp_platform_abstraction_src_files += $(slp_assimp_stubs_src_files)
83 endif # ASSIMP_ENABLED
84
85 # COMMON
86 if COMMON_PROFILE
87
88 adaptor_internal_src_files = $(adaptor_common_internal_src_files) \
89                              $(adaptor_common_internal_default_profile_src_files) \
90                              $(adaptor_tizen_internal_src_files) \
91                              $(static_libraries_libunibreak_src_files)
92
93 if WAYLAND
94 adaptor_internal_src_files += $(adaptor_wayland_tizen_internal_src_files) \
95                               $(adaptor_wayland_internal_default_profile_src_files)
96 else
97 adaptor_internal_src_files += $(adaptor_x11_tizen_internal_src_files) \
98                               $(adaptor_x11_internal_default_profile_src_files)
99 endif # WAYLAND
100 endif # COMMON_PROFILE
101
102
103 # UBUNTU
104 if UBUNTU_PROFILE
105
106 adaptor_internal_src_files = $(adaptor_common_internal_src_files) \
107                              $(adaptor_common_internal_default_profile_src_files) \
108                              $(adaptor_ubuntu_internal_src_files) \
109                              $(adaptor_x11_ubuntu_internal_src_files) \
110                              $(adaptor_x11_internal_default_profile_src_files) \
111                              $(static_libraries_libunibreak_src_files)
112
113 endif # UBUNTU_PROFILE
114
115
116 # MOBILE
117 if MOBILE_PROFILE
118
119 adaptor_internal_src_files = $(adaptor_common_internal_src_files) \
120                              $(adaptor_common_internal_mobile_profile_src_files) \
121                              $(adaptor_tizen_internal_src_files) \
122                              $(adaptor_x11_tizen_internal_src_files) \
123                              $(static_libraries_libunibreak_src_files)
124
125 endif
126
127
128 # LITE
129 if LITE_PROFILE
130
131 adaptor_internal_src_files = $(adaptor_common_internal_src_files) \
132                              $(adaptor_common_internal_mobile_profile_src_files) \
133                              $(adaptor_tizen_internal_src_files) \
134                              $(adaptor_x11_tizen_internal_src_files) \
135                              $(static_libraries_libunibreak_src_files)
136 endif
137
138
139 # WEARABLE
140 if WEARABLE_PROFILE
141
142 adaptor_internal_src_files = $(adaptor_common_internal_src_files) \
143                              $(adaptor_common_internal_mobile_profile_src_files) \
144                              $(adaptor_tizen_internal_src_files) \
145                              $(adaptor_x11_tizen_internal_src_files) \
146                              $(static_libraries_libunibreak_src_files)
147 endif
148
149
150 # TV
151 if TV_PROFILE
152
153 adaptor_internal_src_files = $(adaptor_common_internal_src_files) \
154                              $(adaptor_common_internal_tv_profile_src_files) \
155                              $(adaptor_tizen_internal_src_files) \
156                              $(adaptor_x11_tv_internal_src_files) \
157                              $(static_libraries_libunibreak_src_files)
158 endif
159
160 # Feedback Plugin
161 if USE_FEEDBACK
162 plugin_themes_dir = ../../../adaptors/common/feedback
163 dali_plugin_theme_files = $(plugin_themes_dir)/default-feedback-theme.json
164 dalifeedbackthemedir = ${dataReadOnlyDir}/themes/feedback-themes/
165 dalifeedbacktheme_DATA = ${dali_plugin_theme_files}
166 endif
167
168 if TURBO_JPEG_IS_ON
169   slp_platform_abstraction_src_files += $(slp_turbo_jpeg_loader)
170 else
171   slp_platform_abstraction_src_files += $(slp_jpeg_loader)
172 endif
173
174 lib_LTLIBRARIES = libdali-adaptor.la
175
176 libdali_adaptor_la_SOURCES = \
177                      $(base_adaptor_src_files) \
178                      $(slp_platform_abstraction_src_files) \
179                      $(text_abstraction_src_files) \
180                      $(public_api_src_files) \
181                      $(adaptor_internal_src_files)
182
183 libdali_adaptor_la_DEPENDENCIES =
184
185 # List include directories with more platform-specific (slp) before portable root:
186 libdali_adaptor_la_includes = \
187                       -I../../.. \
188                       -I../../../platform-abstractions/slp \
189                       -I../../../platform-abstractions/slp/resource-loader \
190                       -I../../../platform-abstractions/portable \
191                       -I../../../platform-abstractions/ \
192                       -I../../../adaptors/ \
193                       -I../../../adaptors/public-api \
194                       -I../../../adaptors/public-api/adaptor-framework \
195                       -I../../../adaptors/common \
196                       -I../../../text \
197                       -I../../../text/dali/internal/libunibreak
198
199 if WAYLAND
200 libdali_adaptor_la_includes += \
201                       -I../../../adaptors/wayland
202 else
203 libdali_adaptor_la_includes += \
204                       -I../../../adaptors/x11
205 endif
206
207 if UBUNTU_PROFILE
208 libdali_adaptor_la_includes += \
209                       -I../../../adaptors/ubuntu
210 else
211 libdali_adaptor_la_includes += \
212                       -I../../../adaptors/tizen
213 endif
214
215 daliDefaultFontCacheDir = ${dataReadOnlyDir}/glyphcache/
216 daliUserFontCacheDir = ${dataReadWriteDir}/glyphcache/
217 daliDefaultThemeDir  = ${dataReadWriteDir}/theme/
218 daliUserShaderCacheDir = ${dataReadWriteDir}/core/shaderbin/
219
220 libdali_adaptor_la_CXXFLAGS = \
221                       -DDALI_DATA_RW_DIR="\"${daliReadWriteDir}\"" \
222                       -DDALI_DATA_RO_DIR="\"${daliReadOnlyDir}\"" \
223                       -DDALI_DEFAULT_FONT_CACHE_DIR="\"${daliDefaultFontCacheDir}\"" \
224                       -DDALI_USER_FONT_CACHE_DIR="\"${daliUserFontCacheDir}\"" \
225                       -DDALI_DEFAULT_THEME_DIR="\"${daliDefaultThemeDir}\"" \
226                       -DFONT_PRELOADED_PATH="\"${fontPreloadedPath}\"" \
227                       -DFONT_DOWNLOADED_PATH="\"${fontDownloadedPath}\"" \
228                       -DFONT_APPLICATION_PATH="\"${fontApplicationPath}\"" \
229                       -DFONT_CONFIGURATION_FILE_PATH="\"${fontConfigurationFilePath}\"" \
230                       -DDALI_FEEDBACK_THEME_DIR="\"${dalifeedbackthemedir}\"" \
231                       -DNON_POWER_OF_TWO_TEXTURES \
232                       -DDALI_COMPILATION -DDALI_ADAPTOR_COMPILATION \
233                       -Werror -Wall -lgcc \
234                       $(libdali_adaptor_la_includes) \
235                       $(DALI_ADAPTOR_CFLAGS) \
236                       $(DALICORE_CFLAGS) \
237                       $(OPENGLES20_CFLAGS) \
238                       $(FREETYPE_CFLAGS) \
239                       $(FONTCONFIG_CFLAGS) \
240                       $(PNG_CFLAGS) \
241                       $(CAPI_APPFW_APPLICATION_CFLAGS) \
242                       $(ELEMENTARY_CFLAGS) \
243                       $(EVAS_CFLAGS) \
244                       $(ECORE_CFLAGS) \
245                       $(ECORE_IPC_CFLAGS) \
246                       $(DLOG_CFLAGS) \
247                       $(XML_CFLAGS) \
248                       $(VCONF_CFLAGS) \
249                       $(EXIF_CFLAGS) \
250                       $(MMFSOUND_CFLAGS) \
251                       $(TTS_CFLAGS) \
252                       $(SENSOR_CFLAGS) \
253                       $(LIBDRM_CFLAGS) \
254                       $(LIBEXIF_CFLAGS) \
255                       $(LIBCURL_CFLAGS) \
256                       $(ASSIMP_CFLAGS) \
257                       $(CAPI_SYSTEM_SYSTEM_SETTINGS_CFLAGS)
258
259 libdali_adaptor_la_LIBADD = \
260                       $(DALICORE_LIBS) \
261                       $(OPENGLES20_LIBS) \
262                       $(FREETYPE_LIBS) \
263                       $(FONTCONFIG_LIBS) \
264                       $(PNG_LIBS) \
265                       $(ELEMENTARY_LIBS) \
266                       $(ECORE_IPC_LIBS) \
267                       $(DLOG_LIBS) \
268                       $(XML_LIBS) \
269                       $(VCONF_LIBS) \
270                       $(EXIF_LIBS) \
271                       $(TTS_LIBS) \
272                       $(SENSOR_LIBS) \
273                       $(LIBDRM_LIBS) \
274                       $(LIBEXIF_LIBS) \
275                       $(LIBCURL_LIBS) \
276                       $(CAPI_SYSTEM_SYSTEM_SETTINGS_LIBS) \
277                       $(CAPI_APPFW_APPLICATION_LIBS) \
278                       $(HARFBUZZ_LIBS) \
279                       -lgif \
280                       -lboost_thread
281
282 if WAYLAND
283 libdali_adaptor_la_CXXFLAGS += $(WAYLAND_CFLAGS)
284 libdali_adaptor_la_LIBADD += $(WAYLAND_LIBS)
285 else
286 libdali_adaptor_la_CXXFLAGS += $(X11_CFLAGS)
287 libdali_adaptor_la_LIBADD += $(X11_LIBS)
288 libdali_adaptor_la_LIBADD += $(ECORE_X_LIBS)
289 endif
290
291 if COMMON_PROFILE
292 libdali_adaptor_la_CXXFLAGS += $(HAPTIC_CFLAGS)
293 endif
294
295 if MOBILE_PROFILE
296 libdali_adaptor_la_CXXFLAGS += \
297                       $(DEVICED_CFLAGS) \
298                       $(EFL_ASSIST_CFLAGS) \
299                       $(NATIVE_BUFFER_CFLAGS) \
300                       $(NATIVE_BUFFER_POOL_CFLAGS)
301
302 libdali_adaptor_la_LIBADD += \
303                       $(EFL_ASSIST_LIBS) \
304                       $(NATIVE_BUFFER_LIBS) \
305                       $(NATIVE_BUFFER_POOL_LIBS)
306 endif
307
308 if LITE_PROFILE
309 libdali_adaptor_la_CXXFLAGS += $(HAPTIC_CFLAGS)
310 endif
311
312 if WEARABLE_PROFILE
313 libdali_adaptor_la_CXXFLAGS += \
314                       $(HAPTIC_CFLAGS) \
315                       $(EFL_ASSIST_CFLAGS)
316 endif
317
318 if TV_PROFILE
319 libdali_adaptor_la_CXXFLAGS += $(HAPTIC_CFLAGS)
320 libdali_adaptor_la_LIBADD +=
321 endif
322
323 if TURBO_JPEG_IS_ON
324 libdali_adaptor_la_LIBADD += -lturbojpeg
325 CFLAGS += -D_TURBO_JPEG_LOADER
326 if UBUNTU_PROFILE
327 libdali_adaptor_la_LIBADD += -ljpeg
328 CFLAGS += -fPIC
329 endif
330 else
331 libdali_adaptor_la_LIBADD += -ljpeg
332 endif
333
334 tizenadaptorpublicapidir = $(devincludepath)/dali/public-api
335 tizenadaptorpublicapi_HEADERS = $(public_api_header_files)
336
337 tizenadaptorframeworkpublicapidir = $(tizenadaptorpublicapidir)/adaptor-framework
338 tizenadaptorframeworkpublicapi_HEADERS = $(public_api_adaptor_framework_header_files)
339
340 tizentextabstractionpublicapidir = $(tizenadaptorpublicapidir)/text-abstraction
341 tizentextabstractionpublicapi_HEADERS = $(text_abstraction_header_files)
342
343 tizenadaptordaliheaderdir = $(devincludepath)/dali
344 tizenadaptordaliheader_HEADERS = $(adaptor_dali_header_file)
345
346 install-data-local:
347         $(MKDIR_P) ${DESTDIR}/${daliUserFontCacheDir} ${DESTDIR}/${daliUserShaderCacheDir}
348
349 # Install resource log analyzer script
350 bin_SCRIPTS = ../../../adaptors/scripts/dalireslog.sh
351
352 # linking test
353
354 noinst_PROGRAMS = linker.test
355
356 linker_test_SOURCES = linker-test.cpp
357
358 linker_test_CXXFLAGS = \
359   -I../../../adaptors/common \
360   -I../../../adaptors/public-api \
361   -I../../../adaptors/public-api/adaptor-framework \
362   $(DALI_ADAPTOR_CFLAGS) \
363   $(DALICORE_CFLAGS) \
364   $(VCONF_CFLAGS) \
365   $(DALIX11_CFLAGS) \
366   -Werror -Wall
367
368 linker_test_DEPENDENCIES = libdali-adaptor.la
369 linker_test_LDADD = \
370   $(DALICORE_LIBS) \
371   $(VCONF_LIBS) \
372   libdali-adaptor.la \
373   $(HARFBUZZ_LIBS) \
374   -L${prefix}/lib