sgl

annotate 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
rev   line source
nuclear@2 1 #!/bin/sh
nuclear@2 2
nuclear@2 3 gen_module_init()
nuclear@2 4 {
nuclear@2 5 # collect all src/wsys_whatever.c files
nuclear@2 6 modules=`ls src/wsys_*.c 2>/dev/null | sort | sed 's/src\/wsys_//' | sed 's/\.c//'`
nuclear@2 7
nuclear@2 8 echo "/* this file is generated by $0, do not edit */"
nuclear@2 9 for m in $modules; do
nuclear@2 10 echo "int sgl_register_$m();"
nuclear@2 11 done
nuclear@2 12
nuclear@2 13 echo
nuclear@2 14 echo 'void sgl_modules_init(void)'
nuclear@2 15 echo '{'
nuclear@2 16
nuclear@2 17 for m in $modules; do
nuclear@2 18 echo " sgl_register_$m();"
nuclear@2 19 done
nuclear@2 20
nuclear@2 21 echo '}'
nuclear@2 22 }
nuclear@2 23
nuclear@2 24 gen_module_init >src/modules.c
nuclear@2 25
nuclear@2 26 echo 'PREFIX = /usr/local' >Makefile
nuclear@2 27 cat Makefile.in >>Makefile