2
0

Makefile 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. ifeq ($(SRCDIR),)
  2. updir = $(shell echo $(dir $(1)) | sed 's/.$$//')
  3. TOOLSDIR := $(call updir,$(CURDIR))
  4. SRCDIR := $(call updir,$(TOOLSDIR))
  5. BLDDIR := $(SRCDIR)
  6. endif
  7. SUBDIR := tools/xmlrpc_transport
  8. default: all
  9. include $(BLDDIR)/config.mk
  10. PROGRAMS_TO_INSTALL = xmlrpc_transport
  11. include $(SRCDIR)/tools/common.mk
  12. INCLUDES = \
  13. -I$(BLDDIR) \
  14. -I$(BLDDIR)/include \
  15. -Isrcdir/include \
  16. -Isrcdir/lib/util/include
  17. LDFLAGS = $(LADD)
  18. all: xmlrpc_transport
  19. UTIL_OBJS = \
  20. casprintf.o \
  21. cmdline_parser.o \
  22. getoptx.o \
  23. stripcaseeq.o \
  24. string_parser.o \
  25. UTILS = $(UTIL_OBJS:%=$(UTIL_DIR)/%)
  26. LIBS = $(LIBXMLRPC_CLIENT) $(LIBXMLRPC) $(LIBXMLRPC_XML) $(LIBXMLRPC_UTIL)
  27. xmlrpc_transport:%:%.o $(LIBS) $(UTILS)
  28. $(CCLD) -o $@ $(LDFLAGS) $< $(CLIENT_LDLIBS) $(UTILS)
  29. %.o:%.c
  30. $(CC) -c $(CFLAGS_ALL) $<
  31. # This common.mk dependency makes sure the symlinks get built before
  32. # this make file is used for anything.
  33. $(SRCDIR)/tools/common.mk: srcdir blddir
  34. include depend.mk
  35. .PHONY: dep
  36. dep: dep-common
  37. .PHONY: clean
  38. clean: clean-common
  39. rm -f xmlrpc_transport config.h
  40. .PHONY: distclean
  41. distclean: clean distclean-common