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 11ifeq ($(SRCDIR),) 12 updir = $(shell echo $(dir $(1)) | sed 's/.$$//') 13 EXPATDIR := $(call updir,$(CURDIR)) 14 LIBDIR := $(call updir,$(EXPATDIR)) 15 SRCDIR := $(call updir,$(LIBDIR)) 16 BLDDIR := $(SRCDIR) 17endif 18SUBDIR := lib/expat/xmlparse 19 20XMLTOKDIR = srcdir/lib/expat/xmltok 21UTILDIR = srcdir/lib/util 22 23default: all 24 25include $(BLDDIR)/config.mk 26 27TARGET_LIBRARY_NAMES := libxmlrpc_xmlparse 28 29STATIC_LIBRARIES_TO_INSTALL = libxmlrpc_xmlparse.a 30 31SHARED_LIBS_TO_BUILD := libxmlrpc_xmlparse 32SHARED_LIBS_TO_INSTALL := libxmlrpc_xmlparse 33 34TARGET_MODS = xmlparse 35 36OMIT_XMLPARSE_LIB_RULE=Y 37MAJ=3 38 # Major number of shared libraries in this directory 39 40include $(SRCDIR)/common.mk 41 42INCLUDES = \ 43 -I$(BLDDIR) \ 44 -I$(XMLTOKDIR) \ 45 -I$(UTILDIR)/include \ 46 -Isrcdir/include \ 47 48# LIBDEP is the shared libraries on which libxmlrpc_abyss depends. 49# The runtime loader should load these libraries when it loads libxmlrpc_abyss. 50 51LIBDEP = $(LIBXMLRPC_XMLTOK) $(LIBXMLRPC_UTIL) 52 53XMLPARSE_SHLIB = $(call shlibfn,libxmlrpc_xmlparse) 54#XMLPARSE_SHLIB is e.g. libxmlrpc_xmlparse.so.3.1 55XMLPARSE_SHLIBLE = $(call shliblefn,libxmlrpc_xmlparse) 56#XMLPARSE_SHLIBLE is e.g. libxmlrpc_xmlparse.so 57 58.PHONY: all 59all: libxmlrpc_xmlparse.a $(TARGET_SHARED_LIBRARIES) $(TARGET_SHARED_LE_LIBS) 60 61# Rule for this is in common.mk, courtesy of TARGET_LIBRARY_NAMES: 62$(XMLPARSE_SHLIB): $(TARGET_MODS:%=%.osh) $(LIBDEP) 63$(XMLPARSE_SHLIB): LIBOBJECTS = $(TARGET_MODS:%=%.osh) $(LIBDEP) 64 65# Rule for this is in common.mk, courtesy of TARGET_STATIC_LIBRARIES: 66 67libxmlrpc_xmlparse.a: $(TARGET_MODS:%=%.o) 68libxmlrpc_xmlparse.a: LIBOBJECTS = $(TARGET_MODS:%=%.o) 69 70#----------------------------------------------------------------------------- 71# RULES TO COMPILE OBJECT MODULES FOR LIBRARIES 72#----------------------------------------------------------------------------- 73 74# Rules to compile object modules from which to build the static and shared 75# library are in common.mk, courtesy of TARGET_MODS. 76 77.PHONY: install 78install: install-common 79 80.PHONY: uninstall 81uninstall: uninstall-common 82 83.PHONY: clean distclean 84clean: clean-common 85 86distclean: clean distclean-common 87 88.PHONY: dep 89dep: dep-common 90 91# This 'common.mk' dependency makes sure the symlinks get built before 92# this make file is used for anything. 93 94$(SRCDIR)/common.mk: srcdir 95 96include depend.mk 97