Permalink
Fetching contributors…
Cannot retrieve contributors at this time
38 lines (25 sloc) 774 Bytes
OCAMLFLAGS = -w +a-4-6-9-27-28-30..99 -warn-error -a -annot -thread
OCAMLOPTFLAGS += -inline 100
HAS_NATDYNLINK = false
if $(file-exists $(shell $(OCAMLC) -where)/dynlink.cmxa)
HAS_NATDYNLINK = true
export HAS_NATDYNLINK
# allow to override the above variables from command line
DefineCommandVars()
USE_OCAMLFIND = true
NATIVE_ENABLED = true
BYTE_ENABLED = true
OCAMLPACKS[] = bytes
%.cmxs: %.cmxa
$(OCAMLOPT) -shared -I . -o $@ $< -linkall
.SUBDIRS: src test
PACKAGE_FILES = $(cd src, $(ls *.cma *.cmxa *.cmx *.cmi *.mli *.so *.a))
if $(HAS_NATDYNLINK)
PACKAGE_FILES += $(ls src/*.cmxs)
export PACKAGE_FILES
.PHONY: install
install:
ocamlfind install leveldb META $(PACKAGE_FILES)
.PHONY: uninstall
uninstall:
ocamlfind remove leveldb