File: rules

package info (click to toggle)
spfft 1.1.1-5
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 1,688 kB
  • sloc: cpp: 11,562; f90: 665; ansic: 437; python: 41; makefile: 24
file content (25 lines) | stat: -rwxr-xr-x 648 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

# Enabling ROCm support for AMD GPUs
ARCH_HIP_CPU := amd64 arm64
ifneq ($(filter $(DEB_HOST_ARCH),$(ARCH_HIP_CPU)),)
ARCH_HIP_GPU := $(shell rocm-target-arch --sep ';')
HIP := -DSPFFT_GPU_BACKEND=ROCM "-DCMAKE_HIP_ARCHITECTURES=$(ARCH_HIP_GPU)"

# ThinLTO doesn't seem to work with HIP
export DEB_BUILD_MAINT_OPTIONS = optimize=-lto
endif

CMAKE_FLAGS = $(HIP)

%:
	dh $@

override_dh_auto_configure:
	dh_auto_configure -- $(CMAKE_FLAGS)

execute_after_dh_auto_install:
	find debian/tmp -name libspfft.so | xargs chrpath --delete

override_dh_gencontrol:
	dh_gencontrol -- -Vrocm:GPU-Architecture="$(subst ;, ,$(ARCH_HIP_GPU))"