#!/usr/bin/make -f
# export DH_VERBOSE=1

export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed

DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/buildflags.mk
CFLAGS+=$(CPPFLAGS)
CXXFLAGS+=$(CPPFLAGS)

%:
	dh $@ --parallel --dbg-package=libtbb2-dbg

VERSION = $(shell dpkg-parsechangelog | grep '^Version' | cut -d' ' -f2 | cut -f1 -d-)
debian/tbb.pc: debian/tbb.pc.in
	sed -e"s/@VERSION@/$(VERSION)/g" $< > $@

build-arch: debian/tbb.pc

# Makefiles should not be compressed (tbb-examples)
override_dh_compress-indep:
	dh_compress -X*/examples/*

get-orig-source:
	uscan --verbose --force-download --rename
