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