#!/usr/bin/make -f

SSEFLAG=$(shell if grep -q "^flags.*sse" /proc/cpuinfo ; then echo "--enable-sse" ; else echo "--disable-sse" ; fi)

%:
	dh $@

override_dh_auto_configure:
	./configure --prefix=/usr --extra-cflags="$(CFLAGS)" --extra-ldflags="$(LDFLAGS)" $(SSEFLAG)

override_dh_auto_build:
	dh_auto_build -- CFLAGS="-DNDEBUG -std=c99 $(CFLAGS)"

override_dh_auto_install:
	# do nothing

override_dh_installchangelogs:
	dh_installchangelogs CHANGELOG

override_dh_auto_test:
	echo "no test suite provided upstream"
