#!/usr/bin/make -f

export CPPFLAGS:=$(shell dpkg-buildflags --get CPPFLAGS)
export CFLAGS:=$(shell dpkg-buildflags --get CFLAGS)
export CXXFLAGS:=$(shell dpkg-buildflags --get CXXFLAGS)
export LDFLAGS:=$(shell dpkg-buildflags --get LDFLAGS)

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

Changes: README
	sed -ne '/License terms/q; /^Changes/,$$p' < $< > $@

build: Changes
	dh --with autoreconf $@

clean:
	rm -f Changes
	dh --with autoreconf $@

%:
	dh --with autoreconf $@ 

override_dh_clean:
	dh_clean
	rm -rf *.lo *.la *.o .libs
	rm -rf *.c libtool stamp-h1 Makefile

.PHONY: override_dh_strip
override_dh_strip:
	dh_strip --dbg-package=libzerg0-dbg
