#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS = hardening=+all
export DEB_CFLAGS_MAINT_APPEND = -Wall -Wl,--no-undefined
include /usr/share/dpkg/buildflags.mk


include /usr/share/cdbs/1/rules/upstream-tarball.mk
include /usr/share/cdbs/1/rules/utils.mk
include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/class/makefile.mk

ifeq (,$(filter noopt,$(DEB_BUILD_OPTIONS)))
GNUREC=-ffast-math -funroll-all-loops -fpeel-loops -ftracer -funswitch-loops
endif

DEB_MAKE_EXTRA_ARGS = "GNUREC=$(GNUREC)" "CPPFLAGS=$(CPPFLAGS)" "LDFLAGS=$(LDFLAGS)" "CFLAGS=$(CFLAGS) -c" "CXXFLAGS=$(CXXFLAGS) -c -Wall -Wl,--no-undefined"
DEB_TAR_SRCDIR := .

DEB_INSTALL_EXAMPLES_ALL=toAlignEx

DEB_COPYRIGHT_CHECK_IGNORE_REGEX := ^debian/(changelog|copyright(_hints|_newhints)?)$$|^.*[.](gif)$$

BUILT_USING_SOURCES := $(shell dpkg-query -W -f='$${source:Package} (= $${source:Version})' libtclap-dev)
DEB_DH_GENCONTROL_ARGS_m2m-aligner := -- '-Vmisc:Built-Using=$(BUILT_USING_SOURCES)'

# Needed by upstream build process
CDBS_BUILD_DEPENDS += , libtclap-dev, dpkg-dev (>= 1.16.2)
