#!/bin/sh

set -e

# build and run unit tests against a system-wide libepubgen
cd src/test
CFLAGS=$(pkg-config --cflags libxml-2.0 libepubgen-0.1 cppunit)
LDFLAGS=$(pkg-config --libs libxml-2.0 libepubgen-0.1 cppunit)
g++ $CFLAGS -c -o test.o test.cpp
g++ $CFLAGS -c -o EPUBTextGeneratorTest.o EPUBTextGeneratorTest.cpp
g++ test.o EPUBTextGeneratorTest.o $LDFLAGS -o test
./test
