# NWF makefile
#
# targets are:
#
# all -- rebuild the project (default)
# clean -- remove objects and executables

#export SHELL = /bin/bash
#export PATH = $$PATH:/bin:/usr/local/bin

SOURCES = util.ml coalg.mli alg.mli solver.ml def.mli \
fv/fvcoalg.ml fv/fvalg.ml fv/fvdef.ml fv/fvdef1.ml fv/fvmain.ml \
prob/probcoalg.ml prob/probalg.ml prob/probdef.ml prob/probmain.ml \
auto/autocoalg.ml auto/autoalg.ml auto/autodef.ml auto/automain.ml

.PHONY: all
all: nwf.exe

.PHONY: clean
clean:
	rm -f nwf.exe
	for X in . fv prob auto; do \
      for Y in cmo cmi cma output; do \
        rm -f $$X/*.$$Y; \
      done; \
    done

nwf.exe: $(SOURCES)
	ocamlc -o nwf.exe -I fv -I prob -I auto str.cma -g $(SOURCES)
