File: rules

package info (click to toggle)
mpsolve 3.2.1-7
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 13,176 kB
  • sloc: ansic: 24,344; sh: 4,701; cpp: 3,138; makefile: 906; python: 407; yacc: 158; lex: 85; xml: 41
file content (25 lines) | stat: -rwxr-xr-x 789 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
#!/usr/bin/make -f

include /usr/share/dpkg/architecture.mk

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

%:
	dh $@

# only enable tcmalloc if:
# 1. it's available on the given architecture (i.e., we haven't blacklisted
#    libgoogle-perftools-dev in Build-Depends d/control)
HAVE_TCMALLOC := $(shell dpkg-query -W libgoogle-perftools-dev 2> /dev/null)

# 2.  it doesn't give us a "cannot allocate memory in static TLS block" error.
#     possibly related: https://bugzilla.redhat.com/1483558
NO_TCMALLOC_ERROR := $(filter-out \
	arm64 armel armhf mips64el mipsel s390x riscv64, \
	$(DEB_HOST_ARCH))

ENABLE_TCMALLOC := $(if $(and $(HAVE_TCMALLOC), $(NO_TCMALLOC_ERROR)), \
	--enable-tcmalloc, --disable-tcmalloc)

override_dh_auto_configure:
	dh_auto_configure -- $(ENABLE_TCMALLOC)