# Author: Yann Sagon <yann.sagon@unige.ch>
# Do not edit this file and do not launch it directly.
# Edit instead the Makefile

argdict = dict(ARGLIST)
javaCompiler   = argdict['javaCompiler']
mainClass      = argdict['mainClass']

# create the Java manifest file from the template
env = Environment(tools=['textfile'])
script_dict = {'\$mainClass': mainClass}
env.Substfile('Manifest.mf.in', SUBST_DICT = script_dict)

# build the jar file
env = Environment()
env['JAVACLASSPATH'] = 'classes/:../../src/extlib/mlplot-v1.1.jar:../../src/extlib/snakeyaml-1.9.jar:.'
env['JAVAC'] = javaCompiler

class_files = env.Java(target = 'classes', source = ['../../src/jlabos/' ,mainClass + '.java'])
env.Jar(target = mainClass + '.jar', source = [class_files, 'Manifest.mf'])
