OCAMLMAKEFILE = OCamlMakefile
OCAMLC = ocamlc
OCAMLOPT = ocamlopt
OCAMLDEP = ocamldep
OCAMLLEX = ocamllex
OCAMLYACC = ocamlyacc
OCAMLFIND = ocamlfind
OCAMLLIBPATH = /usr/local/lib/ocaml
NCSUFFIX = .native
BCSUFFIX = .byte

SOURCES = \
	qhasm.ml annotParser.mly annotLexer.mll qhasmParser.mly qhasmLexer.mll \
	btor.ml btorGenerator.ml \
	stp.ml stpGenerator.ml \
	cvc3.ml cvc3Generator.ml \
	smt2.ml smt2Generator.ml \
	generator.ml parser.ml main.ml
EXAMPLEDIR = examples
EXAMPLES = $(wildcard $(EXAMPLEDIR)/*.q)
EXAMPLEFLAGS = -c consts
INCDIRS =
LIBDIRS =
MODULES = 
LIBS = unix str nums
OCAMLFLAGS = -g
LDFLAGS = -fexceptions
#CLIBS = stdc++ 
RESULT = qv

all: nc

examples: nc $(EXAMPLES)
	@for ex in $(EXAMPLES); do \
		echo Processing $$ex; \
		./$(RESULT)$(NCSUFFIX) $(EXAMPLEFLAGS) $$ex 1> /dev/null; \
	done

distclean:: clean
	rm vc/*.btor vc/*.smt2 vc/*.stp vc/*.cvc3

-include $(OCAMLMAKEFILE)

.PHONY: examples
