# Author: Sarah Walker

#.PHONY all:
#	ocamlfind ocamlc -g -package llvm -linkpkg codegensarah.ml ast.ml -o main

.PHONY : all
all : logisimple.native

.PHONY: logisimple.native
logisimple.native:
	ocamlbuild -use-menhir -use-ocamlfind -pkgs unix,llvm,llvm.analysis -cflags -w,+a-4 \
		logisimple.native

# "make clean" removes all generated files

.PHONY : clean
clean :
	ocamlbuild -clean
	rm -rf *.diff logisimple tester scanner.ml parser.ml parser.mli
	rm -rf *.cmx *.cmi *.cmo *.cmx *.o *.s *.ll *.out *.exe
	rm -rf tests/pass/*.s tests/pass/*.ll tests/pass/*.o
	rm -rf tests/fail/*.s tests/fail/*.ll tests/fail/*.o