summaryrefslogtreecommitdiff
path: root/hw/xfree86/xf1bpp/mfbmap.sh
diff options
context:
space:
mode:
Diffstat (limited to 'hw/xfree86/xf1bpp/mfbmap.sh')
-rw-r--r--hw/xfree86/xf1bpp/mfbmap.sh25
1 files changed, 25 insertions, 0 deletions
diff --git a/hw/xfree86/xf1bpp/mfbmap.sh b/hw/xfree86/xf1bpp/mfbmap.sh
new file mode 100644
index 000000000..a8f43eceb
--- /dev/null
+++ b/hw/xfree86/xf1bpp/mfbmap.sh
@@ -0,0 +1,25 @@
+#!/bin/sh
+
+# $XFree86: xc/programs/Xserver/hw/xfree86/xf1bpp/mfbmap.sh,v 1.2 1998/07/25 16:59:24 dawes Exp $
+#
+# 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"