# =====================================================================
#
# 		 MAKEFILE FOR THE HOL LIBRARY: cpo
#
# =====================================================================

# =====================================================================
# MAIN ENTRIES:
#
#    make all	    : create theories
#
#    make clean	    : remove only compiled code
#	
#    make clobber   : remove both theories and compiled code
# ---------------------------------------------------------------------
#
# MACROS:
#
#    Hol            : the pathname of the version of hol used
# =====================================================================

Hol=hol

# =====================================================================
# Main entry
# =====================================================================

all: CPO.th CLa.th galois.th
	@echo "===> library cpo rebuilt"

# =====================================================================
# Cleaning functions.
# =====================================================================

clean:
	rm -f *_ml.o
	@echo "===> library cpo: all object code deleted"

clobber:
	rm -f *_ml.o *_ml.l *.th 
	@echo "===> library cpo: all object code and theory files deleted"

# =====================================================================
# Entries for individual files.
# =====================================================================

CPO.th: mk_CPO.ml 
	rm -f more_lists.th
	echo 'set_flag(`abort_when_fail`,true);;'\
	     'loadt `mk_CPO`;;'\
	     'quit();;' | ${Hol} 

CLa.th: mk_CLa.ml  CPO.th 
	rm -f ell.th
	echo 'set_flag(`abort_when_fail`,true);;'\
	     'loadt `mk_CLa`;;'\
	     'quit();;' | ${Hol} 

galois.th: mk_galois.ml  CLa.th CPO.th 
	rm -f ell.th
	echo 'set_flag(`abort_when_fail`,true);;'\
	     'loadt `mk_galois`;;'\
	     'quit();;' | ${Hol} 
