#!/bin/bash # # rename to SIMLIB # script for compilation of SIMLIB/C++ model # we expect system-wide installation of SIMLIB # SOURCE="$1" # source file MODEL="${1%.cc}" # executable name if [ -z "$SOURCE" -o ! -f "$SOURCE" -o "$MODEL" = "$SOURCE" ]; then echo "Usage: " echo " SIMLIB model.cc" exit 1 fi echo echo "### Creating model $MODEL" echo g++ -g -O2 -o "$MODEL" "$SOURCE" -lsimlib -lm echo