From 2b60d55c919e7588f5aff15936e83c300b3660bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?IOhannes=20m=20zm=C3=B6lnig?= Date: Tue, 22 Mar 2005 20:58:25 +0000 Subject: zexy-2.0: - use of abstractions for objects that allow it - some objects are build both as externals and abstractions (as slower fallbacks) - code-layout is now 1:1 c-file<->object (this should allow for building of zexy as a collection of externals instead as a big library) - matrix-objects have moved to iemmatrix !! svn path=/trunk/externals/zexy/; revision=2641 --- src/makesource.sh | 68 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100755 src/makesource.sh (limited to 'src/makesource.sh') diff --git a/src/makesource.sh b/src/makesource.sh new file mode 100755 index 0000000..d2c527e --- /dev/null +++ b/src/makesource.sh @@ -0,0 +1,68 @@ +#!/bin/sh + +ZEXY_H=z_zexy.h +ZEXY_C=z_zexy.c +ZEXY_S=Make.source + +function head_h() { + echo "/* zexy-setup autogenerated header-file" + echo " * generated by \"$0\"" + echo " * !! DO NOT MANUALLY EDIT !!" + echo " */" + echo + echo "#ifndef Z_ZEXY_H__" + echo "#define Z_ZEXY_H__" +} + +function foot_h() { + echo "#endif /* Z_ZEXY_H__ */" + echo "" +} + +function head_c() { + echo "/* zexy-setup autogenerated setup-file" + echo " * generated by \"$0\"" + echo " * !! DO NOT MANUALLY EDIT !!" + echo " */" + echo + echo "#include \"$ZEXY_H\"" + echo + echo "void z_zexy_setup(void)" + echo "{" +} + +function foot_c() { + echo "}" + echo +} + +function head_s() { + echo "SOURCES = \\" +} + +function foot_s() { + echo " zexy.c" + echo +} + +head_h > $ZEXY_H +head_c > $ZEXY_C +head_s > $ZEXY_S + +for i in `ls *.c | grep -v zexy.c` +do + NAME="${i%.c}" + SETUPNAME="void ${NAME}_setup(void)" + if grep "$SETUPNAME" $i > /dev/null + then +# echo ${i%.c} + echo " $i \\" >> $ZEXY_S + echo "$SETUPNAME;" >> $ZEXY_H + echo " ${NAME}_setup();" >> $ZEXY_C + fi +done + +foot_h >> $ZEXY_H +foot_c >> $ZEXY_C +foot_s >> $ZEXY_S + -- cgit v1.2.1