#!/usr/bin/make -f

include /usr/share/dpkg/buildflags.mk
CFLAGS	+= -Wall -pedantic
LDFLAGS	+= -Wl,--as-needed
export CFLAGS LDFLAGS

# due to autoreconf(1)
FILE_LIST_PRESERVE = \
 Makefile \
 Makefile.in \
 aclocal.m4 \
 config.h.in \
 configure \
 depcomp \
 install-sh \
 missing \
 mkinstalldirs \

include debian/debian-save-restore.mk

override_dh_auto_configure:
	$(file-state-save)
	cp -v /usr/share/misc/config.sub .
	cp -v /usr/share/misc/config.guess .
	autoreconf -fi
	dh_auto_configure

override_dh_auto_build:
	dh_auto_build
	$(file-state-restore-copy)

override_dh_auto_clean:
	rm -f *.o \
		lcab \
		config.guess \
		config.sub \
		config.h \
		config.log \
		config.status \
		stamp-h1 \
	dh_auto_clean

%:
	dh $@

# End of file
