File: rules

package info (click to toggle)
relion-cuda 3.1.3-2
  • links: PTS, VCS
  • area: contrib
  • in suites: bookworm, sid
  • size: 16,304 kB
  • sloc: cpp: 153,130; ansic: 4,359; python: 1,834; sh: 161; makefile: 36; csh: 1
file content (53 lines) | stat: -rwxr-xr-x 1,421 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
#!/usr/bin/make -f
# -*- makefile -*-

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

export DEB_BUILD_MAINT_OPTIONS = hardening=+bindnow

DEBVENDOR  := $(shell dpkg-vendor --query Vendor)

ifeq ($(DEBVENDOR), Qlustar)
    # Qlustar specific stuff
    include /usr/share/ql-deb-utils/Makefile
    MPICXX := mpicxx.openmpi-gcc
else
    include /usr/share/dpkg/default.mk

    NUMJOBS := $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
    MAKE_-J := $(addprefix -j, $(NUMJOBS))
    MPICXX := mpicxx.openmpi
endif

CFLAGS		+= $(CPPFLAGS)
CXXFLAGS	+= $(CPPFLAGS)

CONFIGURE_COMMON := cmake -DCMAKE_INSTALL_PREFIX=/usr \
  -DCMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY=ON "-GUnix Makefiles" \
  -DCMAKE_VERBOSE_MAKEFILE=ON \
  -DCMAKE_SKIP_RPATH=TRUE \
  -DDoublePrec_GPU=ON

%:
	dh $@

override_dh_auto_configure:
	mkdir $(CURDIR)/build
	cd $(CURDIR)/build; \
	$(CONFIGURE_COMMON) -DCUDA_HOST_COMPILER=/usr/bin/cuda-gcc -DGUI=ON -DCUDA=ON $(CURDIR)

override_dh_auto_build:
	$(MAKE) $(MAKE_-J) -C build

override_dh_auto_install:
	$(MAKE) -C build install DESTDIR=$(CURDIR)/debian/tmp/cli
	mkdir -p $(CURDIR)/debian/tmp/gui/usr/bin
	rm $(CURDIR)/debian/tmp/cli/usr/bin/*.csh # Useless ...
	set -e; for prog in relion relion_display relion_manualpick; do \
	  mv $(CURDIR)/debian/tmp/cli/usr/bin/$$prog \
	    $(CURDIR)/debian/tmp/gui/usr/bin; done

override_dh_clean:
	dh_clean
	-rm -rf build