#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS = hardening=+all
export DEB_CFLAGS_MAINT_APPEND  = -Wall -pedantic
export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed

%:
	dh $@

# USE_SYSTEM_LIBS forces dependencies to be installed from the system.
override_dh_auto_configure:
	dh_auto_configure -- -DUSE_SYSTEM_LIBS=ON

# Upstream installs the binary as CANopenTerm; ship it lowercase.
override_dh_auto_install:
	dh_auto_install
	mv debian/canopenterm/usr/bin/CANopenTerm debian/canopenterm/usr/bin/canopenterm
