#!/usr/bin/make -f
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
# export CC=clang
# export CXX=clang++

# NOTE: please check LTO builds when updating the symbols table.  Usually the
# missing symbols were not needed in the first place, and can safely be marked
# as (optional).
#export DEB_BUILD_MAINT_OPTIONS += optimize=+lto

%:
	dh $@ -Scmake

execute_before_dh_missing-indep:
	rm -vf $(CURDIR)/debian/tmp/usr/bin/rocm_smi.py

# see https://manpages.debian.org/testing/debhelper/dh_makeshlibs.1.en.html
# and https://manpages.debian.org/testing/dpkg-dev/dpkg-gensymbols.1.en.html
# To make sure gensymbols fails the build, -c4 to be more strict
override_dh_makeshlibs:
	dh_makeshlibs -V -plibrocm-smi64-7 -- -c4
	dh_makeshlibs -V -pliboam7 -- -c4
