1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66
|
ifeq ($(SRCDIR)x,x)
SRCDIR = $(CURDIR)/../..
endif
# BLDDIR is for use in places where a symbolic link won't work.
# BUILDDIR is for places in Makefile.common that can use the 'blddir'
# symbolic link (but in other directories, doesn't).
BLDDIR = $(SRCDIR)
BUILDDIR = blddir
default: all
include $(BLDDIR)/Makefile.config
PROGRAMS_TO_INSTALL = xmlrpc
include ../Makefile.common
INCLUDES = -I$(SRCDIR) -I$(SRCDIR)/include -I$(SRCDIR)/lib/util/include
CFLAGS = $(CFLAGS_COMMON) $(INCLUDES) $(CFLAGS_PERSONAL) $(CADD)
LDFLAGS = $(LADD)
all: xmlrpc
UTIL_OBJS = cmdline_parser.o getoptx.o casprintf.o
UTILS = $(UTIL_OBJS:%=$(UTIL_DIR)/%)
# These are the Libtool .la files. We use them only for make dependencies.
# We'd like to use these in the link rule, by using libtool --link, but
# Libtool adds -l options to the link to cover the dependencies that are
# recorded inside the shared libraries. And it doesn't add the necessary
# -L options (it can't), so we end up with a messy mixture of the two
# forms of specifying libraries.
LIBS = $(LIBXMLRPC_CLIENT) $(LIBXMLRPC) $(LIBXMLRPC_XML) $(LIBXMLRPC_UTIL)
XMLRPC_OBJS = xmlrpc.o dumpvalue.o
xmlrpc: $(XMLRPC_OBJS) $(LIBS) $(UTILS)
$(CCLD) -o $@ $(LDFLAGS) $(XMLRPC_OBJS) $(UTILS) $(CLIENT_LDLIBS)
%.o:%.c
$(CC) -c $(CFLAGS) $<
*.c: config.h
config.h:
$(LN_S) $(BLDDIR)/xmlrpc_config.h $@
# This Makefile.config dependency makes sure the symlinks get built before
# this make file is used for anything.
$(BLDDIR)/Makefile.config: blddir srcdir
include Makefile.depend
.PHONY: dep
dep: dep-common
.PHONY: clean
clean: clean-common
rm -f xmlrpc config.h
.PHONY: distclean
distclean: clean distclean-common
|