#!/usr/bin/make -f

export DH_VERBOSE = 1
DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/buildflags.mk
include /usr/share/dpkg/buildtools.mk

%:
	dh $@ --with=single-binary

# Upstream supplies scripts and templates, with no build-system entry point.
override_dh_auto_configure override_dh_auto_build:

override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	CC="$(CC_FOR_BUILD)" CXX="$(CXX_FOR_BUILD)" python3 debian/tests/compiler --compiler=$(CURDIR)/dronecan_dsdlc.py
endif

override_dh_python3:
	dh_python3 /usr/share/dronecan-dsdlc
