#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS = hardening=+all
export DEB_LDFLAGS_MAINT_APPEND = -Wl,-z,noexecstack

%:
	dh $@ --with python3

# The debian/compiler directory contains gcc and clang wrappers.
# It adds Debian specifific options distributed in
# $CC, $CFLAGS, $CPPFLAGS and $LDFLAGS
export PATH := $(shell pwd)/debian/compiler:$(PATH)

# Regenerate man pages
.PHONY: manpages
manpages:
	(! command -v pandoc) || (rm -v doc/man/* && autogen/man)

override_dh_auto_configure: manpages
	./configure --host=$(DEB_HOST_ARCH_CPU) --prefix=/usr

override_dh_auto_clean:
	rm -rf ./build

# disable auto installation
override_dh_auto_install:
