#!/usr/bin/make -f CPPFLAGS:=$(shell dpkg-buildflags --get CPPFLAGS) CFLAGS:=$(shell dpkg-buildflags --get CFLAGS) $(CPPFLAGS) CXXFLAGS:=$(shell dpkg-buildflags --get CXXFLAGS) $(CPPFLAGS) LDFLAGS:=$(shell dpkg-buildflags --get LDFLAGS) -Wl,--as-needed DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH) # These don't need to be exported and if they are we'll get the flags # duplicated in the command line. unexport CFLAGS unexport CXXFLAGS unexport LDFLAGS # SSE options ifeq ($(DEB_HOST_ARCH),amd64) CMAKE_ARCH_FLAGS = -DENABLE_SSE=ON -DENABLE_SSE2=ON -DENABLE_SSSE3=OFF else CMAKE_ARCH_FLAGS = -DENABLE_SSE=OFF -DENABLE_SSE2=OFF -DENABLE_SSSE3=OFF endif CMAKE_FLAGS = \ -DCMAKE_INSTALL_PREFIX=/usr \ -DCMAKE_VERBOSE_MAKEFILE=ON \ -DCMAKE_C_FLAGS_RELEASE="$(CFLAGS)" \ -DCMAKE_CXX_FLAGS_RELEASE="$(CXXFLAGS)" \ -DCMAKE_SHARED_LINKER_FLAGS_RELEASE="$(LDFLAGS)" \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_SKIP_RPATH=ON \ $(CMAKE_ARCH_FLAGS) \ -DOPT_COLLADA15=ON \ -DOPT_COLLADA14=ON \ -DOPT_COMPILE_VIEWER=OFF \ -DOPT_COMPILE_FX=OFF \ -DOPT_COMPILE_RT=OFF \ -DOPT_BUILD_PACKAGES=OFF \ -DOPT_BUILD_PACKAGE_DEFAULT=OFF \ -DOPT_DOUBLE_PRECISION=ON %: dh $@ --with quilt --buildsystem=cmake --parallel override_dh_clean: dh_clean -O--buildsystem=cmake override_dh_auto_configure: dh_auto_configure -- $(CMAKE_FLAGS) $(CMAKE_ARCH_FLAGS) override_dh_install: dh_install -O--buildsystem=cmake --list-missing