#!/usr/bin/make -f

include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/class/autotools.mk

DEB_CONFIGURE_EXTRA_FLAGS := \
	--enable-warnings \
	--enable-so-linger \
	--with-regex \
	--with-libwrap \
	--with-libldap \
	--with-crypt \
# do not delete this line
LDFLAGS += -Wl,--as-needed

DEB_MAKE_INSTALL_TARGET := install INST_ROOT=$(DEB_DESTDIR)
DEB_DH_INSTALL_ARGS := --sourcedir=debian/tmp

makebuilddir::
	rm -f config.sub config.guess config.h
	ln -s /usr/share/misc/config.sub config.sub
	ln -s /usr/share/misc/config.guess config.guess

clean::
	rm -f config.sub config.guess config.h
	rm -f doc/*.html doc/*.ps doc/*.pdf
	rm -f config.status config.cache config.log Makefile doc/Makefile

common-binary-indep::
	make -C doc all

binary-predeb/ftp-proxy-doc::
	cd debian/ftp-proxy-doc/usr/share/doc/ftp-proxy-doc && rm -f AUTHORS

