cantera/tools/src/ctsetup.in
2003-04-14 17:57:48 +00:00

38 lines
529 B
Bash
Executable file

#!/bin/sh
# complain if no program name was given
if test $# = 0; then
echo 'usage: ctsetup <program name>'
exit 0
fi
#
# make the Makefile
#
for t in "$@"; do
if test $t = -fort; then
status=fort;
elif test $t = -f90; then
status=f90;
elif test $t = -cxx; then
status=cxx
else
objs=$objs' '$t'.o';
fi
done
TOOLS_DIR=@CANTERA_ROOT@/tools
echo 'creating '$1'.mak...'
cat > .sedscript <<EOF
s/__PROGRAM__/$1/
s/__OBJS__/$objs/
EOF
sed -f .sedscript $TOOLS_DIR/src/sample.mak > ./$1.mak
rm -f .sedscript