#!/usr/bin/make -f

# DH_VERBOSE := 1

# for hardening you might like to uncomment this:
export DEB_BUILD_MAINT_OPTIONS=hardening=+all

ifneq (,$(filter $(DEB_HOST_ARCH),arm64 ppc64el))
	export NON_APPLECLANG_LIBS=z
	# not really z, but we need something innocent here
else
	export NON_APPLECLANG_LIBS=rt
endif

%:
	dh $@

override_dh_auto_configure:
	dh_auto_configure -- -DJELLYFISH_ROOT=/usr -DNO_NATIVE_ARCH=true $(EXTRA)

override_dh_auto_build:
	dh_auto_build
	python3 -m markdown -f README.html README.md

override_dh_clean:
	dh_clean README.html sample_data/sample_quasi_index/ sample_data/sample_quasi_index_ph/ sample_data/sample_quasi_map.sam sample_data/sample_quasi_map_ph.sam

override_dh_gencontrol:
	dh_gencontrol -- -Vsimde:Built-Using="$(shell dpkg-query -f '$${source:Package} (= $${source:Version}), ' -W "libsimde-dev")"