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

DPKG_EXPORT_BUILDFLAGS = 1
-include /usr/share/dpkg/buildflags.mk

export CFLAGS += -DGMP_DESC -DLTM_DESC -DUSE_LTM

DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)

override_dh_auto_test:
	# Tests don’t pass currently.

override_dh_auto_build:
	$(MAKE) docs
	$(MAKE) -f makefile.shared EXTRALIBS="-lgmp -ltommath"

override_dh_auto_install:
	$(MAKE) DESTDIR=$(CURDIR)/debian/tmp INSTALL_GROUP=root LIBPATH=/usr/lib/$(DEB_HOST_MULTIARCH) install -f makefile.shared

%:
	dh $@
