#!/usr/bin/make -f

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

%:
	dh $@ --with autotools_dev

ARCH := $(shell dpkg-architecture -qDEB_BUILD_ARCH_CPU)

ifeq (amd64,$(ARCH))
    DEB_CONFIGURE_EXTRA_FLAGS := --enable-threads --enable-sse
 else
    DEB_CONFIGURE_EXTRA_FLAGS := --enable-threads
endif

override_dh_auto_configure:
	dh_auto_configure -- $(DEB_CONFIGURE_EXTRA_FLAGS)

override_dh_auto_test:
	make check

override_dh_auto_clean:
	dh_auto_clean
	rm -f testsuite/esltmp*
	rm -f easel/testsuite/esltmp*
	rm -f tutorial/MADE1.hmm.h3?

override_dh_compress:
	dh_compress -Xtutorial/
