#!/bin/bash
set -eu

#Some cleanup
rm -rf install adolc*issm

git clone -b 2.3.x_ISSM  git://git.mcs.anl.gov/adol-c.git adolc_issm

#Compile ADOL-C
cd adolc_issm

autoreconf -f -i 
./configure --prefix=$ISSM_DIR/externalpackages/adolc/install 

if [ $# -eq 0 ]; then
	make
else
	make -j $1
fi
make install
