eqemu

diff libs/libimago/configure @ 10:819c7ebb1bec

added libimago to avoid the external dependency
author John Tsiombikas <nuclear@member.fsf.org>
date Fri, 18 Jul 2014 05:07:40 +0300
parents
children
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/libs/libimago/configure	Fri Jul 18 05:07:40 2014 +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/file_whatever.c files
     1.9 +	modules=`ls src/file_*.c 2>/dev/null | sort | sed 's/src\/file_//' | 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 img_register_$m();"
    1.14 +	done
    1.15 +
    1.16 +	echo
    1.17 +	echo 'void img_modules_init(void)'
    1.18 +	echo '{'
    1.19 +
    1.20 +	for m in $modules; do
    1.21 +		echo "	img_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