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.9.4 42 43TARFILE_NAME=$(PRJNAME)-$(LIBXML2VERSION) 44TARFILE_MD5=ae249165c173b1ff386ee8ad676815f5 45 46PATCH_FILES=libxml2-configure.patch \ 47 libxml2-c99.patch 48 49# libxml2-global-symbols: #i112480#: Solaris ld won't export non-listed symbols 50# libxml2-global-symbols.patch 51 52.IF "$(OS)" == "WNT" 53PATCH_FILES+= libxml2-long-path.patch 54.ENDIF 55 56# This is only for UNX environment now 57 58.IF "$(OS)"=="WNT" 59.IF "$(COM)"=="GCC" 60xml2_CC=$(CC) -mthreads 61.IF "$(MINGW_SHARED_GCCLIB)"=="YES" 62xml2_CC+=-shared-libgcc 63.ENDIF 64xml2_LIBS=-lws2_32 65.IF "$(MINGW_SHARED_GXXLIB)"=="YES" 66xml2_LIBS+=$(MINGW_SHARED_LIBSTDCPP) 67.ENDIF 68CONFIGURE_DIR= 69CONFIGURE_ACTION=.$/configure 70CONFIGURE_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 71BUILD_ACTION=$(GNUMAKE) 72BUILD_DIR=$(CONFIGURE_DIR) 73.ELSE 74CONFIGURE_DIR=win32 75CONFIGURE_ACTION=cscript configure.js 76CONFIGURE_FLAGS=iconv=no sax1=yes 77.IF "$(debug)"!="" 78CONFIGURE_FLAGS+=debug=yes 79.ENDIF 80BUILD_ACTION=nmake 81BUILD_DIR=$(CONFIGURE_DIR) 82.ENDIF 83.ELSE 84.IF "$(SYSBASE)"!="" 85xml2_CFLAGS+=-I$(SYSBASE)$/usr$/include 86.IF "$(COMNAME)"=="sunpro5" 87xml2_CFLAGS+=$(ARCH_FLAGS) $(C_RESTRICTIONFLAGS) 88.ENDIF # "$(COMNAME)"=="sunpro5" 89xml2_LDFLAGS+=-L$(SYSBASE)$/usr$/lib 90.ENDIF # "$(SYSBASE)"!="" 91 92CONFIGURE_DIR= 93.IF "$(OS)"=="OS2" 94CONFIGURE_ACTION=sh .$/configure 95CONFIGURE_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)" 96.ELSE 97CONFIGURE_ACTION=.$/configure 98CONFIGURE_FLAGS=--enable-ipv6=no --without-python --without-zlib --enable-static=no --with-sax1=yes ADDCFLAGS="$(xml2_CFLAGS) $(EXTRA_CFLAGS)" LDFLAGS="$(xml2_LDFLAGS) $(EXTRA_LINKFLAGS)" 99.ENDIF 100BUILD_ACTION=$(GNUMAKE) 101BUILD_FLAGS+= -j$(EXTMAXPROCESS) 102BUILD_DIR=$(CONFIGURE_DIR) 103.ENDIF 104 105 106OUTDIR2INC=include$/libxml 107 108.IF "$(OS)"=="MACOSX" 109EXTRPATH=URELIB 110OUT2LIB+=.libs$/libxml2.*.dylib 111OUT2BIN+=.libs$/xmllint 112OUT2BIN+=xml2-config 113.ELIF "$(OS)"=="WNT" 114.IF "$(COM)"=="GCC" 115OUT2LIB+=.libs$/libxml2*.a 116OUT2BIN+=.libs$/libxml2*.dll 117OUT2BIN+=.libs$/xmllint.exe 118OUT2BIN+=xml2-config 119.ELSE 120OUT2LIB+=win32$/bin.msvc$/*.lib 121OUT2BIN+=win32$/bin.msvc$/*.dll 122OUT2BIN+=win32$/bin.msvc$/xmllint.exe 123.ENDIF 124.ELSE 125OUT2LIB+=.libs$/libxml2.so* 126OUT2BIN+=.libs$/xmllint 127OUT2BIN+=xml2-config 128.ENDIF 129 130# --- Targets ------------------------------------------------------ 131 132.INCLUDE : set_ext.mk 133.INCLUDE : target.mk 134.INCLUDE : tg_ext.mk 135 136