8 include $(SRCDIR)/Makefile.config
10 SUBDIRS = include lib src tools examples
12 PROGRAMS_TO_INSTALL = xmlrpc-c-config
14 # We're in a transition between the bloated, complex GNU
15 # Autoconf/Automake style of build, in which 'configure' creates all
16 # the make files, to simpler static make files. Some directories have
17 # been converted; some haven't. So we have the hack of putting
18 # 'xmlrpc_config.h' as the first dependency of 'all' to make sure
19 # 'configure runs before anything in the case that the user neglects
20 # to run 'configure' before doing 'make'.
22 default: xmlrpc_config.h all
25 all: xmlrpc-c-config xmlrpc-c-config.test $(SUBDIRS:%=%/all)
27 version.h: $(BUILDDIR)/Makefile.config
29 echo '/* This file was generated by a make rule */' >>$@
30 echo '#define XMLRPC_C_VERSION "$(XMLRPC_C_VERSION)"' >>$@
32 # We don't want Makefile.common's rule for version.h
35 # We dont' want Makefile.common's rule for transport_config.h
36 OMIT_TRANSPORT_CONFIG_H = Y
38 transport_config.h: $(BUILDDIR)/Makefile.config
40 echo '/* This file was generated by a make rule */' >>$@
41 ifeq ($(MUST_BUILD_WININET_CLIENT),yes)
42 echo '#define MUST_BUILD_WININET_CLIENT 1' >>$@
44 echo '#define MUST_BUILD_WININET_CLIENT 0' >>$@
46 ifeq ($(MUST_BUILD_CURL_CLIENT),yes)
47 echo '#define MUST_BUILD_CURL_CLIENT 1' >>$@
49 echo '#define MUST_BUILD_CURL_CLIENT 0' >>$@
51 ifeq ($(MUST_BUILD_LIBWWW_CLIENT),yes)
52 echo '#define MUST_BUILD_LIBWWW_CLIENT 1' >>$@
54 echo '#define MUST_BUILD_LIBWWW_CLIENT 0' >>$@
56 echo "static const char * const XMLRPC_DEFAULT_TRANSPORT =" >>$@
57 ifeq ($(MUST_BUILD_LIBWWW_CLIENT),yes)
60 ifeq ($(MUST_BUILD_CURL_CLIENT),yes)
63 ifeq ($(MUST_BUILD_WININET_CLIENT),yes)
64 echo '"wininet";' >>$@
66 @echo 'ERROR: no client XML transport configured'; rm $@; false
71 .PHONY: clean clean-local
72 clean: $(SUBDIRS:%=%/clean) clean-common clean-local
75 rm -f transport_config.h
77 .PHONY: distclean distclean-local
78 distclean: $(SUBDIRS:%=%/distclean) distclean-common distclean-local
80 distclean-local: clean-local
81 rm -f config.log config.status Makefile.config libtool
82 rm -f xmlrpc_config.h xmlrpc_amconfig.h stamp-h
83 rm -f xmlrpc-c-config xmlrpc-c-config.test
85 check: $(SUBDIRS:%=%/check)
88 tags: $(SUBDIRS:%=%/tags) TAGS
93 distdir: distdir-common
96 install: $(SUBDIRS:%=%/install) install-common install-compat-hdr
98 .PHONY: install-compat-hdr
100 # Install old names of header files for backward compatibility
101 cd $(DESTDIR)$(HEADERINST_DIR); \
102 rm -f xmlrpc.h xmlrpc_client.h xmlrpc_server.h xmlrpc_cgi.h \
103 xmlrpc_server_abyss.h xmlrpc_abyss.h \
104 xmlrpc_server_w32httpsys.h \
106 $(LN_S) xmlrpc-c/oldxmlrpc.h xmlrpc.h; \
107 $(LN_S) xmlrpc-c/client.h xmlrpc_client.h; \
108 $(LN_S) xmlrpc-c/server.h xmlrpc_server.h; \
109 $(LN_S) xmlrpc-c/server_cgi.h xmlrpc_cgi.h; \
110 $(LN_S) xmlrpc-c/server_abyss.h xmlrpc_abyss.h; \
111 $(LN_S) xmlrpc-c/server_w32httpsys.h xmlrpc_server_w32httpsys.h; \
112 $(LN_S) xmlrpc-c/oldcppwrapper.hpp XmlRpcCpp.h ;\
115 dep: version.h $(BUILDDIR)/include/xmlrpc-c/config.h $(SUBDIRS:%=%/dep)
117 xmlrpc-c-config xmlrpc-c-config.test xmlrpc_config.h xmlrpc_amconfig.h \
118 :%:%.in $(SRCDIR)/configure
121 include $(SRCDIR)/Makefile.common