#!/usr/bin/make -f # -*- makefile -*- # Makefile for MRPT Debian package. include /usr/share/dpkg/architecture.mk # Required to avoid hardening-no-bindnow lintian message: export DEB_BUILD_MAINT_OPTIONS = hardening=+all,optimize=+lto # default: dont build expensive caller graphs with dot in the documentation pkg export MRPT_genCALLERGRAPHS=NO # For multiarch support: DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH) DEB_TARGET_MULTIARCH ?= $(shell dpkg-architecture -qDEB_TARGET_MULTIARCH) #DEB_HOST_ARCH_OS ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_OS) # SSE options: Use automatic flags, do not enforce any special SSE* flags: CMAKE_ARCH_FLAGS = -DMRPT_AUTODETECT_SIMD=OFF # Avoid memory exhaustion on build farms for mips* archs ifneq (,$(findstring mips,$(DEB_HOST_ARCH))) # Avoid LTO in python module: CMAKE_ARCH_FLAGS += -DMRPT_PYBIND11_WITH_LTO=OFF # Minimize debug symbols: export DEB_CXXFLAGS_MAINT_APPEND += -g1 endif # Debug info from the cmake scripts export VERBOSE = 1 # Exact version, needed for the Built-Using field: robotofontversion := $(shell dpkg-query -W -f '$${Version}' fonts-roboto-fontface) mrptversion2digits := $(shell find debian -name "libmrpt-nanogui?.*.install" | sed 's/^.*[^0-9]\([0-9]*\.[0-9]*\)\..*$$/\1/') CMAKE_FLAGS = \ -DMRPT_ALLOW_LGPLV3=ON \ -DMRPT_WITH_KINECT=OFF \ -DMRPT_TUNE_NATIVE=OFF \ $(CMAKE_ARCH_FLAGS) export PYBUILD_SYSTEM=cmake export PYBUILD_CONFIGURE_ARGS=$(CMAKE_FLAGS) %: dh $@ --buildsystem=pybuild execute_before_dh_gencontrol: echo "Using $(robotofontversion) as fonts-roboto-fontface version for debian/libmrpt-nanogui$(mrptversion2digits).substvars" echo 'fonts-roboto-fontface:version=$(robotofontversion)' >> debian/libmrpt-nanogui$(mrptversion2digits).substvars override_dh_auto_build-indep: # Build doc targets: # For both, arch dependent and independent targets, build "all". # This is to prevent future "make install" or "make test" to fail due to # not built targets. dh_auto_build \ man_pages_all \ all # clean useless doxygen files: find $(CURDIR)/doc/ -name '*.md5' | xargs -I FIL rm FIL execute_after_dh_auto_test: # After running the python tests, we can strip the rpath of pymrpt: find . -name "pymrpt.*.so" | xargs -I FIL chrpath --delete FIL execute_after_dh_auto_install: # Manually merge the different pymrpt*.so files from: # - debian/tmp/usr/lib/python3.*/{mrpt,mrpt-2.11.3.dist-info} # into: # - debian/tmp/usr/lib/python3/dist-packages/* # mkdir -p debian/tmp/usr/lib/python3/dist-packages/ cp -rv debian/tmp/usr/lib/python3.*/mrpt* debian/tmp/usr/lib/python3/dist-packages/ rm -fr debian/tmp/usr/lib/python3.*/mrpt*