1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
|
Description: Add Debian build flavour, that respects dpkg-builflags.
Author: Jakub Wilk <jwilk@debian.org>
Forwarded: not-needed
Last-Update: 2011-11-11
Index: openmsx-20.0+dfsg/build/flavour-debian.mk
===================================================================
--- /dev/null
+++ openmsx-20.0+dfsg/build/flavour-debian.mk
@@ -0,0 +1,27 @@
+LDFLAGS += \
+ $(shell dpkg-buildflags --get LDFLAGS | sed -e 's/-Wl,//g')
+
+CXXFLAGS += \
+ $(shell dpkg-buildflags --get CFLAGS | sed -e 's/ *-O[0-3] */ /') \
+ $(shell dpkg-buildflags --get CPPFLAGS) \
+ -DDEFAULT_FONT=\"/usr/share/fonts/truetype/dejavu/DejaVuSans.ttf\" \
+ -DDEFAULT_MONO_FONT=\"/usr/share/fonts/truetype/dejavu/DejaVuSansMono.ttf\"
+
+DEB_HOST_ARCH_CPU ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_CPU)
+
+# Enable link time optimization. Changing the settings in debian/rules does not work.
+#COMPILE_FLAGS+=-flto=auto
+#LINK_FLAGS+=-flto=auto
+
+ifneq ($(filter noopt,$(DEB_BUILD_OPTIONS)),)
+ CXXFLAGS += -O0
+else
+ ifeq ($(DEB_HOST_ARCH_CPU),ia64)
+ # Do not enable -O3 to work around GCC bug <http://bugs.debian.org/647552>.
+ CXXFLAGS += -O2
+ else
+ CXXFLAGS += -O3
+ endif
+endif
+
+OPENMSX_STRIP := false # Stripping will be handled by dh_strip.
|