File: rules

package info (click to toggle)
cubature 1.0.3+ds-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 264 kB
  • sloc: ansic: 1,496; makefile: 73; sh: 34
file content (41 lines) | stat: -rwxr-xr-x 1,055 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
#!/usr/bin/make -f
# -*- makefile -*-

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

%:
	dh $@

ifeq (,$(wildcard /usr/lib/$(DEB_BUILD_MULTIARCH)/libfftw3l*))
FFTWDEF=-DNO_LONG_DOUBLE_FFTW
FFTWLIB=-lfftw3
else
FFTWLIB=-lfftw3l
endif

override_dh_auto_build:
	$(CC) $(CFLAGS) $(CPPFLAGS) $(FFTWDEF) $(LDFLAGS) -o clencurt_gen clencurt_gen.c $(FFTWLIB) -lm
	./clencurt_gen 19 > clencurt.h
	$(CC) $(CFLAGS) $(CPPFLAGS) -fPIC -c hcubature.c pcubature.c
	$(CC) $(LDFLAGS) -shared -o libcubature.so.0 -Wl,-soname,libcubature.so.0 hcubature.o pcubature.o -lm

override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	$(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o htest test.c hcubature.c -lm
	$(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -DPCUBATURE -o ptest test.c pcubature.c -lm
	./htest 3 1e-5 0
	./ptest 3 1e-5 0
	./htest 3 1e-5 1
	./ptest 3 1e-5 1
	./htest 3 1e-5 3
	./ptest 3 1e-5 3
	./htest 3 1e-5 4
	./ptest 3 1e-5 4
	./htest 3 1e-5 5
	./ptest 3 1e-5 5
	./htest 3 1e-5 6
	./ptest 3 1e-5 6
	./htest 3 1e-5 7
	./ptest 3 1e-5 7
endif