#!/usr/bin/make -f
# -*- makefile -*-

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

export DEB_CPPFLAGS_MAINT_APPEND = -DGBE_DEBUG=1

%:
	dh $@ --buildsystem cmake --parallel

SUPERFLUOUS=cl.h cl_d3d10.h cl_dx9_media_sharing.h cl_ext.h cl_gl_ext.h cl_platform.h cl.hpp cl_d3d11.h cl_egl.h cl_gl.h opencl.h
override_dh_auto_configure:
	$(RM) $(patsubst %,include/CL/%,$(SUPERFLUOUS))
	dh_auto_configure --buildsystem cmake

override_dh_strip:
	dh_strip --dbg-package=beignet-opencl-icd-dbg

override_dh_gencontrol:
	dh_gencontrol -- -VClang="$(shell dpkg-query -f '$${source:Package} (= $${source:Version}), \n' -W libclang-?.?-dev | grep -e '= [0-9]')"
