#!/usr/bin/make -f

export DH_OPTIONS
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
export QT_SELECT = qt5

DIRS = pos2kml str2str rnx2rtkp convbin rtkrcv

%:
	dh $@

override_dh_auto_build:
	dh_auto_build -Dlib/iers/gcc
	set -e; for i in $(DIRS); do dh_auto_build -Dapp/$$i/gcc; done
	dh_auto_build -Dutil/rnx2rtcm
	dh_auto_build

override_dh_install-arch:
	dh_install
	patchelf --remove-rpath $(CURDIR)/debian/rtklib-qt/usr/bin/*
