summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent Torri <vincent.torri@gmail.com>2009-11-03 09:27:59 +0000
committerVincent Torri <vincent.torri@gmail.com>2009-11-03 09:27:59 +0000
commita6210fef9aeee73c9988947200a88bbc3ee87512 (patch)
tree0aac47772f88af263b3a06b5d56b010cb1549e29
parentfd17f32a19a4d89086267a6accd28bbd7f3393cd (diff)
allow the amalgation stuff in edje
SVN revision: 43429
-rw-r--r--legacy/edje/configure.ac15
-rw-r--r--legacy/edje/src/lib/Makefile.am93
2 files changed, 103 insertions, 5 deletions
diff --git a/legacy/edje/configure.ac b/legacy/edje/configure.ac
index 280e756a9b..fdeef84511 100644
--- a/legacy/edje/configure.ac
+++ b/legacy/edje/configure.ac
@@ -56,6 +56,18 @@ requirement_edje=""
56 56
57### Additional options to configure 57### Additional options to configure
58 58
59AC_ARG_ENABLE([amalgamation],
60 [AC_HELP_STRING([--enable-amalgamation], [enable generation of one single file with all source code in it, helps compiler optimizations.])],
61 [if test "x${enableval}" = "xyes"; then
62 do_amalgamation="yes"
63 else
64 do_amalgamation="no"
65 fi
66 ],
67 [do_amalgamation="no"]
68)
69AM_CONDITIONAL(EDJE_AMALGAMATION, test "x${do_amalgamation}" = "xyes")
70
59AC_ARG_ENABLE([edje-cc], 71AC_ARG_ENABLE([edje-cc],
60 [AC_HELP_STRING([--disable-edje-cc], [disable building of edje_cc])], 72 [AC_HELP_STRING([--disable-edje-cc], [disable building of edje_cc])],
61 [ 73 [
@@ -322,10 +334,9 @@ echo "------------------------------------------------------------------------"
322echo 334echo
323echo "Configuration Options Summary:" 335echo "Configuration Options Summary:"
324echo 336echo
337echo " Amalgamation.........: ${do_amalgamation}"
325echo " Ecore IMF............: $have_ecore_imf" 338echo " Ecore IMF............: $have_ecore_imf"
326echo
327echo " EDJE_PROGRAM_CACHE...: $want_edje_program_cache" 339echo " EDJE_PROGRAM_CACHE...: $want_edje_program_cache"
328echo
329echo " EDJE_CALC_CACHE......: $want_edje_calc_cache" 340echo " EDJE_CALC_CACHE......: $want_edje_calc_cache"
330echo 341echo
331echo " Build binaries.......: $have_edje_cc" 342echo " Build binaries.......: $have_edje_cc"
diff --git a/legacy/edje/src/lib/Makefile.am b/legacy/edje/src/lib/Makefile.am
index 62a5bd75f1..1aa548c828 100644
--- a/legacy/edje/src/lib/Makefile.am
+++ b/legacy/edje/src/lib/Makefile.am
@@ -18,7 +18,7 @@ lib_LTLIBRARIES = libedje.la
18 18
19include_HEADERS = Edje.h Edje_Edit.h 19include_HEADERS = Edje.h Edje_Edit.h
20 20
21libedje_la_SOURCES = \ 21base_sources = \
22edje_calc.c \ 22edje_calc.c \
23edje_callbacks.c \ 23edje_callbacks.c \
24edje_data.c \ 24edje_data.c \
@@ -33,9 +33,7 @@ edje_text.c \
33edje_util.c \ 33edje_util.c \
34edje_var.c \ 34edje_var.c \
35edje_container.c \ 35edje_container.c \
36edje_container.h \
37edje_message_queue.c \ 36edje_message_queue.c \
38edje_private.h \
39edje_cache.c \ 37edje_cache.c \
40edje_match.c \ 38edje_match.c \
41edje_textblock_styles.c \ 39edje_textblock_styles.c \
@@ -45,5 +43,94 @@ edje_lua_script_only.c \
45edje_entry.c \ 43edje_entry.c \
46edje_external.c 44edje_external.c
47 45
46if EDJE_AMALGAMATION
47edje_sources_used = edje_amalgamation.c
48BUILT_SOURCES = edje_amalgamation.c
49
50edje_amalgamation.c: $(base_sources) Makefile
51 -rm -f edje_amalgamation.c
52
53 @echo "#ifdef HAVE_CONFIG_H" >> edje_amalgamation.c
54 @echo "# include \"config.h\"" >> edje_amalgamation.c
55 @echo "#endif" >> edje_amalgamation.c
56
57 @echo "#ifndef _WIN32" >> eina_amalgamation.c
58 @echo "#define _GNU_SOURCE" >> eina_amalgamation.c
59 @echo "#endif" >> eina_amalgamation.c
60
61 @echo "#ifdef HAVE_ALLOCA_H" >> edje_amalgamation.c
62 @echo "# include <alloca.h>" >> edje_amalgamation.c
63 @echo "#elif defined __GNUC__" >> edje_amalgamation.c
64 @echo "# define alloca __builtin_alloca" >> edje_amalgamation.c
65 @echo "#elif defined _AIX" >> edje_amalgamation.c
66 @echo "# define alloca __alloca" >> edje_amalgamation.c
67 @echo "#elif defined _MSC_VER" >> edje_amalgamation.c
68 @echo "# include <malloc.h>" >> edje_amalgamation.c
69 @echo "# define alloca _alloca" >> edje_amalgamation.c
70 @echo "#else" >> edje_amalgamation.c
71 @echo "# include <stddef.h>" >> edje_amalgamation.c
72 @echo "# ifdef __cplusplus" >> edje_amalgamation.c
73 @echo "#extern \"C\"" >> edje_amalgamation.c
74 @echo "# endif" >> edje_amalgamation.c
75 @echo "#void *alloca (size_t);" >> edje_amalgamation.c
76 @echo "#endif" >> edje_amalgamation.c
77
78 @echo "#include <string.h>" >> edje_amalgamation.c
79 @echo "#include <math.h>" >> edje_amalgamation.c
80 @echo "#include <time.h>" >> edje_amalgamation.c
81 @echo "#include <limits.h>" >> edje_amalgamation.c
82 @echo "#include <errno.h>" >> edje_amalgamation.c
83 @echo "#include <sys/stat.h>" >> edje_amalgamation.c
84
85 @echo "#ifndef _MSC_VER" >> edje_amalgamation.c
86 @echo "# include <unistd.h>" >> edje_amalgamation.c
87 @echo "#endif" >> edje_amalgamation.c
88
89 @echo "#ifdef HAVE_LOCALE_H" >> edje_amalgamation.c
90 @echo "# include <locale.h>" >> edje_amalgamation.c
91 @echo "#endif" >> edje_amalgamation.c
92
93 @echo "#include <lua.h>" >> edje_amalgamation.c
94 @echo "#include <lauxlib.h>" >> edje_amalgamation.c
95
96 @echo "#ifdef HAVE_EVIL" >> edje_amalgamation.c
97 @echo "# include <Evil.h>" >> edje_amalgamation.c
98 @echo "#endif" >> edje_amalgamation.c
99
100 @echo "#include <Eina.h>" >> edje_amalgamation.c
101 @echo "#include <Edje.h>" >> edje_amalgamation.c
102 @echo "#include <Evas.h>" >> edje_amalgamation.c
103 @echo "#include <Ecore.h>" >> edje_amalgamation.c
104 @echo "#include <Ecore_Str.h>" >> edje_amalgamation.c
105 @echo "#include <Ecore_Job.h>" >> edje_amalgamation.c
106 @echo "#include <Embryo.h>" >> edje_amalgamation.c
107
108 @echo "#ifdef HAVE_ECORE_IMF" >> edje_amalgamation.c
109 @echo "# include <Ecore_IMF.h>" >> edje_amalgamation.c
110 @echo "#endif" >> edje_amalgamation.c
111
112 @echo "#include <edje_private.h>" >> edje_amalgamation.c
113
114 @for f in $(base_sources); do \
115 if [ `expr substr $$f 1 1` != '/' ]; then \
116 file="$(srcdir)/$$f" ; \
117 else \
118 file="$$f" ; \
119 fi ; \
120 echo "/* file: $$file */" >> edje_amalgamation.c; \
121 grep -v -e '^# *include \+.\(config\|\|Evil\|Eina\|Eet\|Evas\|Ecore\|Ecore_Str\|Ecore_Job\|Embryo\|Ecore_IMF\|string\|math\|limits\|sys/stat\|errno\|time\|unistd\|locale\|lua\|lauxlib\|edje_private\)[.]h.*' $$file >> edje_amalgamation.c; \
122 done
123 @echo "edje_amalgamation.c generated"
124
125else
126edje_sources_used = $(base_sources)
127endif
128
129libedje_la_SOURCES = $(edje_sources_used)
48libedje_la_LIBADD = @EDJE_LIBS@ @ECORE_IMF_LIBS@ -lm 130libedje_la_LIBADD = @EDJE_LIBS@ @ECORE_IMF_LIBS@ -lm
49libedje_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -version-info @version_info@ @release_info@ 131libedje_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -version-info @version_info@ @release_info@
132
133EXTRA_DIST = edje_private.h edje_container.h
134
135clean-local:
136 @rm -rf edje_amalgamation.c