17871dc3eSAndrew Rist#************************************************************** 27871dc3eSAndrew Rist# 37871dc3eSAndrew Rist# Licensed to the Apache Software Foundation (ASF) under one 47871dc3eSAndrew Rist# or more contributor license agreements. See the NOTICE file 57871dc3eSAndrew Rist# distributed with this work for additional information 67871dc3eSAndrew Rist# regarding copyright ownership. The ASF licenses this file 77871dc3eSAndrew Rist# to you under the Apache License, Version 2.0 (the 87871dc3eSAndrew Rist# "License"); you may not use this file except in compliance 97871dc3eSAndrew Rist# with the License. You may obtain a copy of the License at 107871dc3eSAndrew Rist# 117871dc3eSAndrew Rist# http://www.apache.org/licenses/LICENSE-2.0 127871dc3eSAndrew Rist# 137871dc3eSAndrew Rist# Unless required by applicable law or agreed to in writing, 147871dc3eSAndrew Rist# software distributed under the License is distributed on an 157871dc3eSAndrew Rist# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 167871dc3eSAndrew Rist# KIND, either express or implied. See the License for the 177871dc3eSAndrew Rist# specific language governing permissions and limitations 187871dc3eSAndrew Rist# under the License. 197871dc3eSAndrew Rist# 207871dc3eSAndrew Rist#************************************************************** 217871dc3eSAndrew Rist 227871dc3eSAndrew Rist 23cdf0e10cSrcweir 24cdf0e10cSrcweirPRJ=. 25cdf0e10cSrcweir 26cdf0e10cSrcweirPRJNAME=xmlsec1 27cdf0e10cSrcweirTARGET=so_xmlsec1 28cdf0e10cSrcweirEXTERNAL_WARNINGS_NOT_ERRORS := TRUE 29cdf0e10cSrcweir 30cdf0e10cSrcweir# --- Settings ----------------------------------------------------- 31cdf0e10cSrcweir 32cdf0e10cSrcweir.INCLUDE : settings.mk 33cdf0e10cSrcweir 34*96e0c447SPavel Janík.IF "$(ENABLE_NSS_MODULE)" == "NO" 35cdf0e10cSrcweir@all: 36*96e0c447SPavel Janík @echo "No nss -> no libxmlsec...." 37cdf0e10cSrcweir.ENDIF 38cdf0e10cSrcweir 39cdf0e10cSrcweir# --- Files -------------------------------------------------------- 40cdf0e10cSrcweir 41cdf0e10cSrcweirXMLSEC1VERSION=1.2.14 42cdf0e10cSrcweir 43cdf0e10cSrcweirTARFILE_NAME=$(PRJNAME)-$(XMLSEC1VERSION) 44cdf0e10cSrcweirTARFILE_MD5=1f24ab1d39f4a51faf22244c94a6203f 45cdf0e10cSrcweir 46cdf0e10cSrcweir#xmlsec1-configure.patch: Set up the build. Straightforward configuration 47cdf0e10cSrcweir#xmlsec1-configure-libxml-libxslt.patch: empty "$with_libxml" prepends /bin :-( 48cdf0e10cSrcweir#xmlsec1-olderlibxml2.patch: Allow build against older libxml2, for macosx 49cdf0e10cSrcweir#xmlsec1-nssdisablecallbacks.patch: Disable use of smime3 so don't need to package it 50cdf0e10cSrcweir#xmlsec1-customkeymanage.patch: Could we do this alternatively outside xmlsec 51cdf0e10cSrcweir#xmlsec1-nssmangleciphers.patch: Dubious, do we still need this ? 52cdf0e10cSrcweir#xmlsec1-noverify.patch: As per readme.txt. 53cdf0e10cSrcweir#xmlsec1-mingw32.patch: Mingw32 support. 54cdf0e10cSrcweir#xmlsec1-mingw-customkeymanage-addmscrypto.patch builds the custom keymanager on mingw 55cdf0e10cSrcweirPATCH_FILES=\ 56cdf0e10cSrcweir xmlsec1-configure.patch \ 57cdf0e10cSrcweir xmlsec1-configure-libxml-libxslt.patch \ 58cdf0e10cSrcweir xmlsec1-olderlibxml2.patch \ 59cdf0e10cSrcweir xmlsec1-nssdisablecallbacks.patch \ 60cdf0e10cSrcweir xmlsec1-customkeymanage.patch \ 61cdf0e10cSrcweir xmlsec1-nssmangleciphers.patch \ 62cdf0e10cSrcweir xmlsec1-noverify.patch \ 63cdf0e10cSrcweir xmlsec1-mingw32.patch \ 64cdf0e10cSrcweir xmlsec1-mingw-keymgr-mscrypto.patch 65cdf0e10cSrcweir 66cdf0e10cSrcweir 67cdf0e10cSrcweirADDITIONAL_FILES= \ 68cdf0e10cSrcweir include$/xmlsec$/mscrypto$/akmngr.h \ 69cdf0e10cSrcweir src$/mscrypto$/akmngr.c \ 70cdf0e10cSrcweir include$/xmlsec$/nss$/akmngr.h \ 71cdf0e10cSrcweir include$/xmlsec$/nss$/ciphers.h \ 72cdf0e10cSrcweir include$/xmlsec$/nss$/tokens.h \ 73cdf0e10cSrcweir src$/nss$/akmngr.c \ 74cdf0e10cSrcweir src$/nss$/keywrapers.c \ 75cdf0e10cSrcweir src$/nss$/tokens.c 76cdf0e10cSrcweir 77cdf0e10cSrcweir.IF "$(GUI)"=="WNT" 78cdf0e10cSrcweirCRYPTOLIB=mscrypto 79cdf0e10cSrcweir#CRYPTOLIB=nss 80cdf0e10cSrcweir#BASEINC=$(SOLARVERSION)$/$(INPATH)$/inc$(UPDMINOREXT)$/mozilla;$(SOLARVERSION)$/$(INPATH)$/inc$(UPDMINOREXT)$/mozilla$/nspr;$(SOLARVERSION)$/$(INPATH)$/inc$(UPDMINOREXT)$/mozilla$/nss;$(SOLARVERSION)$/$(INPATH)$/inc$(UPDMINOREXT)$/external 81cdf0e10cSrcweir#BASELIB=$(SOLARVERSION)$/$(INPATH)$/lib$(UPDMINOREXT) 82cdf0e10cSrcweir.ELSE 83cdf0e10cSrcweirCRYPTOLIB=nss 84cdf0e10cSrcweir.ENDIF 85cdf0e10cSrcweir 86cdf0e10cSrcweir.IF "$(OS)"=="WNT" 87cdf0e10cSrcweir.IF "$(COM)"=="GCC" 88cdf0e10cSrcweirxmlsec_CC=$(CC) -mthreads 89cdf0e10cSrcweir.IF "$(MINGW_SHARED_GCCLIB)"=="YES" 90cdf0e10cSrcweirxmlsec_CC+=-shared-libgcc 91cdf0e10cSrcweir.ENDIF 92cdf0e10cSrcweirxmlsec_LIBS= 93cdf0e10cSrcweir.IF "$(MINGW_SHARED_GXXLIB)"=="YES" 94cdf0e10cSrcweirxmlsec_LIBS+=$(MINGW_SHARED_LIBSTDCPP) 95cdf0e10cSrcweir.ENDIF 96cdf0e10cSrcweirCONFIGURE_DIR= 97cdf0e10cSrcweirCONFIGURE_ACTION=.$/configure 98cdf0e10cSrcweirCONFIGURE_FLAGS=--with-libxslt=no --with-openssl=no --with-gnutls=no --with-mozilla_ver=1.7.5 --enable-mscrypto --disable-crypto-dl --build=i586-pc-mingw32 --host=i586-pc-mingw32 CC="$(xmlsec_CC)" LDFLAGS="-no-undefined -L$(ILIB:s/;/ -L/)" LIBS="$(xmlsec_LIBS)" LIBXML2LIB=$(LIBXML2LIB) ZLIB3RDLIB=$(ZLIB3RDLIB) OBJDUMP="$(WRAPCMD) objdump" 99cdf0e10cSrcweir 100cdf0e10cSrcweir.IF "$(SYSTEM_MOZILLA)" != "YES" 101cdf0e10cSrcweirCONFIGURE_FLAGS+=--enable-pkgconfig=no 102cdf0e10cSrcweir.ENDIF 103cdf0e10cSrcweirBUILD_ACTION=$(GNUMAKE) -j$(EXTMAXPROCESS) 104cdf0e10cSrcweirBUILD_DIR=$(CONFIGURE_DIR) 105cdf0e10cSrcweir.ELSE 106cdf0e10cSrcweirCONFIGURE_DIR=win32 107cdf0e10cSrcweirCONFIGURE_ACTION=cscript configure.js 108cdf0e10cSrcweir.IF "$(product)"!="full" && "$(CCNUMVER)" >= "001399999999" 109cdf0e10cSrcweirCONFIGURE_FLAGS=crypto=$(CRYPTOLIB) debug=yes xslt=no iconv=no static=no include=$(BASEINC) lib=$(BASELIB) 110cdf0e10cSrcweir.ELSE 111cdf0e10cSrcweirCONFIGURE_FLAGS=crypto=$(CRYPTOLIB) xslt=no iconv=no static=no include=$(BASEINC) lib=$(BASELIB) 112cdf0e10cSrcweir.ENDIF 113cdf0e10cSrcweirBUILD_ACTION=nmake 114cdf0e10cSrcweirBUILD_DIR=$(CONFIGURE_DIR) 115cdf0e10cSrcweir.ENDIF 116cdf0e10cSrcweir.ELSE 117cdf0e10cSrcweir.IF "$(GUI)"=="UNX" 118cdf0e10cSrcweir 119cdf0e10cSrcweir.IF "$(COM)"=="C52" && "$(CPU)"=="U" 120cdf0e10cSrcweirxmlsec_CFLAGS+=-m64 121cdf0e10cSrcweir.ENDIF 122cdf0e10cSrcweir 123cdf0e10cSrcweir.IF "$(SYSBASE)"!="" 124cdf0e10cSrcweirxmlsec_CFLAGS+=-I$(SYSBASE)$/usr$/include 125cdf0e10cSrcweir.IF "$(COMNAME)"=="sunpro5" 126cdf0e10cSrcweirxmlsec_CFLAGS+=$(C_RESTRICTIONFLAGS) 127cdf0e10cSrcweir.ENDIF # "$(COMNAME)"=="sunpro5" 128cdf0e10cSrcweir.IF "$(EXTRA_CFLAGS)"!="" 129cdf0e10cSrcweirxmlsec_CFLAGS+=$(EXTRA_CFLAGS) 130cdf0e10cSrcweirxmlsec_CPPFLAGS+=$(EXTRA_CFLAGS) 131cdf0e10cSrcweir.ENDIF # "$(EXTRA_CFLAGS)"!="" 132cdf0e10cSrcweirxmlsec_LDFLAGS+=-L$(SYSBASE)$/usr$/lib 133cdf0e10cSrcweir.ELIF "$(OS)"=="MACOSX" # "$(SYSBASE)"!="" 134cdf0e10cSrcweirxmlsec_CPPFLAGS+=$(EXTRA_CDEFS) 135cdf0e10cSrcweir.ENDIF 136cdf0e10cSrcweir 137cdf0e10cSrcweir.IF "$(OS)$(COM)"=="LINUXGCC" || "$(OS)$(COM)"=="FREEBSDGCC" 138cdf0e10cSrcweirxmlsec_LDFLAGS+=-Wl,-rpath,'$$$$ORIGIN:$$$$ORIGIN/../ure-link/lib' 139cdf0e10cSrcweir.ENDIF # "$(OS)$(COM)"=="LINUXGCC" 140cdf0e10cSrcweir.IF "$(OS)$(COM)"=="SOLARISC52" 141cdf0e10cSrcweirxmlsec_LDFLAGS+=-Wl,-R'$$$$ORIGIN:$$$$ORIGIN/../ure-link/lib' 142cdf0e10cSrcweir.ENDIF # "$(OS)$(COM)"=="SOLARISC52" 143cdf0e10cSrcweir 144cdf0e10cSrcweirLDFLAGS:=$(xmlsec_LDFLAGS) 145cdf0e10cSrcweir.EXPORT: LDFLAGS 146cdf0e10cSrcweir 147cdf0e10cSrcweir.ENDIF 148cdf0e10cSrcweirCONFIGURE_DIR= 149cdf0e10cSrcweirCONFIGURE_ACTION=.$/configure ADDCFLAGS="$(xmlsec_CFLAGS)" CPPFLAGS="$(xmlsec_CPPFLAGS)" 150cdf0e10cSrcweirCONFIGURE_FLAGS=--with-pic --disable-shared --disable-crypto-dl --with-libxslt=no --with-openssl=no --with-gnutls=no LIBXML2LIB="$(LIBXML2LIB)" 151cdf0e10cSrcweir# system-mozilla needs pkgconfig to get the information about nss 152cdf0e10cSrcweir# FIXME: This also will enable pkg-config usage for libxml2. It *seems* 153cdf0e10cSrcweir# that the internal headers still are used when they are there but.... 154cdf0e10cSrcweir# (and that pkg-config is allowed to fail...) 155cdf0e10cSrcweir# I have no real good idea how to get mozilla (nss) pkg-config'ed and libxml2 156cdf0e10cSrcweir# not... We need mozilla-nss pkg-config'ed since we can *not* just use 157cdf0e10cSrcweir# --with-nss or parse -pkg-config --libs / cflags mozilla-nss since 158cdf0e10cSrcweir# the lib may a) be in /usr/lib (Debian) and be not in $with_nss/include 159cdf0e10cSrcweir# $with_nss/lib. 160cdf0e10cSrcweir.IF "$(SYSTEM_MOZILLA)" != "YES" 161cdf0e10cSrcweirCONFIGURE_FLAGS+=--enable-pkgconfig=no 162cdf0e10cSrcweir.ENDIF 163cdf0e10cSrcweirBUILD_ACTION=$(GNUMAKE) -j$(EXTMAXPROCESS) 164cdf0e10cSrcweirBUILD_DIR=$(CONFIGURE_DIR) 165cdf0e10cSrcweir.ENDIF 166cdf0e10cSrcweir 167cdf0e10cSrcweir 168cdf0e10cSrcweirOUTDIR2INC=include$/xmlsec 169cdf0e10cSrcweir 170cdf0e10cSrcweir.IF "$(OS)"=="WNT" 171cdf0e10cSrcweir.IF "$(COM)"=="GCC" 172cdf0e10cSrcweirOUT2LIB+=src$/.libs$/libxmlsec1.dll.a src$/nss$/.libs$/libxmlsec1-nss.dll.a src$/mscrypto$/.libs$/libxmlsec1-mscrypto.dll.a 173cdf0e10cSrcweirOUT2BIN+=src$/.libs$/libxmlsec1.dll src$/nss$/.libs$/libxmlsec1-nss.dll src$/mscrypto$/.libs$/libxmlsec1-mscrypto.dll 174cdf0e10cSrcweir.ELSE 175cdf0e10cSrcweirOUT2LIB+=win32$/binaries$/*.lib 176cdf0e10cSrcweirOUT2BIN+=win32$/binaries$/*.dll 177cdf0e10cSrcweir.ENDIF 178cdf0e10cSrcweir.ELSE 179cdf0e10cSrcweirOUT2LIB+=src$/.libs$/libxmlsec1.a src$/nss$/.libs$/libxmlsec1-nss.a 180cdf0e10cSrcweir.ENDIF 181cdf0e10cSrcweir 182cdf0e10cSrcweir# --- Targets ------------------------------------------------------ 183cdf0e10cSrcweir 184cdf0e10cSrcweir.INCLUDE : set_ext.mk 185cdf0e10cSrcweir.INCLUDE : target.mk 186cdf0e10cSrcweir.INCLUDE : tg_ext.mk 187cdf0e10cSrcweir 188cdf0e10cSrcweir 189