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

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

export DEB_BUILD_HARDENING = 1
export DEB_BUILD_MAINT_OPTIONS = hardening=+all

export CXXFLAGS = $(shell dpkg-buildflags --get CXXFLAGS)
export CXXFLAGS += -Wall --std=c++17 -D_FORTIFY_SOURCE=2

export CXX = g++

%:
	dh $@

override_dh_auto_build:
	# compile the package.
	./build program
	./build man

override_dh_auto_clean:
	./build distclean
	dh_auto_clean

override_dh_auto_install:
	./build install x debian/oxref
	dh_auto_install
