File: build-rsa-tools.sh

package info (click to toggle)
openmohaa 0.82.1%2Bdfsg-1
  • links: PTS, VCS
  • area: contrib
  • in suites: forky, sid
  • size: 34,192 kB
  • sloc: cpp: 315,720; ansic: 275,789; sh: 312; xml: 246; asm: 141; makefile: 7
file content (33 lines) | stat: -rwxr-xr-x 790 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/bin/bash

export TFMDIR="tomsfastmath-0.13.1"
export LTCDIR="libtomcrypt-1.17"

OSTYPE=`uname -s`
if [ -z "$CC" ]; then
    if [ "`uname -o`" = "Cygwin" ]; then
        export CC=/usr/bin/i686-w64-mingw32-gcc
    else
        export CC=cc
    fi
fi

function build {
    if [ "$OSTYPE" = "Darwin" ]; then
        $CC -mmacosx-version-min=10.7 -DMAC_OS_X_VERSION_MIN_REQUIRED=1070 -I $TFMDIR/src/headers -I $LTCDIR/src/headers -o "$1" -Wall -O3 "$1.c" rsa_common.c $LTCDIR/libtomcrypt.a $TFMDIR/libtfm.a
    else
        $CC -I $TFMDIR/src/headers -I $LTCDIR/src/headers -o "$1" -Wall -O3 "$1.c" rsa_common.c $LTCDIR/libtomcrypt.a $TFMDIR/libtfm.a
    fi
}

set -e
set -x

./build-libtom-unix.sh
build rsa_make_keys
build rsa_sign
build rsa_verify

set +x
echo "rsa_tools are compiled!"