blob: cf6afc5a065e244e83e0e7b65237a4b495250d99 [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#
3# Copyright (C) 2015-2019, Arm Limited, All Rights Reserved
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.
Bence Szépkúti700ee442020-05-26 00:33:31 +020017#
18# This file is part of Mbed TLS (https://tls.mbed.org)
Manuel Pégourié-Gonnard3385cf42015-04-02 17:59:30 +010019
Manuel Pégourié-Gonnardd1ddd292015-04-09 10:15:10 +020020set -eu
21
22if [ -d include/mbedtls ]; then :; else
23 echo "$0: must be run from root" >&2
24 exit 1
25fi
Manuel Pégourié-Gonnard3385cf42015-04-02 17:59:30 +010026
Nir Sonnenschein03091d12019-01-08 18:15:50 +020027HEADERS=$( ls include/mbedtls/*.h include/psa/*.h | egrep -v 'compat-1\.3\.h' )
Manuel Pégourié-Gonnard65a6fa32020-07-09 09:52:17 +020028HEADERS="$HEADERS library/*.h"
Christoph M. Wintersteiger8a0f5bb2018-12-14 15:46:34 +000029HEADERS="$HEADERS 3rdparty/everest/include/everest/everest.h 3rdparty/everest/include/everest/x25519.h"
Manuel Pégourié-Gonnard3385cf42015-04-02 17:59:30 +010030
Gilles Peskine9d28c422020-02-26 19:00:46 +010031sed -n -e 's/.*#define \([a-zA-Z0-9_]*\).*/\1/p' $HEADERS \
32 | egrep -v '^(asm|inline|EMIT|_CRT_SECURE_NO_DEPRECATE)$|^MULADDC_' \
33 | sort -u > macros
Manuel Pégourié-Gonnard3385cf42015-04-02 17:59:30 +010034
35wc -l macros