1ifeq ($(SRCDIR),) 2 updir = $(shell echo $(dir $(1)) | sed 's/.$$//') 3 TOOLSDIR := $(call updir,$(CURDIR)) 4 SRCDIR := $(call updir,$(TOOLSDIR)) 5 BLDDIR := $(SRCDIR) 6endif 7SUBDIR := tools/xmlrpc 8 9default: all 10 11include $(BLDDIR)/config.mk 12 13PROGRAMS_TO_INSTALL = xmlrpc 14 15include $(SRCDIR)/tools/common.mk 16 17INCLUDES = \ 18 -I../lib/include \ 19 -Iblddir \ 20 -Iblddir/include \ 21 -Isrcdir/include \ 22 -Isrcdir/lib/util/include 23 24all: xmlrpc 25 26UTIL_OBJS = \ 27 casprintf.o \ 28 cmdline_parser.o \ 29 getoptx.o \ 30 stripcaseeq.o \ 31 string_parser.o \ 32 33UTILS = $(UTIL_OBJS:%=$(UTIL_DIR)/%) 34 35DUMPVALUE = blddir/tools/lib/dumpvalue.o 36 37XMLRPC_OBJS = xmlrpc.o $(DUMPVALUE) 38 39CLIENT_LDLIBS += $(SOCKETLIBOPT) $(THREAD_LIBS) 40 41xmlrpc: $(XMLRPC_OBJS) $(CLIENT_LIBS_DEP) $(UTILS) 42 $(CCLD) -o $@ $(LDFLAGS_ALL) $(XMLRPC_OBJS) $(UTILS) $(CLIENT_LDLIBS) 43 44%.o:%.c $(BLDDIR)/include/xmlrpc-c/config.h 45 $(CC) -c $(CFLAGS_ALL) $< 46 47# This common.mk dependency makes sure the symlinks get built before 48# this make file is used for anything. 49 50$(SRCDIR)/tools/common.mk: srcdir blddir 51 52include depend.mk 53 54.PHONY: dep 55dep: dep-common 56 57.PHONY: install 58install: install-common 59 60.PHONY: uninstall 61uninstall: uninstall-common 62 63.PHONY: clean 64clean: clean-common 65 rm -f xmlrpc 66 67.PHONY: distclean 68distclean: clean distclean-common 69