#
# The Apache Software License, Version 1.1
#
# Copyright (c) 1999 The Apache Software Foundation. All rights
# reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in
# the documentation and/or other materials provided with the
# distribution.
#
# 3. The end-user documentation included with the redistribution,
# if any, must include the following acknowledgment:
# "This product includes software developed by the
# Apache Software Foundation (http://www.apache.org/)."
# Alternately, this acknowledgment may appear in the software itself,
# if and wherever such third-party acknowledgments normally appear.
#
# 4. The names "Xalan", "Xerces" and "Apache Software Foundation" must
# not be used to endorse or promote products derived from this
# software without prior written permission. For written
# permission, please contact apache\@apache.org.
#
# 5. Products derived from this software may not be called "Apache",
# nor may "Apache" appear in their name, without prior written
# permission of the Apache Software Foundation.
#
# THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
# ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
# USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
# ====================================================================
#
# This software consists of voluntary contributions made by many
# individuals on behalf of the Apache Software Foundation, and was
# originally based on software copyright (c) 1999, International
# Business Machines, Inc., http://www.ibm.com . For more information
# on the Apache Software Foundation, please see
# .
#
###################################################################
# IMPORTANT NOTE #
###################################################################
# Before you try to run the Makefile, make sure you have two #
# environment variables set. #
# #
# export XALANCROOT= #
# export XERCESCROOT= #
# #
###################################################################
DEPFILE=depends
#MACROS defining commands
MKDIR=mkdir
ifndef XALANCROOT
noxalanroot:
@echo XALANCROOT must be defined
endif
ifndef XERCESCROOT
noxercesroot:
@echo XERCESCROOT must be defined
endif
ifdef XALAN_USE_ICU
ifndef ICUROOT
ICUROOT=/usr/local
endif
ifndef ICUI18NROOT
ICUI18NROOT=${ICUROOT}
endif
endif
XALANDOM_DIR = XalanDOM
DOMSUPPORT_DIR = DOMSupport
INCLUDE_DIR = Include
ICUBRIDGE_DIR = ICUBridge
PLATFORMSUPPORT_DIR = PlatformSupport
XALANSOURCETREE_DIR = XalanSourceTree
TESTXPATH_DIR = TestXPath
TESTXSLT_DIR = TestXSLT
XMLSUPPORT_DIR = XMLSupport
XPATH_DIR = XPath
XSLT_DIR = XSLT
XALANEXTENSIONS_DIR = XalanExtensions
XERCESPARSERLIAISON_DIR = XercesParserLiaison
XALANTRANSFORMER_DIR = XalanTransformer
ALL_OBJECTS_DIR = ${XALANCROOT}/obj
LIB_DIR = ${XALANCROOT}/lib
SAMPLES_DIR = ${XALANCROOT}/samples
TESTS_DIR = ${XALANCROOT}/Tests
PROJECT_NAME = xalan-c
LIBNAME = lib${PROJECT_NAME}
THISLIB = ${LIB_DIR}/${LIBNAME}
VER = 1_2
PRODUCTNAME=xalan
PRODUCTVERSION=${VER}
BINTARGETDIR=${XALANCROOT}/bin
ALL_VPATH_CPP = \
$(XALANDOM_DIR):$(DOMSUPPORT_DIR):$(PLATFORMSUPPORT_DIR):$(XALANSOURCETREE_DIR):$(TESTXPATH_DIR):$(TESTXSLT_DIR):\
$(XMLSUPPORT_DIR):$(XPATH_DIR):$(XSLT_DIR):$(XALANEXTENSIONS_DIR):$(XALANTRANSFORMER_DIR):$(XERCESPARSERLIAISON_DIR)
# Using ICUBridge
ifdef XALAN_USE_ICU
ALL_VPATH_CPP+=:$(ICUBRIDGE_DIR)
endif
#all these setting come from the arguments passed in to runConfigure.
PLATFORM =@platform@
CC = @cc@
CXX = @cxx@
CXXFLAGS = @cxxflags@
PREFIX = @prefix@
#=============== LINUX SPECIFIC OPTIONS =========================
ifeq ($(PLATFORM), LINUX)
SUPPORTED = TRUE
PLATFORM_COMPILE_OPTIONS = -fpic -Wall -instances=static -D${PLATFORM} -D_REENTRANT
ALLLIBS = ${LIBS} -L/usr/lib
SHLIBSUFFIX=.so
# We need the ICU library if we are using the ICUBridge
ifdef XALAN_USE_ICU
LD_RPATH_PRE= -Wl,-rpath,
PLATFORM_LIB_LINK_OPTIONS=$(LD_RPATH_PRE)${ICUROOT}/lib
endif
EXTRA_LINK_OPTIONS=-lc
CC1 = $(CXX) $(CXXFLAGS) $(PLATFORM_COMPILE_OPTIONS)
MAKE_SHARED = ${CXX} $(CXXFLAGS) -D${PLATFORM} -shared -fpic
LINK = g++ -D${PLATFORM} -fpic
endif
#=============== HPUX SPECIFIC OPTIONS =========================
ifeq ($(PLATFORM), HPUX)
SUPPORTED = TRUE
PLATFORM_COMPILE_OPTIONS = +Z -D${PLATFORM} -D_THREAD_SAFE
ALLLIBS = ${LIBS}
SHLIBSUFFIX=.sl
CC1 = $(CXX) $(CXXFLAGS) $(PLATFORM_COMPILE_OPTIONS)
CC2 = $(CXX) $(PLATFORM_COMPILE_OPTIONS)
MAKE_SHARED = $(CXX) -b +Z
LINK = $(CXX) $(CXXFLAGS) $(PLATFORM_COMPILE_OPTIONS) -Wl,+s
endif
#=============== SOLARIS SPECIFIC OPTIONS =========================
ifeq ($(PLATFORM), SOLARIS)
SUPPORTED = TRUE
ifeq (${CXX}, g++)
PLATFORM_COMPILE_OPTIONS = -fPIC -instances=static -D${PLATFORM} -D_REENTRANT
ALLLIBS = ${LIBS} -L/usr/lib -L/usr/local/lib -lc
ifdef XALAN_USE_ICU
LD_RPATH_PRE= -Wl,-rpath,
endif
EXTRA_LINK_OPTIONS=-lc
CC1 = $(CXX) $(CXXFLAGS) $(PLATFORM_COMPILE_OPTIONS)
MAKE_SHARED = ${CXX} $(CXXFLAGS) -D${PLATFORM} -shared -fPIC
LINK = g++ -D${PLATFORM} -fPIC
ALLLIBS = ${LIBS} -L/usr/lib -L/usr/local/lib -lc
PLATFORM_LIB_LINK_OPTIONS=$(LD_RPATH_PRE)${ICUROOT}/lib $(LD_RPATH_PRE)${ICUI18NROOT}/lib
else
PLATFORM_COMPILE_OPTIONS = -KPIC -mt -xs -ptr$(ALL_OBJECTS_DIR) -features=rtti -D${PLATFORM} -D_REENTRANT
CC1 = $(CXX) $(CXXFLAGS) $(PLATFORM_COMPILE_OPTIONS) -I${STLPORTROOT}/stlport
MAKE_SHARED = ${CXX} -D${PLATFORM} -G -ptr$(ALL_OBJECTS_DIR) ${LDFLAGS}
MAKE_SHARED_C = ${CC} -D${PLATFORM} -G ${LDFLAGS}
LINK = ${CXX} -D${PLATFORM} -ptr$(ALL_OBJECTS_DIR) ${LDFLAGS}
ALLLIBS = -mt ${LIBS} -L/usr/local/SUNWspro/lib -L/usr/ccs/lib \
-lc -lgen
endif
SHLIBSUFFIX=.so
endif
#=============== AIX SPECIFIC OPTIONS =========================
ifeq ($(PLATFORM), AIX)
SUPPORTED = TRUE
ifeq (${CXX}, g++)
PLATFORM_COMPILE_OPTIONS = -fPIC -instances=static -D${PLATFORM} -D_REENTRANT
ALLLIBS = ${LIBS} -L/usr/lib -L/usr/local/lib -lc
ifdef XALAN_USE_ICU
LD_RPATH_PRE= -Wl,-rpath,
PLATFORM_LIB_LINK_OPTIONS=$(LD_RPATH_PRE)${ICUROOT}/lib $(LD_RPATH_PRE)${ICUI18NROOT}/lib
endif
EXTRA_LINK_OPTIONS=-lc
CC1 = $(CXX) $(CXXFLAGS) $(PLATFORM_COMPILE_OPTIONS)
MAKE_SHARED = ${CXX} $(CXXFLAGS) -D${PLATFORM} -shared -fPIC
LINK = g++ -D${PLATFORM} -fPIC
ALLLIBS = ${LIBS} -L/usr/lib -L/usr/local/lib -lc
else
ifndef STLPORTROOT
nostlportroot:
@echo STLPORTROOT must be defined
endif
PLATFORM_COMPILE_OPTIONS = -D${PLATFORM} -D_THREAD_SAFE -I${STLPORTROOT}/stlport
ALLLIBS = ${LIBS} -L/usr/lib
CC1 = $(CXX) $(CXXFLAGS) $(PLATFORM_COMPILE_OPTIONS)
CC2 = $(CXX) $(PLATFORM_COMPILE_OPTIONS)
MAKE_SHARED = makeC++SharedLib_r -p 5000
LINK = $(CXX) -qnotempinc $(CXXFLAGS) $(PLATFORM_COMPILE_OPTIONS)
endif
SHLIBSUFFIX=.a
endif
#=============== OS390 SPECIFIC OPTIONS =========================
ifeq ($(PLATFORM), OS390)
ifndef STLPORTROOT
nostlportroot:
@echo STLPORTROOT must be defined
endif
SUPPORTED = TRUE
PLATFORM_COMPILE_OPTIONS =-Wc,dll -W0,"langlvl(extended),float(ieee)" -D${PLATFORM} -D_OPEN_THREADS -D_XOPEN_SOURCE_EXTENDED -I ${STLPORTROOT}/stlport
PLATFORM_COMPILE_OPTIONS2 =-Wc,dll -W0,"langlvl(extended),notempinc,float(ieee)" -D${PLATFORM} -D_OPEN_THREADS -D_XOPEN_SOURCE_EXTENDED -I ${STLPORTROOT}/stlport
ALLLIBS =
SHLIBSUFFIX=.dll
OS390SIDEDECK=.x
CC1 = $(CXX) $(CXXFLAGS) $(PLATFORM_COMPILE_OPTIONS)
CC2 = $(CXX) $(PLATFORM_COMPILE_OPTIONS2)
CC3 = $(CXX) $(CXXFLAGS) $(PLATFORM_COMPILE_OPTIONS2)
MAKE_SHARED = ${CXX} $(CXXFLAGS) -D${PLATFORM} -Wl,dll
LINK = $(CXX) $(CXXFLAGS) $(PLATFORM_COMPILE_OPTIONS)
endif
#============ TRU64 SPECIFIC OPTIONS ============================
ifeq ($(PLATFORM), TRU64)
SUPPORTED = TRUE
PLATFORM_COMPILE_OPTIONS = -D${PLATFORM} -ptr ${ALL_OBJECTS_DIR}/.cxx_repository -ieee -pthread
ALLLIBS = ${LIBS} -L/usr/lib -lc -lrt -lm
SHLIBSUFFIX = .so
CC1 = ${CXX} ${CXXFLAGS} $(PLATFORM_COMPILE_OPTIONS)
MAKE_SHARED = ${CXX} ${CXXFLAGS} -shared -D${PLATFORM} -ptr ${ALL_OBJECTS_DIR}/.cxx_repository -nocxxstd
LINK = ${CXX} $(CXXFLAGS) $(PLATFORM_COMPILE_OPTIONS)
endif
#============ MacOSX SPECIFIC OPTIONS ============================
ifeq ($(PLATFORM), MACOSX)
SUPPORTED = TRUE
PLATFORM_COMPILE_OPTIONS = -Wall -D${PLATFORM} -D_REENTRANT -DXALAN_USE_XERCES_LOCAL_CODEPAGE_TRANSCODERS
ALLLIBS = ${LIBS} -L/usr/lib -L/usr/local/lib
SHLIBSUFFIX=.dylib
CC1 = ${CXX} $(CXXFLAGS) $(PLATFORM_COMPILE_OPTIONS)
MAKE_SHARED = ${CXX} $(CXXFLAGS) -D${PLATFORM} -dynamiclib
LINK = ${CXX} $(CXXFLAGS) ${PLATFORM_COMPILE_OPTIONS}
endif
ifndef SUPPORTED
nogood:
@echo Linux, Solaris, AIX, Compaq Tru64, OS/390, MacOSX, and HP-UX are the only platforms supported.
endif
# We need the Xerces library
ifeq ($(PLATFORM), OS390)
ALLLIBS += $(XERCESCROOT)/lib/libxerces-c1_5_1.x
else
ALLLIBS += -L$(XERCESCROOT)/lib -lxerces-c1_5
endif
# We need the ICU library if we are using the ICUBridge
ifdef XALAN_USE_ICU
ifeq ($(PLATFORM), OS390)
ALLLIBS += ${ICUROOT}/lib/libicuuc.x ${ICUROOT}/lib/libicui18n.x
else
ALLLIBS += -L${ICUROOT}/lib -licuuc
ALLLIBS += -L${ICUI18NROOT}/lib -licui18n
endif
endif
# We have to use the includes from the source distribution, since we use
# headers that others normally wouldn't
ifdef XALAN_USE_ICU
# We need the ICU library if we are using the ICUBridge
XSL_INCL = -I${ICUROOT}/include/ -I. -I$(XERCESCROOT)/src/ -I$(XERCESCROOT)/include/
XSL_BUILD_OPTIONS += -DXALAN_USE_ICU
else
XSL_INCL = -I. -I$(XERCESCROOT)/src/ -I$(XERCESCROOT)/include/
endif
vpath %.cpp \
$(ALL_VPATH_CPP)
${ALL_OBJECTS_DIR}/%.o:%.cpp
$(CC1) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) $(EXTRA_COMPILE_OPTIONS) -o $@ $<
${ALL_OBJECTS_DIR}/%.o:%.hpp
$(CC1) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) $(EXTRA_COMPILE_OPTIONS) -o $@ $(patsubst .hpp,.cpp,$<)
ALLSOURCE = \
$(wildcard $(XALANDOM_DIR)/*.cpp) \
$(wildcard $(DOMSUPPORT_DIR)/*.cpp) \
$(wildcard $(PLATFORMSUPPORT_DIR)/*.cpp) \
$(wildcard $(XALANSOURCETREE_DIR)/*.cpp) \
$(wildcard $(XMLSUPPORT_DIR)/*.cpp) \
$(wildcard $(XPATH_DIR)/*.cpp) \
$(wildcard $(XSLT_DIR)/*.cpp) \
$(wildcard $(XALANEXTENSIONS_DIR)/*.cpp) \
$(wildcard $(XERCESINIT_DIR)/*.cpp) \
$(wildcard $(XERCESPARSERLIAISON_DIR)/*.cpp) \
$(wildcard $(XALANTRANSFORMER_DIR)/*.cpp) \
# Using ICUBridge
ifdef XALAN_USE_ICU
ALLSOURCE += \
$(wildcard $(ICUBRIDGE_DIR)/*.cpp)
endif
ALL_OBJECTS = $(addprefix $(ALL_OBJECTS_DIR)/,$(addsuffix .o,$(basename $(notdir $(ALLSOURCE)))))
all: lib testXSLT testXPath
prepare:
@echo Preparing the directory structure for a build ...
-${MKDIR} -p ${ALL_OBJECTS_DIR}
-${MKDIR} -p ${LIB_DIR}
-${MKDIR} -p $(BINTARGETDIR)
# Create header dependencies file -- this must be run before any objects are
# built
depend:
$(MAKE) -f makedepends DEPFILE=$(DEPFILE)
-include $(DEPFILE)
compile: $(ALL_OBJECTS)
ifeq ($(PLATFORM), AIX)
templates: ${ALL_OBJECTS_DIR}/XalanTemplate.o
${ALL_OBJECTS_DIR}/XalanTemplate.o:$(XSLT_DIR)/XalanTemplate.cpp
$(CC2) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) -o $@ $<
else
ifeq ($(PLATFORM), OS390)
templates: ${ALL_OBJECTS_DIR}/XalanTemplate.o
${ALL_OBJECTS_DIR}/XalanTemplate.o:$(XSLT_DIR)/XalanTemplate.cpp
$(CC2) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) -o $@ $<
endif
endif
testXSLT: lib $(BINTARGETDIR)/testXSLT
ifeq ($(PLATFORM), OS390)
$(BINTARGETDIR)/testXSLT: ${ALL_OBJECTS_DIR}/process.o
${LINK} $(XSL_BUILD_OPTIONS) ${PLATFORM_LIB_LINK_OPTIONS} ${LIBRARY_SEARCH_PATHS} \
${EXTRA_LINK_OPTIONS} $(LIB_DIR)/lib$(PROJECT_NAME)$(VER).x $(ALLLIBS) $^ -o $@
${ALL_OBJECTS_DIR}/process.o: $(TESTXSLT_DIR)/process.cpp
$(CC3) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) $(EXTRA_COMPILE_OPTIONS) -o $@ $<
else
$(BINTARGETDIR)/testXSLT: ${ALL_OBJECTS_DIR}/process.o
${LINK} $(XSL_BUILD_OPTIONS) ${PLATFORM_LIB_LINK_OPTIONS} ${LIBRARY_SEARCH_PATHS} \
${EXTRA_LINK_OPTIONS} -L$(LIB_DIR) -l$(PROJECT_NAME)$(VER) $(ALLLIBS) $^ -o $@
${ALL_OBJECTS_DIR}/process.o: $(TESTXSLT_DIR)/process.cpp
$(CC1) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) $(EXTRA_COMPILE_OPTIONS) -o $@ $<
endif
testXPath: lib $(BINTARGETDIR)/testXPath
ifeq ($(PLATFORM), OS390)
$(BINTARGETDIR)/testXPath: ${ALL_OBJECTS_DIR}/TestXPath.o ${ALL_OBJECTS_DIR}/NodeNameTreeWalker.o
${LINK} $(XSL_BUILD_OPTIONS) ${PLATFORM_LIB_LINK_OPTIONS} ${LIBRARY_SEARCH_PATHS} \
${EXTRA_LINK_OPTIONS} $(LIB_DIR)/lib$(PROJECT_NAME)$(VER).x $(ALLLIBS) $(CXXFLAGS) $^ -o $@
${ALL_OBJECTS_DIR}/TestXPath.o: $(TESTXPATH_DIR)/TestXPath.cpp
$(CC3) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) $(EXTRA_COMPILE_OPTIONS) -o $@ $<
${ALL_OBJECTS_DIR}/NodeNameTreeWalker.o: $(TESTXPATH_DIR)/NodeNameTreeWalker.cpp
$(CC3) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) $(EXTRA_COMPILE_OPTIONS) -o $@ $<
else
$(BINTARGETDIR)/testXPath: ${ALL_OBJECTS_DIR}/TestXPath.o ${ALL_OBJECTS_DIR}/NodeNameTreeWalker.o
${LINK} $(XSL_BUILD_OPTIONS) ${PLATFORM_LIB_LINK_OPTIONS} ${LIBRARY_SEARCH_PATHS} \
${EXTRA_LINK_OPTIONS} -L$(LIB_DIR) -l$(PROJECT_NAME)$(VER) $(ALLLIBS) $(CXXFLAGS) $^ -o $@
${ALL_OBJECTS_DIR}/%.o:$(TESTXPATH_DIR)/%.cpp
$(CC1) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) $(EXTRA_COMPILE_OPTIONS) -o $@ $<
endif
samples : Samples
tests : ThreadTest
Samples: lib CompileStylesheet DocumentBuilder ExternalFunction SimpleTransform SimpleXPathAPI StreamTransform TraceListen UseStylesheetParam XalanTransform XalanTransformerCallback XPathWrapper
ApacheModuleXSLT: lib ${LIB_DIR}/mod_xslt$(SHLIBSUFFIX)
${LIB_DIR}/mod_xslt$(SHLIBSUFFIX) : ${ALL_OBJECTS_DIR}/mod_xslt.o
ifeq ($(PLATFORM), OS390)
$(MAKE_SHARED) $(XSL_BUILD_OPTIONS) ${PLATFORM_LIB_LINK_OPTIONS} ${LIBRARY_SEARCH_PATHS} \
${EXTRA_LINK_OPTIONS} $(LIB_DIR)/lib$(PROJECT_NAME)$(VER).x $(ALLLIBS) $(CXXFLAGS) $^ -o $@
${ALL_OBJECTS_DIR}/%.o:$(SAMPLES_DIR)/ApacheModuleXSLT/%.c
$(CC3) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) -I/usr/include/apache/ $(EXTRA_COMPILE_OPTIONS) -o $@ $<
else
$(MAKE_SHARED) $(XSL_BUILD_OPTIONS) ${PLATFORM_LIB_LINK_OPTIONS} ${LIBRARY_SEARCH_PATHS} \
${EXTRA_LINK_OPTIONS} -L$(LIB_DIR) -l$(PROJECT_NAME)$(VER) $(ALLLIBS) $(CXXFLAGS) $^ -o $@
${ALL_OBJECTS_DIR}/%.o:$(SAMPLES_DIR)/ApacheModuleXSLT/%.c
$(CC1) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) -I/usr/include/apache/ $(EXTRA_COMPILE_OPTIONS) -o $@ $<
endif
CompileStylesheet: lib $(BINTARGETDIR)/CompileStylesheet
$(BINTARGETDIR)/CompileStylesheet: ${ALL_OBJECTS_DIR}/CompileStylesheet.o
ifeq ($(PLATFORM), OS390)
${LINK} $(XSL_BUILD_OPTIONS) ${PLATFORM_LIB_LINK_OPTIONS} ${LIBRARY_SEARCH_PATHS} \
${EXTRA_LINK_OPTIONS} $(LIB_DIR)/lib$(PROJECT_NAME)$(VER).x $(ALLLIBS) $(CXXFLAGS) $^ -o $@
${ALL_OBJECTS_DIR}/%.o:$(SAMPLES_DIR)/CompileStylesheet/%.cpp
$(CC3) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) $(EXTRA_COMPILE_OPTIONS) -o $@ $<
else
${LINK} $(XSL_BUILD_OPTIONS) ${PLATFORM_LIB_LINK_OPTIONS} ${LIBRARY_SEARCH_PATHS} \
${EXTRA_LINK_OPTIONS} -L$(LIB_DIR) -l$(PROJECT_NAME)$(VER) $(ALLLIBS) $(CXXFLAGS) $^ -o $@
${ALL_OBJECTS_DIR}/%.o:$(SAMPLES_DIR)/CompileStylesheet/%.cpp
$(CC1) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) $(EXTRA_COMPILE_OPTIONS) -o $@ $<
endif
DocumentBuilder: lib $(BINTARGETDIR)/DocumentBuilder
$(BINTARGETDIR)/DocumentBuilder: ${ALL_OBJECTS_DIR}/DocumentBuilder.o
ifeq ($(PLATFORM), OS390)
${LINK} $(XSL_BUILD_OPTIONS) ${PLATFORM_LIB_LINK_OPTIONS} ${LIBRARY_SEARCH_PATHS} \
${EXTRA_LINK_OPTIONS} $(LIB_DIR)/lib$(PROJECT_NAME)$(VER).x $(ALLLIBS) $(CXXFLAGS) $^ -o $@
${ALL_OBJECTS_DIR}/%.o:$(SAMPLES_DIR)/DocumentBuilder/%.cpp
$(CC3) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) $(EXTRA_COMPILE_OPTIONS) -o $@ $<
else
${LINK} $(XSL_BUILD_OPTIONS) ${PLATFORM_LIB_LINK_OPTIONS} ${LIBRARY_SEARCH_PATHS} \
${EXTRA_LINK_OPTIONS} -L$(LIB_DIR) -l$(PROJECT_NAME)$(VER) $(ALLLIBS) $(CXXFLAGS) $^ -o $@
${ALL_OBJECTS_DIR}/%.o:$(SAMPLES_DIR)/DocumentBuilder/%.cpp
$(CC1) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) $(EXTRA_COMPILE_OPTIONS) -o $@ $<
endif
ExternalFunction: lib $(BINTARGETDIR)/ExternalFunction
$(BINTARGETDIR)/ExternalFunction: ${ALL_OBJECTS_DIR}/ExternalFunction.o
ifeq ($(PLATFORM), OS390)
${LINK} $(XSL_BUILD_OPTIONS) ${PLATFORM_LIB_LINK_OPTIONS} ${LIBRARY_SEARCH_PATHS} \
${EXTRA_LINK_OPTIONS} $(LIB_DIR)/lib$(PROJECT_NAME)$(VER).x $(ALLLIBS) $(CXXFLAGS) $^ -o $@
${ALL_OBJECTS_DIR}/%.o:$(SAMPLES_DIR)/ExternalFunction/%.cpp
$(CC3) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) $(EXTRA_COMPILE_OPTIONS) -o $@ $<
else
${LINK} $(XSL_BUILD_OPTIONS) ${PLATFORM_LIB_LINK_OPTIONS} ${LIBRARY_SEARCH_PATHS} \
${EXTRA_LINK_OPTIONS} -L$(LIB_DIR) -l$(PROJECT_NAME)$(VER) $(ALLLIBS) $(CXXFLAGS) $^ -o $@
${ALL_OBJECTS_DIR}/%.o:$(SAMPLES_DIR)/ExternalFunction/%.cpp
$(CC1) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) $(EXTRA_COMPILE_OPTIONS) -o $@ $<
endif
SimpleTransform: lib $(BINTARGETDIR)/SimpleTransform
$(BINTARGETDIR)/SimpleTransform: ${ALL_OBJECTS_DIR}/SimpleTransform.o
ifeq ($(PLATFORM), OS390)
${LINK} $(XSL_BUILD_OPTIONS) ${PLATFORM_LIB_LINK_OPTIONS} ${LIBRARY_SEARCH_PATHS} \
${EXTRA_LINK_OPTIONS} $(LIB_DIR)/lib$(PROJECT_NAME)$(VER).x $(ALLLIBS) $(CXXFLAGS) $^ -o $@
${ALL_OBJECTS_DIR}/%.o:$(SAMPLES_DIR)/SimpleTransform/%.cpp
$(CC3) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) $(EXTRA_COMPILE_OPTIONS) -o $@ $<
else
${LINK} $(XSL_BUILD_OPTIONS) ${PLATFORM_LIB_LINK_OPTIONS} ${LIBRARY_SEARCH_PATHS} \
${EXTRA_LINK_OPTIONS} -L$(LIB_DIR) -l$(PROJECT_NAME)$(VER) $(ALLLIBS) $(CXXFLAGS) $^ -o $@
${ALL_OBJECTS_DIR}/%.o:$(SAMPLES_DIR)/SimpleTransform/%.cpp
$(CC1) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) $(EXTRA_COMPILE_OPTIONS) -o $@ $<
endif
SimpleXPathAPI: lib $(BINTARGETDIR)/SimpleXPathAPI
$(BINTARGETDIR)/SimpleXPathAPI: ${ALL_OBJECTS_DIR}/SimpleXPathAPI.o
ifeq ($(PLATFORM), OS390)
${LINK} $(XSL_BUILD_OPTIONS) ${PLATFORM_LIB_LINK_OPTIONS} ${LIBRARY_SEARCH_PATHS} \
${EXTRA_LINK_OPTIONS} $(LIB_DIR)/lib$(PROJECT_NAME)$(VER).x $(ALLLIBS) $(CXXFLAGS) $^ -o $@
${ALL_OBJECTS_DIR}/%.o:$(SAMPLES_DIR)/SimpleXPathAPI/%.cpp
$(CC3) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) $(EXTRA_COMPILE_OPTIONS) -o $@ $<
else
${LINK} $(XSL_BUILD_OPTIONS) ${PLATFORM_LIB_LINK_OPTIONS} ${LIBRARY_SEARCH_PATHS} \
${EXTRA_LINK_OPTIONS} -L$(LIB_DIR) -l$(PROJECT_NAME)$(VER) $(ALLLIBS) $(CXXFLAGS) $^ -o $@
${ALL_OBJECTS_DIR}/%.o:$(SAMPLES_DIR)/SimpleXPathAPI/%.cpp
$(CC1) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) $(EXTRA_COMPILE_OPTIONS) -o $@ $<
endif
StreamTransform: lib $(BINTARGETDIR)/StreamTransform
$(BINTARGETDIR)/StreamTransform: ${ALL_OBJECTS_DIR}/StreamTransform.o
ifeq ($(PLATFORM), OS390)
${LINK} $(XSL_BUILD_OPTIONS) ${PLATFORM_LIB_LINK_OPTIONS} ${LIBRARY_SEARCH_PATHS} \
${EXTRA_LINK_OPTIONS} $(LIB_DIR)/lib$(PROJECT_NAME)$(VER).x $(ALLLIBS) $(CXXFLAGS) $^ -o $@
${ALL_OBJECTS_DIR}/%.o:$(SAMPLES_DIR)/StreamTransform/%.cpp
$(CC3) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) $(EXTRA_COMPILE_OPTIONS) -o $@ $<
else
${LINK} $(XSL_BUILD_OPTIONS) ${PLATFORM_LIB_LINK_OPTIONS} ${LIBRARY_SEARCH_PATHS} \
${EXTRA_LINK_OPTIONS} -L$(LIB_DIR) -l$(PROJECT_NAME)$(VER) $(ALLLIBS) $(CXXFLAGS) $^ -o $@
${ALL_OBJECTS_DIR}/%.o:$(SAMPLES_DIR)/StreamTransform/%.cpp
$(CC1) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) $(EXTRA_COMPILE_OPTIONS) -o $@ $<
endif
TraceListen: lib $(BINTARGETDIR)/TraceListen
$(BINTARGETDIR)/TraceListen: ${ALL_OBJECTS_DIR}/TraceListen.o
ifeq ($(PLATFORM), OS390)
${LINK} $(XSL_BUILD_OPTIONS) ${PLATFORM_LIB_LINK_OPTIONS} ${LIBRARY_SEARCH_PATHS} \
${EXTRA_LINK_OPTIONS} $(LIB_DIR)/lib$(PROJECT_NAME)$(VER).x $(ALLLIBS) $(CXXFLAGS) $^ -o $@
${ALL_OBJECTS_DIR}/%.o:$(SAMPLES_DIR)/TraceListen/%.cpp
$(CC3) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) $(EXTRA_COMPILE_OPTIONS) -o $@ $<
else
${LINK} $(XSL_BUILD_OPTIONS) ${PLATFORM_LIB_LINK_OPTIONS} ${LIBRARY_SEARCH_PATHS} \
${EXTRA_LINK_OPTIONS} -L$(LIB_DIR) -l$(PROJECT_NAME)$(VER) $(ALLLIBS) $(CXXFLAGS) $^ -o $@
${ALL_OBJECTS_DIR}/%.o:$(SAMPLES_DIR)/TraceListen/%.cpp
$(CC1) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) $(EXTRA_COMPILE_OPTIONS) -o $@ $<
endif
UseStylesheetParam: lib $(BINTARGETDIR)/UseStylesheetParam
$(BINTARGETDIR)/UseStylesheetParam: ${ALL_OBJECTS_DIR}/UseStylesheetParam.o
ifeq ($(PLATFORM), OS390)
${LINK} $(XSL_BUILD_OPTIONS) ${PLATFORM_LIB_LINK_OPTIONS} ${LIBRARY_SEARCH_PATHS} \
${EXTRA_LINK_OPTIONS} $(LIB_DIR)/lib$(PROJECT_NAME)$(VER).x $(ALLLIBS) $(CXXFLAGS) $^ -o $@
${ALL_OBJECTS_DIR}/%.o:$(SAMPLES_DIR)/UseStylesheetParam/%.cpp
$(CC3) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) $(EXTRA_COMPILE_OPTIONS) -o $@ $<
else
${LINK} $(XSL_BUILD_OPTIONS) ${PLATFORM_LIB_LINK_OPTIONS} ${LIBRARY_SEARCH_PATHS} \
${EXTRA_LINK_OPTIONS} -L$(LIB_DIR) -l$(PROJECT_NAME)$(VER) $(ALLLIBS) $(CXXFLAGS) $^ -o $@
${ALL_OBJECTS_DIR}/%.o:$(SAMPLES_DIR)/UseStylesheetParam/%.cpp
$(CC1) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) $(EXTRA_COMPILE_OPTIONS) -o $@ $<
endif
XalanTransform: lib $(BINTARGETDIR)/XalanTransform
$(BINTARGETDIR)/XalanTransform: ${ALL_OBJECTS_DIR}/XalanTransform.o
ifeq ($(PLATFORM), OS390)
${LINK} $(XSL_BUILD_OPTIONS) ${PLATFORM_LIB_LINK_OPTIONS} ${LIBRARY_SEARCH_PATHS} \
${EXTRA_LINK_OPTIONS} $(LIB_DIR)/lib$(PROJECT_NAME)$(VER).x $(ALLLIBS) $(CXXFLAGS) $^ -o $@
${ALL_OBJECTS_DIR}/%.o:$(SAMPLES_DIR)/XalanTransform/%.cpp
$(CC3) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) $(EXTRA_COMPILE_OPTIONS) -o $@ $<
else
${LINK} $(XSL_BUILD_OPTIONS) ${PLATFORM_LIB_LINK_OPTIONS} ${LIBRARY_SEARCH_PATHS} \
${EXTRA_LINK_OPTIONS} -L$(LIB_DIR) -l$(PROJECT_NAME)$(VER) $(ALLLIBS) $(CXXFLAGS) $^ -o $@
${ALL_OBJECTS_DIR}/%.o:$(SAMPLES_DIR)/XalanTransform/%.cpp
$(CC1) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) $(EXTRA_COMPILE_OPTIONS) -o $@ $<
endif
XalanTransformerCallback: lib $(BINTARGETDIR)/XalanTransformerCallback
$(BINTARGETDIR)/XalanTransformerCallback: ${ALL_OBJECTS_DIR}/XalanTransformerCallback.o
ifeq ($(PLATFORM), OS390)
${LINK} $(XSL_BUILD_OPTIONS) ${PLATFORM_LIB_LINK_OPTIONS} ${LIBRARY_SEARCH_PATHS} \
${EXTRA_LINK_OPTIONS} $(LIB_DIR)/lib$(PROJECT_NAME)$(VER).x $(ALLLIBS) $(CXXFLAGS) $^ -o $@
${ALL_OBJECTS_DIR}/%.o:$(SAMPLES_DIR)/XalanTransformerCallback/%.cpp
$(CC3) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) $(EXTRA_COMPILE_OPTIONS) -o $@ $<
else
${LINK} $(XSL_BUILD_OPTIONS) ${PLATFORM_LIB_LINK_OPTIONS} ${LIBRARY_SEARCH_PATHS} \
${EXTRA_LINK_OPTIONS} -L$(LIB_DIR) -l$(PROJECT_NAME)$(VER) $(ALLLIBS) $(CXXFLAGS) $^ -o $@
${ALL_OBJECTS_DIR}/%.o:$(SAMPLES_DIR)/XalanTransformerCallback/%.cpp
$(CC1) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) $(EXTRA_COMPILE_OPTIONS) -o $@ $<
endif
XPathWrapper: lib $(BINTARGETDIR)/XPathWrapper
$(BINTARGETDIR)/XPathWrapper: ${ALL_OBJECTS_DIR}/XPathWrapper.o ${ALL_OBJECTS_DIR}/TestDriver.o
ifeq ($(PLATFORM), OS390)
${LINK} $(XSL_BUILD_OPTIONS) ${PLATFORM_LIB_LINK_OPTIONS} ${LIBRARY_SEARCH_PATHS} \
${EXTRA_LINK_OPTIONS} $(LIB_DIR)/lib$(PROJECT_NAME)$(VER).x $(ALLLIBS) $(CXXFLAGS) $^ -o $@
${ALL_OBJECTS_DIR}/%.o:$(SAMPLES_DIR)/XPathWrapper/%.cpp
$(CC3) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) $(EXTRA_COMPILE_OPTIONS) -o $@ $<
else
${LINK} $(XSL_BUILD_OPTIONS) ${PLATFORM_LIB_LINK_OPTIONS} ${LIBRARY_SEARCH_PATHS} \
${EXTRA_LINK_OPTIONS} -L$(LIB_DIR) -l$(PROJECT_NAME)$(VER) $(ALLLIBS) $(CXXFLAGS) $^ -o $@
${ALL_OBJECTS_DIR}/%.o:$(SAMPLES_DIR)/XPathWrapper/%.cpp
$(CC1) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) $(EXTRA_COMPILE_OPTIONS) -o $@ $<
endif
Tests: lib ThreadTest
ThreadTest: lib $(BINTARGETDIR)/ThreadTest
$(BINTARGETDIR)/ThreadTest: ${ALL_OBJECTS_DIR}/ThreadTest.o
ifeq ($(PLATFORM), OS390)
${LINK} $(XSL_BUILD_OPTIONS) ${PLATFORM_LIB_LINK_OPTIONS} ${LIBRARY_SEARCH_PATHS} \
${EXTRA_LINK_OPTIONS} $(LIB_DIR)/lib$(PROJECT_NAME)$(VER).x $(ALLLIBS) $(CXXFLAGS) $^ -o $@
${ALL_OBJECTS_DIR}/%.o:$(TESTS_DIR)/Threads/%.cpp
$(CC3) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) $(EXTRA_COMPILE_OPTIONS) -o $@ $<
else
${LINK} $(XSL_BUILD_OPTIONS) ${PLATFORM_LIB_LINK_OPTIONS} ${LIBRARY_SEARCH_PATHS} \
${EXTRA_LINK_OPTIONS} -L$(LIB_DIR) -l$(PROJECT_NAME)$(VER) $(ALLLIBS) $(CXXFLAGS) $^ -o $@
${ALL_OBJECTS_DIR}/%.o:$(TESTS_DIR)/Threads/%.cpp
$(CC1) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) $(EXTRA_COMPILE_OPTIONS) -o $@ $<
endif
lib: prepare compile $(THISLIB)$(VER)$(SHLIBSUFFIX)
$(THISLIB)$(VER)$(SHLIBSUFFIX): $(ALL_OBJECTS)
$(MAKE_SHARED) $(PLATFORM_LIBRARIES) $(EXTRA_LINK_OPTIONS) $(ALLLIBS) $^ -o $@
ifeq ($(PLATFORM), OS390)
cp -p *.x ${LIB_DIR}
endif
clean:
rm -rf $(ALL_OBJECTS_DIR)/*
ifeq ($(PLATFORM), TRU64)
rm -rf $(ALL_OBJECTS_DIR)/.cxx_repository
endif
rm -f $(THISLIB)$(VER)$(SHLIBSUFFIX)
rm -f $(BINTARGETDIR)/testXSLT
rm -f $(BINTARGETDIR)/testXPath
rm -f ${LIB_DIR}/mod_xslt$(SHLIBSUFFIX)
rm -f $(BINTARGETDIR)/CompileStylesheet
rm -f $(BINTARGETDIR)/ExternalFunction
rm -f $(BINTARGETDIR)/SimpleTransform
rm -f $(BINTARGETDIR)/StreamTransform
rm -f $(BINTARGETDIR)/TraceListen
rm -f $(BINTARGETDIR)/UseStylesheetParam
rm -f $(BINTARGETDIR)/XalanTransform
rm -f $(BINTARGETDIR)/XPathWrapper