blob: 15d2590c1cba84c556b2423970d72d07a727b24d [file] [log] [blame]
Manuel Pégourié-Gonnard3385cf42015-04-02 17:59:30 +01001#!/bin/sh
Bence Szépkúti700ee442020-05-26 00:33:31 +02002#
Bence Szépkúti1e148272020-08-07 13:07:28 +02003# Copyright The Mbed TLS Contributors
Bence Szépkútic7da1fe2020-05-26 01:54:15 +02004# SPDX-License-Identifier: Apache-2.0
5#
6# Licensed under the Apache License, Version 2.0 (the "License"); you may
7# not use this file except in compliance with the License.
8# You may obtain a copy of the License at
9#
10# http://www.apache.org/licenses/LICENSE-2.0
11#
12# Unless required by applicable law or agreed to in writing, software
13# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
14# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15# See the License for the specific language governing permissions and
16# limitations under the License.
Manuel Pégourié-Gonnard3385cf42015-04-02 17:59:30 +010017
Manuel Pégourié-Gonnardd1ddd292015-04-09 10:15:10 +020018set -eu
19
20if [ -d include/mbedtls ]; then :; else
21 echo "$0: must be run from root" >&2
22 exit 1
23fi
Manuel Pégourié-Gonnard3385cf42015-04-02 17:59:30 +010024
Nir Sonnenschein03091d12019-01-08 18:15:50 +020025HEADERS=$( ls include/mbedtls/*.h include/psa/*.h | egrep -v 'compat-1\.3\.h' )
Manuel Pégourié-Gonnard65a6fa32020-07-09 09:52:17 +020026HEADERS="$HEADERS library/*.h"
Christoph M. Wintersteiger8a0f5bb2018-12-14 15:46:34 +000027HEADERS="$HEADERS 3rdparty/everest/include/everest/everest.h 3rdparty/everest/include/everest/x25519.h"
Manuel Pégourié-Gonnard3385cf42015-04-02 17:59:30 +010028
Gilles Peskine9d28c422020-02-26 19:00:46 +010029sed -n -e 's/.*#define \([a-zA-Z0-9_]*\).*/\1/p' $HEADERS \
30 | egrep -v '^(asm|inline|EMIT|_CRT_SECURE_NO_DEPRECATE)$|^MULADDC_' \
31 | sort -u > macros
Manuel Pégourié-Gonnard3385cf42015-04-02 17:59:30 +010032
33wc -l macros