#! /usr/bin/make -f
%:
	dh $@

ifeq (,$(filter noopt,$(DEB_BUILD_OPTIONS)))
CFLAGS := -O2 -g -Wall
else
CFLAGS := -g -Wall
endif

override_dh_auto_build:
	dh_auto_build -- CFLAGS="$(CFLAGS)"

# You only need to run this immediately after checking out the package from
# revision control.
quilt-setup:
	[ ! -d .pc ]
	set -e; for patch in $$(quilt series | tac); do \
		patch -p1 -R --no-backup-if-mismatch <"debian/patches/$$patch"; \
	done
	quilt push -a

.PHONY: quilt-setup
