File: rules

package info (click to toggle)
dsdp 5.8-12
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,196 kB
  • sloc: ansic: 27,119; makefile: 308; sh: 30
file content (30 lines) | stat: -rwxr-xr-x 736 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
#!/usr/bin/make -f

include /usr/share/dpkg/pkg-info.mk

export HOME=/tmp/home

ver    := $(DEB_VERSION_UPSTREAM)
soname := libdsdp-$(ver)gf.so

%:
	dh $@

override_dh_auto_build:
	mkdir -vp $(HOME)
	mkdir -vp $(CURDIR)/lib
	$(MAKE) DSDPROOT=`pwd` OPTFLAGS="-fPIC -O3" dsdpapi LAPACKBLAS="-llapack \
		-lblas -lm"
	cd lib && ar x libdsdp.a && \
		$(CC) -shared -Wl,--no-add-needed,-soname=$(soname) -o $(soname) *.o \
		-llapack -lblas -lm && ln -s $(soname) libdsdp.so && rm *.o
	$(MAKE) DSDPROOT=`pwd` -C examples clean
	$(MAKE) DSDPROOT=`pwd` OPTFLAGS="-O3" DSDPLIB="-L$(CURDIR)/lib -ldsdp -lm" \
		example LAPACKBLAS=""

	cd docs/dox && doxygen

override_dh_auto_install:

override_dh_shlibdeps-arch:
	dh_shlibdeps -l/usr/lib/atlas