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=xmlsec1 27TARGET=so_xmlsec1 28EXTERNAL_WARNINGS_NOT_ERRORS := TRUE 29 30# --- Settings ----------------------------------------------------- 31 32.INCLUDE : settings.mk 33 34.IF "$(WITH_MOZILLA)" == "NO" 35@all: 36 @echo "Mozilla disabled -> no nss -> no libxmlsec...." 37.ENDIF 38 39# --- Files -------------------------------------------------------- 40 41XMLSEC1VERSION=1.2.14 42 43TARFILE_NAME=$(PRJNAME)-$(XMLSEC1VERSION) 44TARFILE_MD5=1f24ab1d39f4a51faf22244c94a6203f 45 46#xmlsec1-configure.patch: Set up the build. Straightforward configuration 47#xmlsec1-configure-libxml-libxslt.patch: empty "$with_libxml" prepends /bin :-( 48#xmlsec1-olderlibxml2.patch: Allow build against older libxml2, for macosx 49#xmlsec1-nssdisablecallbacks.patch: Disable use of smime3 so don't need to package it 50#xmlsec1-customkeymanage.patch: Could we do this alternatively outside xmlsec 51#xmlsec1-nssmangleciphers.patch: Dubious, do we still need this ? 52#xmlsec1-noverify.patch: As per readme.txt. 53#xmlsec1-mingw32.patch: Mingw32 support. 54#xmlsec1-mingw-customkeymanage-addmscrypto.patch builds the custom keymanager on mingw 55PATCH_FILES=\ 56 xmlsec1-configure.patch \ 57 xmlsec1-configure-libxml-libxslt.patch \ 58 xmlsec1-olderlibxml2.patch \ 59 xmlsec1-nssdisablecallbacks.patch \ 60 xmlsec1-customkeymanage.patch \ 61 xmlsec1-nssmangleciphers.patch \ 62 xmlsec1-noverify.patch \ 63 xmlsec1-mingw32.patch \ 64 xmlsec1-mingw-keymgr-mscrypto.patch 65 66 67ADDITIONAL_FILES= \ 68 include$/xmlsec$/mscrypto$/akmngr.h \ 69 src$/mscrypto$/akmngr.c \ 70 include$/xmlsec$/nss$/akmngr.h \ 71 include$/xmlsec$/nss$/ciphers.h \ 72 include$/xmlsec$/nss$/tokens.h \ 73 src$/nss$/akmngr.c \ 74 src$/nss$/keywrapers.c \ 75 src$/nss$/tokens.c 76 77.IF "$(GUI)"=="WNT" 78CRYPTOLIB=mscrypto 79#CRYPTOLIB=nss 80#BASEINC=$(SOLARVERSION)$/$(INPATH)$/inc$(UPDMINOREXT)$/mozilla;$(SOLARVERSION)$/$(INPATH)$/inc$(UPDMINOREXT)$/mozilla$/nspr;$(SOLARVERSION)$/$(INPATH)$/inc$(UPDMINOREXT)$/mozilla$/nss;$(SOLARVERSION)$/$(INPATH)$/inc$(UPDMINOREXT)$/external 81#BASELIB=$(SOLARVERSION)$/$(INPATH)$/lib$(UPDMINOREXT) 82.ELSE 83CRYPTOLIB=nss 84.ENDIF 85 86.IF "$(OS)"=="WNT" 87.IF "$(COM)"=="GCC" 88xmlsec_CC=$(CC) -mthreads 89.IF "$(MINGW_SHARED_GCCLIB)"=="YES" 90xmlsec_CC+=-shared-libgcc 91.ENDIF 92xmlsec_LIBS= 93.IF "$(MINGW_SHARED_GXXLIB)"=="YES" 94xmlsec_LIBS+=$(MINGW_SHARED_LIBSTDCPP) 95.ENDIF 96CONFIGURE_DIR= 97CONFIGURE_ACTION=.$/configure 98CONFIGURE_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" 99 100.IF "$(SYSTEM_MOZILLA)" != "YES" 101CONFIGURE_FLAGS+=--enable-pkgconfig=no 102.ENDIF 103BUILD_ACTION=$(GNUMAKE) -j$(EXTMAXPROCESS) 104BUILD_DIR=$(CONFIGURE_DIR) 105.ELSE 106CONFIGURE_DIR=win32 107CONFIGURE_ACTION=cscript configure.js 108.IF "$(product)"!="full" && "$(CCNUMVER)" >= "001399999999" 109CONFIGURE_FLAGS=crypto=$(CRYPTOLIB) debug=yes xslt=no iconv=no static=no include=$(BASEINC) lib=$(BASELIB) 110.ELSE 111CONFIGURE_FLAGS=crypto=$(CRYPTOLIB) xslt=no iconv=no static=no include=$(BASEINC) lib=$(BASELIB) 112.ENDIF 113BUILD_ACTION=nmake 114BUILD_DIR=$(CONFIGURE_DIR) 115.ENDIF 116.ELSE 117.IF "$(GUI)"=="UNX" 118 119.IF "$(COM)"=="C52" && "$(CPU)"=="U" 120xmlsec_CFLAGS+=-m64 121.ENDIF 122 123.IF "$(SYSBASE)"!="" 124xmlsec_CFLAGS+=-I$(SYSBASE)$/usr$/include 125.IF "$(COMNAME)"=="sunpro5" 126xmlsec_CFLAGS+=$(C_RESTRICTIONFLAGS) 127.ENDIF # "$(COMNAME)"=="sunpro5" 128.IF "$(EXTRA_CFLAGS)"!="" 129xmlsec_CFLAGS+=$(EXTRA_CFLAGS) 130xmlsec_CPPFLAGS+=$(EXTRA_CFLAGS) 131.ENDIF # "$(EXTRA_CFLAGS)"!="" 132xmlsec_LDFLAGS+=-L$(SYSBASE)$/usr$/lib 133.ELIF "$(OS)"=="MACOSX" # "$(SYSBASE)"!="" 134xmlsec_CPPFLAGS+=$(EXTRA_CDEFS) 135.ENDIF 136 137.IF "$(OS)$(COM)"=="LINUXGCC" || "$(OS)$(COM)"=="FREEBSDGCC" 138xmlsec_LDFLAGS+=-Wl,-rpath,'$$$$ORIGIN:$$$$ORIGIN/../ure-link/lib' 139.ENDIF # "$(OS)$(COM)"=="LINUXGCC" 140.IF "$(OS)$(COM)"=="SOLARISC52" 141xmlsec_LDFLAGS+=-Wl,-R'$$$$ORIGIN:$$$$ORIGIN/../ure-link/lib' 142.ENDIF # "$(OS)$(COM)"=="SOLARISC52" 143 144LDFLAGS:=$(xmlsec_LDFLAGS) 145.EXPORT: LDFLAGS 146 147.ENDIF 148CONFIGURE_DIR= 149CONFIGURE_ACTION=.$/configure ADDCFLAGS="$(xmlsec_CFLAGS)" CPPFLAGS="$(xmlsec_CPPFLAGS)" 150CONFIGURE_FLAGS=--with-pic --disable-shared --disable-crypto-dl --with-libxslt=no --with-openssl=no --with-gnutls=no LIBXML2LIB="$(LIBXML2LIB)" 151# system-mozilla needs pkgconfig to get the information about nss 152# FIXME: This also will enable pkg-config usage for libxml2. It *seems* 153# that the internal headers still are used when they are there but.... 154# (and that pkg-config is allowed to fail...) 155# I have no real good idea how to get mozilla (nss) pkg-config'ed and libxml2 156# not... We need mozilla-nss pkg-config'ed since we can *not* just use 157# --with-nss or parse -pkg-config --libs / cflags mozilla-nss since 158# the lib may a) be in /usr/lib (Debian) and be not in $with_nss/include 159# $with_nss/lib. 160.IF "$(SYSTEM_MOZILLA)" != "YES" 161CONFIGURE_FLAGS+=--enable-pkgconfig=no 162.ENDIF 163BUILD_ACTION=$(GNUMAKE) -j$(EXTMAXPROCESS) 164BUILD_DIR=$(CONFIGURE_DIR) 165.ENDIF 166 167 168OUTDIR2INC=include$/xmlsec 169 170.IF "$(OS)"=="WNT" 171.IF "$(COM)"=="GCC" 172OUT2LIB+=src$/.libs$/libxmlsec1.dll.a src$/nss$/.libs$/libxmlsec1-nss.dll.a src$/mscrypto$/.libs$/libxmlsec1-mscrypto.dll.a 173OUT2BIN+=src$/.libs$/libxmlsec1.dll src$/nss$/.libs$/libxmlsec1-nss.dll src$/mscrypto$/.libs$/libxmlsec1-mscrypto.dll 174.ELSE 175OUT2LIB+=win32$/binaries$/*.lib 176OUT2BIN+=win32$/binaries$/*.dll 177.ENDIF 178.ELSE 179OUT2LIB+=src$/.libs$/libxmlsec1.a src$/nss$/.libs$/libxmlsec1-nss.a 180.ENDIF 181 182# --- Targets ------------------------------------------------------ 183 184.INCLUDE : set_ext.mk 185.INCLUDE : target.mk 186.INCLUDE : tg_ext.mk 187 188 189