#!/usr/bin/make -f

# vsxx submodule need to be downloaded from
# https://github.com/sekrit-twc/znedi3

include /usr/share/dpkg/buildflags.mk
export CXXFLAGS

%:
	dh $@ 

ifeq (,$(filter-out amd64 i386,$(DEB_HOST_ARCH_CPU)))
override_dh_auto_build:
	$(MAKE) X86=1 X86_AVX512=1 NNEDI3_WEIGHTS_PATH=/usr/share/nnedi3
#	$(MAKE) X86=1 X86_AVX512=1 testapp/testapp
else
	$(MAKE) NNEDI3_WEIGHTS_PATH=/usr/share/nnedi3
endif

override_dh_install:
	dh_installdirs usr/lib/$(DEB_HOST_MULTIARCH)/vapoursynth
	dh_install vsznedi3.so usr/lib/$(DEB_HOST_MULTIARCH)/vapoursynth

override_dh_clean:
	dh_clean nnedi3_weights.bin
