#!/usr/bin/make -f

# Filter out GCC-specific LTO flags that are not valid for ld
export DEB_LDFLAGS_MAINT_STRIP = -flto=auto -ffat-lto-objects -fuse-linker-plugin

%:
	dh $@

override_dh_auto_clean:
	echo "Ok"

override_dh_auto_configure:
	PREFIX=/usr \
	LIBDIR=/usr/lib/$$(LC_ALL=C cc -v 2>&1 | \
			grep 'Target:' | \
			cut -d ' ' -f 2) \
	GCOV=false \
	./configure

override_dh_auto_build:
	make -j

override_dh_auto_install:
	make install DESTDIR=$(CURDIR)/debian/kc3
