File: rules

package info (click to toggle)
openmsx 21.0%2Bdfsg-3
  • links: PTS
  • area: main
  • in suites: sid
  • size: 28,132 kB
  • sloc: cpp: 244,928; xml: 54,344; tcl: 15,603; python: 5,335; perl: 281; sh: 78; makefile: 57
file content (49 lines) | stat: -rwxr-xr-x 1,686 bytes parent folder | download | duplicates (2)
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
#!/usr/bin/make -f

# Enable hardening. Disable link time optimization flags.
# However, note that the actual flags _are_ passed to the
# compiler in build/flavour-debian.mk.
# So link time optimization is enabled.
export DEB_BUILD_MAINT_OPTIONS = hardening=+all optimize=-lto

%:
	dh $@

CXXFLAGS = $(shell dpkg-buildflags --get CPPFLAGS) $(shell dpkg-buildflags --get CXXFLAGS) -flto=auto
LDFLAGS = $(shell dpkg-buildflags --get LDFLAGS) -flto=auto

override_dh_auto_build:
	dh_testdir
	$(MAKE) V=2 OPENMSX_FLAVOUR=debian
	docbook-to-man doc/openmsx.sgml > debian/openmsx.1
	$(MAKE) -C Contrib/dmk CXXFLAGS="-std=c++23 ${CXXFLAGS}" LDFLAGS="${LDFLAGS}"
	$(MAKE) -C Contrib/tsx CXXFLAGS="-I../../src/utils -std=c++23 ${CXXFLAGS}" LDFLAGS="${LDFLAGS}"
	rm Contrib/tsx/build/*.o

override_dh_auto_clean:
	dh_testdir
	dh_testroot
	$(MAKE) clean
	rm -rf Contrib/dmk/build/
	rm -rf Contrib/tsx/build/
	rm -rf derived/
	rm -f debian/openmsx.1
	rm -f src/unittest/catch.hpp
	rm -rf build/__pycache__
	dh_clean 

override_dh_auto_install:
	$(MAKE) install DESTDIR=$(CURDIR)/debian/tmp OPENMSX_FLAVOUR=debian
	rm debian/tmp/usr/share/openmsx/skins/DejaVuSans.ttf.gz
	rm debian/tmp/usr/share/openmsx/skins/DejaVuSansMono.ttf.gz
	rm debian/tmp/usr/share/doc/openmsx-data/release-history.txt
	rm debian/tmp/usr/share/doc/openmsx-data/GPL.txt
	chmod a-x debian/tmp/usr/share/openmsx/machines/*.xml
	dh_install -X release-history.txt
	dh_installchangelogs -i doc/release-history.txt
	dh_installman -a debian/openmsx.1
	dh_link -a usr/share/doc/openmsx-data usr/share/doc/openmsx

override_dh_auto_test:
	# No testsuite available.
	# This makes sure dh doesn't attempt to run it anyway (see #718133)