2
0

Makefile 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  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_pstream
  8. READLINE_LDLIBS = -lreadline -lncurses
  9. default: all
  10. include $(BLDDIR)/config.mk
  11. PROGRAMS_TO_INSTALL = xmlrpc_pstream
  12. include $(SRCDIR)/tools/common.mk
  13. INCLUDES = \
  14. -I../lib/include \
  15. -Isrcdir/lib/util/include \
  16. -Iblddir \
  17. -Iblddir/include \
  18. -Isrcdir/include \
  19. LDFLAGS = $(LADD)
  20. all: xmlrpc_pstream
  21. OBJECTS = \
  22. xmlrpc_pstream.o \
  23. blddir/tools/lib/dumpvalue.o \
  24. LIBS = \
  25. $(LIBXMLRPC_CLIENTPP) \
  26. $(LIBXMLRPCPP) \
  27. $(LIBXMLRPC_CLIENT) \
  28. $(LIBXMLRPC) \
  29. $(LIBXMLRPC_XML) \
  30. $(LIBXMLRPC_UTIL) \
  31. LDLIBS = $(CLIENTPP_LDLIBS) $(CLIENT_LDLIBS) $(READLINE_LDLIBS)
  32. UTIL_OBJS = \
  33. casprintf.o \
  34. cmdline_parser_cpp.o \
  35. cmdline_parser.o \
  36. getoptx.o \
  37. string_parser.o \
  38. stripcaseeq.o \
  39. UTILS = $(UTIL_OBJS:%=$(UTIL_DIR)/%)
  40. xmlrpc_pstream: $(OBJECTS) $(LIBS) $(UTILS)
  41. $(CXXLD) -o $@ $(LDFLAGS) $(OBJECTS) $(UTILS) $(LDLIBS) $(LADD)
  42. %.o:%.cpp blddir/include/xmlrpc-c/config.h
  43. $(CXX) -c $(CXXFLAGS_ALL) $<
  44. # This common.mk dependency makes sure the symlinks get built before
  45. # this make file is used for anything.
  46. $(SRCDIR)/tools/common.mk: srcdir blddir
  47. include depend.mk
  48. .PHONY: clean
  49. clean: clean-common
  50. rm -f xmlrpc_pstream
  51. .PHONY: distclean
  52. distclean: clean distclean-common
  53. .PHONY: dep
  54. dep: dep-common