Makefile 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. ###############################################################################
  2. # This directory builds libxmlrpc_xmlparse, an XML parser. This is
  3. # essentially the separately distributed Expat library from 2001, but
  4. # with slight changes. The main reason it is bundled with Xmlrpc-c is
  5. # to make the latter easier to build and use.
  6. #
  7. # The library is about XML in general. There is nothing specific to
  8. # XML-RPC here.
  9. ###############################################################################
  10. ifeq ($(SRCDIR),)
  11. updir = $(shell echo $(dir $(1)) | sed 's/.$$//')
  12. EXPATDIR := $(call updir,$(CURDIR))
  13. LIBDIR := $(call updir,$(EXPATDIR))
  14. SRCDIR := $(call updir,$(LIBDIR))
  15. BLDDIR := $(SRCDIR)
  16. endif
  17. SUBDIR := lib/expat/xmlparse
  18. XMLTOKDIR = srcdir/lib/expat/xmltok
  19. UTILDIR = srcdir/lib/util
  20. default: all
  21. include $(BLDDIR)/config.mk
  22. TARGET_LIBRARY_NAMES := libxmlrpc_xmlparse
  23. STATIC_LIBRARIES_TO_INSTALL = libxmlrpc_xmlparse.a
  24. SHARED_LIBS_TO_BUILD := libxmlrpc_xmlparse
  25. SHARED_LIBS_TO_INSTALL := libxmlrpc_xmlparse
  26. TARGET_MODS = xmlparse
  27. OMIT_XMLPARSE_LIB_RULE=Y
  28. MAJ=3
  29. # Major number of shared libraries in this directory
  30. include $(SRCDIR)/common.mk
  31. INCLUDES = \
  32. -I$(BLDDIR) \
  33. -I$(XMLTOKDIR) \
  34. -I$(UTILDIR)/include \
  35. -Isrcdir/include \
  36. # LIBDEP is the shared libraries on which libxmlrpc_abyss depends.
  37. # The runtime loader should load these libraries when it loads libxmlrpc_abyss.
  38. LIBDEP = $(LIBXMLRPC_XMLTOK) $(LIBXMLRPC_UTIL)
  39. XMLPARSE_SHLIB = $(call shlibfn,libxmlrpc_xmlparse)
  40. #XMLPARSE_SHLIB is e.g. libxmlrpc_xmlparse.so.3.1
  41. XMLPARSE_SHLIBLE = $(call shliblefn,libxmlrpc_xmlparse)
  42. #XMLPARSE_SHLIBLE is e.g. libxmlrpc_xmlparse.so
  43. .PHONY: all
  44. all: libxmlrpc_xmlparse.a $(TARGET_SHARED_LIBRARIES) $(TARGET_SHARED_LE_LIBS)
  45. # Rule for this is in common.mk, courtesy of TARGET_LIBRARY_NAMES:
  46. $(XMLPARSE_SHLIB): $(TARGET_MODS:%=%.osh) $(LIBDEP)
  47. $(XMLPARSE_SHLIB): LIBOBJECTS = $(TARGET_MODS:%=%.osh) $(LIBDEP)
  48. # Rule for this is in common.mk, courtesy of TARGET_STATIC_LIBRARIES:
  49. libxmlrpc_xmlparse.a: $(TARGET_MODS:%=%.o)
  50. libxmlrpc_xmlparse.a: LIBOBJECTS = $(TARGET_MODS:%=%.o)
  51. #-----------------------------------------------------------------------------
  52. # RULES TO COMPILE OBJECT MODULES FOR LIBRARIES
  53. #-----------------------------------------------------------------------------
  54. # Rules to compile object modules from which to build the static and shared
  55. # library are in common.mk, courtesy of TARGET_MODS.
  56. .PHONY: install
  57. install: install-common
  58. .PHONY: clean distclean
  59. clean: clean-common
  60. distclean: clean distclean-common
  61. .PHONY: dep
  62. dep: dep-common
  63. # This 'common.mk' dependency makes sure the symlinks get built before
  64. # this make file is used for anything.
  65. $(SRCDIR)/common.mk: srcdir
  66. include depend.mk