#!/bin/ksh

echo "Building bin/$1 from offline/src/$1.cc"

g++ -Wall \
    -DRcdArenaSize=128*1024 \
    `$ROOTSYS/bin/root-config --cflags --glibs` \
    \
    -I records/inc/ahc \
    -I records/inc/bml \
    -I records/inc/crc \
    -I records/inc/daq \
    -I records/inc/dhc \
    -I records/inc/emc \
    -I records/inc/rcd \
    -I records/inc/sub \
    -I records/inc/utl \
    \
    -I dualuse/inc/chk \
    -I dualuse/inc/daq \
    -I dualuse/inc/dsp \
    -I dualuse/inc/emc \
    -I dualuse/inc/hst \
    -I dualuse/inc/rcd \
    -I dualuse/inc/shm \
    -I dualuse/inc/skt \
    -I dualuse/inc/slw \
    -I dualuse/inc/sub \
    -I dualuse/inc/trg \
    -I dualuse/inc/uti \
    \
    -I offline/inc/bml \
    -I offline/inc/daq \
    -I offline/inc/lco \
    -I offline/inc/rcd \
    -I offline/inc/sim \
    \
    -o bin/$1 offline/src/$1.cc
