| 1 |
#!/usr/bin/make -f |
| 2 |
|
| 3 |
export DH_OPTIONS |
| 4 |
|
| 5 |
export DEB_BUILD_MAINT_OPTIONS = hardening=+all |
| 6 |
|
| 7 |
include /usr/share/dpkg/architecture.mk |
| 8 |
|
| 9 |
ifeq ($(DEB_HOST_ARCH),i386) |
| 10 |
use_asm386=yes |
| 11 |
else |
| 12 |
use_asm386=no |
| 13 |
endif |
| 14 |
|
| 15 |
CFLAGS := $(shell dpkg-buildflags --get CFLAGS) |
| 16 |
CFLAGS += -fPIC -DDEBUG=1 |
| 17 |
ifneq (,$(findstring functions,$(CLAN_BUILD_OPTIONS))) |
| 18 |
CFLAGS += -ffunction-sections |
| 19 |
endif |
| 20 |
ifneq (,$(findstring "/$(DEB_HOST_ARCH)/","/hppa/mipsel/powerpc/")) |
| 21 |
CFLAGS += -ffunction-sections |
| 22 |
endif |
| 23 |
CXXFLAGS := $(CFLAGS) |
| 24 |
|
| 25 |
CONFIG_FLAGS := \ |
| 26 |
--enable-x11 --disable-directfb --enable-opengl --enable-png \ |
| 27 |
--enable-clansound --enable-lua --enable-network --enable-dyn \ |
| 28 |
--enable-vidmode --disable-smalljpeg --disable-debug \ |
| 29 |
--enable-asm386=$(use_asm386) --disable-clanSDL \ |
| 30 |
--x-includes=/usr/include/X11 |
| 31 |
|
| 32 |
%: |
| 33 |
dh $@ |
| 34 |
|
| 35 |
override_dh_auto_configure: |
| 36 |
CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" CPPFLAGS="$(shell dpkg-buildflags --get CPPFLAGS)" LDFLAGS="$(shell dpkg-buildflags --get LDFLAGS)" dh_auto_configure -- $(CONFIG_FLAGS) |
| 37 |
|
| 38 |
override_dh_auto_clean: |
| 39 |
dh_auto_clean |
| 40 |
rm -f build-stamp configure-stamp |
| 41 |
rm -f config.sub config.guess ltmain.sh configure |
| 42 |
rm -f missing depcomp install-sh aclocal.m4 |
| 43 |
find ./ -name Makefile.in -and -not -path './Examples/Makefile.in' -delete |
| 44 |
rm -f Documentation/*.html |
| 45 |
rm -f Documentation/Tutorial/*.html |
| 46 |
rm -f Documentation/Tutorial/Kavanek/*.html |
| 47 |
|
| 48 |
override_dh_installdocs-arch: |
| 49 |
dh_installdocs --link-doc=libclanapp-1.0t64 |
| 50 |
|
| 51 |
override_dh_installexamples-indep: |
| 52 |
dh_installexamples -pclanlib-doc Examples/* |