#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

export PVER=$(shell dpkg-parsechangelog --show-field version | cut -d"-" -f1)

%:
	dh $@ --parallel --with autoreconf

ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
CFLAGS += -O0
endif

override_dh_auto_configure:
	dh_auto_configure -- LDFLAGS="$(LDFLAGS) -Wl,--as-needed"\
		--disable-static \
		--enable-sdl

override_dh_makeshlibs:
	dh_makeshlibs -- -v$(PVER)

