2012-08-26 08:39:24 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
2013-03-07 14:56:48 +00:00
|
|
|
#
|
|
|
|
# This file is a part of Pcompress, a chunked parallel multi-
|
|
|
|
# algorithm lossless compression and decompression program.
|
|
|
|
#
|
|
|
|
# Copyright (C) 2012-2013 Moinak Ghosh. All rights reserved.
|
|
|
|
# Use is subject to license terms.
|
|
|
|
#
|
|
|
|
# This program is free software; you can redistribute it and/or
|
|
|
|
# modify it under the terms of the GNU Lesser General Public
|
|
|
|
# License as published by the Free Software Foundation; either
|
|
|
|
# version 3 of the License, or (at your option) any later version.
|
|
|
|
#
|
|
|
|
# This program is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
# Lesser General Public License for more details.
|
|
|
|
#
|
|
|
|
# moinakg@belenix.org, http://moinakg.wordpress.com/
|
|
|
|
#
|
|
|
|
|
2014-07-24 16:50:30 +00:00
|
|
|
my_license=LGPLv3
|
|
|
|
|
2012-08-26 08:39:24 +00:00
|
|
|
usage() {
|
|
|
|
prog=$1
|
|
|
|
cat << _EOF
|
|
|
|
${prog} [<options>]
|
|
|
|
|
|
|
|
<options> can be one of the following:
|
|
|
|
|
|
|
|
--prefix=<val> The installation prefix (default: /usr).
|
|
|
|
--enable-debug Enable debug mode compilation (default: disabled).
|
|
|
|
--disable-allocator Disable use of internal memory allocator mechanism (default: enabled).
|
|
|
|
--enable-debug-stats Enable printing of some verbose debug info (default: disabled).
|
2012-10-03 17:13:02 +00:00
|
|
|
--with-openssl=<path to OpenSSL installation tree> (Default: System)
|
2013-03-03 14:32:14 +00:00
|
|
|
This defaults to the system's OpenSSL library. You can use this option
|
|
|
|
if you want to use an alternate OpenSSL installation.
|
2012-12-16 17:47:04 +00:00
|
|
|
--with-zlib=<path to zlib installation tree> (Default: System)
|
2013-03-03 14:32:14 +00:00
|
|
|
Enable building against an alternate Zlib installation.
|
2012-12-16 17:47:04 +00:00
|
|
|
--with-bzlib=<path to Bzip2 library installation tree> (Default: System)
|
2013-03-03 14:32:14 +00:00
|
|
|
Enable building against an alternate Bzip2 and library installation.
|
2013-10-20 18:24:27 +00:00
|
|
|
--with-libarchive=<path to libarchive installation tree> (Default: System)
|
|
|
|
Enable building against an alternate libarchive installation.
|
2014-07-24 16:50:30 +00:00
|
|
|
--with-external-libbsc=<path to libbsc source tree>
|
|
|
|
Enable building with exernal libbsc sources. Can be used to link with
|
|
|
|
ASLv2 libbsc when using MPLv2 licensed sources.
|
2014-05-04 16:33:40 +00:00
|
|
|
--no-sse-detect Do NOT attempt to probe the system's SSE capability for build flags.
|
|
|
|
Implies '--no-avx-detect' below.
|
2014-07-24 16:50:30 +00:00
|
|
|
--no-avx-detect Do NOT attempt to probe the system's AVX capability for build flags.
|
2013-02-24 14:35:16 +00:00
|
|
|
--no-1.3-archive-compat Disable compatibility with compressed archives created with Pcompress
|
2013-03-03 14:32:14 +00:00
|
|
|
version 1.3 (default: retain compatibility). Hash formats changed from
|
|
|
|
version 1.3 to 1.4 so this option is required if files created using
|
|
|
|
1.3 need to be decompressed by version 1.4 onwards.
|
|
|
|
--limit-key128 Limit key length to 128-bit encryption keys. Otherwise the default is to
|
|
|
|
use 256-bit keys changeable at runtime via the '-k <keylen>' option.
|
2012-08-26 08:39:24 +00:00
|
|
|
--help Display this help message.
|
|
|
|
|
|
|
|
_EOF
|
2014-01-12 16:22:27 +00:00
|
|
|
exit 0
|
2012-08-26 08:39:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
arg1=$1
|
|
|
|
debug=0
|
|
|
|
allocator=1
|
|
|
|
debug_stats=0
|
|
|
|
prefix=/usr
|
2014-07-24 16:50:30 +00:00
|
|
|
|
|
|
|
if [ "$my_license" = "LGPLv3" ]
|
|
|
|
then
|
|
|
|
libbsc_dir=./bsc
|
|
|
|
libbsc_lib=${libbsc_dir}/libbsc.a
|
|
|
|
libbsclflags='\$\(LIBBSCLFLAGS\)'
|
|
|
|
libbscwrapobj='\$\(LIBBSCWRAPOBJ\)'
|
|
|
|
libbscgenopt='\$\(LIBBSCGEN_OPT\)'
|
|
|
|
libbsccppflags='\$\(LIBBSCCPPFLAGS\)'
|
|
|
|
fi
|
2012-10-03 17:13:02 +00:00
|
|
|
openssl_prefix=
|
|
|
|
openssl_libdir=
|
|
|
|
openssl_incdir=
|
2012-10-21 15:33:07 +00:00
|
|
|
libbz2_libdir=
|
|
|
|
libz_libdir=
|
2013-10-20 18:24:27 +00:00
|
|
|
libarchive_libdir=
|
2012-10-06 15:21:23 +00:00
|
|
|
sha256asmobjs=
|
|
|
|
sha256objs=
|
2012-10-15 06:40:00 +00:00
|
|
|
keylen=
|
2012-10-06 15:21:23 +00:00
|
|
|
yasm=yasm
|
2014-04-30 17:16:24 +00:00
|
|
|
yasm_params_linux="-f x64 -f elf64 -X gnu -g dwarf2 -D LINUX"
|
2014-05-04 09:15:07 +00:00
|
|
|
yasm_params_osx="-f macho64 --prefix=_"
|
|
|
|
yasm_params_gas_osx="-f macho64 -X gnu -p gas --prefix=_"
|
2014-05-04 08:02:11 +00:00
|
|
|
yasm_params_gas=
|
2012-12-08 08:49:01 +00:00
|
|
|
keccak_srcs=
|
|
|
|
keccak_hdrs=
|
|
|
|
keccak_srcs_asm=
|
2013-01-20 17:23:36 +00:00
|
|
|
extra_opt_flags=
|
2012-12-16 17:47:04 +00:00
|
|
|
zlib_prefix=
|
|
|
|
bzlib_prefix=
|
2013-10-20 18:24:27 +00:00
|
|
|
libarchive_prefix=
|
2013-01-20 17:23:36 +00:00
|
|
|
sse_detect=1
|
2014-05-04 16:33:40 +00:00
|
|
|
avx_detect=1
|
2013-01-24 18:40:12 +00:00
|
|
|
sse_opt_flags="-msse2"
|
2013-02-24 14:35:16 +00:00
|
|
|
crypto_compat_objs='\$\(CRYPTO_COMPAT_OBJS\)'
|
|
|
|
crypto_compat_flags="-D__HASH_COMPATIBILITY_"
|
2013-03-04 16:26:07 +00:00
|
|
|
salsa20_stream_c=
|
|
|
|
salsa20_stream_asm='\$\(XSALSA20_STREAM_ASM\)'
|
|
|
|
salsa20_debug=
|
2014-04-26 17:35:14 +00:00
|
|
|
so_suffix=so
|
2014-05-04 06:24:33 +00:00
|
|
|
crypto_asm_compile='\$\(CRYPTO_ASM_COMPILE1\)'
|
2014-05-04 08:02:11 +00:00
|
|
|
use_clang_as=
|
|
|
|
soname_opt="soname,"
|
|
|
|
rpath="-R"
|
|
|
|
dtag_val=',--enable-new-dtags'
|
|
|
|
lrt="-lrt"
|
2014-05-09 17:23:47 +00:00
|
|
|
default_opt="O3"
|
|
|
|
max_opt="O3"
|
2014-04-26 17:35:14 +00:00
|
|
|
|
|
|
|
if [ -x /bin/echo ]
|
|
|
|
then
|
|
|
|
ECHO=/bin/echo
|
|
|
|
elif [ -x /usr/bin/echo ]
|
|
|
|
then
|
|
|
|
ECHO=/usr/bin/echo
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ "x$GCC" = "x" ]
|
|
|
|
then
|
|
|
|
GCC=gcc
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ "x$GPP" = "x" ]
|
|
|
|
then
|
|
|
|
GPP=g++
|
|
|
|
fi
|
2012-12-08 08:49:01 +00:00
|
|
|
|
2013-01-04 18:46:15 +00:00
|
|
|
rm -rf ./buildtmp
|
|
|
|
mkdir ./buildtmp
|
|
|
|
|
2013-10-20 18:24:27 +00:00
|
|
|
echo "Checking for GCC ..."
|
2012-12-08 08:49:01 +00:00
|
|
|
# Try a simple compilation
|
|
|
|
cat << _EOF > tst.c
|
|
|
|
#include <stdio.h>
|
|
|
|
|
|
|
|
int
|
|
|
|
main(void)
|
|
|
|
{
|
|
|
|
long l;
|
2012-12-17 14:53:30 +00:00
|
|
|
printf("%lu\n", sizeof (l));
|
2012-12-08 08:49:01 +00:00
|
|
|
return (0);
|
|
|
|
}
|
|
|
|
_EOF
|
|
|
|
|
2014-04-26 17:35:14 +00:00
|
|
|
${GCC} tst.c -o tst
|
2012-12-08 08:49:01 +00:00
|
|
|
if [ $? -ne 0 ]
|
|
|
|
then
|
|
|
|
echo "ERROR:"
|
2013-01-24 18:40:12 +00:00
|
|
|
echo "Cannot compile a simple program. GCC 4.4 and above is required"
|
2012-12-08 08:49:01 +00:00
|
|
|
echo "to build this program. Please include installation bindir of GCC in the PATH."
|
|
|
|
echo ""
|
|
|
|
rm -f tst.c
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2012-12-17 13:07:27 +00:00
|
|
|
# Check bitness of system/toolchain
|
2013-10-20 18:24:27 +00:00
|
|
|
echo "Checking for 32-bit/64-bit platform ..."
|
2012-12-08 08:49:01 +00:00
|
|
|
bitness=`./tst`
|
|
|
|
if [ $bitness -lt 8 ]
|
|
|
|
then
|
2012-12-17 13:07:27 +00:00
|
|
|
# Hmmm maybe default compilation is 32-bit. Re-try with m64 flag.
|
2014-04-26 17:35:14 +00:00
|
|
|
${GCC} -m64 tst.c -o tst
|
2012-12-17 13:07:27 +00:00
|
|
|
if [ $? -ne 0 ]
|
|
|
|
then
|
|
|
|
rm -f tst tst.c
|
|
|
|
echo "ERROR:"
|
|
|
|
echo "Only 64-bit platforms are supported."
|
|
|
|
echo ""
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
# If m64 compilation succeeds we assume platform to be 64-bit capable but
|
|
|
|
# explicit flag is reqd.
|
2013-01-20 17:23:36 +00:00
|
|
|
extra_opt_flags="-m64"
|
2012-12-08 08:49:01 +00:00
|
|
|
fi
|
2012-12-17 13:07:27 +00:00
|
|
|
rm -f tst tst.c
|
2012-08-27 16:21:55 +00:00
|
|
|
|
2012-08-26 08:39:24 +00:00
|
|
|
while [ "${arg1}" != "" ]
|
|
|
|
do
|
|
|
|
case "$arg1" in
|
|
|
|
--enable-debug) debug=1;;
|
|
|
|
--disable-allocator) allocator=0;;
|
|
|
|
--enable-debug-stats) debug_stats=1;;
|
|
|
|
--prefix=*)
|
|
|
|
pval=`echo ${arg1} | cut -f2 -d"="`
|
|
|
|
prefix=$pval
|
|
|
|
;;
|
2012-10-03 17:13:02 +00:00
|
|
|
--with-openssl=*)
|
|
|
|
openssl_prefix=`echo ${arg1} | cut -f2 -d"="`
|
|
|
|
;;
|
2012-12-16 17:47:04 +00:00
|
|
|
--with-zlib=*)
|
|
|
|
zlib_prefix=`echo ${arg1} | cut -f2 -d"="`
|
|
|
|
;;
|
|
|
|
--with-bzlib=*)
|
|
|
|
bzlib_prefix=`echo ${arg1} | cut -f2 -d"="`
|
|
|
|
;;
|
2013-10-20 18:24:27 +00:00
|
|
|
--with-libarchive=*)
|
|
|
|
libarchive_prefix=`echo ${arg1} | cut -f2 -d"="`
|
|
|
|
;;
|
2014-07-24 16:50:30 +00:00
|
|
|
--with-external-libbsc)
|
|
|
|
libbsc_dir=`echo ${arg1} | cut -f2 -d"="`
|
|
|
|
libbsc_lib=${libbsc_dir}/libbsc.a
|
|
|
|
libbsclflags='\$\(LIBBSCLFLAGS\)'
|
|
|
|
libbscwrapobj='\$\(LIBBSCWRAPOBJ\)'
|
|
|
|
libbscgenopt='\$\(LIBBSCGEN_OPT\)'
|
|
|
|
libbsccppflags='\$\(LIBBSCCPPFLAGS\)'
|
|
|
|
;;
|
2012-10-15 06:40:00 +00:00
|
|
|
--use-key256)
|
2013-03-03 14:32:14 +00:00
|
|
|
keylen='-DDEFAULT_KEYLEN=16'
|
2012-10-15 06:40:00 +00:00
|
|
|
;;
|
2013-01-24 18:40:12 +00:00
|
|
|
--no-sse-detect)
|
2013-01-20 17:23:36 +00:00
|
|
|
sse_detect=0
|
2014-05-04 16:33:40 +00:00
|
|
|
avx_detect=0
|
2013-01-20 17:23:36 +00:00
|
|
|
;;
|
2014-05-05 14:10:53 +00:00
|
|
|
--no-avx-detect)
|
|
|
|
avx_detect=0
|
|
|
|
;;
|
2013-02-24 14:35:16 +00:00
|
|
|
--no-1.3-archive-compat)
|
|
|
|
crypto_compat_objs=""
|
|
|
|
crypto_compat_flags=""
|
|
|
|
;;
|
2012-08-26 08:39:24 +00:00
|
|
|
--help) usage $0;;
|
|
|
|
*)
|
|
|
|
echo "Unrecognized option: ${arg1}"
|
|
|
|
exit 1
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
shift
|
|
|
|
arg1=$1
|
|
|
|
done
|
|
|
|
|
|
|
|
if [ $debug -eq 1 ]
|
|
|
|
then
|
|
|
|
typ="DEBUG"
|
2013-03-04 16:26:07 +00:00
|
|
|
salsa20_stream_c='\$\(XSALSA20_STREAM_C\)'
|
|
|
|
salsa20_stream_asm=
|
|
|
|
salsa20_debug='\$\(XSALSA20_DEBUG\)'
|
2012-08-26 08:39:24 +00:00
|
|
|
else
|
|
|
|
typ="RELEASE"
|
|
|
|
fi
|
|
|
|
|
2013-10-20 18:24:27 +00:00
|
|
|
echo "Checking OS ..."
|
2012-09-01 09:10:15 +00:00
|
|
|
OS=$(uname)
|
|
|
|
skeinblock='\$\(SKEIN_BLOCK_C\)'
|
|
|
|
if [ "$OS" = "Linux" ]
|
|
|
|
then
|
2012-10-21 15:33:07 +00:00
|
|
|
plat=$(uname -m)
|
2014-04-26 17:35:14 +00:00
|
|
|
elif [ "$OS" = "Darwin" ]
|
|
|
|
then
|
|
|
|
plat=$(uname -m)
|
|
|
|
so_suffix=dylib
|
2012-09-01 09:10:15 +00:00
|
|
|
elif [ "$OS" = "SunOS" ]
|
|
|
|
then
|
|
|
|
plat=$(isainfo -v)
|
|
|
|
else
|
|
|
|
echo "Unsupported OS: $OS"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2012-12-08 08:49:01 +00:00
|
|
|
# Check GCC version
|
2013-10-20 18:24:27 +00:00
|
|
|
echo "Checking GCC version ..."
|
2014-04-26 17:35:14 +00:00
|
|
|
vers=`${GCC} -dumpversion`
|
2012-12-08 08:49:01 +00:00
|
|
|
OIFS="$IFS"
|
|
|
|
IFS=.
|
|
|
|
set -- ${vers}
|
|
|
|
IFS="$OIFS"
|
|
|
|
|
2013-01-24 18:40:12 +00:00
|
|
|
if [ $1 -lt 4 -o $2 -lt 4 ]
|
2012-12-08 08:49:01 +00:00
|
|
|
then
|
|
|
|
echo "ERROR:"
|
2013-01-24 18:40:12 +00:00
|
|
|
echo "GCC version 4.4 or above is required."
|
2012-12-08 08:49:01 +00:00
|
|
|
echo ""
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2013-01-20 17:23:36 +00:00
|
|
|
if [ $sse_detect -eq 1 ]
|
|
|
|
then
|
2014-04-26 17:35:14 +00:00
|
|
|
${GCC} -o sse_level ./utils/sse_level.c ./utils/cpuid.c -I./utils
|
2013-01-20 17:23:36 +00:00
|
|
|
if [ $? -ne 0 ]
|
|
|
|
then
|
|
|
|
echo "ERROR:"
|
|
|
|
echo "Failed to build SSE detection utility."
|
|
|
|
echo ""
|
|
|
|
exit 1
|
|
|
|
fi
|
2014-05-04 16:33:40 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
if [ $sse_detect -eq 1 ]
|
|
|
|
then
|
|
|
|
# SSE Detection
|
|
|
|
${ECHO} -n "Checking for CPU SSE version ... "
|
2013-01-20 17:23:36 +00:00
|
|
|
sse_ver=`./sse_level`
|
|
|
|
if [ $? -ne 0 ]
|
|
|
|
then
|
|
|
|
rm -f sse_level
|
|
|
|
echo "ERROR:"
|
|
|
|
echo "SSE version detection utility. Try configuring with --no-sse-check option."
|
|
|
|
echo ""
|
|
|
|
exit 1
|
|
|
|
fi
|
2013-10-20 18:24:27 +00:00
|
|
|
echo $sse_ver
|
2013-01-24 18:40:12 +00:00
|
|
|
sse_opt_flags="-m${sse_ver}"
|
2013-01-20 17:23:36 +00:00
|
|
|
fi
|
|
|
|
|
2014-05-04 16:33:40 +00:00
|
|
|
if [ $avx_detect -eq 1 -a $sse_detect -eq 1 ]
|
|
|
|
then
|
|
|
|
${ECHO} -n "Checking for CPU AVX version ... "
|
|
|
|
avx_ver=`./sse_level --avx`
|
|
|
|
if [ $? -ne 0 ]
|
|
|
|
then
|
|
|
|
rm -f sse_level
|
|
|
|
echo "ERROR:"
|
|
|
|
echo "SSE/AVX version detection utility. Try configuring with --no-sse-check option."
|
|
|
|
echo ""
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
if [ "x$avx_ver" = "x" ]
|
|
|
|
then
|
|
|
|
echo None
|
|
|
|
else
|
|
|
|
echo $avx_ver
|
|
|
|
sse_opt_flags="${sse_opt_flags} -m${avx_ver}"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
rm -f sse_level
|
2013-01-20 17:23:36 +00:00
|
|
|
|
2012-09-01 09:10:15 +00:00
|
|
|
echo $plat | egrep 'x86_64|amd64' > /dev/null
|
|
|
|
if [ $? -eq 0 ]
|
|
|
|
then
|
2014-04-30 17:16:24 +00:00
|
|
|
if [ "$OS" != "Darwin" ]
|
|
|
|
then
|
|
|
|
skeinblock='\$\(SKEIN_BLOCK_ASM\)'
|
|
|
|
fi
|
2012-10-06 15:21:23 +00:00
|
|
|
yasm=
|
|
|
|
|
|
|
|
#
|
|
|
|
# Detect Yasm
|
|
|
|
#
|
2013-10-20 18:24:27 +00:00
|
|
|
echo "Checking for Yasm ..."
|
2012-10-06 15:21:23 +00:00
|
|
|
for bindir in /bin /usr/bin /usr/local/bin
|
|
|
|
do
|
|
|
|
if [ -x ${bindir}/yasm ]
|
|
|
|
then
|
|
|
|
# Get yasm version
|
|
|
|
yver=`${bindir}/yasm --version | head -1 | awk '{print $2}'`
|
|
|
|
_OIFS=$IFS; IFS="."; set -- ${yver}; IFS="$_OIFS"
|
|
|
|
major=$1
|
|
|
|
minor=$2
|
|
|
|
|
|
|
|
# Minimum yasm version 1.1
|
|
|
|
[ $major -lt 1 -o $minor -lt 1 ] && continue
|
|
|
|
yasm=${bindir}/yasm
|
2013-01-25 17:25:55 +00:00
|
|
|
sha256asmobjs='\$\(SHA2ASM_OBJS\)'
|
|
|
|
sha256objs='\$\(SHA2_OBJS\)'
|
2012-10-06 15:21:23 +00:00
|
|
|
fi
|
|
|
|
done
|
|
|
|
if [ "x${yasm}" = "x" ]
|
|
|
|
then
|
|
|
|
echo "Yasm version 1.1 or later is required to build on x64 platforms"
|
|
|
|
exit 1
|
|
|
|
fi
|
2012-12-08 08:49:01 +00:00
|
|
|
|
2014-04-30 17:16:24 +00:00
|
|
|
if [ "$OS" = "Linux" ]
|
|
|
|
then
|
|
|
|
yasm="${yasm} ${yasm_params_linux}"
|
2014-05-04 06:24:33 +00:00
|
|
|
|
2014-04-30 17:16:24 +00:00
|
|
|
elif [ "$OS" = "Darwin" ]
|
|
|
|
then
|
|
|
|
yasm="${yasm} ${yasm_params_osx}"
|
2014-05-04 08:02:11 +00:00
|
|
|
yasm_params_gas="${yasm} ${yasm_params_gas_osx}"
|
2014-05-04 06:24:33 +00:00
|
|
|
|
2014-04-30 17:16:24 +00:00
|
|
|
elif [ "$OS" = "SunOS" ]
|
|
|
|
then
|
|
|
|
yasm="${yasm} ${yasm_params_linux}"
|
|
|
|
fi
|
|
|
|
|
2012-12-08 08:49:01 +00:00
|
|
|
if [ $debug -eq 1 ]
|
|
|
|
then
|
|
|
|
keccak_srcs='\$\(KECCAK_SRC_OPT64\)'
|
|
|
|
keccak_hdrs='\$\(KECCAK_HDRS_OPT64\)'
|
|
|
|
else
|
|
|
|
keccak_srcs='\$\(KECCAK_SRC_OPT64_ASM1\)'
|
2014-05-04 06:24:33 +00:00
|
|
|
if [ "$OS" != "Darwin" ]
|
|
|
|
then
|
|
|
|
keccak_srcs_asm='\$\(KECCAK_SRC_OPT64_ASM2\)'
|
|
|
|
else
|
|
|
|
keccak_srcs_asm='\$\(KECCAK_SRC_OPT64_ASM3\)'
|
|
|
|
fi
|
2012-12-08 08:49:01 +00:00
|
|
|
keccak_hdrs='\$\(KECCAK_HDRS_OPT64_ASM\)'
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
keccak_srcs='\$\(KECCAK_SRC_OPT64\)'
|
2012-09-01 09:10:15 +00:00
|
|
|
fi
|
|
|
|
|
2014-05-04 08:02:11 +00:00
|
|
|
if [ "$OS" = "Darwin" ]
|
|
|
|
then
|
|
|
|
crypto_asm_compile='\$\(CRYPTO_ASM_COMPILE2\)'
|
|
|
|
use_clang_as="-Wa,-q"
|
2014-05-04 09:15:07 +00:00
|
|
|
soname_opt="install_name,"
|
2014-05-04 08:02:11 +00:00
|
|
|
rpath="-rpath,"
|
|
|
|
dtag_val=""
|
|
|
|
lrt=""
|
2014-05-09 17:23:47 +00:00
|
|
|
max_opt="O2"
|
2014-05-04 08:02:11 +00:00
|
|
|
fi
|
|
|
|
|
2012-10-03 17:13:02 +00:00
|
|
|
# Detect OpenSSL library
|
2013-10-20 18:24:27 +00:00
|
|
|
echo "Checking for OpenSSL ..."
|
2012-10-03 17:13:02 +00:00
|
|
|
for lib in "${openssl_prefix}/lib64" "${openssl_prefix}/usr/lib64" \
|
|
|
|
"${openssl_prefix}/lib" "${openssl_prefix}/usr/lib" \
|
2012-10-21 15:33:07 +00:00
|
|
|
"${openssl_prefix}/ssl/lib64" "${openssl_prefix}/ssl/lib" \
|
|
|
|
"${openssl_prefix}/lib/x86_64-linux-gnu" \
|
|
|
|
"${openssl_prefix}/usr/lib/x86_64-linux-gnu"
|
2012-10-03 17:13:02 +00:00
|
|
|
do
|
|
|
|
if [ -d ${lib} ]
|
|
|
|
then
|
2014-04-26 17:35:14 +00:00
|
|
|
if [ -f "${lib}/libcrypto.${so_suffix}" -o -h "${lib}/libcrypto.${so_suffix}" ]
|
2012-10-03 17:13:02 +00:00
|
|
|
then
|
2013-01-04 18:46:15 +00:00
|
|
|
openssl_libdir="${lib}"
|
2014-04-26 17:35:14 +00:00
|
|
|
(cd ./buildtmp; ln -s ${openssl_libdir}/libcrypto.${so_suffix})
|
2012-10-03 17:13:02 +00:00
|
|
|
break
|
|
|
|
else
|
|
|
|
if [ -f "${lib}/libcrypto.a" ]
|
|
|
|
then
|
2013-01-04 18:46:15 +00:00
|
|
|
openssl_libdir="${lib}"
|
|
|
|
(cd ./buildtmp; ln -s ${openssl_libdir}/libcrypto.a)
|
2012-10-03 17:13:02 +00:00
|
|
|
break
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
|
|
|
|
if [ "x${openssl_libdir}" = "x" ]
|
|
|
|
then
|
|
|
|
echo "ERROR: OpenSSL libraries not detected."
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
# Detect OpenSSL headers
|
|
|
|
for inc in "${openssl_prefix}/include" \
|
|
|
|
"${openssl_prefix}/usr/include" \
|
|
|
|
"${openssl_prefix}/ssl/include"
|
|
|
|
do
|
|
|
|
if [ -d ${inc} ]
|
|
|
|
then
|
|
|
|
if [ -f "${inc}/openssl/sha.h" ]
|
|
|
|
then
|
|
|
|
openssl_incdir=${inc}
|
|
|
|
break
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
|
|
|
|
if [ "x${openssl_incdir}" = "x" ]
|
|
|
|
then
|
|
|
|
echo "ERROR: OpenSSL header files not detected."
|
|
|
|
if [ "x${openssl_prefix}" = "x" ]
|
|
|
|
then
|
2012-10-21 15:33:07 +00:00
|
|
|
echo "Depending on your system you may need to install the openssl-devel or openssl-dev package."
|
2012-10-03 17:13:02 +00:00
|
|
|
fi
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2012-10-06 15:21:23 +00:00
|
|
|
|
2013-01-04 18:46:15 +00:00
|
|
|
# Check for OpenSSL version
|
2013-10-20 18:24:27 +00:00
|
|
|
echo "Checking OpenSSL version ..."
|
2013-01-04 18:46:15 +00:00
|
|
|
cat << __EOF > tst.c
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <openssl/opensslv.h>
|
|
|
|
|
|
|
|
int
|
|
|
|
main(void)
|
|
|
|
{
|
|
|
|
if (OPENSSL_VERSION_NUMBER < 0x0090805fL)
|
|
|
|
exit (1);
|
|
|
|
return (0);
|
|
|
|
}
|
|
|
|
__EOF
|
|
|
|
|
2014-04-26 17:35:14 +00:00
|
|
|
${GCC} ${extra_opt_flags} -I${openssl_incdir} -L${openssl_libdir} tst.c -o tst
|
2013-01-04 18:46:15 +00:00
|
|
|
if [ $? -ne 0 ]
|
|
|
|
then
|
|
|
|
echo "Unable to compile OpenSSL test program please check OpenSSL installation."
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
./tst
|
|
|
|
if [ $? -ne 0 ]
|
|
|
|
then
|
|
|
|
echo "OpenSSL version too old. At least version 0.9.8e is required.\n"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
# Check for HMAC_CTX_copy function
|
2014-04-26 17:35:14 +00:00
|
|
|
${ECHO} -n "Checking if the OpenSSL library provides HMAC_CTX_copy function ... "
|
2013-01-04 18:46:15 +00:00
|
|
|
cat << __EOF > tst.c
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <openssl/sha.h>
|
|
|
|
#include <openssl/rand.h>
|
|
|
|
#include <openssl/evp.h>
|
|
|
|
#include <openssl/hmac.h>
|
|
|
|
|
|
|
|
int
|
|
|
|
main(void)
|
|
|
|
{
|
|
|
|
unsigned char key[16];
|
|
|
|
HMAC_CTX *ctx = (HMAC_CTX *)malloc(sizeof (HMAC_CTX));
|
|
|
|
HMAC_CTX *ctx1 = (HMAC_CTX *)malloc(sizeof (HMAC_CTX));
|
|
|
|
|
|
|
|
HMAC_CTX_init(ctx);
|
|
|
|
HMAC_Init_ex(ctx, key, 16, EVP_sha256(), NULL);
|
|
|
|
HMAC_CTX_copy(ctx1, ctx);
|
|
|
|
|
|
|
|
return (0);
|
|
|
|
}
|
|
|
|
__EOF
|
|
|
|
|
2014-04-26 17:35:14 +00:00
|
|
|
${GCC} ${extra_opt_flags} -I${openssl_incdir} -L${openssl_libdir} -O0 -g tst.c -o tst -lcrypto >/dev/null 2>&1
|
2013-01-04 18:46:15 +00:00
|
|
|
if [ $? -ne 0 ]
|
|
|
|
then
|
|
|
|
openssl_incdir="${openssl_incdir} -D__OSSL_OLD__"
|
2013-10-20 18:24:27 +00:00
|
|
|
echo "No. Using internal variant."
|
|
|
|
else
|
|
|
|
echo "Yes."
|
2013-01-04 18:46:15 +00:00
|
|
|
fi
|
|
|
|
|
2014-04-30 17:16:24 +00:00
|
|
|
rm -rf tst*
|
2014-05-04 08:02:11 +00:00
|
|
|
openssl_libdir="${openssl_libdir}${dtag_val}"
|
2013-01-04 18:46:15 +00:00
|
|
|
|
2012-10-21 15:33:07 +00:00
|
|
|
# Detect other library packages
|
2013-10-20 18:24:27 +00:00
|
|
|
for libspec in "libbz2:${bzlib_prefix}" "libz:${zlib_prefix}" "libarchive:${libarchive_prefix}"
|
2012-10-21 15:33:07 +00:00
|
|
|
do
|
2012-12-16 17:47:04 +00:00
|
|
|
_OIFS="$IFS"
|
|
|
|
IFS=":"
|
|
|
|
set -- ${libspec}
|
|
|
|
libname=$1
|
|
|
|
pref=$2
|
|
|
|
IFS="$_OIFS"
|
|
|
|
|
2013-10-20 18:24:27 +00:00
|
|
|
echo "Checking for $libname ..."
|
2012-12-16 17:47:04 +00:00
|
|
|
use_prefix="${pref}"
|
|
|
|
if [ "x${pref}" = "x" ]
|
|
|
|
then
|
|
|
|
use_prefix="$prefix"
|
|
|
|
fi
|
|
|
|
for lib in "${pref}/lib64" "${pref}/usr/lib64" "${pref}/lib" "${pref}/usr/lib" \
|
|
|
|
"${pref}/lib/x86_64-linux-gnu" "${pref}/usr/lib/x86_64-linux-gnu" \
|
|
|
|
"${pref}/local/lib64" "${pref}/usr/local/lib64" "${pref}/local/lib" "${pref}/usr/local/lib" \
|
|
|
|
"${pref}/local/lib/x86_64-linux-gnu" "${pref}/usr/local/lib/x86_64-linux-gnu" \
|
|
|
|
"${use_prefix}/lib64" "${use_prefix}/lib" "${use_prefix}/lib/x86_64-linux-gnu" \
|
2014-01-14 16:29:32 +00:00
|
|
|
"${use_prefix}/usr/lib/x86_64-linux-gnu" "${use_prefix}/.libs" "${use_prefix}"
|
2012-10-21 15:33:07 +00:00
|
|
|
do
|
|
|
|
if [ -d ${lib} ]
|
|
|
|
then
|
2014-04-26 17:35:14 +00:00
|
|
|
if [ -f "${lib}/${libname}.${so_suffix}" -o -h "${lib}/${libname}.${so_suffix}" ]
|
2012-10-21 15:33:07 +00:00
|
|
|
then
|
2014-05-04 08:02:11 +00:00
|
|
|
eval "${libname}_libdir=${lib}${dtag_val}"
|
2014-04-26 17:35:14 +00:00
|
|
|
(cd ./buildtmp; ln -s ${lib}/${libname}.${so_suffix})
|
2012-10-21 15:33:07 +00:00
|
|
|
break
|
|
|
|
else
|
|
|
|
if [ -f "${lib}/${libname}.a" ]
|
|
|
|
then
|
2014-05-04 08:02:11 +00:00
|
|
|
eval "${libname}_libdir=${lib}${dtag_val}"
|
2013-01-04 18:46:15 +00:00
|
|
|
(cd ./buildtmp; ln -s ${lib}/${libname}.a)
|
2012-10-21 15:33:07 +00:00
|
|
|
break
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
done
|
|
|
|
|
|
|
|
if [ "x${libbz2_libdir}" = "x" ]
|
|
|
|
then
|
2012-12-16 17:47:04 +00:00
|
|
|
if [ "x$bzlib_prefix" = "x" ]
|
|
|
|
then
|
|
|
|
echo "ERROR: Libbz2 not detected."
|
|
|
|
echo " You may have to install libbz2-devel or libbz2-dev"
|
|
|
|
else
|
|
|
|
echo "ERROR: Bzip2 library not detected in given prefix."
|
|
|
|
fi
|
2012-10-21 15:33:07 +00:00
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ "x${libz_libdir}" = "x" ]
|
|
|
|
then
|
2012-12-16 17:47:04 +00:00
|
|
|
if [ "x$zlib_prefix" = "x" ]
|
|
|
|
then
|
|
|
|
echo "ERROR: Zlib not detected."
|
|
|
|
echo " You may have to install libz-devel or libz-dev"
|
|
|
|
else
|
|
|
|
echo "ERROR: Zlib not detected in given prefix."
|
|
|
|
fi
|
2012-10-21 15:33:07 +00:00
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2013-10-20 18:24:27 +00:00
|
|
|
if [ "x${libarchive_libdir}" = "x" ]
|
|
|
|
then
|
|
|
|
if [ "x$libarchive_prefix" = "x" ]
|
|
|
|
then
|
|
|
|
echo "ERROR: Libarchive not detected."
|
|
|
|
echo " You may have to install libarchive-devel or libarchive-dev"
|
|
|
|
else
|
|
|
|
echo "ERROR: Libarchive not detected in given prefix."
|
|
|
|
fi
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2012-10-21 15:33:07 +00:00
|
|
|
libbz2_inc=
|
|
|
|
libz_inc=
|
2013-10-20 18:24:27 +00:00
|
|
|
libarchive_inc=
|
2012-10-21 15:33:07 +00:00
|
|
|
# Detect other library headers
|
2013-10-20 18:24:27 +00:00
|
|
|
for hdr in "libbz2_inc:bzlib.h:${bzlib_prefix}" "libz_inc:zlib.h:${zlib_prefix}" \
|
|
|
|
"libarchive_inc:archive.h:${libarchive_prefix}"
|
2012-10-21 15:33:07 +00:00
|
|
|
do
|
|
|
|
_OIFS="$IFS"
|
|
|
|
IFS=":"
|
|
|
|
set -- ${hdr}
|
|
|
|
var=$1
|
|
|
|
hdrf=$2
|
2012-12-16 17:47:04 +00:00
|
|
|
pref=$3
|
2012-10-21 15:33:07 +00:00
|
|
|
IFS="$_OIFS"
|
|
|
|
|
2013-10-20 18:24:27 +00:00
|
|
|
echo "Checking for $hdrf ..."
|
2012-12-16 17:47:04 +00:00
|
|
|
use_prefix="${pref}"
|
|
|
|
if [ "x${pref}" = "x" ]
|
|
|
|
then
|
|
|
|
use_prefix="$prefix"
|
|
|
|
fi
|
2014-01-14 16:29:32 +00:00
|
|
|
found=0
|
2012-12-16 17:47:04 +00:00
|
|
|
for inc in "${pref}/include" "${pref}/usr/include" \
|
|
|
|
"${pref}/local/include" "${pref}/usr/local/include" \
|
2014-01-14 16:29:32 +00:00
|
|
|
"${use_prefix}/include" "${use_prefix}/usr/include" \
|
|
|
|
"${use_prefix}/libarchive" "${use_prefix}"
|
2012-10-21 15:33:07 +00:00
|
|
|
do
|
|
|
|
if [ -d ${inc} ]
|
|
|
|
then
|
|
|
|
if [ -f "${inc}/${hdrf}" ]
|
|
|
|
then
|
|
|
|
eval "${var}=\"-I${inc}\""
|
2014-01-14 16:29:32 +00:00
|
|
|
found=1
|
2012-10-21 15:33:07 +00:00
|
|
|
break
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
done
|
2014-01-14 16:29:32 +00:00
|
|
|
if [ $found -ne 1 ]
|
|
|
|
then
|
|
|
|
echo "Cannot find header $hdrf"
|
|
|
|
exit 1
|
|
|
|
fi
|
2012-10-21 15:33:07 +00:00
|
|
|
done
|
|
|
|
|
2014-01-14 16:29:32 +00:00
|
|
|
echo "Checking for Libarchive version ..."
|
|
|
|
cat << _EOF > tst.c
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <archive.h>
|
|
|
|
|
|
|
|
int
|
|
|
|
main(void)
|
|
|
|
{
|
|
|
|
int flags = ARCHIVE_READDISK_NO_TRAVERSE_MOUNTS;
|
|
|
|
|
|
|
|
return (0);
|
|
|
|
}
|
|
|
|
_EOF
|
|
|
|
|
2014-04-26 17:35:14 +00:00
|
|
|
${GCC} ${extra_opt_flags} ${libarchive_inc} -L${libarchive_libdir} -O0 -g tst.c -o tst -larchive >/dev/null 2>&1
|
2014-01-14 16:29:32 +00:00
|
|
|
if [ $? -ne 0 ]
|
|
|
|
then
|
|
|
|
echo "Libarchive version 3.0 or newer is required."
|
|
|
|
exit 1
|
|
|
|
fi
|
2014-04-30 17:16:24 +00:00
|
|
|
rm -rf tst* tst.c
|
2014-01-14 16:29:32 +00:00
|
|
|
|
2013-10-20 18:24:27 +00:00
|
|
|
echo "Generating Makefile ..."
|
2012-08-26 08:39:24 +00:00
|
|
|
linkvar="LINK"
|
|
|
|
compilevar="COMPILE"
|
|
|
|
compilecppvar="COMPILE_cpp"
|
|
|
|
vecflagsvar="VEC_FLAGS"
|
|
|
|
loopoptflagsvar="LOOP_OPTFLAGS"
|
|
|
|
cppflagsvar="CPPFLAGS"
|
|
|
|
genoptvar="GEN_OPT"
|
|
|
|
noslabcppflagsvar="NO_SLAB_CPPFLAGS"
|
|
|
|
debugstatscppflagsvar="DEBUG_STATS_CPPFLAGS"
|
|
|
|
prefixvar="PREFIX"
|
2012-09-01 09:10:15 +00:00
|
|
|
skeinblockvar="SKEIN_BLOCK"
|
2012-10-15 06:40:00 +00:00
|
|
|
keylenvar="KEYLEN"
|
2012-08-26 08:39:24 +00:00
|
|
|
|
2012-08-27 16:21:55 +00:00
|
|
|
libbscdirvar="LIBBSCDIR"
|
|
|
|
libbsclibvar="LIBBSCLIB"
|
|
|
|
libbsclflagsvar="LIBBSCLFLAGS"
|
|
|
|
libbscwrapobjvar="LIBBSCWRAPOBJ"
|
|
|
|
libbscgenoptvar="LIBBSCGEN_OPT"
|
|
|
|
libbsccppflagsvar="LIBBSCCPPFLAGS"
|
2013-01-25 17:25:55 +00:00
|
|
|
sha256asmobjsvar="SHA2ASM_OBJS"
|
|
|
|
sha256objsvar="SHA2_OBJS"
|
2012-10-06 15:21:23 +00:00
|
|
|
yasmvar="YASM"
|
2012-12-08 08:49:01 +00:00
|
|
|
fptr_flag_var="FPTR_FLAG"
|
2013-01-20 17:23:36 +00:00
|
|
|
extra_opt_flags_var="EXTRA_OPT_FLAGS"
|
2013-01-24 18:40:12 +00:00
|
|
|
sse_opt_flags_var="SSE_OPT_FLAGS"
|
2012-08-27 16:21:55 +00:00
|
|
|
|
2012-10-03 17:13:02 +00:00
|
|
|
openssllibdirvar="OPENSSL_LIBDIR"
|
|
|
|
opensslincdirvar="OPENSSL_INCDIR"
|
2012-10-21 15:33:07 +00:00
|
|
|
libbz2libdirvar="LIBBZ2_DIR"
|
|
|
|
libzlibdirvar="LIBZ_DIR"
|
|
|
|
libbz2incvar="LIBBZ2_INC"
|
|
|
|
libzincvar="LIBZ_INC"
|
2013-10-20 18:24:27 +00:00
|
|
|
libarchivedirvar="LIBARCHIVE_DIR"
|
|
|
|
libarchiveincvar="LIBARCHIVE_INC"
|
2012-10-03 17:13:02 +00:00
|
|
|
|
2012-12-08 08:49:01 +00:00
|
|
|
keccak_srcs_var="KECCAK_SRCS"
|
|
|
|
keccak_hdrs_var="KECCAK_HDRS"
|
|
|
|
keccak_srcs_asm_var="KECCAK_SRCS_ASM"
|
|
|
|
|
2013-02-24 14:35:16 +00:00
|
|
|
crypto_compat_objs_var="CRYPTO_COMPAT_OBJS"
|
|
|
|
crypto_compat_flags_var="COMPAT_CPPFLAGS"
|
2013-03-04 16:26:07 +00:00
|
|
|
salsa20_stream_c_var="XSALSA20_STREAM_C"
|
|
|
|
salsa20_stream_asm_var="XSALSA20_STREAM_ASM"
|
|
|
|
salsa20_debug_var="XSALSA20_DEBUG"
|
2013-02-24 14:35:16 +00:00
|
|
|
|
2012-08-26 08:39:24 +00:00
|
|
|
noslabcppflagsval=
|
|
|
|
debugstatscppflagsval=
|
|
|
|
|
|
|
|
[ $allocator -eq 0 ] && noslabcppflagsval='\$\(NO_SLAB_CPPFLAGS\)'
|
|
|
|
[ $debug_stats -eq 1 ] && debugstatscppflagsval='\$\(DEBUG_STATS_CPPFLAGS\)'
|
|
|
|
|
|
|
|
cat Makefile.in | sed "
|
2014-04-26 17:35:14 +00:00
|
|
|
s#@GCC@#${GCC}#g
|
|
|
|
s#@GPP@#${GPP}#g
|
2014-05-04 06:24:33 +00:00
|
|
|
s#@CRYPTO_ASM_COMPILE@#${crypto_asm_compile}#g
|
2014-05-04 08:02:11 +00:00
|
|
|
s#@USE_CLANG_AS@#${use_clang_as}#g
|
2014-04-26 17:35:14 +00:00
|
|
|
s#@SO_SUFFIX@#${so_suffix}#g
|
2014-05-04 08:02:11 +00:00
|
|
|
s#@YASM_GAS@#${yasm_params_gas}#g
|
|
|
|
s#@RPATH@#${rpath}#g
|
|
|
|
s#@LRT@#${lrt}#g
|
|
|
|
s#soname#${soname_opt}#g
|
2014-05-09 17:23:47 +00:00
|
|
|
s#${default_opt}#${max_opt}#g
|
2014-05-04 08:02:11 +00:00
|
|
|
s#@DTAGS@#${dtag_val}#g
|
2012-08-26 08:39:24 +00:00
|
|
|
s#@${linkvar}@#\\\$\\(${typ}_${linkvar}\\)#g
|
|
|
|
s#@${compilevar}@#\\\$\\(${typ}_${compilevar}\\)#g
|
|
|
|
s#@${compilecppvar}@#\\\$\\(${typ}_${compilecppvar}\\)#g
|
|
|
|
s#@${vecflagsvar}@#\\\$\\(${typ}_${vecflagsvar}\\)#g
|
|
|
|
s#@${loopoptflagsvar}@#\\\$\\(${typ}_${loopoptflagsvar}\\)#g
|
|
|
|
s#@${cppflagsvar}@#\\\$\\(${typ}_${cppflagsvar}\\)#g
|
|
|
|
s#@${genoptvar}@#\\\$\\(${typ}_${genoptvar}\\)#g
|
2012-12-08 08:49:01 +00:00
|
|
|
s#@${fptr_flag_var}@#\\\$\\(${typ}_${fptr_flag_var}\\)#g
|
2012-08-26 08:39:24 +00:00
|
|
|
s#@${noslabcppflagsvar}@#${noslabcppflagsval}#g
|
|
|
|
s#@${debugstatscppflagsvar}@#${debugstatscppflagsval}#g
|
|
|
|
s#@${prefixvar}@#${prefix}#g
|
2012-08-27 16:21:55 +00:00
|
|
|
s#@${libbscdirvar}@#${libbsc_dir}#g
|
|
|
|
s#@${libbsclibvar}@#${libbsc_lib}#g
|
|
|
|
s#@${libbsclflagsvar}@#${libbsclflags}#g
|
|
|
|
s#@${libbscwrapobjvar}@#${libbscwrapobj}#g
|
|
|
|
s#@${libbscgenoptvar}@#${libbscgenopt}#g
|
|
|
|
s#@${libbsccppflagsvar}@#${libbsccppflags}#g
|
2012-09-01 09:10:15 +00:00
|
|
|
s#@${skeinblockvar}@#${skeinblock}#g
|
2012-10-03 17:13:02 +00:00
|
|
|
s#@${openssllibdirvar}@#${openssl_libdir}#g
|
|
|
|
s#@${opensslincdirvar}@#${openssl_incdir}#g
|
2012-10-06 15:21:23 +00:00
|
|
|
s#@${sha256asmobjsvar}@#${sha256asmobjs}#g
|
|
|
|
s#@${sha256objsvar}@#${sha256objs}#g
|
|
|
|
s#@${yasmvar}@#${yasm}#g
|
2012-10-15 06:40:00 +00:00
|
|
|
s#@${keylenvar}@#${keylen}#g
|
2012-10-21 15:33:07 +00:00
|
|
|
s#@${libbz2libdirvar}@#${libbz2_libdir}#g
|
|
|
|
s#@${libzlibdirvar}@#${libz_libdir}#g
|
|
|
|
s#@${libbz2incvar}@#${libbz2_inc}#g
|
|
|
|
s#@${libzincvar}@#${libz_inc}#g
|
2012-12-08 08:49:01 +00:00
|
|
|
s#@${keccak_srcs_var}@#${keccak_srcs}#g
|
|
|
|
s#@${keccak_hdrs_var}@#${keccak_hdrs}#g
|
|
|
|
s#@${keccak_srcs_var}@#${keccak_srcs}#g
|
|
|
|
s#@${keccak_srcs_asm_var}@#${keccak_srcs_asm}#g
|
2013-01-20 17:23:36 +00:00
|
|
|
s#@${extra_opt_flags_var}@#${extra_opt_flags}#g
|
2013-01-24 18:40:12 +00:00
|
|
|
s#@${sse_opt_flags_var}@#${sse_opt_flags}#g
|
2013-02-24 14:35:16 +00:00
|
|
|
s#@${crypto_compat_objs_var}@#${crypto_compat_objs}#g
|
|
|
|
s#@${crypto_compat_flags_var}@#${crypto_compat_flags}#g
|
2013-03-04 16:26:07 +00:00
|
|
|
s#@${salsa20_stream_c_var}@#${salsa20_stream_c}#g
|
|
|
|
s#@${salsa20_stream_asm_var}@#${salsa20_stream_asm}#g
|
|
|
|
s#@${salsa20_debug_var}@#${salsa20_debug}#g
|
2013-10-20 18:24:27 +00:00
|
|
|
s#@${libarchivedirvar}@#${libarchive_libdir}#g
|
|
|
|
s#@${libarchiveincvar}@#${libarchive_inc}#g
|
2012-08-26 08:39:24 +00:00
|
|
|
" > Makefile
|
|
|
|
|