#!/usr/bin/make -f
%:
	dh $@


CFLAGS = -Wall -g -fstack-protector -fPIE
LDFLAGS = -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -pie

# Disable optimisations if noopt found in $DEB_BUILD_OPTIONS
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
	CFLAGS += -O0
	LDFLAGS += -Wl,-O0
else
	CFLAGS += -Os
	LDFLAGS += -Wl,-O1
endif

override_dh_auto_configure:
	dh_auto_configure -- CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" \
		--exec-prefix=
	make -C po update-po
