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=libxslt 27TARGET=so_libxslt 28 29# --- Settings ----------------------------------------------------- 30 31.INCLUDE : settings.mk 32 33.IF "$(SYSTEM_LIBXSLT)" == "YES" 34all: 35 @echo "An already available installation of libxslt 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 41.IF "$(L10N_framework)"=="" 42 43.INCLUDE : libxsltversion.mk 44 45LIBXSLTVERSION=$(LIBXSLT_MAJOR).$(LIBXSLT_MINOR).$(LIBXSLT_MICRO) 46 47TARFILE_NAME=$(PRJNAME)-$(LIBXSLTVERSION) 48TARFILE_MD5=db8765c8d076f1b6caafd9f2542a304a 49 50# libxslt-internal-symbols: #i112480#: Solaris ld requires symbols to be defined 51PATCH_FILES=libxslt-configure.patch \ 52 libxslt-win_manifest.patch \ 53 libxslt-stdlib-getenv.patch 54 55# This is only for UNX environment now 56.IF "$(OS)"=="WNT" 57.IF "$(COM)"=="GCC" 58xslt_CC=$(CC) -mthreads 59.IF "$(MINGW_SHARED_GCCLIB)"=="YES" 60xslt_CC+=-shared-libgcc 61.ENDIF 62xslt_LIBS= 63.IF "$(MINGW_SHARED_GXXLIB)"=="YES" 64xslt_LIBS+=$(MINGW_SHARED_LIBSTDCPP) 65.ENDIF 66CONFIGURE_DIR= 67CONFIGURE_ACTION=.$/configure 68CONFIGURE_FLAGS=--without-crypto --without-python --enable-static=no --build=i586-pc-mingw32 --host=i586-pc-mingw32 CC="$(xslt_CC)" CFLAGS="$(xslt_CFLAGS)" LDFLAGS="-no-undefined -Wl,--enable-runtime-pseudo-reloc-v2 -L$(ILIB:s/;/ -L/)" LIBS="$(xslt_LIBS)" LIBXML2LIB=$(LIBXML2LIB) OBJDUMP=objdump 69BUILD_ACTION=chmod 777 xslt-config && $(GNUMAKE) 70BUILD_FLAGS+= -j$(EXTMAXPROCESS) 71BUILD_DIR=$(CONFIGURE_DIR) 72.IF "$(GUI)$(COM)"=="WNTGCC" 73.EXPORT : PWD 74.ENDIF 75.ELSE 76CONFIGURE_DIR=win32 77CONFIGURE_ACTION=cscript configure.js 78#CONFIGURE_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 87.IF "$(OS)$(COM)"=="LINUXGCC" || "$(OS)$(COM)"=="FREEBSDGCC" 88LDFLAGS:=-Wl,-rpath,'$$$$ORIGIN:$$$$ORIGIN/../ure-link/lib' -Wl,-noinhibit-exec 89.ENDIF # "$(OS)$(COM)"=="LINUXGCC" 90.IF "$(OS)$(COM)"=="SOLARISC52" 91LDFLAGS:=-Wl,-R'$$$$ORIGIN:$$$$ORIGIN/../ure-link/lib' 92.ENDIF # "$(OS)$(COM)"=="SOLARISC52" 93 94.IF "$(SYSBASE)"!="" 95CPPFLAGS+:=-I$(SOLARINCDIR)$/external -I$(SYSBASE)$/usr$/include $(EXTRA_CFLAGS) 96.IF "$(OS)"=="SOLARIS" || "$(OS)"=="LINUX" 97LDFLAGS+:=-L$(SOLARLIBDIR) -L$(SYSBASE)$/lib -L$(SYSBASE)$/usr$/lib -lpthread -ldl 98.ENDIF 99.ENDIF # "$(SYSBASE)"!="" 100 101.EXPORT: CPPFLAGS 102.EXPORT: LDFLAGS 103.EXPORT: LIBXML2LIB 104 105.IF "$(COMNAME)"=="sunpro5" 106CPPFLAGS+:=$(ARCH_FLAGS) -xc99=none 107.ENDIF # "$(COMNAME)"=="sunpro5" 108CONFIGURE_DIR= 109CONFIGURE_ACTION=.$/configure 110.IF "$(OS)"=="MACOSX" 111# Community builds bundle a static libxslt/libexslt rather than a dylib -- 112# see main/xmlsecurity/util/makefile.mk and main/forms/util/makefile.mk 113# for the analogous libxml2 case. 114# 115# libxslt's own configure otherwise discovers libxml2 via pkg-config, 116# which resolves to whatever libxml2 a package manager (MacPorts, 117# Homebrew, ...) has registered there -- not the bundled copy this 118# module just built. --with-libxml-prefix pins it to the bundled 119# xml2-config instead, matching the consumer-side fix in xmlsecurity/ 120# forms. 121CONFIGURE_FLAGS=--enable-ipv6=no --without-crypto --without-python --enable-static=yes --enable-shared=no --with-sax1=yes --with-libxml-prefix=$(SOLARVERSION)/$(INPATH) ac_cv_func_clock_gettime=false 122.ELSE 123CONFIGURE_FLAGS=--enable-ipv6=no --without-crypto --without-python --enable-static=no --with-sax1=yes ac_cv_func_clock_gettime=false 124.ENDIF 125BUILD_ACTION=chmod 777 xslt-config && $(GNUMAKE) 126BUILD_FLAGS+= -j$(EXTMAXPROCESS) 127BUILD_DIR=$(CONFIGURE_DIR) 128.ENDIF 129 130OUT2INC=libxslt$/*.h 131 132.IF "$(OS)"=="MACOSX" 133OUT2LIB+=libxslt$/.libs$/libxslt.a 134OUT2LIB+=libexslt$/.libs$/libexslt.a 135# With --enable-shared=no, libtool links xsltproc directly (no .libs 136# wrapper dir, unlike the static .a archives above). 137OUT2BIN+=xsltproc$/xsltproc 138OUT2BIN+=xslt-config 139.ELIF "$(OS)"=="WNT" 140.IF "$(COM)"=="GCC" 141OUT2LIB+=libxslt$/.libs$/*.a 142OUT2LIB+=libexslt$/.libs$/*.a 143OUT2BIN+=libxslt$/.libs$/*.dll 144OUT2BIN+=libexslt$/.libs$/*.dll 145OUT2BIN+=xsltproc$/.libs$/*.exe* 146OUT2BIN+=xslt-config 147.ELSE 148OUT2LIB+=win32$/bin.msvc$/*.lib 149OUT2BIN+=win32$/bin.msvc$/*.dll 150OUT2BIN+=win32$/bin.msvc$/*.exe 151.ENDIF 152.ELSE 153OUT2LIB+=libxslt$/.libs$/libxslt.so* 154OUT2LIB+=libexslt$/.libs$/libexslt.so* 155OUT2BIN+=xsltproc$/.libs$/xsltproc 156OUT2BIN+=xslt-config 157.ENDIF 158 159# --- Targets ------------------------------------------------------ 160.ENDIF # L10N_framework 161.INCLUDE : set_ext.mk 162.INCLUDE : target.mk 163.INCLUDE : tg_ext.mk 164