#!/usr/bin/make -f # -*- makefile -*- # This has to be exported to make some magic below work. export DH_OPTIONS # Utility to get a literal space in GNU Make space := space += # Ignore spurious editor backup files in orig tarball export DH_ALWAYS_EXCLUDE override DH_ALWAYS_EXCLUDE := $(subst $(space),:,$(strip $(DH_ALWAYS_EXCLUDE) \ auxiliary/nmf/align1/el_wise_mul_div.cl~ \ auxiliary/nmf/align1/sub_wise.cl~ \ examples/tutorial/iterative-ublas.cpp~ \ viennacl/linalg/lanczos.hpp~ \ )) BUILDDIR := obj-$(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) # Catch-all rule %: dh $@ --without python-support --parallel override_dh_auto_test: $(BUILDDIR)/test_compute_capability if $(BUILDDIR)/test_compute_capability; then \ dh_auto_test; \ else \ echo '== SKIPPING TESTS BECAUSE NO OPENCL CAPABILITY FOUND ==' >&2; \ fi # Utility program to determine compute-capability of the build host $(BUILDDIR)/test_compute_capability: debian/test_compute_capability.c gcc -o $@ `dpkg-buildflags --get CFLAGS` \ `dpkg-buildflags --get LDFLAGS` $^ -lOpenCL