#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

%:
	dh $@

override_dh_auto_build:
	dh_auto_build -- OPTS="$(CFLAGS) $(LDFLAGS) $(CPPFLAGS) -std=gnu89 -pedantic -Wall -ggdb" INC="-I../include" LIB="-L/usr/lib -lm"

override_dh_auto_install:
	dh_auto_install -- PREFIX=$(CURDIR)/debian/reglookup/usr MAN_PREFIX=\$${PREFIX}/share/man

	rm -rf debian/reglookup/usr/share/man
	mv debian/reglookup/usr/share/doc/reglookup/man debian/reglookup/usr/share/man
