#!/usr/bin/make -f # -*- makefile -*- # # debian/rules for simgear, by Markus Wanner # based on the dh7 template provided by dh_make(1) # Include makefile snippet for DEB_HOST_ARCH include /usr/share/dpkg/architecture.mk # Enable all hardening options export DEB_BUILD_MAINT_OPTIONS=hardening=+all # http://wiki.debian.org/Hardening#Notes_for_packages_using_CMake CPPFLAGS:=$(shell dpkg-buildflags --get CPPFLAGS) ifneq (,$(findstring $(DEB_HOST_ARCH) , amd64 i386 mipsel ia64 armel armhf arm64 )) # Note the spaces in the condition above. They stop 'mips' from # matching 'mipsel' CFLAGS:=$(shell dpkg-buildflags --get CFLAGS) $(CPPFLAGS) CXXFLAGS:=$(shell dpkg-buildflags --get CXXFLAGS) $(CPPFLAGS) else # Required on big-endian architectures, see bug #722115 CFLAGS:=$(shell dpkg-buildflags --get CFLAGS) $(CPPFLAGS) -fno-strict-aliasing CXXFLAGS:=$(shell dpkg-buildflags --get CXXFLAGS) $(CPPFLAGS) -fno-strict-aliasing endif LDFLAGS:=$(shell dpkg-buildflags --get LDFLAGS) CMAKE_FLAGS = \ -DCMAKE_BUILD_TYPE="RelWithDebInfo" \ -DCMAKE_C_FLAGS="$(CFLAGS)" \ -DCMAKE_CXX_FLAGS="$(CXXFLAGS)" \ -DCMAKE_CXX_FLAGS_RELWITHDEBINFO="-g -DNDEBUG" \ -DCMAKE_SHARED_LINKER_FLAGS="$(LDFLAGS)" \ -DCMAKE_VERBOSE_MAKEFILE=ON \ -DCMAKE_INSTALL_PREFIX:PATH=/usr \ -DSIMGEAR_SHARED=OFF \ -DSYSTEM_EXPAT=ON \ -DSYSTEM_UDNS=ON \ -DENABLE_DNS=ON %: dh $@ --buildsystem=cmake --builddirectory=build override_dh_auto_configure: mkdir build cd build && cmake .. $(CMAKE_FLAGS) override_dh_clean: dh_clean rm -rf CMakeFiles override_dh_auto_test: dh_auto_test --no-parallel get-orig-source: uscan --download-current-version --verbose --rename