File: rules

package info (click to toggle)
libsharp 1.0.0-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, forky, sid, trixie
  • size: 1,752 kB
  • sloc: ansic: 5,956; sh: 4,452; makefile: 64
file content (38 lines) | stat: -rwxr-xr-x 1,242 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
#!/usr/bin/make -f

DEB_HOST_ARCH_CPU ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_CPU)

# Verbose build. See:
# http://qa.debian.org/bls/bytag/W-compiler-flags-hidden.html
export V=1

# Output Automake test log after summary. See:
# https://www.gnu.org/software/automake/manual/html_node/Parallel-Test-Harness.html#Parallel-Test-Harness
export VERBOSE=1

# If DEB_BUILD_OPTIONS=parallel=n is set, then use that many OpenMP threads
# in the unit test suite too.
ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
export OMP_NUM_THREADS=$(NUMJOBS)
endif

# Enable build hardening.
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/buildflags.mk

# Enable -ffast-math optimizations, as per upstream author's instructions.
CFLAGS += -ffast-math

# On amd64, enable libsharp's automatic dispatch to optimized routines
# based on support for amd64 instruction sets detected at runtime.
# Note that the libsharp source refers to this feature using the
# preprocessor macro MULTIARCH, but it has nothing to do with the
# Debian concept of multiarch.
ifeq ($(DEB_HOST_ARCH_CPU),amd64)
CFLAGS += -DMULTIARCH
endif

%:
	dh $@