#!/usr/bin/make -f

ifneq "$(DEB_BUILD_ARCH)" "amd64"
	CONFIG_ASM = --disable-asm
endif

export NASMENV=-w-macro-params-legacy

%:
	dh $@ -Dbuild/linux --with quilt

override_dh_auto_configure:
	dh_auto_configure -- \
	--enable-pic --enable-shared --system-libdavs2 \
	$(CONFIG_ASM) --host=$(DEB_HOST_GNU_TYPE)

override_dh_clean:
	dh_clean build/linux/common/vec/*.o source/version.h \
	build/linux/common/x86/*.o

override_dh_auto_clean:
	cd build/linux && ./configure --host=$(DEB_HOST_GNU_TYPE) --disable-asm
	cd build/linux && $(MAKE) distclean
