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.
9 SRCDIR = $(CURDIR)/../..
15 include $(BUILDDIR)/Makefile.config
17 CXXFLAGS = $(CXXFLAGS_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_server \
31 LEGACY_CLIENTPROGS = \
35 xmlrpc_sample_add_client \
36 sample_add_client_complex \
41 ifeq ($(ENABLE_ABYSS_SERVER),yes)
42 PROGS += $(SERVERPROGS_ABYSS)
45 ifeq ($(MUST_BUILD_CLIENT),yes)
46 PROGS += $(CLIENTPROGS) $(LEGACY_CLIENTPROGS)
49 INCLUDES = $(shell $(XMLRPC_C_CONFIG) c++2 client abyss-server --cflags)
51 LDADD_SERVER_ABYSS = \
52 $(shell $(XMLRPC_C_CONFIG) c++2 abyss-server --ldadd)
55 $(shell $(XMLRPC_C_CONFIG) c++2 client --ldadd)
58 $(shell $(XMLRPC_C_CONFIG) c++2 --ldadd)
60 LDADD_LEGACY_CLIENT = \
61 $(shell $(XMLRPC_C_CONFIG) c++ client --ldadd)
65 $(SERVERPROGS_ABYSS):%:%.o
66 $(CXXLD) -o $@ $(LDFLAGS) $^ $(LDADD_SERVER_ABYSS)
68 $(LEGACY_CLIENTPROGS):%:%.o
69 $(CXXLD) -o $@ $(LDFLAGS) $^ $(LDADD_LEGACY_CLIENT)
72 $(CXXLD) -o $@ $(LDFLAGS) $^ $(LDADD_CLIENT)
75 $(CXX) -c $(INCLUDES) $(CXXFLAGS) $<
77 *.c: config.h xmlrpc_amconfig.h
80 $(LN_S) $(BUILDDIR)/xmlrpc_config.h $@
82 $(LN_S) $(BUILDDIR)/$@ .
84 include $(SRCDIR)/Makefile.common
88 rm -f $(PROGS) config.h xmlrpc_amconfig.h
95 # We don't do dependencies in this directory, because it's supposed to be
96 # an example of what a program outside this package would do, so we can't
97 # go weaving it into the rest of the package. Ergo, a developer must
98 # carefully clean and remake examples as he updates other parts of the tree.