#!/usr/bin/make -f

include /usr/share/dpkg/default.mk

%:
	dh $@

override_dh_auto_build:
	$(MAKE) all extensions

override_dh_auto_install:
	mkdir -p debian/libcpputest-dev/usr/lib/$(DEB_HOST_MULTIARCH)
	cp lib/*.a debian/libcpputest-dev/usr/lib/$(DEB_HOST_MULTIARCH)/

override_dh_auto_clean:
	$(MAKE) cleanExtensions clean

override_dh_compress:
	dh_compress -X.cpp

# Fixes for the cpputest (arch-all) package
override_dh_installexamples-indep:
	dh_installexamples
	chmod 644 debian/cpputest/usr/share/doc/cpputest/examples/*.dsw

override_dh_fixperms-indep:
	chmod 755 debian/cpputest/usr/share/cpputest/scripts/NewProject.sh \
		  debian/cpputest/usr/share/cpputest/scripts/convertToUnity/create_unity_test_runner.rb
	dh_fixperms

# Work-around debhelper bug #676462
override_dh_installexamples-arch:
	dh_installexamples
override_dh_fixperms-arch:
	dh_fixperms
