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

DESTDIR=$(CURDIR)/debian/libnproc-ocaml-dev
include /usr/share/ocaml/ocamlvars.mk
OCAMLFIND_DESTDIR=$(DESTDIR)/$(OCAML_STDLIB_DIR)
export OCAMLFIND_DESTDIR

ifeq ($(OCAML_HAVE_OCAMLOPT),yes)
TARGET := default
else
TARGET := all
endif

%:
	dh $@ --with ocaml

.PHONY: override_dh_auto_build
override_dh_auto_build:
	$(MAKE) $(TARGET)

.PHONY: override_dh_auto_install
override_dh_auto_install:
	mkdir -p $(OCAMLFIND_DESTDIR)
	dh_auto_install
