# Makefile generated by imake - do not edit!
# $XConsortium: imake.c,v 1.91 95/01/12 16:15:47 kaleb Exp $

LIBDIR=/usr/local/lib/ocaml/
CAMLC=ocamlc
CAMLCOPT=ocamlopt
COMPFLAGS=-g
COMPFLAGSOPT=
CAMLLIBR=ocamllibr
CAMLLEX=ocamllex
CAMLYACC=ocamlyacc
CAMLDEP=ocamldep
CPP=/lib/cpp -P
RM=rm -f
CP=cp -p -f
TOP=../.
CONFIG=$(TOP)/config

all::

# (begin Imakefile)

all::calc

calc: lexer.cmo parser.cmo calc.cmo main.cmo
	$(CAMLC) $(LINKFLAGS)  lexer.cmo parser.cmo calc.cmo main.cmo -o calc

clean::
	$(RM) calc

opt::calc.opt

calc.opt: lexer.cmx parser.cmx calc.cmx main.cmx
	$(CAMLCOPT) $(LINKFLAGSOPT)  lexer.cmx parser.cmx calc.cmx main.cmx -o calc.opt
	$(CP) calc.opt calc

clean::
	$(RM) calc

parser.ml parser.mli: parser.mly
	@$(RM) parser.ml parser.mli
	$(CAMLYACC) parser.mly
	@chmod a-w parser.ml parser.mli

clean::
	$(RM) parser.ml parser.mli

beforedepend:: parser.ml parser.mli

lexer.ml: lexer.mll
	@$(RM) lexer.ml
	$(CAMLLEX) lexer.mll
	@chmod a-w lexer.ml

clean::
	$(RM) lexer.ml

beforedepend:: lexer.ml

# (end Imakefile)

clean::
	$(RM) *.cmi *.cmix *.cmo *.cmx *.o *~ *.opt #*#

beforedepend::

makefile: beforedepend
	imake -I$(CONFIG) -DTOPDIR=$(TOP)
	$(CAMLDEP) *.mli *.ml >> Makefile

makefiles:: makefile

.SUFFIXES: .mli .cmi .ml .cmo .cmx

.mli.cmi:
	$(CAMLC) $(COMPFLAGS) -c $<

.ml.cmo:
	$(CAMLC) $(COMPFLAGS) -c $<

.ml.cmx:
	$(CAMLCOPT) $(COMPFLAGSOPT) -c $<

# Generated dependencies below

calc.cmo: lexer.cmo parser.cmi 
calc.cmx: lexer.cmx parser.cmx 
lexer.cmo: parser.cmi 
lexer.cmx: parser.cmx 
loadall.cmo: main.cmo 
loadall.cmx: main.cmx 
main.cmo: calc.cmo 
main.cmx: calc.cmx 
parser.cmo: parser.cmi 
parser.cmx: parser.cmi 
