initial load of upstream version 1.06.32
[xmlrpc-c] / tools / xml-rpc-api2cpp / Makefile
1 ifeq ($(SRCDIR)x,x)
2 SRCDIR = $(CURDIR)/../..
3 endif
4 # BLDDIR is for use in places where a symbolic link won't work.
5 # BUILDDIR is for places in Makefile.common that can use the 'blddir'
6 # symbolic link (but in other directories, doesn't).
7 BLDDIR = $(SRCDIR)
8 BUILDDIR = blddir
9
10 default: all
11
12 include $(BLDDIR)/Makefile.config
13
14 include ../Makefile.common
15
16 INCLUDES = -I$(SRCDIR) -I$(SRCDIR)/include
17
18 CXXFLAGS = $(INCLUDES) $(CXXFLAGS_COMMON) $(CFLAGS_PERSONAL) $(CADD)
19
20 LDFLAGS = $(LADD)
21
22 LDLIBS = -Lblddir/src/cpp -lxmlrpc_cpp -lxmlrpc_server $(CLIENT_LDLIBS)
23
24 PROGS :=
25
26 ifeq ($(MUST_BUILD_CLIENT),yes)
27   PROGS += xml-rpc-api2cpp
28 endif
29
30 all: $(PROGS)
31
32 OBJECTS = \
33   xml-rpc-api2cpp.o \
34   DataType.o \
35   XmlRpcFunction.o \
36   XmlRpcClass.o \
37   SystemProxy.o \
38
39 xml-rpc-api2cpp: \
40   $(OBJECTS) \
41   $(LIBXMLRPC_CPP) \
42   $(LIBXMLRPC_CLIENT) \
43   $(LIBXMLRPC_SERVER) \
44   $(LIBXMLRPC) \
45   $(LIBXMLRPC_XML) \
46   $(LIBXMLRPC_UTIL)
47         $(CXXLD) -o $@ $(LDFLAGS) $(OBJECTS) $(LDLIBS)
48
49 %.o:%.cpp
50         $(CXX) -c $(CXXFLAGS) $<
51
52 # This Makefile.config dependency makes sure the symlinks get built before
53 # this make file is used for anything.
54
55 $(BLDDIR)/Makefile.config: blddir srcdir
56
57 include Makefile.depend
58
59 .PHONY: clean
60 clean: clean-common
61         rm -f xml-rpc-api2cpp
62
63 .PHONY: distclean
64 distclean: clean distclean-common
65
66 .PHONY: dep
67 dep: dep-common