#!/usr/bin/make -f

include /usr/share/ocaml/ocamlvars.mk

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

%:
	dh  $@ --with ocaml

.PHONY: override_dh_auto_build
override_dh_auto_build:
	$(MAKE)
ifneq ($(OCAML_OPT_ARCH),)
	$(MAKE) allopt
	ocamlopt -I . -shared -linkall -o zip.cmxs zip.cmxa
endif

.PHONY: override_dh_auto_install
override_dh_auto_install:
	$(MAKE) install DESTDIR=$(CURDIR)/debian/tmp
ifneq ($(OCAML_OPT_ARCH),)
	$(MAKE) installopt DESTDIR=$(CURDIR)/debian/tmp
endif
