Manuel Pégourié-Gonnard | 3385cf4 | 2015-04-02 17:59:30 +0100 | [diff] [blame] | 1 | #!/bin/sh |
| 2 | |
| 3 | set -eu |
| 4 | |
Manuel Pégourié-Gonnard | d1ddd29 | 2015-04-09 10:15:10 +0200 | [diff] [blame] | 5 | if [ -d include/mbedtls ]; then :; else |
| 6 | echo "$0: must be run from root" >&2 |
| 7 | exit 1 |
| 8 | fi |
| 9 | |
Manuel Pégourié-Gonnard | 3385cf4 | 2015-04-02 17:59:30 +0100 | [diff] [blame] | 10 | if grep -i cmake Makefile >/dev/null; then |
Manuel Pégourié-Gonnard | d1ddd29 | 2015-04-09 10:15:10 +0200 | [diff] [blame] | 11 | echo "$0: not compatible with cmake" >&2 |
Manuel Pégourié-Gonnard | 3385cf4 | 2015-04-02 17:59:30 +0100 | [diff] [blame] | 12 | exit 1 |
| 13 | fi |
| 14 | |
Manuel Pégourié-Gonnard | 9afdc83 | 2015-08-04 17:15:13 +0200 | [diff] [blame^] | 15 | cp include/mbedtls/config.h include/mbedtls/config.h.bak |
Manuel Pégourié-Gonnard | 3385cf4 | 2015-04-02 17:59:30 +0100 | [diff] [blame] | 16 | scripts/config.pl full |
| 17 | CFLAGS=-fno-asynchronous-unwind-tables make clean lib >/dev/null 2>&1 |
Manuel Pégourié-Gonnard | 9afdc83 | 2015-08-04 17:15:13 +0200 | [diff] [blame^] | 18 | mv include/mbedtls/config.h.bak include/mbedtls/config.h |
Manuel Pégourié-Gonnard | 3385cf4 | 2015-04-02 17:59:30 +0100 | [diff] [blame] | 19 | nm -gUj library/libmbedtls.a 2>/dev/null | sed -n -e 's/^_//p' | sort > exported-symbols |
| 20 | make clean |
| 21 | |
| 22 | wc -l exported-symbols |