initial load of upstream version 1.06.32
[xmlrpc-c] / lib / util / Makefile
1 ###############################################################################
2 # This directory builds object modules that provide utility functions that
3 # programs can use.  Not libraries, though -- just programs.  The reason
4 # we don't want any library to use object modules in here is that they'll
5 # probably pollute the name space when users link those libraries to their
6 # programs.  In fact, if more than one Xmlrpc-c library includes one of these
7 # modules, the libraries will conflict with each other.
8 #
9 # So a utility function that is to be used by libraries (and, optionally,
10 # programs) should go in libxmlrpc_util.  libxmlrpc_util is a prerequisite
11 # for many Xmlrpc-c libraries, gets included in a program link only once,
12 # and uses external symbol names that have the "xmlrpc_" prefix to avoid
13 # collision with users' code.
14 #
15 # If we knew a portable way to link multiple object modules into one and
16 # restrict the symbols exported by the whole, we could avoid this mess and
17 # just link utility object modules into each Xmlrpc-c library.
18 ##############################################################################
19
20 ifeq ($(SRCDIR)x,x)
21 SRCDIR = $(CURDIR)/../..
22 endif
23 SUBDIR = lib/util
24 BUILDDIR = $(SRCDIR)
25
26 default: all
27
28 include $(BUILDDIR)/Makefile.config
29
30 include $(SRCDIR)/Makefile.common
31
32 .PHONY: all
33 all: cmdline_parser.lo getoptx.lo casprintf.lo
34
35 INCLUDES = -Iinclude -I$(BUILDDIR)
36
37 CFLAGS = $(CFLAGS_COMMON) $(INCLUDES) $(CFLAGS_PERSONAL) $(CADD)
38
39 %.lo:%.c
40         $(LIBTOOL) --mode=compile $(CC) -c $(CFLAGS) $<
41
42 include Makefile.depend
43
44 .PHONY: clean distclean
45 clean: clean-common
46
47 distclean: clean distclean-common
48
49 .PHONY: dep
50 dep: dep-common
51
52 install: