File: rules

package info (click to toggle)
simrisc 15.00.00-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 3,456 kB
  • sloc: cpp: 5,943; fortran: 581; makefile: 111; ansic: 94; sh: 62
file content (56 lines) | stat: -rwxr-xr-x 1,742 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
53
54
55
56
#!/usr/bin/make -f

# DH_VERBOSE := 1
export LC_ALL=C.UTF-8

include /usr/share/dpkg/default.mk
# this provides:
# DEB_SOURCE: the source package name
# DEB_VERSION: the full version of the package (epoch + upstream vers. + revision)
# DEB_VERSION_EPOCH_UPSTREAM: the package's version without the Debian revision
# DEB_VERSION_UPSTREAM_REVISION: the package's version without the Debian epoch
# DEB_VERSION_UPSTREAM: the package's upstream version
# DEB_DISTRIBUTION: the distribution(s) listed in the current entry of debian/changelog
# SOURCE_DATE_EPOCH: the source release date as seconds since the epoch, as
#                    specified by <https://reproducible-builds.org/specs/source-date-epoch/>

# For reproducible builds of documentation.
# Also see https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=950603
export FORCE_SOURCE_DATE=1

export DEB_BUILD_HARDENING = 1
export DEB_BUILD_MAINT_OPTIONS = hardening=+all

export CPPFLAGS = $(shell dpkg-buildflags --get CPPFLAGS)
export CPPFLAGS += -D_FORTIFY_SOURCE=2

export CXXFLAGS = $(shell dpkg-buildflags --get CXXFLAGS)
export CXXFLAGS += -D_FORTIFY_SOURCE=2

# Define the c++std to use by processing the upstream 'c++std' file
export CXXFLAGS += $(shell cat c++std|sed -e 's/#define CPPSTD "//' -e 's/"//')

export LDFLAGS = $(shell dpkg-buildflags --get LDFLAGS) -Wl,-z,now

export CXX = g++

%:
	dh $@

override_dh_auto_clean:
	./build clean
	dh_auto_clean

override_dh_auto_build-arch:
	# compile the package.
	./build program
	./build man
#	./build manual
#	./build pdf
	dh_auto_build -a

override_dh_auto_install-arch:
	# Add here commands to install the package into debian/simrisc.
	./build install bdm debian/simrisc
	dh_installdocs hierarchy.odp -a
	dh_auto_install -a