File: rules

package info (click to toggle)
rocrand 5.3.3-4
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 37,268 kB
  • sloc: cpp: 95,463; f90: 2,847; python: 1,648; sh: 293; xml: 210; makefile: 49
file content (39 lines) | stat: -rwxr-xr-x 1,117 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
#!/usr/bin/make -f
export CXX=hipcc
export DEB_BUILD_MAINT_OPTIONS = hardening=-all
export DEB_CFLAGS_MAINT_APPEND = -gdwarf-4
export DEB_CXXFLAGS_MAINT_APPEND = -gdwarf-4
export VERBOSE=1
#export AMD_LOG_LEVEL=4

CMAKE_FLAGS = \
	-DCMAKE_BUILD_TYPE=Release \
	-DROCM_SYMLINK_LIBS=OFF \
	-DBUILD_FILE_REORG_BACKWARD_COMPATIBILITY=OFF \
	-DENABLE_INLINE_ASM=1

ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
CMAKE_FLAGS += -DBUILD_TEST=ON
endif

%:
	dh $@ -Scmake

override_dh_auto_configure:
	dh_auto_configure -- $(CMAKE_FLAGS)

override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	set -e \
	; if [ -r /dev/kfd ] \
	; then dh_auto_test --no-parallel -- \
	; else echo "W: /dev/kfd unreadable: no available AMD GPU." \
	;      echo "W: tests skipped." \
	; fi
endif

execute_before_dh_install:
	# Note the rpath field setting may cause reproducible build issues.
	# This should be removed earlier in the toolchain if possible.
	patchelf --remove-rpath ./debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/librocrand.so.1.1
	patchelf --remove-rpath ./debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/libhiprand.so.1.1