File: rules

package info (click to toggle)
libflame 5.2.0-5.1
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 162,092 kB
  • sloc: ansic: 750,080; fortran: 404,344; makefile: 8,136; sh: 5,458; python: 937; pascal: 144; perl: 66
file content (62 lines) | stat: -rwxr-xr-x 1,794 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
57
58
59
60
61
62
#!/usr/bin/make -f
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
export CFLAGS=$(shell dpkg-buildflags --get CFLAGS) $(shell dpkg-buildflags --get CPPFLAGS)
export FFLAGS=$(shell dpkg-buildflags --get FFLAGS)

# [[ common flags ]]
# TODO: openmp or pthreads, or both?
# https://github.com/flame/libflame/issues/28#issuecomment-561791815
CONFFLAGS = \
	--prefix=/usr \
	--libdir=/usr/lib/$(DEB_HOST_MULTIARCH)/ \
	--enable-max-arg-list-hack \
	--enable-dynamic-build \
	--enable-lapack2flame \
	--enable-verbose-make-output \
	--enable-multithreading=openmp \
	--enable-supermatrix \
	--enable-memory-alignment=16 \
	--enable-ldim-alignment

# [[ arch-specific flags ]]
ifeq (amd64,$(DEB_HOST_ARCH))
CONFFLAGS+= --enable-vector-intrinsics=sse
endif

%:
	dh $@ -Smakefile

override_dh_clean:
	dh_auto_clean
	dh_clean -X.orig -X.bak
	-$(RM) libflame1t64.install libflame1t64.links
	-$(RM) libflame1t64.postinst libflame1t64.prerm
	-$(RM) -rf test/obj/
	-$(RM) test/test_libflame.x

override_dh_autoreconf:

override_dh_auto_configure:
	./configure $(CONFFLAGS)
	sed -e "s/@DEB_HOST_MULTIARCH@/$(DEB_HOST_MULTIARCH)/g" \
		< debian/libflame1t64.install.in \
		> debian/libflame1t64.install
	#sed -e "s/@DEB_HOST_MULTIARCH@/$(DEB_HOST_MULTIARCH)/g" \
	#	< debian/libflame1t64.links.in \
	#	> debian/libflame1t64.links
	#sed -e "s/@DEB_HOST_MULTIARCH@/$(DEB_HOST_MULTIARCH)/g" \
	#	< debian/libflame1t64.postinst.in \
	#	> debian/libflame1t64.postinst
	#sed -e "s/@DEB_HOST_MULTIARCH@/$(DEB_HOST_MULTIARCH)/g" \
	#	< debian/libflame1t64.prerm.in \
	#	> debian/libflame1t64.prerm

override_dh_auto_build:
	dh_auto_build --parallel -- V=1

override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	mkdir -p test/obj
	dh_auto_build --parallel -- -C test
	cd test; ./test_libflame.x
endif