sgl
view configure @ 4:648f8604d2b2
cont. x11 module
author | John Tsiombikas <nuclear@siggraph.org> |
---|---|
date | Thu, 12 May 2011 11:04:10 +0300 |
parents | e55e71da991d |
children | edbfc96fe80d |
line source
1 #!/bin/sh
3 gen_module_init()
4 {
5 # collect all src/wsys_whatever.c files
6 modules=`ls src/wsys_*.c 2>/dev/null | sort | sed 's/src\/wsys_//' | sed 's/\.c//'`
8 echo "/* this file is generated by $0, do not edit */"
9 for m in $modules; do
10 echo "void sgl_register_$m();"
11 done
13 echo
14 echo 'void sgl_modules_init(void)'
15 echo '{'
17 for m in $modules; do
18 echo " sgl_register_$m();"
19 done
21 echo '}'
22 }
24 gen_module_init >src/modules.c
26 echo 'PREFIX = /usr/local' >Makefile
27 cat Makefile.in >>Makefile