blob: 1324986e1362c594ee48bc7da8f13828d5179ca8 [file] [log] [blame]
Masahiro Yamadabbda5ec2018-11-30 10:05:26 +09001#!/bin/sh
2# SPDX-License-Identifier: GPL-2.0
3
4set -e
5
6# List of exported symbols
7ksyms=$($NM $1 | sed -n 's/.*__ksym_marker_\(.*\)/\1/p' | tr A-Z a-z)
8
9if [ -z "$ksyms" ]; then
10 exit 0
11fi
12
13echo
14echo "ksymdeps_$1 := \\"
15
16for s in $ksyms
17do
18 echo $s | sed -e 's:^_*: $(wildcard include/ksym/:' \
19 -e 's:__*:/:g' -e 's/$/.h) \\/'
20done
21
22echo
23echo "$1: \$(ksymdeps_$1)"
24echo
25echo "\$(ksymdeps_$1):"