#!/usr/bin/make -f

%:
	dh ${@}

override_dh_auto_build:
	$(MAKE) LIBRARY_KIND=dynamic
	$(MAKE) LIBRARY_KIND=static
	$(MAKE) doc

override_dh_auto_install:
	$(MAKE) LIBRARY_KIND=dynamic PREFIX=$(CURDIR)/debian/tmp/usr install
	$(MAKE) LIBRARY_KIND=static PREFIX=$(CURDIR)/debian/tmp/usr install
	cp debian/addon/*.gpr debian/tmp/usr/share/ada/adainclude

override_dh_auto_test:
	$(MAKE) utests

# disabled for now: incorrect libpcscada.so.0 symlink problem
#override_dh_install:
#	dh_install --fail-missing

override_dh_compress:
	dh_compress -X.ads -X.adb -XMakefile

override_dh_strip:
	dh_strip --dbg-package=pcscada-dbg
