#!/usr/bin/make -f
# -*- makefile -*-

include /usr/share/ocaml/ocamlvars.mk

BUILD_ARGS :=

ifeq ($(OCAML_HAVE_OCAMLOPT),yes)
  BUILD_ARGS += native=true
else
  BUILD_ARGS += native=false
endif

ifeq ($(OCAML_NATDYNLINK),yes)
  BUILD_ARGS += native-dynlink=true
else
  BUILD_ARGS += native-dynlink=false
endif

%:
	dh $@ --with ocaml

.PHONY: override_dh_auto_build
override_dh_auto_build:
	ocaml pkg/build.ml $(BUILD_ARGS)

.PHONY: override_dh_auto_install
override_dh_auto_install:
	opam-installer --prefix=debian/tmp --libdir=.$(OCAML_STDLIB_DIR) reactiveData.install

.PHONY: override_dh_missing
override_dh_missing:
	dh_missing --fail-missing
