#!/usr/bin/make -f
export DH_VERBOSE = 1
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
export DEB_CFLAGS_MAINT_APPEND  = -Wall -pedantic
export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed

# enable fPIC to stop relocation errors in union pckaging
export DEB_CFLAGS_MAINT_APPEND = -fPIC
export DEB_CXXFLAGS_MAINT_APPEND = -fPIC
export DEB_LDFLAGS_MAINT_APPEND = -fPIC

%:
	dh $@ --buildsystem=cmake

override_dh_auto_configure:
	dh_auto_configure -- \
		-DCMAKE_LIBRARY_ARCHITECTURE="$(DEB_TARGET_MULTIARCH)" \
		-DRYML_EXT_DIR=/usr/include/c4 \
		-DC4_EXTERN_DIR=/usr/lib/cmake \
		-DRYML_STANDALONE=OFF
