initial load of upstream version 1.06.32
[xmlrpc-c] / lib / libutil / Makefile
1 ###############################################################################
2 # This directory builds libxmlrpc_util, which contains utility
3 # functions that are used by the Xmlprc-c # libraries, and also
4 # directly by Xmlrpc-c programs.
5 #
6 # The functions in this library are characterized by being general purpose
7 # programming functions, such as one might wish were in the standard C
8 # library, which have nothing in particular to do with XML-RPC.
9 ###############################################################################
10
11 ifeq ($(SRCDIR)x,x)
12 SRCDIR = $(CURDIR)/../..
13 endif
14 SUBDIR = lib/libutil
15 # BLDDIR is for use in places where a symbolic link won't work.
16 # BUILDDIR is for places in Makefile.common that can use the 'blddir'
17 # symbolic link (but in other directories, doesn't).
18 BLDDIR = ../..
19 BUILDDIR = blddir
20 VPATH = .:$(SRCDIR)
21
22 include $(BLDDIR)/Makefile.config
23
24 default: all
25
26 all: libxmlrpc_util.la
27
28 LIBXMLRPC_UTIL_OBJS = \
29   casprintf.lo \
30   error.lo \
31   make_printable.lo \
32   memblock.lo \
33   resource.lo \
34   sleep.lo \
35
36 INCLUDES = -Iblddir -I$(SRCDIR) \
37            -Isrcdir/include -Isrcdir/lib/util/include
38
39 LDFLAGS = $(LADD)
40
41 LIBLDFLAGS = $(LDFLAGS_VERSINFO) -rpath $(LIBINST_DIR) $(LADD)
42
43 libxmlrpc_util.la: $(LIBXMLRPC_UTIL_OBJS)
44         $(LIBTOOL) --mode=link $(CCLD) -o $@ $(LIBLDFLAGS) $^
45
46 CFLAGS = $(CFLAGS_COMMON) $(CFLAGS_PERSONAL) $(CADD)
47
48 $(LIBXMLRPC_UTIL_OBJS):%.lo:%.c
49         $(LIBTOOL) --mode=compile $(CC) -c $(INCLUDES) $(CFLAGS) $<
50
51 LTLIBRARIES_TO_INSTALL = libxmlrpc_util.la
52
53 .PHONY: install
54 install: install-common
55
56 .PHONY: clean distclean
57 clean: clean-common
58
59 distclean: clean distclean-common
60
61 .PHONY: dep
62 dep: dep-common
63
64 # This 'Makefile.common' dependency makes sure the symlinks get built before
65 # this make file is used for anything.
66
67 $(SRCDIR)/Makefile.common: srcdir blddir
68
69 include $(SRCDIR)/Makefile.common
70
71 include Makefile.depend