#!/usr/bin/make -f
# -*- makefile -*-

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

export LDFLAGS=-Wl,--as-needed

include /usr/share/dpkg/architecture.mk

ifneq ($(DEB_HOST_ARCH),$(DEB_BUILD_ARCH))
  cross_args = ac_cv_func_malloc_0_nonnull=yes
endif

%:
	dh $@ --with autoreconf

override_dh_auto_configure:
	dh_auto_configure -- --docdir=/usr/share/doc/libasyncns-dev $(cross_args)

override_dh_auto_build:
	dh_auto_build
	make -C doxygen doxygen

override_dh_installchangelogs:
	dh_installchangelogs debian/changelog.upstream
