#!/usr/bin/make -f

CFLAGS = $(shell dpkg-buildflags --get CFLAGS 2>/dev/null | sed -e 's/-g\|-O2//g')
ifeq (,$(CFLAGS))
  # Handle case for versions of Debian/Ubuntu that have dpkg-dev (<< 1.15.7).
  CFLAGS = -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security
endif

%:
	dh $@ --parallel

override_dh_auto_configure:
	dh_auto_configure -- \
		--disable-debug \
		--disable-rpath \
		--enable-dynamic-frontends \
		--enable-expopt=full \
		--enable-nasm \
		--with-fileio=lame
