#!/bin/sh
#$ -o /exports/csce/eddie/geos/groups/LURG/models/PLUM/output/qlogs
#$ -e /exports/csce/eddie/geos/groups/LURG/models/PLUM/output/qlogs
#$ -l h_vmem=8G 
#$ -R y

cd /exports/csce/eddie/geos/groups/LURG/models/PLUM/plumv2

buildver="$(hg identify --num)"

echo "Building version: $buildver"

echo "$buildver" > ../classes/buildver

javac -J-Xmx1g -cp .:/exports/csce/eddie/geos/groups/LURG/models/gams/gams24.7_linux_x64_64_sfx/apifiles/Java/api/GAMSJavaAPI.jar ./src/ac/ed/lurg/*.java ./src/ac/ed/lurg/country/*.java ./src/ac/ed/lurg/country/crafty/*.java ./src/ac/ed/lurg/country/gams/*.java ./src/ac/ed/lurg/demand/*.java ./src/ac/ed/lurg/landuse/*.java ./src/ac/ed/lurg/output/*.java ./src/ac/ed/lurg/types/*.java ./src/ac/ed/lurg/utils/*.java ./src/ac/ed/lurg/yield/*.java ./src/ac/ed/lurg/shock/*.java ./src/ac/sac/raster/*.java ./src/ac/ed/lurg/utils/cluster/*.java -d ../classes

echo "javac completed"
