#according to lepix's Makefile,
#this is the bare minimum we need to compile

# Make sure ocamlbuild can find opam-managed packages: first run
#
# eval `opam config env`

# Easiest way to build: using ocamlbuild, which in turn uses ocamlfind

all: warhol.native printbig.o openfile.o prep

warhol.native :
	ocamlbuild -use-ocamlfind -pkgs llvm,llvm.analysis -cflags -w,+a-4 \
		warhol.native

# "make clean" removes all generated files

.PHONY : clean
clean :
	ocamlbuild -clean
	rm -rf testall.log *.diff warhol scanner.ml parser.ml parser.mli prep
	rm -rf printbig openfile
	rm -rf *.cmx *.cmi *.cmo *.cmx *.o *.s *.ll *.out *.exe


printbig : printbig.c
	cc -o printbig printbig.c


openfile : openfile.c
	cc -o openfile openfile.c

prep: prep.c
	gcc -o prep prep.c
