#!/bin/bash

#Some cleanup
rm -rf source build install
mkdir install source build

#Untar 
tar -zxvf  rose-0.9.5a-13219.tar.gz

#Move rose into install directory
mv rose-0.9.5a-13219/* source
rm -rf rose-0.9.5a-13219

#Configure
cd build
../source/configure \
	--prefix=$ISSM_DIR/externalpackages/rose/install \
	--with-boost=$ISSM_DIR/externalpackages/boost/install\
	--srcdir=$ISSM_DIR/externalpackages/rose/source

if [ -z $1 ]; then
	make
else
	make -j $1
fi
make install
