#!/usr/bin/make -f

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)

ifeq ($(DEB_HOST_ARCH),$(filter $(DEB_HOST_ARCH),armel mips mipsel))
	CONFIG_OPTS = --enable-single-precision
else
	CONFIG_OPTS = --enable-double-precision
endif

CONFIG_OPTS += 	--mandir=/usr/share/man \
                --with-libccd=system \
                --enable-libccd \
                --enable-shared \
                --enable-static

%:
	dh $@

override_dh_auto_configure:
	dh_auto_configure -- $(CONFIG_OPTS)

override_dh_auto_build:
	dh_auto_build
	docbook-to-man debian/ode-config.man.sgml > debian/ode-config.1
