summaryrefslogtreecommitdiff
path: root/src/examples/efl_mono
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@samsung.com>2018-07-18 17:55:09 -0400
committerStefan Schmidt <s.schmidt@samsung.com>2018-08-03 13:09:22 +0200
commit310d6d972dbe9f323dd3783158608687b52b6bca (patch)
treeac5b27d299e562071697bae3f77b6363c6fd66db /src/examples/efl_mono
parentab1fd96363b630df1f5b3cb145eade3466b74b75 (diff)
build: move src/examples/ to a single makefile
this greatly improves build times by improving parallelizing, though it does introduce more BUILT_SOURCES usage which causes builds with cxx bindings to take significantly longer fix T7157 ref T7154 Differential Revision: https://phab.enlightenment.org/D6633
Diffstat (limited to 'src/examples/efl_mono')
-rw-r--r--src/examples/efl_mono/Makefile.am125
1 files changed, 0 insertions, 125 deletions
diff --git a/src/examples/efl_mono/Makefile.am b/src/examples/efl_mono/Makefile.am
deleted file mode 100644
index 7d3f02a..0000000
--- a/src/examples/efl_mono/Makefile.am
+++ /dev/null
@@ -1,125 +0,0 @@
1MAINTAINERCLEANFILES = Makefile.in
2
3include $(top_srcdir)/src/Makefile_Eolian_Helper.am
4include $(top_srcdir)/src/Makefile_Eolian_Mono_Helper.am
5include $(top_srcdir)/src/Makefile_Efl_Mono_MSBuild_Gen_Helper.am
6
7# Eolian_Files_Helper
8# Thus we need to override it here in order to make its pattern
9# rules work properly.
10_EOLIAN_GEN_DEP = ../../bin/eolian/eolian_gen${EXEEXT}
11
12SRCS = example_numberwrapper.c
13EXTRA_FILES = example_numberwrapper.eo
14EXTRA_PROGRAMS =
15GENERATED =
16CLEANFILES =
17
18if HAVE_CSHARP
19
20# Simple object used by the examples
21
22EOLIAN_FLAGS := $(EOLIAN_FLAGS)
23EOLIAN_FLAGS += \
24-I$(srcdir) \
25-I$(top_srcdir)/src/lib/eo \
26-I$(top_srcdir)/src/lib/efl
27
28COMMON_FLAGS = \
29@EINA_CFLAGS@ @EINA_LDFLAGS@ \
30-L$(top_builddir)/src/lib/eina/.libs -leina \
31@EO_CFLAGS@ @EO_LDFLAGS@ \
32-L$(top_builddir)/src/lib/eo/.libs -leo \
33@EFL_CFLAGS@ @EFL_LDFLAGS@ \
34-L$(top_builddir)/src/lib/efl/.libs -lefl
35
36if HAVE_WIN32
37COMMON_FLAGS += \
38@EVIL_CFLAGS@ @EVIL_LDFLAGS@ \
39@EFL_WINDOWS_VERSION_CFLAGS@ \
40-L$(top_builddir)/src/lib/evil/.libs -levil
41else
42COMMON_FLAGS += \
43-fPIC -DPIC
44endif
45
46example_numberwrapper.c: example_numberwrapper.eo.h example_numberwrapper.eo.c
47
48noinst_lib_LTLIBRARIES = libexample_numberwrapper.la
49noinst_libdir = $(abs_top_builddir)
50
51libexample_numberwrapper_la_SOURCES = example_numberwrapper.c
52libexample_numberwrapper_la_LDFLAGS = -shared @EFL_LTMODULE_FLAGS@
53libexample_numberwrapper_la_CFLAGS = $(COMMON_FLAGS) -DEFL_BETA_API_SUPPORT
54
55GENERATED += example_numberwrapper.eo.h example_numberwrapper.eo.c EoInherit01$(EXEEXT).config
56
57# CSharp examples
58
59EXTRA_PROGRAMS += \
60EoInherit01 \
61FunctionPointer01
62
63example_numberwrapper.eo.cs: example_numberwrapper.eo
64 $(AM_V_EOLMONO) \
65 $(EOLIAN_MONO) $(EOLIAN_FLAGS) $(EOLIAN_MONO_FLAGS) --dllimport example_numberwrapper -o $@ -r $(top_builddir)/src/bindings/mono/efl_mono/efl_libs.csv $<
66
67EoInherit01_SOURCES = EoInherit01.cs
68#EoInherit01_files = $(EoInherit01_exe_srcs) example_numberwrapper.eo.cs
69EoInherit01$(EXEEXT): $(EoInherit01_SOURCES) $(am_dirstamp) $(top_builddir)/src/lib/efl_mono/libefl_mono.dll libexample_numberwrapper.la EoInherit01$(EXEEXT).config example_numberwrapper.eo.cs
70 @rm -f $@
71 $(AM_V_MCS) $(MCS) $(MCSFLAGS) -r:$(abs_top_builddir)/src/lib/efl_mono/libefl_mono.dll -out:$@ $(filter %.cs, $(^))
72
73EoInherit01.csproj: $(EoInherit01_SOURCES) $(am_dirstamp) libexample_numberwrapper.la
74 @rm -f $@
75 $(EFL_MONO_MSBUILD_GEN) $(MSBUILD_GEN_FLAGS) -o $@ -a EoInherit01$(EXEEXT) -r libefl_mono.dll -t exe $(patsubst %.cs,src/examples/efl_mono/%.cs,$(filter %.cs, $(^)))
76
77EoInherit01$(EXEEXT).config:
78 echo "<configuration>" > $@
79 echo " <dllmap dll=\"example_numberwrapper\" target=\"$(abs_top_builddir)/src/examples/efl_mono/.libs/libexample_numberwrapper.so\"/>" >> $@
80 echo " <dllmap dll=\"efl_mono\" target=\"$(abs_top_builddir)/src/lib/efl_mono/libefl_mono.dll\"/>" >> $@
81 echo " <runtime>" >> $@
82 echo " <assemblyBinding xmlns=\"urn:schemas-microsoft-com:asm.v1\">" >> $@
83 echo " <probing privatePath=\"$(abs_top_builddir)/src/lib/efl_mono\" />" >> $@
84 echo " </assemblyBinding>" >> $@
85 echo " </runtime>" >> $@
86 echo "</configuration>" >> $@
87
88FunctionPointer01_SOURCES = FunctionPointer01.cs
89FunctionPointer01$(EXEEXT): $(FunctionPointer01_SOURCES) $(am_dirstamp) $(top_builddir)/src/lib/efl_mono/libefl_mono.dll libexample_numberwrapper.la example_numberwrapper.eo.cs
90 @rm -f $@
91 $(AM_V_MCS) $(MCS) $(MCSFLAGS) -r:$(abs_top_builddir)/src/lib/efl_mono/libefl_mono.dll -out:$@ $(filter %.cs, $(^))
92
93FunctionPointer01.csproj: $(FunctionPointer01_SOURCES) $(am_dirstamp) libexample_numberwrapper.la
94 @rm -f $@
95 $(EFL_MONO_MSBUILD_GEN) $(MSBUILD_GEN_FLAGS) -o $@ -a FunctionPointer01$(EXEEXT) -r libefl_mono.dll -t exe $(patsubst %.cs,src/examples/efl_mono/%.cs,$(filter %.cs, $(^)))
96
97msbuildcsprojs: EoInherit01.csproj $(abs_top_builddir)/FunctionPointer01.csproj
98
99GENERATED += example_numberwrapper.eo.cs
100
101
102# Finishing
103CLEANFILES += $(GENERATED)
104endif
105
106EXTRA_DIST = $(EXTRA_FILES)
107
108examples: $(EXTRA_PROGRAMS)
109
110clean-local:
111 rm -f $(EXTRA_PROGRAMS) $(GENERATED)
112
113install-examples:
114 $(MKDIR_P) $(DESTDIR)$(datadir)/efl_mono/examples
115 cd $(srcdir) && $(install_sh_DATA) -c $(SRCS) $(EXTRA_FILES) $(DESTDIR)$(datadir)/efl_mono/examples
116
117uninstall-local:
118 for f in $(SRCS) $(EXTRA_FILES); do \
119 rm -f $(DESTDIR)$(datadir)/efl_mono/examples/$$f ; \
120 done
121
122if ALWAYS_BUILD_EXAMPLES
123noinst_PROGRAMS = $(EXTRA_PROGRAMS)
124endif
125