efl: support elementary optional build
[platform/upstream/efl.git] / src / Makefile.am
1 AUTOMAKE_OPTIONS= -Wno-portability
2 MAINTAINERCLEANFILES = Makefile.in
3 CLEANFILES =
4 BUILT_SOURCES =
5
6 EOLIAN_FLAGS = -I$(srcdir)
7 EOLIAN_GEN_FLAGS = -S
8
9 LOG_COMPILER = dbus-run-session
10 AM_LOG_FLAGS = --
11
12 DIST_SUBDIRS =
13 SUBDIRS =
14
15 AM_TESTS_ENVIRONMENT =
16
17 lib_LTLIBRARIES =
18 bin_PROGRAMS =
19 bin_SCRIPTS =
20 noinst_PROGRAMS =
21 check_PROGRAMS =
22 TESTS =
23 EXTRA_DIST2 =
24
25 noinst_LTLIBRARIES =
26 noinst_DATA =
27 noinst_HEADERS =
28
29 GENERATED_JS_BINDINGS =
30 GENERATED_LUA_BINDINGS =
31
32 EFL_INSTALL_EXEC_HOOK=
33
34 ## TIZEN_ONLY(20180508): support elementary optional build
35 if BUILD_TIZEN_EFL
36 include Makefile_Evil.am
37 include Makefile_Escape.am
38
39 include Makefile_Eina.am
40 include Makefile_Eo.am
41 include Makefile_Efl.am
42 include Makefile_Emile.am
43 include Makefile_Eet.am
44 include Makefile_Eolian.am
45 include Makefile_Ector.am
46 include Makefile_Ecore.am
47 include Makefile_Evas.am
48 include Makefile_Eldbus.am
49 include Makefile_Ecore_Con.am
50 include Makefile_Ecore_Ipc.am
51 include Makefile_Ecore_File.am
52 include Makefile_Eeze.am
53 include Makefile_Ecore_Input.am
54 include Makefile_Ecore_Input_Evas.am
55 include Makefile_Ecore_Cocoa.am
56 include Makefile_Ecore_FB.am
57 include Makefile_Ecore_SDL.am
58 include Makefile_Ecore_Wayland.am
59 include Makefile_Ecore_Wl2.am
60 include Makefile_Ecore_Win32.am
61 include Makefile_Ecore_X.am
62 include Makefile_Ecore_IMF.am
63 include Makefile_Ecore_IMF_Evas.am
64 include Makefile_Elput.am
65 include Makefile_Ecore_Drm.am
66 include Makefile_Ecore_Drm2.am
67 include Makefile_Ecore_Evas.am
68 include Makefile_Ecore_Audio.am
69 include Makefile_Ecore_Avahi.am
70 include Makefile_Embryo.am
71 include Makefile_Efreet.am
72 include Makefile_Eio.am
73 include Makefile_Ecore_Buffer.am
74 include Makefile_EPhysics.am
75 include Makefile_Edje.am
76 include Makefile_Emotion.am
77 include Makefile_Ethumb.am
78 include Makefile_Ethumb_Client.am
79 include Makefile_Elocation.am
80 include Makefile_efl_wl.am
81 endif
82 ##
83
84 ## TIZEN_ONLY(20180508): support elementary optional build
85 if BUILD_TIZEN_ELM
86 include Makefile_Eolian_Helper.am
87 include Makefile_Elua_Helper.am
88 include Makefile_Edje_Helper.am
89 include Makefile_Eet_Helper.am
90 include Makefile_Elementary_Tizen.am
91 include Makefile_Elementary.am
92 endif
93 ##
94
95 ## TIZEN_ONLY(20180508): support elementary optional build
96 if BUILD_TIZEN_EFL
97 include Makefile_Cxx.am
98 include Makefile_Eolian_Cxx.am
99 include Makefile_Efl_Mono.am
100
101 include Makefile_Elua.am
102 endif
103 ##
104
105 include Makefile_Wayland_Protocols.am
106
107 if HAVE_JS
108 AM_V_CP = $(am__v_CP_@AM_V@)
109 am__v_CP_ = $(am__v_CP_@AM_DEFAULT_V@)
110 am__v_CP_0 = @echo "  CP  " $@;
111 CP = cp
112 if EFL_ENABLE_TESTS
113 if HAVE_NODEJS
114 AM_TESTS_ENVIRONMENT += NODE_PATH='$(abs_builddir)/bin/efl_js:$(abs_builddir)/tests/eolian_js:$(abs_builddir)/tests/efl_js'; export NODE_PATH;
115 endif
116 endif
117 endif
118
119 ## TIZEN_ONLY(20180508): support elementary optional build
120 #include Makefile_Eolian_Js.am
121 #include Makefile_Efl_Js.am
122 ##
123
124 .PHONY: benchmark examples
125
126 BENCHMARK_SUBDIRS = \
127 benchmarks/eina \
128 benchmarks/eo \
129 benchmarks/evas
130 DIST_SUBDIRS += $(BENCHMARK_SUBDIRS)
131
132 benchmark: all
133         @for d in $(BENCHMARK_SUBDIRS); do \
134            echo "Making benchmark in $$d"; \
135            $(MAKE) $(AM_MAKEFLAGS) -C $$d benchmark; \
136         done
137
138 EXAMPLES_SUBDIRS = \
139 examples/eina \
140 examples/eet \
141 examples/evas \
142 examples/ecore \
143 examples/ecore_avahi \
144 examples/eio \
145 examples/eldbus \
146 examples/ephysics \
147 examples/edje \
148 examples/emotion \
149 examples/emile \
150 examples/elocation \
151 examples/ethumb_client \
152 examples/eina_cxx \
153 examples/eolian_cxx \
154 examples/efl_mono \
155 examples/elementary
156
157 if HAVE_ELUA
158 EXAMPLES_SUBDIRS += examples/elua
159 endif
160
161 if ALWAYS_BUILD_EXAMPLES
162 SUBDIRS += . $(EXAMPLES_SUBDIRS)
163 endif
164
165 DIST_SUBDIRS += $(EXAMPLES_SUBDIRS)
166
167 if EFL_ENABLE_TESTS
168 check-build: all
169         @$(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS)
170 endif
171
172 examples: all
173         @for d in $(EXAMPLES_SUBDIRS); do \
174            echo "Making examples in $$d"; \
175            $(MAKE) $(AM_MAKEFLAGS) -C $$d examples || exit 1; \
176         done
177
178 install-examples:
179         @for d in $(EXAMPLES_SUBDIRS); do \
180            echo "Making install-examples in $$d"; \
181            $(MAKE) $(AM_MAKEFLAGS) -C $$d install-examples || exit 1; \
182         done
183
184 dist-hook:
185         @mkdir -p $(distdir)/tests/elua/data/apps $(distdir)/tests/eolian/data
186         @mkdir -p $(distdir)/tests/evas/images $(distdir)/tests/evas/meshes
187         @mkdir -p $(distdir)/tests/evas/fonts
188         @mkdir -p $(distdir)/tests/efreet/data $(distdir)/tests/edje/data
189         @mkdir -p $(distdir)/tests/emotion/data $(distdir)/tests/evas/meshes/md2
190         @mkdir -p $(distdir)/tests/evas/meshes/obj $(distdir)/tests/efreet/data/sub
191         @mkdir -p $(distdir)/tests/efl_mono
192         @mkdir -p $(distdir)/scripts/eina $(distdir)/scripts/elua/modules
193         @mkdir -p $(distdir)/scripts/elua/core $(distdir)/scripts/elua/apps/docgen
194         @mkdir -p $(distdir)/lib/evas/common/evas_op_add $(distdir)/lib/evas/common/evas_op_copy
195         @mkdir -p $(distdir)/lib/evas/common/evas_op_mask $(distdir)/lib/evas/common/evas_op_mul
196         @mkdir -p $(distdir)/lib/evas/common/evas_op_sub $(distdir)/lib/evas/filters/blur
197         @mkdir -p $(distdir)/static_libs/http-parser/contrib $(distdir)/bindings/luajit/eina
198         @mkdir -p $(distdir)/wayland_protocol $(distdir)/lib/efl_wl/
199         @mkdir -p $(distdir)/modules/evas/engines/software_generic/filters/blur
200         @mkdir -p $(distdir)/bindings/mono/ecore_evas_mono
201         @mkdir -p $(distdir)/bindings/mono/efl_mono
202         @mkdir -p $(distdir)/bindings/mono/eina_mono
203         @mkdir -p $(distdir)/bindings/mono/eldbus_mono
204         @mkdir -p $(distdir)/bindings/mono/eo_mono
205         for F in $(EXTRA_DIST2); do cp -f $(srcdir)/$$F $(distdir)/$$F; done
206
207 clean-local:
208         find . -type f -name '*.gcno' -delete
209         find . -type f -name '*.gcda' -delete
210         find . -type f -name check-results*.xml -delete
211         rm -f $(GENERATED_JS_BINDINGS)
212         rm -f $(GENERATED_LUA_BINDINGS)
213         rm -f $(BUILT_SOURCES)
214
215 install-exec-hook:
216         $(MKDIR_P) $(DESTDIR)$(libdir)
217         for i in $(lib_LTLIBRARIES); do \
218            FNAME="$(DESTDIR)$(libdir)/`echo $$i | sed "s#lib/.*/##"`"; \
219            FNAMEEXT="$$FNAME.$$$$"; \
220            sed "s/-luuid//" $$FNAME > $$FNAMEEXT; \
221            mv $$FNAMEEXT $$FNAME; \
222         done
223         $(EFL_INSTALL_EXEC_HOOK)
224
225 #At the bottom because .SECONDEXPANSION is applied to all following rules.
226 if HAVE_WAYLAND_SCANNER
227 #Stolen from weston's Makefile.am and modified for Enlightenment
228 .SECONDEXPANSION:
229
230 define protostability
231 $(if $(findstring unstable,$1),unstable,stable)
232 endef
233
234 define protoname
235 $(shell echo $1 | sed 's/\([a-z\-]\+\)-[a-z]\+-v[0-9]\+/\1/')
236 endef
237
238 #rules for generating protocol from wayland_protocols
239 %-protocol.c : $(WAYLAND_PROTOCOLS_DATADIR)/$$(call protostability,$$*)/$$(call protoname,$$*)/$$*.xml
240         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) code < $< > $@
241
242 %-server-protocol.h : $(WAYLAND_PROTOCOLS_DATADIR)/$$(call protostability,$$*)/$$(call protoname,$$*)/$$*.xml
243         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) server-header < $< > $@
244
245 %-client-protocol.h : $(WAYLAND_PROTOCOLS_DATADIR)/$$(call protostability,$$*)/$$(call protoname,$$*)/$$*.xml
246         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) client-header < $< > $@
247
248 #rules for generating local protocols which must be in src/wayland_protocol
249 %-protocol.c : $(top_srcdir)/src/wayland_protocol/$(notdir $$*).xml
250         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) code < $< > $@
251
252 %-server-protocol.h : $(top_srcdir)/src/wayland_protocol/$(notdir $$*).xml
253         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) server-header < $< > $@
254
255 %-client-protocol.h : $(top_srcdir)/src/wayland_protocol/$(notdir $$*).xml
256         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) client-header < $< > $@
257
258 #End of weston stuff
259 endif