summaryrefslogtreecommitdiff
path: root/hw/xfree86/xf1bpp/mfbmap.sh
blob: 066a9fb4024e14fba5b8ae63fe5f9141ec139fea (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/bin/sh

# $XFree86$
#
# This script recreates the mapping list that maps the mfb external
#  symbols * to xf1bpp* (without "mfb")
# This should only be rerun if there have been changes in the mfb code
#  that affect the external symbols.
#  It assumes that Xserver/mfb has been compiled.
# The output goes to stdout.
echo ""
echo "#ifndef _MFBMAP_H"
echo "#define _MFBMAP_H"
echo ""

nm ../../../mfb/*.o | \
awk "{ if ((\$2 == \"D\") || (\$2 == \"T\") || (\$2 == \"C\")) print \$3 }" | \
sed s/^_// | \
grep -v "ModuleInit$" | \
sort | \
awk "{ print \"#define \" \$1 \" xf1bpp\"\$1 }" | \
sed s/xf1bppmfb/xf1bpp/

echo ""
echo "#endif"