#!/usr/bin/env bash

set -e -v

cd htslib
git submodule init && git submodule update
mkdir -p build
autoheader
autoreconf
./configure --prefix=`pwd`/build/ CXXFLAGS="${CXXFLAGS} -I${PREFIX}/include ${LDFLAGS}" CFLAGS="${CFLAGS} ${LDFLAGS}"
make
make install
