Makefile 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  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/xml-rpc-api2cpp
  8. default: all
  9. include $(BLDDIR)/config.mk
  10. PROGS := xml-rpc-api2cpp
  11. PROGRAMS_TO_INSTALL := $(PROGS)
  12. MAN_FILES_TO_INSTALL := xml-rpc-api2cpp.1
  13. all: $(PROGS)
  14. include $(SRCDIR)/tools/common.mk
  15. # <sstream.h> in Glibc 2.2 has a bug that results in inlining failure,
  16. # so we disable warnings for that:
  17. CFLAGS_LOCAL = -Wno-inline
  18. INCLUDES = -I$(BLDDIR) -I$(BLDDIR)/include -Isrcdir/include
  19. LDFLAGS = $(LADD)
  20. LDLIBS = -L$(BLDDIR)/src/cpp -lxmlrpc_cpp -L$(BLDDIR)/src -lxmlrpc_server \
  21. $(CLIENT_LDLIBS)
  22. OBJECTS = \
  23. xml-rpc-api2cpp.o \
  24. DataType.o \
  25. XmlRpcFunction.o \
  26. XmlRpcClass.o \
  27. SystemProxy.o \
  28. xml-rpc-api2cpp: \
  29. $(OBJECTS) \
  30. $(LIBXMLRPC_CPP) \
  31. $(LIBXMLRPC_CLIENT) \
  32. $(LIBXMLRPC_SERVER) \
  33. $(LIBXMLRPC) \
  34. $(LIBXMLRPC_XML) \
  35. $(LIBXMLRPC_UTIL)
  36. $(CXXLD) -o $@ $(LDFLAGS) $(OBJECTS) $(LDLIBS)
  37. %.o:%.cpp
  38. $(CXX) -c $(CXXFLAGS_ALL) $<
  39. # This common.mk dependency makes sure the symlinks get built before
  40. # this make file is used for anything.
  41. $(SRCDIR)/tools/common.mk: srcdir blddir
  42. include depend.mk
  43. .PHONY: clean
  44. clean: clean-common
  45. rm -f $(PROGS)
  46. .PHONY: distclean
  47. distclean: clean distclean-common
  48. .PHONY: dep
  49. dep: dep-common