Makefile.incl
上传用户:zhuqijet
上传日期:2013-06-25
资源大小:10074k
文件大小:12k
- #
- # The Apache Software License, Version 1.1
- #
- # Copyright (c) 1999-2001 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 "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
- # <http://www.apache.org/>.
- #
- #
- # $Id: Makefile.incl,v 1.56 2003/05/12 09:44:18 gareth Exp $
- #
- ################## LIBRARY NAMES AND DIRECTORIES ##################
- ifeq (${SYSOVR},OS400)
- PLATFORM = OS400
- endif
- INCLUDES= -I. -I${XERCESCROOT}/include
- LIB_DIR=${XERCESCROOT}/lib
- ifneq (${PLATFORM},OS400)
- LIBNAME=xerces-c
- else
- LIBNAME=xercesc
- endif
- THISLIB=${LIB_DIR}/${LIBNAME}
- LIBRARY_NAMES=-l${LIBNAME}
- LIBRARY_SEARCH_PATHS=-L${LIB_DIR}
- TO = o
- ####################### PLATFORM DEPENDENCIES #####################
- #=============== IRIX SPECIFIC OPTIONS =========================
- ifeq (${PLATFORM}, IRIX)
- ifeq (${GXX}, yes)
- CMP= -c ${CXXFLAGS}
- CC= ${COMPILER} -c -D${PLATFORM} -D_REENTRANT -fpic
- LINK = ${COMPILER} -D${PLATFORM} -fpic ${LDFLAGS}
- PLATFORM_LIB_LINK_OPTIONS=-L/usr/lib -L/usr/local/lib
- EXTRA_LINK_OPTIONS=-lc ${EXTRA_LIBS}
- else
- CMP= -c ${CXXFLAGS}
- CC= CC -c -D${PLATFORM} -LANG:pch -LANG:std -O2 -D_REENTRANT -I/usr/local/include
- LINK = CC -D${PLATFORM} ${LDFLAGS}
- PLATFORM_LIB_LINK_OPTIONS=
- EXTRA_LINK_OPTIONS=${EXTRA_LIBS}
- endif
- SHLIBSUFFIX=.so
- endif
- #=============== SOLARIS SPECIFIC OPTIONS =========================
- ifeq (${PLATFORM}, SOLARIS)
- ifeq (${GXX}, yes)
- CMP= -c ${CXXFLAGS}
- CC= ${COMPILER} -c -D${PLATFORM} -D_REENTRANT -fpic
- LINK = ${COMPILER} -D${PLATFORM} -fpic ${LDFLAGS}
- PLATFORM_LIB_LINK_OPTIONS=-L/usr/lib -L/usr/local/lib
- EXTRA_LINK_OPTIONS=-lc ${EXTRA_LIBS}
- else
- CMP= -c ${CXXFLAGS}
- CC= CC -c -D${PLATFORM} -D_REENTRANT -pic
- LINK = CC -D${PLATFORM} ${LDFLAGS}
- PLATFORM_LIB_LINK_OPTIONS=-L/usr/lib
- EXTRA_LINK_OPTIONS=-lc -lgen ${EXTRA_LIBS}
- endif
- SHLIBSUFFIX=.so
- endif
- #=============== OPENSERVER SPECIFIC OPTIONS =========================
- ifeq (${PLATFORM}, OPENSERVER)
- CC=${COMPILER} -D${PLATFORM} -fPIC
- CMP=-c ${CXXFLAGS}
- LINK=${CC} ${LDFLAGS}
- EXTRA_LINK_OPTIONS=-lc -lsocket ${EXTRA_LIBS}
- PLATFORM_LIB_LINK_OPTIONS=-L/usr/lib -L/usr/local/lib
- SHLIBSUFFIX=.so
- endif
- #=============== UNIXWARE SPECIFIC OPTIONS =========================
- ifeq (${PLATFORM}, UNIXWARE)
- CMP= -O2 -c ${CXXFLAGS} -pthread
- CC= ${COMPILER} -O2 -c -D${PLATFORM} -D_REENTRANT -fpic -pthread
- LINK = ${COMPILER} -D${PLATFORM} -fpic -pthread ${LDFLAGS}
- EXTRA_LINK_OPTIONS=-lc -lsocket ${EXTRA_LIBS}
- PLATFORM_LIB_LINK_OPTIONS=-L/usr/lib -L/usr/local/lib
- SHLIBSUFFIX=.so
- endif
- #================= PTX SPECIFIC OPTIONS ===========================
- ifeq (${PLATFORM}, PTX)
- COMPILESWITCH= -KPIC -Kthread -DPTX -w -O
- CMP = -c ${COMPILESWITCH}
- CC= c++
- LINK = ${CC} -DPTX -Kthread ${LDFLAGS}
- PLATFORM_CPP_COMPILER = c++
- PLATFORM_C_COMPILER = cc
- PLATFORM_LIBRARIES =
- PLATFORM_COMPILE_OPTIONS = -KPIC -Kthread -DPTX
- MAKE_SHARED = ${PLATFORM_CPP_COMPILER} -DPTX -G
- MAKE_SHARED_C = ${PLATFORM_C_COMPILER} -DPTX -G
- PLATFORM_LIB_LINK_OPTIONS=-L/usr/local/lib -L${XMLINSTALL}/lib
- EXTRA_LINK_OPTIONS=-lm -lgen ${EXTRA_LIBS}
- SHLIBSUFFIX=.so
- endif
- #================= AIX SPECIFIC OPTIONS ===========================
- ifeq (${PLATFORM}, AIX)
- CMP= -c ${CXXFLAGS} -qnotempinc
- CC=${COMPILER} -D${PLATFORM}
- LINK = ${COMPILER} -brtl ${LDFLAGS}
- # the compiler knows about this two
- # PLATFORM_LIB_LINK_OPTIONS=-L/usr/lpp/xlC/lib
- # EXTRA_LINK_OPTIONS=-lC ${EXTRA_LIBS}
- # EXTRA_LINK_OPTIONS=-bnolibpath
- SHLIBSUFFIX=.a
- endif
- #=============== OS400 SPECIFIC OPTIONS =========================
- ifeq (${PLATFORM}, OS400)
- ifeq (${SYSOVR},OS400)
- MYCC = cross compiler path here
- TO = qwobj
- else
- MYCC = icc
- LINK = ${CC} -v ${LDFLAGS}
- endif
- CMP= -c -DOS400 ${CXXFLAGS}
- CXX = $(MYCC)
- CC = $(MYCC)
- #INCLUDES += -I${ICUROOT}/include
- SHLIBSUFFIX=.a
- EXTRA_LINK_OPTIONS=-q OPTION='*DUPPROC *DUPVAR' ${EXTRA_LIBS}
- endif
- #=============== BEOS SPECIFIC OPTIONS =========================
- ifeq (${PLATFORM}, BEOS)
- CMP= -c ${CXXFLAGS}
- CC= ${COMPILER} -c -D${PLATFORM} -DAPP_NO_THREADS -fpic
- LINK = ${COMPILER} -D${PLATFORM} -fpic ${LDFLAGS}
- PLATFORM_LIB_LINK_OPTIONS=-L/boot/develop/lib/x86 -L/boot/home/config/lib
- EXTRA_LINK_OPTIONS=-lbe ${EXTRA_LIBS}
- SHLIBSUFFIX=.so
- endif
- #=============== LINUX SPECIFIC OPTIONS =========================
- ifeq (${PLATFORM}, LINUX)
- CMP= -c ${CXXFLAGS}
- CC= ${COMPILER} -c -D${PLATFORM} -D_REENTRANT -fpic
- LINK = ${COMPILER} -D${PLATFORM} -fpic ${LDFLAGS}
- PLATFORM_LIB_LINK_OPTIONS=-L/usr/local/lib
- EXTRA_LINK_OPTIONS=-lc ${EXTRA_LIBS}
- SHLIBSUFFIX=.so
- endif
- #=============== QNX SPECIFIC OPTIONS =========================
- ifeq (${PLATFORM}, QNX)
- CMP= -c ${CXXFLAGS}
- CC= QCC -c
- LINK = QCC ${LDFLAGS}
- PLATFORM_LIB_LINK_OPTIONS=-L/usr/local/lib
- EXTRA_LINK_OPTIONS=${EXTRA_LIBS}
- SHLIBSUFFIX=.so
- endif
- #=============== CYGWIN SPECIFIC OPTIONS =========================
- ifeq (${PLATFORM}, CYGWIN)
- CMP= -c ${CXXFLAGS}
- CC= ${COMPILER} -c -D__${PLATFORM}__
- LINK = ${COMPILER} -D__${PLATFORM}__ ${LDFLAGS}
- PLATFORM_LIB_LINK_OPTIONS=-L/usr/lib -L/usr/local/lib
- EXTRA_LINK_OPTIONS=${EXTRA_LIBS}
- SHLIBSUFFIX=.dll
- endif
- #=============== FREEBSD SPECIFIC OPTIONS =========================
- ifeq (${PLATFORM}, FREEBSD)
- CMP= -c ${CXXFLAGS}
- CC= ${COMPILER} -c -D${PLATFORM} -fPIC
- LINK = ${COMPILER} -D${PLATFORM} -fPIC ${LDFLAGS}
- PLATFORM_LIB_LINK_OPTIONS=-Wl,-rpath,${XERCESCROOT}/lib
- ifdef ICUROOT
- PLATFORM_LIB_LINK_OPTIONS+=-L${ICUROOT} -Wl,-rpath,${ICUROOT}
- EXTRA_LINK_OPTIONS=-licudata -lstdc++ ${EXTRA_LIBS}
- else
- EXTRA_LINK_OPTIONS=${EXTRA_LIBS} -lstdc++
- endif
- SHLIBSUFFIX=.so
- endif
- #=============== NETBSD SPECIFIC OPTIONS =========================
- ifeq (${PLATFORM}, NETBSD)
- CMP= -c ${CXXFLAGS}
- CC= ${COMPILER} -c -D${PLATFORM} -fPIC
- LINK = ${COMPILER} -D${PLATFORM} -fPIC ${LDFLAGS}
- PLATFORM_LIB_LINK_OPTIONS=-Wl,-rpath,${XERCESCROOT}/lib
- ifdef ICUROOT
- PLATFORM_LIB_LINK_OPTIONS+=-L${ICUROOT} -Wl,-rpath,${ICUROOT}
- EXTRA_LINK_OPTIONS=-licudata -lstdc++ ${EXTRA_LIBS}
- else
- EXTRA_LINK_OPTIONS=${EXTRA_LIBS} -lstdc++
- endif
- SHLIBSUFFIX=.so
- endif
- #================= HP SPECIFIC OPTIONS ===========================
- ifeq (${PLATFORM}, HPUX)
- ifeq (${COMPILER}, aCC)
- CMP = -c +DAportable $(CXXFLAGS) -D_HP_UX -DHPaCC -w +z
- CC = aCC
- LINK = ${CC} -Wl,+s -Wl,+b,. ${LDFLAGS}
- PLATFORM_LIB_LINK_OPTIONS=-L/opt/aCC/lib -L/usr/ccs/lib -lpthread
- SHLIBSUFFIX=.sl
- else
- ifneq (${DEBUG}, 1)
- CXXFLAGS = -w +O1
- endif
- APPL_NAME = $(notdir $(shell pwd))
- TEMPLATESDIR = $(XERCESCROOT)/bin/obj/$(APPL_NAME)/ptrepository
- COMMON_CMP = $(CXXFLAGS) -D_HP_UX -DHPCC +DAportable -w +eh +z -z
- -ptr$(TEMPLATESDIR)
- CMP = -c $(COMMON_CMP)
- CC = CC
- LINK = ${CC} $(COMMON_CMP) -Wl,+s -Wl,+b,. ${LDFLAGS}
- PLATFORM_LIB_LINK_OPTIONS=-L/opt/CC/lib -L/usr/lib
- SHLIBSUFFIX=.sl
- endif
- endif
- #================= OS390 SPECIFIC OPTIONS ===========================
- ###################################################################
- # IMPORTANT NOTE #
- ###################################################################
- # Before you try to run the Makefile, make sure you have two #
- # environment variables set. #
- # #
- # export XERCESCROOT=<the directory where you installed XERCES-C> #
- # #
- # If you are going to do the OS390BATCH build, make sure you have #
- # the OS390BATCH environment variable set. #
- # #
- # export OS390BATCH=1 #
- # #
- # Also, #
- # #
- # export LOADMOD=USERID.LOAD #
- # export LOADEXP=SYS1.SIXMEXP or &hlq.SIXMEXP #
- # #
- # to specify your LOADMOD and the IXM4C51X definition sidedeck #
- # dataset. #
- ###################################################################
- ifeq (${PLATFORM}, OS390)
- CMP= -c -DOS390 ${CXXFLAGS}
- ## OS390BATCH
- ifeq (${OS390BATCH},1)
- CC = _CXX_CXXSUFFIX="cpp" _CXX_STEPS="-1" c++ -W0,"langlvl(extended)" -Wc,"TMPLPARSE(NO)" -DOS390 -D_OPEN_THREADS -D_XOPEN_SOURCE_EXTENDED -DOS390BATCH
- else
- CC = _CXX_CXXSUFFIX="cpp" _CXX_STEPS="-1" c++ -W0,"langlvl(extended)" -Wc,"TMPLPARSE(NO)" -DOS390 -D_OPEN_THREADS -D_XOPEN_SOURCE_EXTENDED
- endif
- LINK = ${CC} ${LDFLAGS}
- PLATFORM_LIB_LINK_OPTIONS=
- EXTRA_LINK_OPTIONS=${EXTRA_LIBS}
- SHLIBSUFFIX=.dll
- OS390SIDEDECK=.x
- ## OS390BATCH
- ifeq (${OS390BATCH},1)
- LIBRARY_NAMES="//'${LOADEXP}(IXM4C51X)'"
- else
- LIBRARY_NAMES=${LIB_DIR}/lib${LIBNAME}${VER}${OS390SIDEDECK}
- endif
- LIBRARY_SEARCH_PATHS=
- endif
- #=============== TRU64 SPECIFIC OPTIONS =========================
- ifeq (${PLATFORM}, TRU64)
- CMP= -c ${CXXFLAGS}
- CC = ${COMPILER} -c -D${PLATFORM}
- LINK = ${COMPILER} -D${PLATFORM} ${LDFLAGS}
- PLATFORM_LIB_LINK_OPTIONS=-L/usr/lib -L/usr/local/lib
- SHLIBSUFFIX=.so
- endif
- #=============== MacOS SPECIFIC OPTIONS =========================
- ifeq (${PLATFORM}, MACOSX)
- CMP= -c ${CXXFLAGS}
- CC= c++ -c -D${PLATFORM} -D_REENTRANT
- LINK = c++ -D${PLATFORM} ${LDFLAGS}
- PLATFORM_LIB_LINK_OPTIONS=-L/usr/lib -L/usr/local/lib
- SHLIBSUFFIX=.dylib
- endif