File: rules

package info (click to toggle)
suitesparse 1:4.5.4-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 74,020 kB
  • ctags: 12,092
  • sloc: ansic: 146,148; cpp: 17,776; makefile: 5,777; fortran: 1,927; java: 1,846; csh: 749; ruby: 725; perl: 225; sed: 164; awk: 27; sh: 18
file content (40 lines) | stat: -rwxr-xr-x 1,451 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
#!/usr/bin/make -f

include /usr/share/dpkg/buildflags.mk

COMMON_FLAGS := BLAS=-lblas MY_METIS_LIB=-lmetis
PIC_FLAGS := $(COMMON_FLAGS) OPTIMIZATION=-fPIC
NOPIC_FLAGS := $(COMMON_FLAGS) OPTIMIZATION=

STATIC_LIBS := CAMD/Lib/libcamd.a BTF/Lib/libbtf.a CHOLMOD/Lib/libcholmod.a AMD/Lib/libamd.a RBio/Lib/librbio.a LDL/Lib/libldl.a SuiteSparse_config/libsuitesparseconfig.a KLU/Lib/libklu.a SPQR/Lib/libspqr.a UMFPACK/Lib/libumfpack.a COLAMD/Lib/libcolamd.a CXSparse/Lib/libcxsparse.a CCOLAMD/Lib/libccolamd.a

%:
	dh $@

# LD_LIBRARY_PATH needed to make tests work (since buildflags.patch removes the -rpath)
override_dh_auto_build:
	# Build static libraries
	dh_auto_build -- static $(NOPIC_FLAGS)
	mkdir static_lib && cp $(STATIC_LIBS) static_lib/
	make purge

	# Build dynamic libraries
	LD_LIBRARY_PATH=$$(pwd)/lib dh_auto_build -- $(PIC_FLAGS)

override_dh_auto_install:
	make install $(PIC_FLAGS) INSTALL=$$(pwd)/debian/tmp/usr INSTALL_LIB=$$(pwd)/debian/tmp/usr/lib/${DEB_HOST_MULTIARCH}/ INSTALL_INCLUDE=$$(pwd)/debian/tmp/usr/include/suitesparse INSTALL_DOC=$$(pwd)/debian/tmp/usr/share/doc/suitesparse
	cp static_lib/* $$(pwd)/debian/tmp/usr/lib/${DEB_HOST_MULTIARCH}/

override_dh_auto_clean:
	make purge
	rm -rf static_lib

override_dh_strip:
	dh_strip --dbgsym-migration='libsuitesparse-dbg (<< 1:4.4.6-1~)'

override_dh_compress:
	dh_compress -X.pdf

get-orig-source:
	uscan --force-download --rename --destdir .
.PHONY: get-orig-source