#!/usr/bin/make -f

# Workaround for RC bug #947718
# I worked on it on abel.debian.org, a porterbox
# for which I thank:
# - ARM Ltd for hosting
# - Marvell Technology Group Ltd for the hardware
ifneq (,$(findstring $(DEB_HOST_ARCH),armel armhf mipsel m68k powerpc sh4))
export DEB_LDFLAGS_MAINT_APPEND=-latomic
endif

export DEB_CPPFLAGS_MAINT_APPEND= -D_LARGEFILE_SOURCE
export DEB_BUILD_MAINT_OPTIONS = hardening=+all

%:
	dh $@

override_dh_auto_build:
	make -j2 # make -j8 is too much for J.Puydt's box

override_dh_install:
	dh_install
	find debian -name "*.la" -type f -delete

override_dh_installchangelogs:
	dh_installchangelogs NEWS
