#!/usr/bin/env bash

set -e -v

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