File: rules

package info (click to toggle)
clanlib 1.0~svn3827-11.2
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 24,720 kB
  • sloc: cpp: 101,597; xml: 6,410; makefile: 1,742; ansic: 463; perl: 424; php: 247; sh: 53
file content (52 lines) | stat: -rwxr-xr-x 1,538 bytes parent folder | download
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#!/usr/bin/make -f

export DH_OPTIONS

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

include /usr/share/dpkg/architecture.mk

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) --disable-clanSDL               \
	--x-includes=/usr/include/X11

%:
	dh $@

override_dh_auto_configure:
	CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" CPPFLAGS="$(shell dpkg-buildflags --get CPPFLAGS)" LDFLAGS="$(shell dpkg-buildflags --get LDFLAGS)" dh_auto_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.0t64

override_dh_installexamples-indep:
	dh_installexamples -pclanlib-doc Examples/*