Makefile 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. ###############################################################################
  2. # This directory builds libxmlrpc_util, which contains utility
  3. # functions that are used by the Xmlprc-c libraries, and also
  4. # directly by Xmlrpc-c programs. Some of them are documented for use
  5. # by Xmlrpc-c users, as facilities of the libxmlrpc library (which
  6. # prerequires libxmlrpc_util).
  7. #
  8. # The functions in this library are characterized by being general purpose
  9. # programming functions, such as one might wish were in the standard C
  10. # library, which have nothing in particular to do with XML-RPC.
  11. ###############################################################################
  12. ifeq ($(SRCDIR),)
  13. updir = $(shell echo $(dir $(1)) | sed 's/.$$//')
  14. LIBDIR := $(call updir,$(CURDIR))
  15. SRCDIR := $(call updir,$(LIBDIR))
  16. BLDDIR := $(SRCDIR)
  17. endif
  18. SUBDIR := lib/libutil
  19. include $(BLDDIR)/config.mk
  20. default: all
  21. TARGET_LIBRARY_NAMES := libxmlrpc_util
  22. STATIC_LIBRARIES_TO_INSTALL = libxmlrpc_util.a
  23. SHARED_LIBS_TO_BUILD := libxmlrpc_util
  24. SHARED_LIBS_TO_INSTALL := libxmlrpc_util
  25. TARGET_MODS = \
  26. asprintf \
  27. base64 \
  28. error \
  29. make_printable \
  30. memblock \
  31. select \
  32. sleep \
  33. string_number \
  34. time \
  35. utf8 \
  36. OMIT_LIBXMLRPC_UTIL_RULE=Y
  37. MAJ=3
  38. # Major number of shared libraries in this directory
  39. include $(SRCDIR)/common.mk
  40. INCLUDES = -I$(BLDDIR) -Isrcdir \
  41. -I$(BLDDIR)/include -Isrcdir/include -Isrcdir/lib/util/include
  42. UTIL_SHLIB = $(call shlibfn,libxmlrpc_util)
  43. #UTIL_SHLIB is e.g. libxmlrpc_util.so.3.1
  44. UTIL_SHLIBLE = $(call shliblefn,libxmlrpc_util)
  45. #UTIL_SHLIBLE is e.g. libxmlrpc_util.so
  46. # This 'common.mk' dependency makes sure the symlinks get built before
  47. # this make file is used for anything.
  48. $(SRCDIR)/common.mk: srcdir blddir
  49. .PHONY: all
  50. all: libxmlrpc_util.a $(TARGET_SHARED_LIBRARIES) $(TARGET_SHARED_LE_LIBS)
  51. # Rule for this is in common.mk, courtesy of TARGET_LIBRARY_NAMES:
  52. $(UTIL_SHLIB): $(TARGET_MODS:%=%.osh)
  53. $(UTIL_SHLIB): LIBOBJECTS = $(TARGET_MODS:%=%.osh)
  54. # Rule for this is in common.mk, courtesy of TARGET_LIBRARY_NAMES:
  55. libxmlrpc_util.a: $(TARGET_MODS:%=%.o)
  56. libxmlrpc_util.a: LIBOBJECTS = $(TARGET_MODS:%=%.o)
  57. #-----------------------------------------------------------------------------
  58. # RULES TO COMPILE OBJECT MODULES FOR LIBRARIES
  59. #-----------------------------------------------------------------------------
  60. # Rules to compile object modules from which to build the static and shared
  61. # library are in common.mk, courtesy of TARGET_MODS.
  62. .PHONY: install
  63. install: install-common
  64. .PHONY: clean distclean
  65. clean: clean-common
  66. distclean: clean distclean-common
  67. .PHONY: dep
  68. dep: dep-common
  69. include depend.mk