#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

export CFLAGS+=-Werror

%:
	dh $@

override_dh_clean:
	dh_clean man/*.1
	dh_clean man/manpage.refs

override_dh_installman: manpages
	dh_installman

man/%.1: man/%.sgml
	docbook2man -o $(shell dirname $@) $<

.PHONY: manpages
manpages: man/pngchunks.1 man/pngchunkdesc.1 man/pngcp.1 man/pnginfo.1
