# Makefile for The ML Kit
# 
# The variables below must be set according to the local site.
# If your ML compiler only has the Ediburgh Standard ML Library's Make
# facility loaded then the variable CONSULT will ensure that the
# correct library modules are loaded prior to compiling the ML Kit;
# otherwise it will be ignored.

CONSULT=ML_CONSULT_LIB

# NJSML is the a version of the New Jersey Compiler with the
# Edinburgh Library loaded

NJSML = sml

# POLYDATABASEFILE is a Poly/ML databasefile with the 
# Edinburgh Library saved

POLYDATABASEFILE = /home/hugin/birkedal/bin/sun4/MLedlib_dbase

# POLY is the Poly/ML compiler.
POLY = poly 

kit-int-NJ:
	(cp Common/Prelude.sml.interpreter Common/Prelude.sml; \
  	 cat $(CONSULT) ../tools/NJ/buildNJint | $(NJSML) )
kit-comp-NJ:
	(cp Common/Prelude.sml.compiler Common/Prelude.sml; \
	cat $(CONSULT) ../tools/NJ/buildNJcomp | $(NJSML) )
kit-batch-NJ:
	(cp Common/Prelude.sml.interpreter Common/Prelude.sml; \
	cat $(CONSULT) ../tools/NJ/buildNJbatch | $(NJSML) )
kit-int-Poly:
	(cp Common/Prelude.sml.interpreter Common/Prelude.sml; \
	 cp $(POLYDATABASEFILE) kit; \
	 chmod +w kit; \
	cat $(CONSULT) ../tools/Poly/buildPolyint | $(POLY) -h 32768 kit )
kit-comp-Poly:
	(cp Common/Prelude.sml.compiler Common/Prelude.sml; \
	 cp $(POLYDATABASEFILE) kit; \
	 chmod +w kit; \
	cat $(CONSULT) ../tools/Poly/buildPolycomp | $(POLY) -h 32768 kit )
