#!/usr/bin/make -f

# allow bashism's in commandlines
SHELL = /bin/bash

export DH_VERBOSE = 1

export DEB_CFLAGS_MAINT_APPEND = -I/usr/include/oprf/noiseXK/karmel \
 -I/usr/include/oprf/noiseXK/karmel/minimal -I/usr/include/oprf \
 -I/usr/include/oprf/noiseXK -DWITH_SODIUM -D_BSD_SOURCE -D_DEFAULT_SOURCE \
 -std=c11

export DEB_LDFLAGS_MAINT_APPEND = -loprf -lsodium

export PYBUILD_SYSTEM=distutils
export PYBUILD_DIR=python

%:
	dh $@ --with python3

override_dh_auto_build:
	dh_auto_build
	$(MAKE) -C man

override_dh_auto_install:
	dh_auto_install --sourcedirectory=python --buildsystem=pybuild
	dh_auto_install --sourcedirectory=. -- PREFIX=/usr

# FIXME typo in upstream makefile : test vs tests
override_dh_auto_test:
	echo "all build time tests skipped"

override_dh_auto_clean:
	dh_auto_clean
	$(MAKE) -C man clean
