# (C) Copyright International Business Machines Corporation 23 January 
# 1990.  All Rights Reserved. 
#  
# See the file USERAGREEMENT distributed with this software for full 
# terms and conditions of use. 
# File: Makefile
# Author: David F. Bacon
# SCCS info: @(#)Makefile	1.9 3/13/90 

# Makefile is the makefile for this directory (hermes/type/checker) which makes
# the typechecker for the Hermes compiler.  It uses the bootstrap version of
# the compiler in hermes/type/bootstrap and hermes/type/common.

TCDEFDIR =	../defs
TCCOMDIR =	../common
TCBOOTDIR =	../bootstrap

# #ifdef'd modules from $(TCCOMDIR)
BSSRC	=	$(TCCOMDIR)/interfacecheck.bs $(TCCOMDIR)/stmtchecker.bs \
		$(TCCOMDIR)/recheckinfer.bs $(TCCOMDIR)/type.bs \
		$(TCCOMDIR)/qualchecker.bs
BSINT	=	interfacecheck.p stmtchecker.p recheckinfer.p type.p \
		qualchecker.p
BSOBJ	=	interfacecheck.po stmtchecker.po recheckinfer.po type.po \
		qualchecker.po

# main modules not used in bootstrap version
MAINSRC	=	recheckclass.p  literalcheck.p
MAINOBJ	=	recheckclass.po literalcheck.po

# class rule modules
CLASSSRC=	class.p boolean.p numeric.p variant.p string.p inport.p \
		outport.p orderedscalar.p table.p integer.p \
		enumerationorboolean.p nominal.p enumeration.p newable.p \
		polymorph.p copyable.p orderedtable.p callmess.p \
		variantcomponent.p
CLASSOBJ=	class.po boolean.po numeric.po variant.po string.po inport.po \
		outport.po orderedscalar.po table.po integer.po \
		enumerationorboolean.po nominal.po enumeration.po newable.po \
		polymorph.po copyable.po orderedtable.po callmess.po \
		variantcomponent.po

# combined modules
SRC	=	$(BSSRC) $(MAINSRC) $(CLASSSRC)
INT	=	$(BSINT)
PROCOBJS =	$(BSOBJ) $(MAINOBJ) $(CLASSOBJ)


include ../../make/includefile


EXTRACPPFLAGS =	-DFullChecking -Udebug

# Include typechecker local defs in DEFPATH, and the bootstrapping
# typechecker and common directories in LOADPATH.  Note that if you want
# to use the bootstrapper, you must not have any of the bootstrapped
# or common modules in $(PROCDIR).  The path ordering is as given so
# the more common situation of recompiling the typechecker with
# changes that do not require bumping to a new version.
DEFPATH	=	$(TCDEFDIR):$(DEFDIR)
LOADPATH= 	$(PROCDIR):$(TCCOMDIR):$(TCBOOTDIR)

all:	$(SRC) $(INT) compileprocs

install: all
	cp $(PROCOBJS) $(PROCDIR)

# Main type checking modules
# note: dependencies upon non-local definitions have been omitted

# *.bs files from $(TCCOMDIR)

include ../common/bsmake

# cleanup

clean:
	rm -f *~ $(INT) $(PROCOBJS)

