#!/usr/bin/make -f

export DH_VERBOSE=1

export DEB_BUILD_MAINT_OPTIONS=hardening=+all
# gcc15 defaults to -std=gnu23 where bool/true/false are keywords, which
# breaks bool.h's "typedef enum {false, true} bool;". Pin C standard to C17
# via DEB_CFLAGS_MAINT_APPEND (appends after -fPIE so the PIE link in the
# patched makefile still works); C++ files are unaffected by this header.
export DEB_CFLAGS_MAINT_APPEND=-fPIE -std=gnu17
export DEB_CXXFLAGS_MAINT_APPEND=-fPIE
export DEB_LDFLAGS_MAINT_APPEND=-Wl,--as-needed -fPIE -pie

%:
	dh $@
