Fix the handling of soup-enum-types.h to ensure that it gets built before
[platform/upstream/libsoup.git] / libsoup / Makefile.am
1 ## Process this file with automake to produce Makefile.in
2
3 if OS_WIN32
4 LIBWS2_32 = -lws2_32
5 endif
6
7 INCLUDES =                              \
8         -DG_LOG_DOMAIN=\"libsoup\"      \
9         -I$(top_srcdir)                 \
10         $(SOUP_DEBUG_FLAGS)             \
11         $(GLIB_CFLAGS)                  \
12         $(XML_CFLAGS)                   \
13         $(LIBGCRYPT_CFLAGS)             \
14         $(LIBGNUTLS_CFLAGS)
15
16 MARSHAL_GENERATED = soup-marshal.c soup-marshal.h
17 MKENUMS_GENERATED = soup-enum-types.c soup-enum-types.h
18
19 soup-marshal.h: soup-marshal.list
20         ( $(GLIB_GENMARSHAL) --prefix=soup_marshal $(srcdir)/soup-marshal.list --header > soup-marshal.tmp \
21         && mv soup-marshal.tmp soup-marshal.h ) \
22         || ( rm -f soup-marshal.tmp && exit 1 )
23
24 soup-marshal.c: soup-marshal.h
25         ( (echo '#include "soup-marshal.h"'; $(GLIB_GENMARSHAL) --prefix=soup_marshal $(srcdir)/soup-marshal.list --body) > soup-marshal.tmp \
26         && mv soup-marshal.tmp soup-marshal.c ) \
27         || ( rm -f soup-marshal.tmp && exit 1 )
28
29 soup-enum-types.h: $(soup_headers)
30         ( cd $(srcdir) && $(GLIB_MKENUMS) --template soup-enum-types.h.tmpl \
31                 $(soup_headers) ) > soup-enum-types.h.tmp \
32         && mv soup-enum-types.h.tmp soup-enum-types.h \
33         || rm -f soup-enum-type.h.tmp
34
35 soup-enum-types.c: $(libsoupinclude_HEADERS)
36         ( cd $(srcdir) && $(GLIB_MKENUMS) --template soup-enum-types.c.tmpl \
37                 $(soup_headers) ) > soup-enum-types.c.tmp \
38         && mv soup-enum-types.c.tmp soup-enum-types.c \
39         || rm -f soup-enum-type.c.tmp
40
41 BUILT_SOURCES = $(MARSHAL_GENERATED) $(MKENUMS_GENERATED)
42
43 CLEANFILES = $(MARSHAL_GENERATED) $(MKENUMS_GENERATED)
44
45 libsoupincludedir = $(includedir)/libsoup-$(SOUP_API_VERSION)/libsoup
46
47 soup_headers =                  \
48         soup.h                  \
49         soup-address.h          \
50         soup-auth.h             \
51         soup-auth-domain.h      \
52         soup-auth-domain-basic.h  \
53         soup-auth-domain-digest.h \
54         soup-date.h             \
55         soup-form.h             \
56         soup-headers.h          \
57         soup-logger.h           \
58         soup-message.h          \
59         soup-message-body.h     \
60         soup-message-headers.h  \
61         soup-method.h           \
62         soup-misc.h             \
63         soup-portability.h      \
64         soup-server.h           \
65         soup-session.h          \
66         soup-session-async.h    \
67         soup-session-sync.h     \
68         soup-socket.h           \
69         soup-status.h           \
70         soup-types.h            \
71         soup-uri.h              \
72         soup-value-utils.h      \
73         soup-xmlrpc.h
74
75 libsoupinclude_HEADERS =        \
76         $(soup_headers)         \
77         soup-enum-types.h
78
79 lib_LTLIBRARIES = libsoup-2.4.la
80
81 libsoup_2_4_la_LDFLAGS =        \
82         -version-info $(SOUP_CURRENT):$(SOUP_REVISION):$(SOUP_AGE) -no-undefined
83
84 libsoup_2_4_la_LIBADD =                 \
85         $(GLIB_LIBS)                    \
86         $(XML_LIBS)                     \
87         $(LIBGNUTLS_LIBS_STATIC)        \
88         $(LIBGNUTLS_LIBS)               \
89         $(LIBGCRYPT_LIBS)               \
90         $(LIBWS2_32)
91
92 libsoup_2_4_la_SOURCES =                \
93         $(BUILT_SOURCES)                \
94         soup-address.c                  \
95         soup-auth.c                     \
96         soup-auth-basic.h               \
97         soup-auth-basic.c               \
98         soup-auth-digest.h              \
99         soup-auth-digest.c              \
100         soup-auth-ntlm.h                \
101         soup-auth-ntlm.c                \
102         soup-auth-domain.c              \
103         soup-auth-domain-basic.c        \
104         soup-auth-domain-digest.c       \
105         soup-auth-manager.h             \
106         soup-auth-manager.c             \
107         soup-auth-manager-ntlm.h        \
108         soup-auth-manager-ntlm.c        \
109         soup-connection.h               \
110         soup-connection.c               \
111         soup-date.c                     \
112         soup-dns.h                      \
113         soup-dns.c                      \
114         soup-form.c                     \
115         soup-gnutls.c                   \
116         soup-headers.c                  \
117         soup-logger.c                   \
118         soup-message.c                  \
119         soup-message-body.c             \
120         soup-message-client-io.c        \
121         soup-message-headers.c          \
122         soup-message-io.c               \
123         soup-message-private.h          \
124         soup-message-queue.h            \
125         soup-message-queue.c            \
126         soup-message-server-io.c        \
127         soup-method.c                   \
128         soup-misc.c                     \
129         soup-nossl.c                    \
130         soup-path-map.h                 \
131         soup-path-map.c                 \
132         soup-server.c                   \
133         soup-session.c                  \
134         soup-session-async.c            \
135         soup-session-private.h          \
136         soup-session-sync.c             \
137         soup-socket.c                   \
138         soup-ssl.h                      \
139         soup-status.c                   \
140         soup-uri.c                      \
141         soup-value-utils.c              \
142         soup-xmlrpc.c
143
144 EXTRA_DIST=                             \
145         soup-marshal.list               \
146         soup-enum-types.h.tmpl          \
147         soup-enum-types.c.tmpl