mbed TLS Build

Dependents:   Encrypt_Decrypt1 mbed_blink_tls encrypt encrypt

Committer:
markrad
Date:
Thu Jan 05 00:18:44 2017 +0000
Revision:
0:cdf462088d13
Initial commit

Who changed what in which revision?

UserRevisionLine numberNew contents of line
markrad 0:cdf462088d13 1 #!/bin/sh
markrad 0:cdf462088d13 2
markrad 0:cdf462088d13 3 set -eu
markrad 0:cdf462088d13 4
markrad 0:cdf462088d13 5 if [ -d include/mbedtls ]; then :; else
markrad 0:cdf462088d13 6 echo "$0: must be run from root" >&2
markrad 0:cdf462088d13 7 exit 1
markrad 0:cdf462088d13 8 fi
markrad 0:cdf462088d13 9
markrad 0:cdf462088d13 10 if grep -i cmake Makefile >/dev/null; then
markrad 0:cdf462088d13 11 echo "$0: not compatible with cmake" >&2
markrad 0:cdf462088d13 12 exit 1
markrad 0:cdf462088d13 13 fi
markrad 0:cdf462088d13 14
markrad 0:cdf462088d13 15 cp include/mbedtls/config.h include/mbedtls/config.h.bak
markrad 0:cdf462088d13 16 scripts/config.pl full
markrad 0:cdf462088d13 17 CFLAGS=-fno-asynchronous-unwind-tables make clean lib >/dev/null 2>&1
markrad 0:cdf462088d13 18 mv include/mbedtls/config.h.bak include/mbedtls/config.h
markrad 0:cdf462088d13 19 if uname | grep -F Darwin >/dev/null; then
markrad 0:cdf462088d13 20 nm -gUj library/libmbed*.a 2>/dev/null | sed -n -e 's/^_//p'
markrad 0:cdf462088d13 21 elif uname | grep -F Linux >/dev/null; then
markrad 0:cdf462088d13 22 nm -og library/libmbed*.a | grep -v '^[^ ]*: *U \|^$\|^[^ ]*:$' | sed 's/^[^ ]* . //'
markrad 0:cdf462088d13 23 fi | sort > exported-symbols
markrad 0:cdf462088d13 24 make clean
markrad 0:cdf462088d13 25
markrad 0:cdf462088d13 26 wc -l exported-symbols