Imported Upstream version 1.7.1
[platform/upstream/edje.git] / src / lib / Makefile.am
1
2 MAINTAINERCLEANFILES = Makefile.in
3
4 AM_CPPFLAGS = \
5 -I. \
6 -I$(top_srcdir) \
7 -I$(top_srcdir)/src/bin \
8 -I$(top_srcdir)/src/lib \
9 -DPACKAGE_BIN_DIR=\"$(bindir)\" \
10 -DPACKAGE_LIB_DIR=\"$(libdir)\" \
11 -DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \
12 @EVIL_CFLAGS@ \
13 @EDJE_CFLAGS@ \
14 @ECORE_IMF_CFLAGS@ \
15 @EIO_CFLAGS@ \
16 @EFL_EDJE_BUILD@ \
17 @REMIX_CFLAGS@ \
18 @SNDFILE_CFLAGS@ 
19
20 lib_LTLIBRARIES = libedje.la
21
22 includes_HEADERS = Edje.h Edje_Edit.h
23 includesdir = $(includedir)/edje-@VMAJ@
24
25 base_sources = \
26 edje_box_layout.c \
27 edje_cache.c \
28 edje_calc.c \
29 edje_callbacks.c \
30 edje_container.c \
31 edje_data.c \
32 edje_edit.c \
33 edje_embryo.c \
34 edje_entry.c \
35 edje_external.c \
36 edje_load.c \
37 edje_lua.c \
38 edje_lua2.c \
39 edje_lua_script_only.c \
40 edje_main.c \
41 edje_match.c \
42 edje_message_queue.c \
43 edje_misc.c \
44 edje_module.c \
45 edje_multisense.c \
46 edje_program.c \
47 edje_script_only.c \
48 edje_smart.c \
49 edje_text.c \
50 edje_textblock_styles.c \
51 edje_util.c \
52 edje_var.c
53
54 if EDJE_AMALGAMATION
55 nodist_libedje_la_SOURCES = edje_amalgamation.c
56
57 edje_amalgamation.c: $(base_sources) Makefile
58         -rm -f edje_amalgamation.c
59
60         @echo "#ifdef HAVE_CONFIG_H" >> edje_amalgamation.c
61         @echo "# include \"config.h\"" >> edje_amalgamation.c
62         @echo "#endif" >> edje_amalgamation.c
63
64         @echo "#ifndef _WIN32" >> edje_amalgamation.c
65         @echo "#define _GNU_SOURCE" >> edje_amalgamation.c
66         @echo "#endif" >> edje_amalgamation.c
67
68         @echo "#ifdef HAVE_ALLOCA_H" >> edje_amalgamation.c
69         @echo "# include <alloca.h>" >> edje_amalgamation.c
70         @echo "#elif defined __GNUC__" >> edje_amalgamation.c
71         @echo "# define alloca __builtin_alloca" >> edje_amalgamation.c
72         @echo "#elif defined _AIX" >> edje_amalgamation.c
73         @echo "# define alloca __alloca" >> edje_amalgamation.c
74         @echo "#elif defined _MSC_VER" >> edje_amalgamation.c
75         @echo "# include <malloc.h>" >> edje_amalgamation.c
76         @echo "# define alloca _alloca" >> edje_amalgamation.c
77         @echo "#else" >> edje_amalgamation.c
78         @echo "# include <stddef.h>" >> edje_amalgamation.c
79         @echo "# ifdef __cplusplus" >> edje_amalgamation.c
80         @echo "#extern \"C\"" >> edje_amalgamation.c
81         @echo "# endif" >> edje_amalgamation.c
82         @echo "#void *alloca (size_t);" >> edje_amalgamation.c
83         @echo "#endif" >> edje_amalgamation.c
84
85         @echo "#include <string.h>" >> edje_amalgamation.c
86         @echo "#include <math.h>" >> edje_amalgamation.c
87         @echo "#include <time.h>" >> edje_amalgamation.c
88         @echo "#include <limits.h>" >> edje_amalgamation.c
89         @echo "#include <errno.h>" >> edje_amalgamation.c
90         @echo "#include <sys/stat.h>" >> edje_amalgamation.c
91         @echo "#include <fcntl.h>" >> edje_amalgamation.c
92
93         @echo "#ifndef _MSC_VER" >> edje_amalgamation.c
94         @echo "# include <unistd.h>" >> edje_amalgamation.c
95         @echo "#endif" >> edje_amalgamation.c
96
97         @echo "#ifdef HAVE_LOCALE_H" >> edje_amalgamation.c
98         @echo "# include <locale.h>" >> edje_amalgamation.c
99         @echo "#endif" >> edje_amalgamation.c
100
101         @echo "#include <lua.h>" >> edje_amalgamation.c
102         @echo "#include <lauxlib.h>" >> edje_amalgamation.c
103
104         @echo "#ifdef HAVE_EVIL" >> edje_amalgamation.c
105         @echo "# include <Evil.h>" >> edje_amalgamation.c
106         @echo "#endif" >> edje_amalgamation.c
107
108         @echo "#include <Eina.h>" >> edje_amalgamation.c
109         @echo "#include <Edje.h>" >> edje_amalgamation.c
110         @echo "#include <Evas.h>" >> edje_amalgamation.c
111         @echo "#include <Ecore.h>" >> edje_amalgamation.c
112         @echo "#include <Embryo.h>" >> edje_amalgamation.c
113
114         @echo "#ifdef HAVE_ECORE_IMF" >> edje_amalgamation.c
115         @echo "# include <Ecore_IMF.h>" >> edje_amalgamation.c
116         @echo "#endif" >> edje_amalgamation.c
117
118         @echo "#ifdef HAVE_EIO" >> edje_amalgamation.c
119         @echo "# include <Eio.h>" >> edje_amalgamation.c
120         @echo "#endif" >> edje_amalgamation.c
121
122         @echo "#include <edje_private.h>" >> edje_amalgamation.c
123
124         @for f in $(base_sources); do \
125            if [ `echo $$f | sed -e 's/^...\(.\).*/\1/'` != '/' ]; then \
126                   file="$(srcdir)/$$f" ; \
127            else \
128                   file="$$f" ; \
129            fi ; \
130            echo "/* file: $$file */" >> edje_amalgamation.c; \
131            grep -v -e '^# *include \+.\(config\|\|Evil\|Eina\|Eet\|Evas\|Ecore\|Embryo\|Ecore_IMF\|Eio\|string\|math\|limits\|sys/stat\|errno\|time\|unistd\|locale\|lua\|lauxlib\|edje_private\)[.]h.*' $$file >> edje_amalgamation.c; \
132         done
133         @echo "edje_amalgamation.c generated"
134
135 else
136 libedje_la_SOURCES = $(base_sources)
137 endif
138
139 libedje_la_LIBADD = @EDJE_LIBS@ @ECORE_IMF_LIBS@ @EIO_LIBS@ @EVIL_LIBS@ @REMIX_LIBS@ @SNDFILE_LIBS@ -lm
140 libedje_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -version-info @version_info@ @release_info@
141
142 EXTRA_DIST = edje_private.h edje_container.h edje_convert.h
143
144 clean-local:
145         @rm -rf *.gcno edje_amalgamation.c