#!/bin/bash

#tput clear

case $1 in
    (b)
        g++ -DBOBCAT --static ${ICMAKE_CPPSTD} -I../../tmp -o driver driver.cc \
        -L../../tmp/lib -lbobcat -s
    ;;
    (o)
        g++ ${ICMAKE_CPPSTD} -o driver *.cc ../tmp/o/*.o -lbobcat # -s
    ;;
    (c)
        g++ ${ICMAKE_CPPSTD} -o driver *.cc -lbobcat -s
    ;;
    (w)
        # merely link:
        # gx -I.. -o driver driver.o -L../tmp -larg -lbobcat -s

        g++ ${ICMAKE_CPPSTD} -I.. -o driver *.cc -L../tmp -larg -lbobcat -s
    ;;
    (*)
    echo $0 b links to bobcat built by 'build libraries all'
    echo $0 o links to the files in ../tmp/o
    echo $0 c links to the files in the current dir only
    echo $0 w links to libarg.a and the existing bobcat library
    echo '        (to avoid linker confusion: temp. rename Arg to Arg)'
    ;;
esac
