diff options
author | IOhannes m zmölnig <zmoelnig@users.sourceforge.net> | 2005-03-22 20:58:25 +0000 |
---|---|---|
committer | IOhannes m zmölnig <zmoelnig@users.sourceforge.net> | 2005-03-22 20:58:25 +0000 |
commit | 2b60d55c919e7588f5aff15936e83c300b3660bb (patch) | |
tree | 14d860de7f28083d3756ad91b627de70f26788f6 /src/makesource.sh | |
parent | c500bc542cb7cc78d6dac3f7da3bff626056b1aa (diff) |
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
Diffstat (limited to 'src/makesource.sh')
-rwxr-xr-x | src/makesource.sh | 68 |
1 files changed, 68 insertions, 0 deletions
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 + |