PROGS=prompt dump populate test_lo prompt_gtk
LABLGTK_DIR=`ocamlfind query lablgtk`

all: $(PROGS)

prompt: prompt.ml
	ocamlc -o $@ -I .. postgres.cma unix.cma threads.cma -thread $<

dump: dump.ml
	ocamlc -o $@ -I .. postgres.cma $<

populate: populate.ml
	ocamlc -o $@ -I .. postgres.cma $<

test_lo: test_lo.ml
	ocamlc -o $@ -I .. postgres.cma $<

prompt_gtk: prompt_gtk.ml
	ocamlc -o $@ -I .. postgres.cma -I $(LABLGTK_DIR) lablgtk.cma gtkInit.cmo $<

.PHONY:
clean:
	rm -f *~ *.cm[iox] $(PROGS)
