RMLC=rmlc
OCAMLOPT=ocamlopt
OCAMLC=ocamlc

LUC4OCAML_CMXA = unix.cmxa  str.cmxa bdd.cmxa polka.cmxa luc4ocaml.cmxa 

all: window 

window.ml: window.rml 
	$(RMLC) -s main window.rml

window: window.ml 
	$(OCAMLC) -o window \
		-I `$(RMLC) -where` -I ../../lib \
		luc4ocaml.cma rmllib.cma \
		window.ml 

window.opt: window.ml 
	$(OCAMLOPT) -o window \
		-I `$(RMLC) -where` -I +lucky -I ../../lib \
		$(LUC4OCAML_CMXA) rmllib.cmxa \
		window.ml 


make test: clean window
	./window > window.out &&  \
	rm -f test.res && diff -u -i window.out.exp window.out > test.res
	[ ! -s test.res ] && make clean 

make utest:
	cp window.out window.out.exp

clean:
	rm -f window.ml  *.rannot *.rzi *.cmx *.cmi *.cmo *.o *~ Makefile.window window_luciole.c window.out window.h window.c window window.dro 

real_clean: clean
	rm  window