#!/usr/bin/make -f

# https://wiki.ubuntu.com/ToolChain/LTO
# can't do clang build with ubuntu lto defaults
# my CI won't consistently build the package from source with LTO turned on because sqlite takes 20+ minutes
# Would it yield better performance to have LTO *on* and use slightly more ""normal"" sqlite?
# this is muddied by my suspicion that they are actually using sqlcipher - but that is also in the repos.
export DEB_BUILD_MAINT_OPTIONS=optimize=-lto

# examples have this file in them
export DH_ALWAYS_EXCLUDE=.gitignore

# never quite got clang working
#export CXXFLAGS=-stdlib=libc++
#export CC=/usr/bin/clang-10
#export CXX=/usr/bin/clang++-10
	# -DCMAKE_AR=/usr/bin/llvm-ar-10 -DCMAKE_NM=/usr/bin/llvm-nm-10
	# -DCMAKE_OBJDUMP=/usr/bin/llvm-objdump-10 -DCMAKE_RANLIB=/usr/bin/llvm-ranlib-10

%:
	dh $@

override_dh_auto_configure:
	dh_auto_configure -- -DTD_ENABLE_LTO=ON #-DTD_ENABLE_JNI=ON

override_dh_auto_test:
	# The test suite for this package is busted somehow 
	echo -n

