#!/usr/bin/make -f

# DH_VERBOSE := 1

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

%:
	dh $@  --with python3

override_dh_auto_build:
	dh_auto_build
	python3 -m markdown -f README.html README.md
	g++ $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -std=gnu++0x align_2d.cc -o align_2d
	g++ $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -std=gnu++0x training/realign.cc -o realign

override_dh_fixperms-arch:
	dh_fixperms -a
	for bin in debian/bin/* ; do \
	    script=`basename $${bin} | sed 's/^deepnano_//'`.py ; \
	    chmod +x debian/*/usr/share/*/$${script} ; \
	done
