#!/bin/bash

#
# g++ -I. --std=c++20 -O2 -Wall -o driver driver.cc -lssl -lbobcat \
#     -L../../ohexbuf/tmp -L../tmp -lhmacbuf   -lohexbuf
#

tput clear

LIBS=" -lbobcat -lcrypto"

sed 's_<bobcat/digestbuf>_"../digestbuf"_' driver.cc > src.cc

GPP="g++ `cat ../../c++std`"

#   Using the standard bobcat library
CMD="$GPP -o driver -Wall driver.cc ${LIBS} -s"

#   Using the library in ../tmp/ and libbobcat
#CMD="$GPP -o driver -Wall src.cc -L../tmp -ldigestbuf ${LIBS} -s"


#   Using the library in ../tmp/ and bobcat as /tmp/libbob.a
# CMD="$GPP -o driver -Wall src.cc -L../tmp -lhmacbuf -L /tmp -lbob -lcrypto -s"

# #   Using tmp libraries and bobcat
# CMD="$GPP -o driver -Wall -I../tmp src.cc \
#     -L../tmp -ldigestbuf \
#     -L../../ohexbuf/tmp -lohexbuf \
#     -L../../eoibuf/tmp -leoibuf \
#     -L../../eoi/tmp -leoi \
#     ${LIBS} -s"

echo ${CMD}
${CMD}

rm src.cc
