#!/usr/bin/make -f # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 export DEB_BUILD_MAINT_OPTIONS = hardening=+all CPPFLAGS :=$(shell dpkg-buildflags --get CPPFLAGS) CFLAGS :=$(shell dpkg-buildflags --get CFLAGS) CXXFLAGS :=$(shell dpkg-buildflags --get CXXFLAGS) LDFLAGS :=$(shell dpkg-buildflags --get LDFLAGS) -fopenmp export CPPFLAGS CFLAGS CXXFLAGS LDFLAGS DEB_HOST_ARCH_CPU ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_CPU) DISABLE_INSTRUCTION_SETS = \ --disable-sse3 \ --disable-ssse3 \ --disable-sse41 \ --disable-sse42 \ --disable-avx \ --disable-avx2 \ --disable-fma \ --disable-fma4 # Disable failing test test-charpoly on mips and mipsel. # See #797167, #856356 and https://github.com/linbox-team/linbox/issues/37 ifneq (,$(filter mips mipsel, $(DEB_HOST_ARCH_CPU))) override_dh_autoreconf: sed -e '/\s*test-charpoly\s*\\/d' -i tests/Makefile.am dh_autoreconf endif override_dh_auto_configure: dh_auto_configure -- \ --prefix=/usr \ --libdir=/usr/lib/$(DEB_HOST_MULTIARCH) \ --with-gmp \ --with-m4rie \ --with-givaro \ --with-ntl \ --with-iml \ --with-m4ri \ --without-fplll \ --enable-sage \ --enable-shared \ $(DISABLE_INSTRUCTION_SETS) override_dh_auto_install: dh_auto_install --max-parallel=1 mkdir -p debian/liblinboxsage-dev/usr/include/linbox mv debian/tmp/usr/include/linbox/linbox-sage.h \ debian/liblinboxsage-dev/usr/include/linbox cd debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH); \ ln -s liblinbox-1.5.2.so.0.0.0 liblinbox-1.5.2.so; \ ln -s liblinboxsage-1.5.2.so.0.0.0 liblinboxsage-1.5.2.so; \ sed -e 's|-llinbox|-llinbox-1.5.2|' -i pkgconfig/linbox.pc; \ sed -e 's|-llinboxsage|-llinboxsage-1.5.2|' -i pkgconfig/linbox.pc override_dh_auto_build-indep: dh_testdir ifeq (,$(filter nodoc,$(DEB_BUILD_OPTIONS))) $(MAKE) docs_dev $(MAKE) docs rm -f doc/linbox-*html/INSTALL rm -f doc/linbox-*html/COPYING endif %: dh $@