cti: cti.sav
	spld --static --main=restore --resources=$<=/mystuff/$<,system --output=$@

cTI: *.pl Makefile
	echo "compile([main,runtime_entry]), save_program(cTI,runtime_entry(start2))." | sicstus
	mv cTI.sav cTI

cti.sav: *.pl  Makefile
	echo "compile([main,runtime_entry]), save_program('cti.sav')." | sicstus

