Makefile 730 Bytes
Newer Older
bguillaum's avatar
bguillaum committed
1
OCB_FLAGS = -use-ocamlfind -use-menhir -I src
bguillaum's avatar
bguillaum committed
2
OCB = ocamlbuild $(OCB_FLAGS)
bguillaum's avatar
bguillaum committed
3

Bruno Guillaume's avatar
Bruno Guillaume committed
4
LIB_FILES = libgrew.cma libgrew.cmxa libgrew.a libgrew.cmi libgrew_types.cmi libgrew.cmx libgrew.cmxs
bguillaum's avatar
bguillaum committed
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
INSTALL_FILES = $(LIB_FILES:%=_build/src/%)

VERSION = `cat VERSION`

build:
	$(OCB) $(LIB_FILES)

install: build uninstall
	cp META_STD META
	ocamlfind install -patch-version $(VERSION) libgrew META $(INSTALL_FILES)
	rm -f META

install_dev: build uninstall_dev
	cp META_DEV META
	ocamlfind install -patch-version $(VERSION) libgrew_dev META $(INSTALL_FILES)
	rm -f META

uninstall:
	ocamlfind remove libgrew

uninstall_dev:
	ocamlfind remove libgrew_dev

doc:
	$(OCB) libgrew.docdir/index.html

.PHONY:	all clean build sanity

clean:
	$(OCB) -clean