efl: support elementary optional build
[platform/upstream/efl.git] / Makefile.am
1 ACLOCAL_AMFLAGS = -I m4
2 AM_MAKEFLAGS = --no-print-directory
3 AM_DISTCHECK_CONFIGURE_FLAGS = \
4 --with-tests=regular \
5 --with-systemdunitdir=. \
6 --enable-always-build-examples
7
8 ## TIZEN_ONLY(20180509): support elementary optional build
9 SUBDIRS = src data
10
11 if BUILD_TIZEN_EFL
12 SUBDIRS += doc
13
14 if HAVE_PO
15
16 SUBDIRS += po
17
18 endif
19 endif
20 ##
21
22 MAINTAINERCLEANFILES = \
23 Makefile.in \
24 aclocal.m4 \
25 compile \
26 config.cache-env \
27 config.guess \
28 config.h.in \
29 config.h.in~ \
30 config.sub \
31 configure \
32 depcomp \
33 install-sh \
34 ltmain.sh \
35 missing \
36 m4/libtool.m4 \
37 m4/lt~obsolete.m4 \
38 m4/ltoptions.m4 \
39 m4/ltsugar.m4 \
40 m4/ltversion.m4
41
42 EXTRA_DIST =  \
43 m4/pkg_var.m4 \
44 m4/ac_path_generic.m4 \
45 m4/ecore_check_c_extension.m4 \
46 m4/ecore_check_module.m4 \
47 m4/efl_attribute.m4 \
48 m4/efl_check_funcs.m4 \
49 m4/efl_compiler.m4 \
50 m4/efl_doxygen.m4 \
51 m4/efl_path_max.m4 \
52 m4/efl_threads.m4 \
53 m4/efl_libunwind.m4 \
54 m4/eina_check.m4 \
55 m4/eina_config.m4 \
56 m4/eio_check_options.m4 \
57 m4/evas_check_engine.m4 \
58 m4/evas_check_loader.m4 \
59 m4/evil_windows.m4 \
60 m4/libgcrypt.m4 \
61 m4/gcc_check_builtin.m4
62
63 EXTRA_DIST += \
64 README \
65 AUTHORS \
66 COPYING \
67 COMPLIANCE \
68 licenses/COPYING.LGPL \
69 licenses/COPYING.GPL \
70 licenses/COPYING.BSD \
71 licenses/COPYING.SMALL \
72 licenses/COPYING.FTL \
73 licenses/COPYING.NGINX-MIT \
74 old/ChangeLog.ecore \
75 old/ChangeLog.edje \
76 old/ChangeLog.eet \
77 old/ChangeLog.eeze \
78 old/ChangeLog.efreet \
79 old/ChangeLog.eina \
80 old/ChangeLog.eio \
81 old/ChangeLog.embryo \
82 old/ChangeLog.emotion \
83 old/ChangeLog.escape \
84 old/ChangeLog.ethumb \
85 old/ChangeLog.evas \
86 old/ChangeLog.evil \
87 old/ChangeLog.evil.0 \
88 old/NEWS.ecore \
89 old/NEWS.edje \
90 old/NEWS.eet \
91 old/NEWS.eeze \
92 old/NEWS.efreet \
93 old/NEWS.eina \
94 old/NEWS.eio \
95 old/NEWS.embryo \
96 old/NEWS.emotion \
97 old/NEWS.escape \
98 old/NEWS.ethumb \
99 old/NEWS.evas \
100 old/NEWS.evil \
101 old/README.ecore \
102 old/README.eldbus \
103 old/README.edje \
104 old/README.eet \
105 old/README.eeze \
106 old/README.efreet \
107 old/README.eina \
108 old/README.eio \
109 old/README.embryo \
110 old/README.emotion \
111 old/README.ephysics \
112 old/README.escape \
113 old/README.ethumb \
114 old/README.evas \
115 old/README.evil \
116 spec/efl.spec \
117 pkgbuild/PKGBUILD \
118 pkgbuild/efl.install
119
120 if HAVE_FREEBSD
121 pkgconfigdir = $(libdir)data/pkgconfig
122 else
123 pkgconfigdir = $(libdir)/pkgconfig
124 endif
125
126 pkgconfig_DATA =
127
128 ## TIZEN_ONLY(20180509): support elementary optional build
129 if BUILD_TIZEN_EFL
130 if HAVE_WINDOWS
131 pkgconfig_DATA += pc/evil.pc
132 endif
133
134 if HAVE_PS3
135 pkgconfig_DATA += pc/escape.pc
136 endif
137
138 pkgconfig_DATA += \
139 pc/eina.pc \
140 pc/eo.pc \
141 pc/eolian.pc \
142 pc/efl.pc \
143 pc/emile.pc \
144 pc/eet.pc \
145 pc/evas.pc \
146 pc/ecore.pc \
147 pc/efl-core.pc \
148 pc/ecore-core.pc \
149 pc/ecore-con.pc \
150 pc/efl-net.pc \
151 pc/ecore-ipc.pc \
152 pc/ecore-file.pc \
153 pc/ecore-input.pc \
154 pc/ecore-input-evas.pc \
155 pc/ecore-imf.pc \
156 pc/ecore-imf-evas.pc \
157 pc/ecore-evas.pc \
158 pc/ecore-avahi.pc \
159 pc/ector.pc \
160 pc/embryo.pc \
161 pc/eio.pc \
162 pc/eldbus.pc \
163 pc/efreet.pc \
164 pc/efreet-mime.pc \
165 pc/efreet-trash.pc \
166 pc/edje.pc \
167 pc/emotion.pc \
168 pc/ethumb.pc \
169 pc/ethumb_client.pc \
170 pc/elocation.pc \
171 pc/efl-ui.pc
172 endif
173 ##
174
175 ## TIZEN_ONLY(20180509): support elementary optional build
176 if BUILD_TIZEN_ELM
177 pkgconfig_DATA += \
178 pc/elementary.pc
179 endif
180 ##
181
182 ## TIZEN_ONLY(20180509): support elementary optional build
183 if BUILD_TIZEN_EFL
184 if HAVE_CXX
185 pkgconfig_DATA += \
186 pc/eina-cxx.pc \
187 pc/evas-cxx.pc \
188 pc/ecore-cxx.pc \
189 pc/efl-cxx.pc \
190 pc/eolian-cxx.pc \
191 pc/edje-cxx.pc \
192 pc/eet-cxx.pc \
193 pc/eo-cxx.pc \
194 pc/eio-cxx.pc \
195 pc/elementary-cxx.pc
196 endif
197
198 if HAVE_ELUA
199 pkgconfig_DATA += pc/elua.pc
200 endif
201
202 if HAVE_JS
203 pkgconfig_DATA += \
204 pc/eolian-js.pc \
205 pc/efl-js.pc \
206 pc/eo-js.pc \
207 pc/eina-js.pc
208 endif
209
210 if HAVE_CSHARP
211 pkgconfig_DATA += \
212 pc/efl-mono.pc
213 endif
214
215 if BUILD_ENGINE_SOFTWARE_X11
216 pkgconfig_DATA += pc/evas-software-x11.pc
217 endif
218
219 if BUILD_ENGINE_FB
220 pkgconfig_DATA += pc/evas-fb.pc
221 endif
222
223 if BUILD_ENGINE_EGLFS
224 pkgconfig_DATA += pc/evas-eglfs.pc
225 endif
226
227 if BUILD_ENGINE_BUFFER
228 pkgconfig_DATA += pc/evas-software-buffer.pc
229 endif
230
231 if BUILD_ENGINE_GL_X11
232 pkgconfig_DATA += pc/evas-opengl-x11.pc
233 endif
234
235 if BUILD_ENGINE_GL_SDL
236 pkgconfig_DATA += pc/evas-opengl-sdl.pc
237 endif
238
239 if BUILD_ENGINE_GL_COCOA
240 pkgconfig_DATA += pc/evas-opengl-cocoa.pc
241 endif
242
243 if BUILD_ENGINE_SOFTWARE_GDI
244 pkgconfig_DATA += pc/evas-software-gdi.pc
245 endif
246
247 if BUILD_ENGINE_SOFTWARE_DDRAW
248 pkgconfig_DATA += pc/evas-software-ddraw.pc
249 endif
250
251 if BUILD_ENGINE_WAYLAND_SHM
252 pkgconfig_DATA += pc/evas-wayland-shm.pc
253 endif
254
255 if BUILD_ENGINE_WAYLAND_EGL
256 pkgconfig_DATA += pc/evas-wayland-egl.pc
257 endif
258
259 if BUILD_ENGINE_DRM
260 pkgconfig_DATA += pc/evas-drm.pc
261 endif
262
263 if HAVE_ECORE_COCOA
264 pkgconfig_DATA += pc/ecore-cocoa.pc
265 endif
266
267 if HAVE_ECORE_FB
268 pkgconfig_DATA += pc/ecore-fb.pc
269 endif
270
271 if HAVE_ECORE_DRM
272 pkgconfig_DATA += pc/ecore-drm.pc
273 endif
274
275 if HAVE_ECORE_SDL
276 pkgconfig_DATA += pc/ecore-sdl.pc
277 endif
278
279 if HAVE_ECORE_WAYLAND
280 pkgconfig_DATA += pc/ecore-wayland.pc
281 endif
282
283 if HAVE_ECORE_WL2
284 pkgconfig_DATA += pc/ecore-wl2.pc
285 endif
286
287 if HAVE_EFL_WL
288 pkgconfig_DATA += pc/efl-wl.pc
289 endif
290
291 if HAVE_WIN32
292 pkgconfig_DATA += pc/ecore-win32.pc
293 endif
294
295 if HAVE_ECORE_X
296 pkgconfig_DATA += pc/ecore-x.pc
297 endif
298
299 if HAVE_EEZE
300 pkgconfig_DATA += pc/eeze.pc
301 endif
302
303 if HAVE_EPHYSICS
304 pkgconfig_DATA += pc/ephysics.pc
305 endif
306
307 if HAVE_ECORE_AUDIO
308 pkgconfig_DATA += pc/ecore-audio.pc pc/ecore-audio-cxx.pc
309 endif
310
311 if HAVE_ECORE_BUFFER
312 pkgconfig_DATA += pc/ecore-buffer.pc
313 endif
314
315 if HAVE_ELPUT
316 pkgconfig_DATA += pc/elput.pc
317 endif
318
319 if HAVE_ECORE_DRM2
320 pkgconfig_DATA += pc/ecore-drm2.pc
321 endif
322 endif
323 ##
324
325 # Cmake configs:
326
327 ## TIZEN_ONLY(20180509): support elementary optional build
328 if BUILD_TIZEN_EFL
329 efl_cmakeconfigdir = $(libdir)/cmake/Efl/
330 efl_cmakeconfig_DATA = \
331 cmakeconfig/EflConfig.cmake \
332 cmakeconfig/EflConfigVersion.cmake
333
334 eina_cmakeconfigdir = $(libdir)/cmake/Eina/
335 eina_cmakeconfig_DATA = \
336 cmakeconfig/EinaConfig.cmake \
337 cmakeconfig/EinaConfigVersion.cmake
338
339 eio_cmakeconfigdir = $(libdir)/cmake/Eio/
340 eio_cmakeconfig_DATA = \
341 cmakeconfig/EioConfig.cmake \
342 cmakeconfig/EioConfigVersion.cmake
343
344 eeze_cmakeconfigdir = $(libdir)/cmake/Eeze/
345 eeze_cmakeconfig_DATA = \
346 cmakeconfig/EezeConfig.cmake \
347 cmakeconfig/EezeConfigVersion.cmake
348
349 eo_cmakeconfigdir = $(libdir)/cmake/Eo/
350 eo_cmakeconfig_DATA = \
351 cmakeconfig/EoConfig.cmake \
352 cmakeconfig/EoConfigVersion.cmake
353
354 eolian_cmakeconfigdir = $(libdir)/cmake/Eolian/
355 eolian_cmakeconfig_DATA = \
356 cmakeconfig/EolianConfig.cmake \
357 cmakeconfig/EolianConfigVersion.cmake \
358 cmakeconfig/EolianHelper.cmake
359
360 eolian_cxx_cmakeconfigdir = $(libdir)/cmake/EolianCxx/
361 eolian_cxx_cmakeconfig_DATA = \
362 cmakeconfig/EolianCxxConfig.cmake \
363 cmakeconfig/EolianCxxConfigVersion.cmake
364
365 eina_cxx_cmakeconfigdir = $(libdir)/cmake/EinaCxx/
366 eina_cxx_cmakeconfig_DATA = \
367 cmakeconfig/EinaCxxConfig.cmake \
368 cmakeconfig/EinaCxxConfigVersion.cmake
369
370 eo_cxx_cmakeconfigdir = $(libdir)/cmake/EoCxx/
371 eo_cxx_cmakeconfig_DATA = \
372 cmakeconfig/EoCxxConfig.cmake \
373 cmakeconfig/EoCxxConfigVersion.cmake
374
375 ecore_cxx_cmakeconfigdir = $(libdir)/cmake/EcoreCxx/
376 ecore_cxx_cmakeconfig_DATA = \
377 cmakeconfig/EcoreCxxConfig.cmake \
378 cmakeconfig/EcoreCxxConfigVersion.cmake
379
380 evas_cxx_cmakeconfigdir = $(libdir)/cmake/EvasCxx/
381 evas_cxx_cmakeconfig_DATA = \
382 cmakeconfig/EvasCxxConfig.cmake \
383 cmakeconfig/EvasCxxConfigVersion.cmake
384
385 eet_cxx_cmakeconfigdir = $(libdir)/cmake/EetCxx/
386 eet_cxx_cmakeconfig_DATA = \
387 cmakeconfig/EetCxxConfig.cmake \
388 cmakeconfig/EetCxxConfigVersion.cmake
389
390 eet_cmakeconfigdir = $(libdir)/cmake/Eet/
391 eet_cmakeconfig_DATA = \
392 cmakeconfig/EetConfig.cmake \
393 cmakeconfig/EetConfigVersion.cmake
394
395 evas_cmakeconfigdir =  $(libdir)/cmake/Evas/
396 evas_cmakeconfig_DATA = \
397 cmakeconfig/EvasConfig.cmake \
398 cmakeconfig/EvasConfigVersion.cmake
399
400 ecore_cmakeconfigdir =  $(libdir)/cmake/Ecore/
401 ecore_cmakeconfig_DATA = \
402 cmakeconfig/EcoreConfig.cmake \
403 cmakeconfig/EcoreConfigVersion.cmake
404
405 edje_cmakeconfigdir =  $(libdir)/cmake/Edje/
406 edje_cmakeconfig_DATA = \
407 cmakeconfig/EdjeConfig.cmake \
408 cmakeconfig/EdjeConfigVersion.cmake
409
410 eldbus_cmakeconfigdir = $(libdir)/cmake/Eldbus/
411 eldbus_cmakeconfig_DATA = \
412 cmakeconfig/EldbusConfig.cmake \
413 cmakeconfig/EldbusConfigVersion.cmake
414
415 efreet_cmakeconfigdir =  $(libdir)/cmake/Efreet/
416 efreet_cmakeconfig_DATA = \
417 cmakeconfig/EfreetConfig.cmake \
418 cmakeconfig/EfreetConfigVersion.cmake
419
420 ethumb_cmakeconfigdir =  $(libdir)/cmake/Ethumb/
421 ethumb_cmakeconfig_DATA = \
422 cmakeconfig/EthumbConfig.cmake \
423 cmakeconfig/EthumbConfigVersion.cmake
424
425 ethumbclient_cmakeconfigdir =  $(libdir)/cmake/EthumbClient/
426 ethumbclient_cmakeconfig_DATA = \
427 cmakeconfig/EthumbClientConfig.cmake \
428 cmakeconfig/EthumbClientConfigVersion.cmake
429 endif
430 ##
431
432 ## TIZEN_ONLY(20180509): support elementary optional build
433 if BUILD_TIZEN_ELM
434 cmakeconfigdir = $(libdir)/cmake/Elementary
435 cmakeconfig_DATA = \
436 cmakeconfig/ElementaryConfig.cmake \
437 cmakeconfig/ElementaryConfigVersion.cmake
438 endif
439 ##
440
441 ## TIZEN_ONLY(20180509): support elementary optional build
442 if BUILD_TIZEN_EFL
443 emotion_cmakeconfigdir =  $(libdir)/cmake/Emotion/
444 emotion_cmakeconfig_DATA = \
445 cmakeconfig/EmotionConfig.cmake \
446 cmakeconfig/EmotionConfigVersion.cmake
447
448 elua_cmakeconfigdir = $(libdir)/cmake/Elua
449 elua_cmakeconfig_DATA = \
450 cmakeconfig/EluaConfig.cmake \
451 cmakeconfig/EluaConfigVersion.cmake
452
453 emile_cmakeconfigdir = $(libdir)/cmake/Emile
454 emile_cmakeconfig_DATA = \
455 cmakeconfig/EmileConfig.cmake \
456 cmakeconfig/EmileConfigVersion.cmake
457
458 # D-Bus services:
459
460 servicedir = @dbusservicedir@
461 service_DATA = \
462 dbus-services/org.enlightenment.Ethumb.service
463
464 if HAVE_SYSTEMD_USER_SESSION
465 systemdunitsdir = @USER_SESSION_DIR@
466 systemdunits_DATA = \
467 systemd-services/ethumb.service
468 endif
469 endif
470 ##
471
472 EXTRA_DIST += $(systemdunits_DATA)
473
474
475 .PHONY: doc benchmark examples install-examples
476
477 # MSBuild C Sharp projects generation:
478
479 if HAVE_CSHARP
480
481 msbuildcsprojs:
482         @$(MAKE) $(AM_MAKEFLAGS) -C src msbuildcsprojs
483
484 endif
485
486 # Documentation
487
488 doc:
489         @echo "entering doc/"
490         $(MAKE) $(AM_MAKEFLAGS) -C doc doc
491
492 # Unit tests
493
494 if EFL_ENABLE_COVERAGE
495
496 lcov-reset:
497         @rm -rf $(abs_top_builddir)/coverage
498         @find $(abs_top_builddir) -name "*.gcda" -delete
499         @lcov --zerocounters --directory $(abs_top_builddir)
500
501 lcov-baseline:
502         $(MKDIR_P) $(abs_top_builddir)/coverage
503         lcov --capture --initial --compat-libtool --no-external --output-file $(abs_top_builddir)/coverage/coverage-baseline.info --directory $(abs_top_builddir) --config-file .lcov-config
504
505 lcov-report: lcov-baseline
506         lcov --capture --compat-libtool --no-external --output-file $(abs_top_builddir)/coverage/coverage-check.info --directory $(abs_top_builddir) --config-file .lcov-config
507         lcov --no-external --compat-libtool --add-tracefile $(abs_top_builddir)/coverage/coverage-baseline.info --add-tracefile $(abs_top_builddir)/coverage/coverage-check.info --output-file $(abs_top_builddir)/coverage/coverage.info --config-file .lcov-config
508         lcov --no-external --compat-libtool --remove $(abs_top_builddir)/coverage/coverage.info \
509           '*.h' '*/tests/*' '*NONE*' '*/doc/*' '*usr/include*' '*/bin*' '*/edje_external*' \
510           '*/generic/*' '*/modules/*' '*/static_libs/*' \
511           --output-file $(abs_top_builddir)/coverage/coverage.cleaned.info --config-file .lcov-config
512         genhtml --config-file .lcov-config --legend -t "$(PACKAGE_STRING)" -o $(abs_top_builddir)/coverage/html $(abs_top_builddir)/coverage/coverage.cleaned.info
513         @echo "Coverage Report at $(abs_top_builddir)/coverage/html"
514
515 endif
516
517 if EFL_ENABLE_TESTS
518
519 lcov-check:
520 if EFL_ENABLE_COVERAGE
521         @$(MAKE) $(AM_MAKEFLAGS) lcov-reset
522         @$(MAKE) $(AM_MAKEFLAGS) lcov-baseline
523 endif
524         @$(MAKE) $(AM_MAKEFLAGS) check
525 if EFL_ENABLE_COVERAGE
526         @$(MAKE) $(AM_MAKEFLAGS) lcov-report
527 endif
528
529 check-build:
530         @$(MAKE) $(AM_MAKEFLAGS) -C src check-build
531 endif
532
533 # benchmark
534
535 benchmark:
536         @$(MAKE) $(AM_MAKEFLAGS) -C src benchmark
537         $(MKDIR_P) benchmark
538         @cd benchmark && ../src/benchmarks/eo/eo_bench$(EXEEXT) `date +%F_%s`
539
540 # examples
541
542 examples:
543         @$(MAKE) $(AM_MAKEFLAGS) -C src examples
544
545 install-examples:
546         @$(MAKE) $(AM_MAKEFLAGS) -C src install-examples
547
548 pkgbuild::
549         @echo "making arch packages"
550         makepkg -f -p $(top_builddir)/pkgbuild/PKGBUILD
551
552 # cleaning
553
554 clean-local:
555         rm -rf benchmark coverage
556
557 DISTCLEANFILES= \
558 ./src/lib/emile/Makefile \
559 ./src/lib/eo/Makefile \
560 ./src/lib/eet/Makefile \
561 ./src/lib/ecore/Makefile \
562 ./src/lib/efl/Makefile \
563 ./src/lib/eina/Makefile \
564 ./src/lib/eio/Makefile \
565 ./src/lib/elementary/Makefile \
566 ./src/lib/ector/Makefile \
567 ./src/lib/evil/Makefile \
568 ./src/lib/edje/Makefile \
569 ./src/lib/efl/Efl_Config.h \
570 ./src/lib/eina/eina_config.h