#!/usr/bin/make -f

# DH_VERBOSE := 1
export LC_ALL=C.UTF-8
export DEB_BUILD_MAINT_OPTIONS = hardening=+all

# Link with -latomic on architectures that need it
ifneq (,$(filter $(DEB_HOST_ARCH), armel mipsel powerpc riscv64 sh4))
  export DEB_LDFLAGS_MAINT_APPEND += -Wl,--no-as-needed -latomic -Wl,--as-needed
endif

include /usr/share/dpkg/default.mk

%:
	dh $@

execute_after_dh_clean:
	rm -rf docs

execute_before_dh_auto_configure:
	cp debian/argparse.hpp $(CURDIR)

override_dh_auto_build:
	dh_auto_build --no-parallel --buildsystem=cmake

execute_before_dh_missing:
	find debian/tmp -type f \( -name LICENSE -o -name ChangeLog \) -delete
