#!/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
#git reset --hard b254b2a001a1b7a024a9184cd087ae06eb975cad

#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
