#!/usr/bin/make -f export DH_OPTIONS export DEB_BUILD_MAINT_OPTIONS = hardening=+all DEB_HOST_ARCH=$(shell dpkg-architecture -qDEB_HOST_ARCH 2>/dev/null) ifeq ($(DEB_HOST_ARCH),i386) use_asm386=yes else use_asm386=no endif CFLAGS := $(shell dpkg-buildflags --get CFLAGS) CFLAGS += -fPIC -DDEBUG=1 ifneq (,$(findstring functions,$(CLAN_BUILD_OPTIONS))) CFLAGS += -ffunction-sections endif ifneq (,$(findstring "/$(DEB_HOST_ARCH)/","/hppa/mipsel/powerpc/")) CFLAGS += -ffunction-sections endif CXXFLAGS := $(CFLAGS) CONFIG_FLAGS := \ --enable-x11 --disable-directfb --enable-opengl --enable-png \ --enable-clansound --enable-lua --enable-network --enable-dyn \ --enable-vidmode --disable-smalljpeg --disable-debug \ --enable-asm386=$(use_asm386) \ --x-includes=/usr/include/X11 \ --prefix=/usr --mandir=/usr/share/man %: dh $@ override_dh_auto_configure: CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" CPPFLAGS="$(shell dpkg-buildflags --get CPPFLAGS)" LDFLAGS="$(shell dpkg-buildflags --get LDFLAGS)" ./configure $(CONFIG_FLAGS) override_dh_auto_clean: dh_auto_clean rm -f build-stamp configure-stamp rm -f config.sub config.guess ltmain.sh configure rm -f missing depcomp install-sh aclocal.m4 find ./ -name Makefile.in -and -not -path './Examples/Makefile.in' -delete rm -f Documentation/*.html rm -f Documentation/Tutorial/*.html rm -f Documentation/Tutorial/Kavanek/*.html override_dh_installdocs-arch: dh_installdocs --link-doc=libclanapp-1.0v5 override_dh_installexamples-indep: dh_installexamples -pclanlib-doc Examples/*