2
0

Makefile 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. ###############################################################################
  2. # This directory builds libxmlrpc_xmltok, an XML token 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/xmltok
  18. include $(BLDDIR)/config.mk
  19. # I can't figure out what XML_BYTE_ORDER is, but it doesn't look like the
  20. # code has ever defined it. That means it's treated like 0 in #if. Since
  21. # we started using the Gcc -Wundef option, that generates a warning, so
  22. # se set it explicitly to 0 here.
  23. CFLAGS_LOCAL = -DXML_BYTE_ORDER=0
  24. # -I. is necessary when blddir != srcdir
  25. INCLUDES = -I. -I$(BLDDIR) -Isrcdir/lib/util/include -Isrcdir/include
  26. default: all
  27. TARGET_LIBRARY_NAMES := libxmlrpc_xmltok
  28. STATIC_LIBRARIES_TO_INSTALL = libxmlrpc_xmltok.a
  29. SHARED_LIBS_TO_BUILD := libxmlrpc_xmltok
  30. SHARED_LIBS_TO_INSTALL := libxmlrpc_xmltok
  31. TARGET_MODS = xmltok xmlrole
  32. OMIT_XMLTOK_LIB_RULE = Y
  33. MAJ=3
  34. # Major number of shared libraries in this directory
  35. include $(SRCDIR)/common.mk
  36. # This 'common.mk' dependency makes sure the symlinks get built before
  37. # this make file is used for anything.
  38. $(SRCDIR)/common.mk: srcdir blddir
  39. XMLTOK_SHLIB = $(call shlibfn,libxmlrpc_xmltok)
  40. #XMLTOK_SHLIB is e.g. libxmlrpc_xmltok.so.3.1
  41. XMLTOK_SHLIBLE = $(call shliblefn,libxmlrpc_xmltok)
  42. #XMLTOK_SHLIBLE is e.g. libxmlrpc_xmltok.so
  43. .PHONY: all
  44. all: libxmlrpc_xmltok.a $(TARGET_SHARED_LIBRARIES) $(TARGET_SHARED_LE_LIBS)
  45. # Rule for this is in common.mk, courtesy of TARGET_LIBRARY_NAMES
  46. $(XMLTOK_SHLIB): $(TARGET_MODS:%=%.osh)
  47. $(XMLTOK_SHLIB): LIBOBJECTS = $(TARGET_MODS:%=%.osh)
  48. # Rule for this is in common.mk, courtesy of TARGET_STATIC_LIBRARIES:
  49. libxmlrpc_xmltok.a: $(TARGET_MODS:%=%.o)
  50. libxmlrpc_xmltok.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: clean
  57. clean: clean-common
  58. rm -f nametab.h
  59. .PHONY: distclean
  60. distclean: clean distclean-common
  61. .PHONY: tags
  62. tags: TAGS
  63. .PHONY: distdir
  64. distdir:
  65. .PHONY: install
  66. install: install-common
  67. .PHONY: dep
  68. dep: dep-common
  69. GENNMTAB = ../gennmtab/gennmtab
  70. nametab.h: $(GENNMTAB)
  71. rm -f $@
  72. $(GENNMTAB) >$@
  73. $(GENNMTAB):
  74. $(MAKE) -C $(dir $@) $(notdir $@)
  75. xmltok.o xmltok.osh: nametab.h xmltok_impl.c
  76. include depend.mk