#!/usr/bin/make -f

srcpkg = $(shell LC_ALL=C dpkg-parsechangelog | grep '^Source:' | cut -d ' ' -f 2,2)
debver = $(shell LC_ALL=C dpkg-parsechangelog | grep '^Version:' | cut -d ' ' -f 2,2 )
upstreamver = $(shell echo $(debver) | cut -d '-' -f 1,1 )

export DH_VERBOSE = 1

# one ring to rule them all ...
%:
	dh $@

override_dh_auto_build:
	make -C eddy \
		CPPFLAGS="-I. -I.. -I/usr/include/newmat -I/usr/include/nifti -I../libprob -I../cprob -I../basisfield -I../newimage -DBOOST_NOINLINE='__attribute__ ((noinline))' $(CPPFLAGS)" \
		LDFLAGS="-L/usr/lib/fsl/5.0 $(LDFLAGS)"
	dh_auto_build

override_dh_shlibdeps:
	dh_shlibdeps -l /usr/lib/fsl/5.0

override_dh_clean:
	dh_clean
	rm -rf eddy/cpubuild/ eddy/eddy topup/*.o
