OCAMLBUILD ?= ocamlbuild PACKAGES=num,curses,camlzip,ezxmlm,text,str,menhirLib PATHS=.,odf MENHIR=-use-menhir LIB = licht LIB_STUB = $(LIB)_stub STUB_OPTIONS=-lflags -ccopt,-L.,-cclib,-l$(LIB_STUB) BYTE_STUB_OPTIONS=$(STUB_OPTIONS)#,-dllib,-l$(LIB_STUB) .PHONY: stub all: native stub: $(MAKE) -C stub LIB=$(LIB) deps: opam install ocamlbuild curses camlzip ezxmlm ounit text menhir byte: stub $(OCAMLBUILD) -pkgs $(PACKAGES) $(STUB_OPTIONS) $(MENHIR) -Is $(PATHS) main.byte native: stub $(OCAMLBUILD) -tags optimize\(3\) -pkgs $(PACKAGES) $(STUB_OPTIONS) $(MENHIR) -Is $(PATHS) main.native #$(OCAMLBUILD) -pkgs $(PACKAGES) $(STUB_OPTIONS) $(MENHIR) -Is $(PATHS) main.native doc: $(OCAMLBUILD) -pkgs $(PACKAGES) -menhir -Is $(PATHS) licht.docdir/index.html test: stub $(OCAMLBUILD) -pkgs $(PACKAGES),oUnit -cflag -g -lflag -g $(STUB_OPTIONS) $(MENHIR) -Is $(PATHS),tests test.byte -- relink: stub rm -f _build/main.native rm -f _build/main.byte rm -f _build/tests.byte make clean: make -C stub clean $(OCAMLBUILD) -clean