blob: ad3f842025a4f107f831457e9d46b2b934cba84f [file] [log] [blame]
Manuel Pégourié-Gonnard3385cf42015-04-02 17:59:30 +01001#!/bin/sh
2
3set -eu
4
Manuel Pégourié-Gonnardd1ddd292015-04-09 10:15:10 +02005if [ -d include/mbedtls ]; then :; else
6 echo "$0: must be run from root" >&2
7 exit 1
8fi
9
Manuel Pégourié-Gonnard3385cf42015-04-02 17:59:30 +010010if grep -i cmake Makefile >/dev/null; then
Manuel Pégourié-Gonnardd1ddd292015-04-09 10:15:10 +020011 echo "$0: not compatible with cmake" >&2
Manuel Pégourié-Gonnard3385cf42015-04-02 17:59:30 +010012 exit 1
13fi
14
15cp include/mbedtls/config.h{,.bak}
16scripts/config.pl full
17CFLAGS=-fno-asynchronous-unwind-tables make clean lib >/dev/null 2>&1
18mv include/mbedtls/config.h{.bak,}
19nm -gUj library/libmbedtls.a 2>/dev/null | sed -n -e 's/^_//p' | sort > exported-symbols
20make clean
21
22wc -l exported-symbols