#!/usr/bin/make -f
# -*- makefile -*-
# Debhelper build instructions for timelimit.

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

CFLAGS+=	-pipe -Wall -W -ansi -pedantic -Wbad-function-cast \
		-Wcast-align -Wcast-qual -Wchar-subscripts -Winline \
		-Wmissing-prototypes -Wnested-externs -Wpointer-arith \
		-Wredundant-decls -Wshadow -Wstrict-prototypes -Wwrite-strings
ifneq (,$(filter werror,$(DEB_BUILD_OPTIONS)))
	CFLAGS+=	-Werror
endif

include /usr/share/hardening-includes/hardening.make
ifeq (,$(filter nohardening,$(DEB_BUILD_OPTIONS)))
CFLAGS+=	$(HARDENING_CFLAGS)
LDFLAGS+=	$(HARDENING_LDFLAGS)
endif

export CFLAGS CPPFLAGS LDFLAGS

override_dh_auto_install:
	dh_auto_install -- PREFIX=/usr MANDIR=/usr/share/man/man \
	  BINGRP=root MANGRP=root

override_dh_installchangelogs:
	dh_installchangelogs NEWS

%:
	dh "$@"
