#!/bin/sh
# Was /bin/ksh

if [ -r src/$1.cc ]; then
    dir=src
else
    dir=records/src
fi

echo "Building bin/$1 from $dir/$1.cc"

. records/bin/setRecordsInc

g++ -Wall \
    -D CALICE_DAQ_ICC \
    \
    -I- \
    -I inc \
    -I src \
    $CALICE_RECORDS_INC \
    \
    -o bin/$1 $dir/$1.cc
