#!/bin/sh -ex

pkg=khmer
if [ "$ADTTMP" = "" ] ; then
  ADTTMP=$(mktemp -d /tmp/${pkg}-test.XXXXXX)
fi
cd "$ADTTMP"

c++ -o test-prog-static -static -std=c++11 \
	$(pkg-config oxli --static --cflags) -I/usr/include/oxli/smhasher \
	/usr/share/doc/khmer-common/test-compile.cc \
	$(pkg-config oxli --static --libs)

./test-prog-static

c++ -o test-prog-dynamic -std=c++11 $(pkg-config oxli --cflags) \
	-I/usr/include/oxli/smhasher \
	/usr/share/doc/khmer-common/test-compile.cc $(pkg-config oxli --libs)

./test-prog-dynamic


rm -f test-prog-*
