8 include $(BUILDDIR)/Makefile.config
10 ABYSS_LIBDIR = $(BUILDDIR)/lib/abyss/src/.libs
11 LIBUTIL_LIBDIR = $(BUILDDIR)/lib/libutil/.libs
17 ifeq ($(ENABLE_CPLUSPLUS),yes)
21 WININET_TRANSPORT_DIR = $(SRCDIR)/lib/wininet_transport
22 CURL_TRANSPORT_DIR = $(SRCDIR)/lib/curl_transport
23 LIBWWW_TRANSPORT_DIR = $(SRCDIR)/lib/libwww_transport
25 # TRANSPORT_OBJS is the list of modules that have to go into the client
26 # library to provide the client XML transport functions. Since there is
27 # some variability in what XML transports we can build into the client
28 # library, this is a little complicated.
30 # TRANSPORT_LIBDEP is linker -l options to declare what libraries contain
31 # things to which the transport objects refer. (like LIBxxx_LIBDEP --
36 ifeq ($(MUST_BUILD_WININET_CLIENT),yes)
37 TRANSPORT_OBJS += $(WININET_TRANSPORT_DIR)/xmlrpc_wininet_transport.lo
38 TRANSPORT_LIBDEP += $(shell wininet-config --libs)
40 ifeq ($(MUST_BUILD_CURL_CLIENT),yes)
41 TRANSPORT_OBJS += $(CURL_TRANSPORT_DIR)/xmlrpc_curl_transport.lo
42 TRANSPORT_LIBDEP += $(shell curl-config --libs)
44 ifeq ($(MUST_BUILD_LIBWWW_CLIENT),yes)
45 TRANSPORT_OBJS += $(LIBWWW_TRANSPORT_DIR)/xmlrpc_libwww_transport.lo
46 TRANSPORT_LIBDEP += $(shell libwww-config --libs)
49 ifeq ($(ENABLE_LIBXML2_BACKEND),yes)
50 LIBXML_INCLUDES = $(shell xml2-config --cflags)
51 LIBXML_LIBS = $(shell xml2-config --libs)
53 LIBXML_INCLUDES = -I$(SRCDIR)/lib/expat/xmlparse
56 ABYSS_INCLUDES = -I$(SRCDIR)/lib/abyss/src
58 ifeq ($(ENABLE_LIBXML2_BACKEND),yes)
59 XMLRPC_XML_PARSER = xmlrpc_libxml2.lo
61 XMLRPC_XML_PARSER = xmlrpc_expat.lo
64 # LIBxxx_OBJS is the list of object files that make up library libxxx.
66 # LIBxxx_LIBDEP is linker -l options to declare what libraries contain
67 # things to which the library being built refers. This information
68 # makes its way to the dynamic linker, so it knows to load the
69 # referred-to library before it loads libxxx. Note that the link command
70 # may require the necessary -L options in addition.
72 LIBXMLRPC_CLIENT_OBJS = xmlrpc_client.lo xmlrpc_client_global.lo
73 LIBXMLRPC_CLIENT_LIBDEP = -lxmlrpc_util -lxmlrpc
75 LIBXMLRPC_SERVER_OBJS = registry.lo system_method.lo
76 LIBXMLRPC_SERVER_LIBDEP = -lxmlrpc_util -lxmlrpc
78 LIBXMLRPC_SERVER_ABYSS_OBJS = xmlrpc_server_abyss.lo
79 LIBXMLRPC_SERVER_ABYSS_LIBDEP = \
80 -lxmlrpc_util -lxmlrpc_server -L$(ABYSS_LIBDIR) -lxmlrpc_abyss -lxmlrpc
82 LIBXMLRPC_SERVER_CGI_OBJS = xmlrpc_server_cgi.lo
83 LIBXMLRPC_SERVER_CGI_LIBDEP = -lxmlrpc_util -lxmlrpc_server -lxmlrpc
88 xmlrpc_builddecomp.lo \
92 $(XMLRPC_XML_PARSER) \
97 xmlrpc_authcookie.lo \
99 LIBXMLRPC_LIBDEP = -lxmlrpc_util $(LIBXML_LIBS)
101 LIB_OBJS = $(LIBXMLRPC_CLIENT_OBJS) $(LIBXMLRPC_SERVER_OBJS)
103 TRANSPORT_INCLUDES = \
104 -I$(WININET_TRANSPORT_DIR) \
105 -I$(CURL_TRANSPORT_DIR) \
106 -I$(LIBWWW_TRANSPORT_DIR) \
108 INCLUDES = -I$(BUILDDIR) -I$(SRCDIR) \
109 -I$(SRCDIR)/include -I$(SRCDIR)/lib/util/include \
110 -I$(SRCDIR)/lib/abyss/src \
111 $(TRANSPORT_INCLUDES) \
114 # People sometimes think that when the Xmlrpc-c build has been
115 # configured for no Abyss server (configure --disable-abyss), that
116 # libmxlrpc_server_abyss should not get built. But
117 # libxmlrpc_server_abyss is not part of the Abyss server; it is merely
118 # some code that exploits an Abyss server, and you don't need to have a
119 # built Abyss server to build it.
121 TARGET_LTLIBRARIES = libxmlrpc.la libxmlrpc_server.la \
122 libxmlrpc_server_abyss.la
124 ifeq ($(MUST_BUILD_CLIENT),yes)
125 TARGET_LTLIBRARIES += libxmlrpc_client.la
128 ifeq ($(ENABLE_CGI_SERVER),yes)
129 TARGET_LTLIBRARIES += libxmlrpc_server_cgi.la
132 all: $(TARGET_LTLIBRARIES) $(SUBDIRS:%=%/all)
136 LIBPATHS = -L.libs -L$(LIBUTIL_LIBDIR)
138 LIBLDFLAGS = $(LDFLAGS_VERSINFO) -rpath $(LIBINST_DIR) $(LIBPATHS) $(LADD)
141 libxmlrpc.la: $(LIBXMLRPC_OBJS)
142 $(LIBTOOL) --mode=link $(CCLD) -o $@ $(LIBLDFLAGS) \
143 $(LIBXMLRPC_OBJS) $(LIBXMLRPC_LIBDEP)
145 libxmlrpc_client.la: $(LIBXMLRPC_CLIENT_OBJS) $(TRANSPORT_OBJS)
146 $(LIBTOOL) --mode=link $(CCLD) -o $@ $(LIBLDFLAGS) \
147 $(LIBXMLRPC_CLIENT_OBJS) $(TRANSPORT_OBJS) \
148 $(LIBXMLRPC_CLIENT_LIBDEP) $(TRANSPORT_LIBDEP) \
150 libxmlrpc_server.la: $(LIBXMLRPC_SERVER_OBJS)
151 $(LIBTOOL) --mode=link $(CCLD) -o $@ $(LIBLDFLAGS) \
152 $(LIBXMLRPC_SERVER_OBJS) $(LIBXMLRPC_SERVER_LIBDEP)
154 libxmlrpc_server_abyss.la: $(LIBXMLRPC_SERVER_ABYSS_OBJS)
155 $(LIBTOOL) --mode=link $(CCLD) -o $@ $(LIBLDFLAGS) \
156 $(LIBXMLRPC_SERVER_ABYSS_OBJS) $(LIBXMLRPC_SERVER_ABYSS_LIBDEP)
158 libxmlrpc_server_cgi.la: $(LIBXMLRPC_SERVER_CGI_OBJS)
159 $(LIBTOOL) --mode=link $(CCLD) -o $@ $(LIBLDFLAGS) \
160 $(LIBXMLRPC_SERVER_CGI_OBJS) $(LIBXMLRPC_SERVER_CGI_LIBDEP)
163 CFLAGS = $(CFLAGS_COMMON) $(CFLAGS_PERSONAL) $(CADD)
165 $(LIBXMLRPC_CLIENT_OBJS) $(LIBXMLRPC_SERVER_OBJS):%.lo:%.c
166 $(LIBTOOL) --mode=compile $(CC) -c $(INCLUDES) $(CFLAGS) $<
168 $(LIBXMLRPC_OBJS):%.lo:%.c
169 $(LIBTOOL) --mode=compile $(CC) -c $(INCLUDES) $(LIBXML_INCLUDES) \
172 $(LIBXMLRPC_SERVER_ABYSS_OBJS):%.lo:%.c
173 $(LIBTOOL) --mode=compile $(CC) -c $(INCLUDES) $(ABYSS_INCLUDES) \
176 xmlrpc_server_cgi.lo:%.lo:%.c
177 $(LIBTOOL) --mode=compile $(CC) -c $(INCLUDES) \
180 LTLIBRARIES_TO_INSTALL = $(TARGET_LTLIBRARIES)
183 $(MAKE) -C test runtests
187 install: install-common $(SUBDIRS:%=%/install)
189 .PHONY: clean clean-local distclean
190 clean: clean-common clean-local $(SUBDIRS:%=%/clean)
192 $(MAKE) -C test clean
194 distclean: clean-common clean-local distclean-common $(SUBDIRS:%=%/distclean)
197 dep: $(SUBDIRS:%=%/dep) $(BUILDDIR)/transport_config.h dep-common
199 include $(SRCDIR)/Makefile.common
201 xmlrpc_client.lo: $(BUILDDIR)/transport_config.h
203 include Makefile.depend