svn update: 48539 (latest:48959)
[framework/uifw/eet.git] / src / lib / Makefile.am
1
2 MAINTAINERCLEANFILES = Makefile.in
3
4 AM_CPPFLAGS = \
5 -I. \
6 -I$(top_srcdir)/src/lib \
7 -I$(top_builddir)/src/lib \
8 -DPACKAGE_BIN_DIR=\"$(bindir)\" \
9 -DPACKAGE_LIB_DIR=\"$(libdir)\" \
10 -DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \
11 @EVIL_CFLAGS@ \
12 @EINA_CFLAGS@ \
13 @EET_CPPFLAGS@ \
14 @EFL_EET_BUILD@ \
15 @EFL_COVERAGE_CFLAGS@ \
16 @OPENSSL_CFLAGS@ \
17 @GNUTLS_CFLAGS@
18
19 include_HEADERS = Eet.h
20
21 lib_LTLIBRARIES = libeet.la
22
23 base_sources = \
24 eet_lib.c \
25 eet_data.c \
26 eet_image.c \
27 eet_cipher.c \
28 eet_dictionary.c \
29 eet_node.c \
30 eet_utils.c \
31 eet_connection.c
32
33 if EET_AMALGAMATION
34 nodist_libeet_la_SOURCES = eet_amalgamation.c
35
36 eet_amalgamation.c: $(base_sources) Makefile
37         -rm -f eet_amalgamation.c
38
39         @echo "#ifdef HAVE_CONFIG_H" >> eet_amalgamation.c
40         @echo "# include \"config.h\"" >> eet_amalgamation.c
41         @echo "#endif" >> eet_amalgamation.c
42
43         @echo "#ifdef HAVE_ALLOCA_H" >> eet_amalgamation.c
44         @echo "# include <alloca.h>" >> eet_amalgamation.c
45         @echo "#elif defined __GNUC__" >> eet_amalgamation.c
46         @echo "# define alloca __builtin_alloca" >> eet_amalgamation.c
47         @echo "#elif defined _AIX" >> eet_amalgamation.c
48         @echo "# define alloca __alloca" >> eet_amalgamation.c
49         @echo "#elif defined _MSC_VER" >> eet_amalgamation.c
50         @echo "# include <malloc.h>" >> eet_amalgamation.c
51         @echo "# define alloca _alloca" >> eet_amalgamation.c
52         @echo "#else" >> eet_amalgamation.c
53         @echo "# include <stddef.h>" >> eet_amalgamation.c
54         @echo "# ifdef __cplusplus" >> eet_amalgamation.c
55         @echo "#extern \"C\"" >> eet_amalgamation.c
56         @echo "# endif" >> eet_amalgamation.c
57         @echo "#void *alloca (size_t);" >> eet_amalgamation.c
58         @echo "#endif" >> eet_amalgamation.c
59
60         @echo "#include <stdio.h>" >> eet_amalgamation.c
61         @echo "#include <string.h>" >> eet_amalgamation.c
62         @echo "#include <math.h>" >> eet_amalgamation.c
63         @echo "#include <ctype.h>" >> eet_amalgamation.c
64         @echo "#include <limits.h>" >> eet_amalgamation.c
65         @echo "#include <sys/types.h>" >> eet_amalgamation.c
66         @echo "#include <sys/stat.h>" >> eet_amalgamation.c
67         @echo "#include <sys/mman.h>" >> eet_amalgamation.c
68         @echo "#include <setjmp.h>" >> eet_amalgamation.c
69         @echo "#include <errno.h>" >> eet_amalgamation.c
70         @echo "#include <time.h>" >> eet_amalgamation.c
71         @echo "#include <fnmatch.h>" >> eet_amalgamation.c
72         @echo "#include <fcntl.h>" >> eet_amalgamation.c
73
74         @echo "#ifdef _WIN32" >> eet_amalgamation.c
75         @echo "# include <winsock2.h>" >> eet_amalgamation.c
76         @echo "#endif" >> eet_amalgamation.c
77
78         @echo "#ifndef _MSC_VER" >> eet_amalgamation.c
79         @echo "# include <unistd.h>" >> eet_amalgamation.c
80         @echo "#endif" >> eet_amalgamation.c
81
82         @echo "#ifdef HAVE_NETINET_IN_H" >> eet_amalgamation.c
83         @echo "# include <netinet/in.h>" >> eet_amalgamation.c
84         @echo "#endif" >> eet_amalgamation.c
85
86         @echo "#ifdef HAVE_GNUTLS" >> eet_amalgamation.c
87         @echo "# include <gnutls/gnutls.h>" >> eet_amalgamation.c
88         @echo "# include <gcrypt.h>" >> eet_amalgamation.c
89         @echo "#endif" >> eet_amalgamation.c
90
91         @echo "#ifdef HAVE_OPENSSL" >> eet_amalgamation.c
92         @echo "# include <openssl/err.h>" >> eet_amalgamation.c
93         @echo "# include <openssl/evp.h>" >> eet_amalgamation.c
94         @echo "# include <openssl/sha.h>" >> eet_amalgamation.c
95         @echo "#endif" >> eet_amalgamation.c
96
97         @echo "#ifdef HAVE_SIGNATURE" >> eet_amalgamation.c
98         @echo "# ifdef HAVE_GNUTLS" >> eet_amalgamation.c
99         @echo "#  include <gnutls/gnutls.h>" >> eet_amalgamation.c
100         @echo "#  include <gnutls/x509.h>" >> eet_amalgamation.c
101         @echo "# else" >> eet_amalgamation.c
102         @echo "#  include <openssl/rsa.h>" >> eet_amalgamation.c
103         @echo "#  include <openssl/objects.h>" >> eet_amalgamation.c
104         @echo "#  include <openssl/err.h>" >> eet_amalgamation.c
105         @echo "#  include <openssl/ssl.h>" >> eet_amalgamation.c
106         @echo "#  include <openssl/dh.h>" >> eet_amalgamation.c
107         @echo "#  include <openssl/dsa.h>" >> eet_amalgamation.c
108         @echo "#  include <openssl/evp.h>" >> eet_amalgamation.c
109         @echo "#  include <openssl/x509.h>" >> eet_amalgamation.c
110         @echo "#  include <openssl/pem.h>" >> eet_amalgamation.c
111         @echo "# endif" >> eet_amalgamation.c
112         @echo "#endif" >> eet_amalgamation.c
113
114         @echo "#ifdef HAVE_CIPHER" >> eet_amalgamation.c
115         @echo "# ifdef HAVE_GNUTLS" >> eet_amalgamation.c
116         @echo "#  include <gnutls/x509.h>" >> eet_amalgamation.c
117         @echo "#  include <gcrypt.h>" >> eet_amalgamation.c
118         @echo "# else" >> eet_amalgamation.c
119         @echo "#  include <openssl/evp.h>" >> eet_amalgamation.c
120         @echo "#  include <openssl/hmac.h>" >> eet_amalgamation.c
121         @echo "#  include <openssl/rand.h>" >> eet_amalgamation.c
122         @echo "# endif" >> eet_amalgamation.c
123         @echo "#endif" >> eet_amalgamation.c
124
125         @echo "#include <zlib.h>" >> eet_amalgamation.c
126         @echo "#include <jpeglib.h>" >> eet_amalgamation.c
127
128         @echo "#ifdef HAVE_EVIL" >> eet_amalgamation.c
129         @echo "# include <Evil.h>" >> eet_amalgamation.c
130         @echo "#endif" >> eet_amalgamation.c
131
132         @echo "#include <Eet.h>" >> eet_amalgamation.c
133
134         @echo "#include \"Eet_private.h\"" >> eet_amalgamation.c
135         @echo "#include \"Eet.h\"" >> eet_amalgamation.c
136
137         @for f in $(base_sources); do \
138            if [ `echo $$f | sed -e 's/^...\(.\).*/\1/'` != '/' ]; then \
139                   file="$(srcdir)/$$f" ; \
140            else \
141                   file="$$f" ; \
142            fi ; \
143            echo "/* file: $$file */" >> eet_amalgamation.c; \
144            grep -v -e '^# *include \+.\(config\|\|Evil\|Eina\|stdio\|string\|math\|ctype\|limits\|sys/types\|sys/stat\|sys/mman\|setjmp\|errno\|time\|fnmatch\|fcntl\|winsock2\|unistd\|netinet/in\|gnutls/gnutls\|gcrypt\|gnutls/x509\|openssl/rsa\|openssl/objects\|openssl/err\|openssl/ssl\|openssl/dh\|openssl/dsa\|openssl/evp\|openssl/pem\|openssl/sha\|openssl/hmac\|openssl/x509\|openssl/rand\|zlib\|jpeglib\|Eet_private\|Eet\)[.]h.*' $$file >> eet_amalgamation.c; \
145         done
146         @echo "eet_amalgamation.c generated"
147
148 else
149 libeet_la_SOURCES = $(base_sources)
150 endif
151
152 libeet_la_CFLAGS = @EET_CFLAGS@ @DEBUG_CFLAGS@ @EFL_PTHREAD_CFLAGS@
153 libeet_la_LIBADD = @GNUTLS_LIBS@ @OPENSSL_LIBS@ @EFL_COVERAGE_LIBS@ @EET_LIBS@ @EINA_LIBS@ @EVIL_LIBS@ -lz -ljpeg -lm
154 libeet_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -version-info @version_info@ @release_info@ @EFL_PTHREAD_LIBS@
155
156 EXTRA_DIST = Eet_private.h
157
158 clean-local:
159         @rm -rf *.gcno eet_amalgamation.c