sgl

diff 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 diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/configure	Wed May 11 05:53:26 2011 +0300
     1.3 @@ -0,0 +1,27 @@
     1.4 +#!/bin/sh
     1.5 +
     1.6 +gen_module_init()
     1.7 +{
     1.8 +	# collect all src/wsys_whatever.c files
     1.9 +	modules=`ls src/wsys_*.c 2>/dev/null | sort | sed 's/src\/wsys_//' | sed 's/\.c//'`
    1.10 +
    1.11 +	echo "/* this file is generated by $0, do not edit */"
    1.12 +	for m in $modules; do
    1.13 +		echo "int sgl_register_$m();"
    1.14 +	done
    1.15 +
    1.16 +	echo
    1.17 +	echo 'void sgl_modules_init(void)'
    1.18 +	echo '{'
    1.19 +
    1.20 +	for m in $modules; do
    1.21 +		echo "	sgl_register_$m();"
    1.22 +	done
    1.23 +
    1.24 +	echo '}'
    1.25 +}
    1.26 +
    1.27 +gen_module_init >src/modules.c
    1.28 +
    1.29 +echo 'PREFIX = /usr/local' >Makefile
    1.30 +cat Makefile.in >>Makefile