CC=ocamlopt
PROG=bigtoe

main: parser
	$(CC) -pp "camlp4o ./Quotexpander.cmo" -o $(PROG) nums.cmxa atp.cmx extracted.cmx convert.cmx pprinter.cmx lexer.cmx grammar.cmx main.cmx

parser: Quotexpander.cmo extracted.ml pprinter.ml convert.ml grammar.mly lexer.mll  
	$(CC) -pp "camlp4o ./Quotexpander.cmo" -w ax -c atp.ml
	$(CC) -c extracted.ml
	$(CC) -c convert.ml
	$(CC) -c pprinter.ml
	ocamlyacc grammar.mly
	ocamllex lexer.mll
	$(CC) -c grammar.mli
	$(CC) -c lexer.ml
	$(CC) -c grammar.ml
	$(CC) -c main.ml 
	ocamlc -I +camlp4 -c Quotexpander.ml	

Quotexpander.cmo: Quotexpander.ml; ocamlc -I +camlp4 -c Quotexpander.ml	

clean:
	rm -f *.cmo *.cmi *.cmx *.o lexer.ml grammar.ml grammar.mli $(PROG)

