1#************************************************************** 2# 3# Licensed to the Apache Software Foundation (ASF) under one 4# or more contributor license agreements. See the NOTICE file 5# distributed with this work for additional information 6# regarding copyright ownership. The ASF licenses this file 7# to you under the Apache License, Version 2.0 (the 8# "License"); you may not use this file except in compliance 9# with the License. You may obtain a copy of the License at 10# 11# http://www.apache.org/licenses/LICENSE-2.0 12# 13# Unless required by applicable law or agreed to in writing, 14# software distributed under the License is distributed on an 15# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16# KIND, either express or implied. See the License for the 17# specific language governing permissions and limitations 18# under the License. 19# 20#************************************************************** 21 22 23 24PRJ=. 25 26PRJNAME=libxml2 27TARGET=so_libxml2 28 29# --- Settings ----------------------------------------------------- 30 31.INCLUDE : settings.mk 32 33.IF "$(SYSTEM_LIBXML)" == "YES" 34all: 35 @echo "An already available installation of libxml should exist on your system." 36 @echo "Therefore the version provided here does not need to be built in addition." 37.ENDIF 38 39# --- Files -------------------------------------------------------- 40 41LIBXML2VERSION=2.7.6 42 43TARFILE_NAME=$(PRJNAME)-$(LIBXML2VERSION) 44TARFILE_MD5=7740a8ec23878a2f50120e1faa2730f2 45 46# libxml2-global-symbols: #i112480#: Solaris ld won't export non-listed symbols 47PATCH_FILES=libxml2-configure.patch \ 48 libxml2-mingw.patch \ 49 libxml2-gnome599717.patch \ 50 libxml2-xpath.patch \ 51 libxml2-global-symbols.patch \ 52 libxml2-testapi.patch \ 53 libxml2-runtest.patch 54 55.IF "$(OS)" == "WNT" 56PATCH_FILES+= libxml2-long-path.patch 57.ENDIF 58 59# This is only for UNX environment now 60 61.IF "$(OS)"=="WNT" 62.IF "$(COM)"=="GCC" 63xml2_CC=$(CC) -mthreads 64.IF "$(MINGW_SHARED_GCCLIB)"=="YES" 65xml2_CC+=-shared-libgcc 66.ENDIF 67xml2_LIBS=-lws2_32 68.IF "$(MINGW_SHARED_GXXLIB)"=="YES" 69xml2_LIBS+=$(MINGW_SHARED_LIBSTDCPP) 70.ENDIF 71CONFIGURE_DIR= 72CONFIGURE_ACTION=.$/configure 73CONFIGURE_FLAGS=--enable-ipv6=no --without-python --without-zlib --enable-static=no --without-debug --build=i586-pc-mingw32 --host=i586-pc-mingw32 lt_cv_cc_dll_switch="-shared" CC="$(xml2_CC)" LDFLAGS="-no-undefined -Wl,--enable-runtime-pseudo-reloc-v2 -L$(ILIB:s/;/ -L/)" LIBS="$(xml2_LIBS)" OBJDUMP=objdump 74BUILD_ACTION=$(GNUMAKE) 75BUILD_DIR=$(CONFIGURE_DIR) 76.ELSE 77CONFIGURE_DIR=win32 78CONFIGURE_ACTION=cscript configure.js 79CONFIGURE_FLAGS=iconv=no sax1=yes 80.IF "$(debug)"!="" 81CONFIGURE_FLAGS+=debug=yes 82.ENDIF 83BUILD_ACTION=nmake 84BUILD_DIR=$(CONFIGURE_DIR) 85.ENDIF 86.ELSE 87.IF "$(SYSBASE)"!="" 88xml2_CFLAGS+=-I$(SYSBASE)$/usr$/include 89.IF "$(COMNAME)"=="sunpro5" 90xml2_CFLAGS+=$(ARCH_FLAGS) $(C_RESTRICTIONFLAGS) 91.ENDIF # "$(COMNAME)"=="sunpro5" 92xml2_LDFLAGS+=-L$(SYSBASE)$/usr$/lib 93.ENDIF # "$(SYSBASE)"!="" 94 95CONFIGURE_DIR= 96.IF "$(OS)"=="OS2" 97CONFIGURE_ACTION=sh .$/configure 98CONFIGURE_FLAGS=--enable-ipv6=no --without-python --without-zlib --enable-static=yes --with-sax1=yes ADDCFLAGS="$(xml2_CFLAGS)" CFLAGS="$(EXTRA_CFLAGS)" LDFLAGS="$(xml2_LDFLAGS) $(EXTRA_LINKFLAGS)" 99.ELSE 100CONFIGURE_ACTION=.$/configure 101CONFIGURE_FLAGS=--enable-ipv6=no --without-python --without-zlib --enable-static=no --with-sax1=yes ADDCFLAGS="$(xml2_CFLAGS) $(EXTRA_CFLAGS)" LDFLAGS="$(xml2_LDFLAGS) $(EXTRA_LINKFLAGS)" 102.ENDIF 103BUILD_ACTION=$(GNUMAKE) 104BUILD_FLAGS+= -j$(EXTMAXPROCESS) 105BUILD_DIR=$(CONFIGURE_DIR) 106.ENDIF 107 108 109OUTDIR2INC=include$/libxml 110 111.IF "$(OS)"=="MACOSX" 112EXTRPATH=URELIB 113OUT2LIB+=.libs$/libxml2.*.dylib 114OUT2BIN+=.libs$/xmllint 115OUT2BIN+=xml2-config 116.ELIF "$(OS)"=="WNT" 117.IF "$(COM)"=="GCC" 118OUT2LIB+=.libs$/libxml2*.a 119OUT2BIN+=.libs$/libxml2*.dll 120OUT2BIN+=.libs$/xmllint.exe 121OUT2BIN+=xml2-config 122.ELSE 123OUT2LIB+=win32$/bin.msvc$/*.lib 124OUT2BIN+=win32$/bin.msvc$/*.dll 125OUT2BIN+=win32$/bin.msvc$/xmllint.exe 126.ENDIF 127.ELSE 128OUT2LIB+=.libs$/libxml2.so* 129OUT2BIN+=.libs$/xmllint 130OUT2BIN+=xml2-config 131.ENDIF 132 133# --- Targets ------------------------------------------------------ 134 135.INCLUDE : set_ext.mk 136.INCLUDE : target.mk 137.INCLUDE : tg_ext.mk 138 139