1 # Since the programs in this directories are examples for the user, this
2 # make file should be as ordinary as possible. It should not rely heavily
3 # on included make files or configuration parameters. It should not use
4 # libtool. Also, we don't try to build or rebuild the libraries on which
5 # these programs depend.
15 include $(BUILDDIR)/Makefile.config
17 CFLAGS = $(CFLAGS_COMMON) $(CFLAGS_PERSONAL) $(CADD)
20 # If this were a real application, working from an installed copy of
21 # Xmlrpc-c, XMLRPC_C_CONFIG would just be 'xmlrpc-c-config'. It would be
22 # found in the user's PATH.
23 XMLRPC_C_CONFIG = $(BUILDDIR)/xmlrpc-c-config.test
29 xmlrpc_sample_add_client \
30 xmlrpc_asynch_client \
33 xmlrpc_sample_add_server.cgi
37 xmlrpc_socket_server \
39 xmlrpc_sample_add_server \
40 xmlrpc_server_validatee \
45 ifeq ($(ENABLE_ABYSS_SERVER),yes)
46 PROGS += $(SERVERPROGS_ABYSS)
49 PROGS += gen_sample_add_xml
51 ifeq ($(MUST_BUILD_CLIENT),yes)
52 PROGS += $(CLIENTPROGS)
55 ifeq ($(ENABLE_CGI_SERVER),yes)
56 PROGS += $(SERVERPROGS_CGI)
59 INCLUDES = $(shell $(XMLRPC_C_CONFIG) client abyss-server --cflags)
62 $(shell $(XMLRPC_C_CONFIG) client --ldadd)
64 LDADD_SERVER_ABYSS = \
65 $(shell $(XMLRPC_C_CONFIG) abyss-server --ldadd)
68 $(shell $(XMLRPC_C_CONFIG) cgi-server --ldadd)
71 $(shell $(XMLRPC_C_CONFIG) --ldadd)
75 ifeq ($(ENABLE_CPLUSPLUS),yes)
81 $(MAKE) -C $(dir $@) $(notdir $@)
84 $(CCLD) -o $@ $(LDFLAGS) $^ $(LDADD_CLIENT)
86 $(SERVERPROGS_CGI):%.cgi:%_cgi.o
87 $(CCLD) -o $@ $(LDFLAGS) $^ $(LDADD_SERVER_CGI)
89 $(SERVERPROGS_ABYSS):%:%.o
90 $(CCLD) -o $@ $(LDFLAGS) $^ $(LDADD_SERVER_ABYSS)
92 gen_sample_add_xml:%:%.o
93 $(CCLD) -o $@ $(LDFLAGS) $^ $(LDADD_BASE)
96 $(CC) -c $(INCLUDES) $(CFLAGS) $<
98 *.c: config.h xmlrpc_amconfig.h
101 $(LN_S) $(BUILDDIR)/xmlrpc_config.h $@
103 $(LN_S) $(BUILDDIR)/$@ .
105 include $(SRCDIR)/Makefile.common
109 rm -f $(PROGS) config.h xmlrpc_amconfig.h
115 BINDIR=$(DESTDIR)$(bindir)
117 FILENAME_GENERATOR = "echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'"
119 INSTCMD = "$(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p \
120 $(BINDIR)/`$(FILENAME_GENERATOR)`"
125 $(MKINSTALLDIRS) $(BINDIR)
126 @list='$(bin_PROGRAMS)'; for p in $$list; do \
127 if test -f $$p; then \
128 echo "$(INSTCMD)"; $(INSTCMD); \
138 # We don't do dependencies in this directory, because it's supposed to be
139 # an example of what a program outside this package would do, so we can't
140 # go weaving it into the rest of the package. Ergo, a developer must
141 # carefully clean and remake examples as he updates other parts of the tree.