File: rules

package info (click to toggle)
fortran-caffeine 0.7.0-4
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 904 kB
  • sloc: f90: 6,336; ansic: 4,304; sh: 433; makefile: 29
file content (50 lines) | stat: -rwxr-xr-x 1,306 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
#!/usr/bin/make -f

# Build with both gfortran and flang

# This version still builds asser, julienne first

export DH_VERBOSE=1


# The magic debhelper  rule
%:
	dh $@  # --with fortran

include /usr/share/dpkg/architecture.mk

TOPDIR:=$(shell pwd)
LIBDIR:=debian/libfortran-caffeine-dev/usr/lib/${DEB_HOST_MULTIARCH}

export FC_DEFAULT=gfortran-15
# Overrule version in ./install.sh
export GCC_VERSION=15

MODDIR=$(shell dh_fortran get_fmoddir -I)

UCX_ARCH:= $(shell sed -n -r '/^Build/,/^$$/s/.*libucx-dev *\[([^]]*)\].*/\1/p' debian/control)
IBV_ARCH:= $(shell sed -n -r '/^Build/,/^$$/s/.*libibverbs-dev *\[([^]]*)\].*/\1/p' debian/control)

# IBV:= $(if $(filter $(DEB_TARGET_ARCH), $(IBV_ARCH)),ibv,)
IBV:= ibv
UCX:= $(if $(filter $(DEB_TARGET_ARCH), $(UCX_ARCH)),ucx,)
NETWORKS:=smp udp $(IBV) $(UCX)


execute_before_dh_clean:
	rm -rf fpm.toml build*

override_dh_auto_build: 
	for c in $(NETWORKS) ;  do \
		b=$(TOPDIR)/build-$(FC)-$$c ; \
		mkdir -p  $$b/lib/pkgconfig ; \
		FFLAGS=$(MODDIR) ./install.sh --network=$$c --prefix=$$b ; \
	done

execute_after_dh_auto_install:
	mkdir -p $(LIBDIR)/pkgconfig
	for c in $(NETWORKS) ;  do \
		b=$(TOPDIR)/build-$(FC)-$$c ; \
		cp $$b/lib/libcaffeine-$$c.a $(LIBDIR) ; \
		cp $$b/lib/pkgconfig/caffeine.pc $(LIBDIR)/pkgconfig/caffeine-$$c.pc ;\
		done