File: rules

package info (click to toggle)
stella 7.0%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 27,764 kB
  • sloc: ansic: 198,808; cpp: 111,476; sh: 4,514; makefile: 821; perl: 511; objc: 187; asm: 163; yacc: 86
file content (30 lines) | stat: -rwxr-xr-x 975 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
#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

COMMA = ,
ifneq (,$(filter parallel=%,$(subst $(COMMA), ,$(DEB_BUILD_OPTIONS))))
  CPUS := $(subst parallel=,,$(filter parallel=%,$(subst $(COMMA), ,$(DEB_BUILD_OPTIONS))))
else
  CPUS := auto
endif
export DEB_CXXFLAGS_MAINT_APPEND = -flto=$(CPUS)
export DEB_LDFLAGS_MAINT_APPEND = -flto=$(CPUS)

include /usr/share/dpkg/architecture.mk

%:
	dh $@

execute_before_dh_auto_clean:
# Generate the minimal config.mak required for "make distclean"
	test -f config.mak || echo "RM_REC := rm -f -r" > config.mak

override_dh_auto_configure:
	./configure --prefix=/usr $(if $(filter $(DEB_BUILD_ARCH),$(DEB_HOST_ARCH)),,--host=$(DEB_HOST_GNU_TYPE)) --enable-release

execute_after_dh_auto_install:
# This is also installed as the upstream changelog
	rm $(CURDIR)/debian/stella/usr/share/doc/stella/Changes.txt
# This is overridden by the copyright file
	rm $(CURDIR)/debian/stella/usr/share/doc/stella/License.txt