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