sgl

view configure @ 2:e55e71da991d

converting to configure/makefile.in
author John Tsiombikas <nuclear@siggraph.org>
date Wed, 11 May 2011 05:53:26 +0300
parents
children 1b6c5dadb460
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 "int 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