#! /usr/bin/make -f

#   Copyright 1994-98   joey@infodrom.north.de (Martin Schulze)
#		2001	Filip Van Raemdonck <mechanix@debian.org>
#               2010    Peter Pentchev <roam@ringlet.net>

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

LDFLAGS+=	-Wl,--as-needed

INSTPREFIX=debian/gtkcookie/usr

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

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

export INSTPREFIX CFLAGS CFLAGS_WARN CPPFLAGS DEB_BUILD_HARDENING LDFLAGS

%:
	dh $@
