File: rules

package info (click to toggle)
canl-c 3.0.0-3.1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 992 kB
  • sloc: ansic: 10,634; perl: 1,371; makefile: 238; yacc: 234; lex: 133
file content (84 lines) | stat: -rwxr-xr-x 1,826 bytes parent folder | download | duplicates (2)
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
#!/usr/bin/make -f
# -*- makefile -*-

-include /usr/share/dpkg/buildflags.mk

p_dev=libcanl-c-dev
p_examples=libcanl-c-examples
p_lib=libcanl-c4

DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)

configure: configure-stamp

configure-stamp:
	dh_testdir
	./configure --root=/ --prefix=/usr --libdir=lib/$(DEB_HOST_MULTIARCH) --project=emi
	touch $@

build: build-arch build-indep

build-arch build-indep: build-stamp

build-stamp: configure-stamp
	dh_testdir
	CFLAGS="$(CFLAGS) $(CPPFLAGS)" LDFLAGS="$(LDFLAGS)" $(MAKE)
ifeq ($(filter nocheck,$(DEB_BUILD_OPTIONS)),)
	CFLAGS="$(CFLAGS) $(CPPFLAGS)" LDFLAGS="$(LDFLAGS)" $(MAKE) check
endif
	touch $@

clean:
	dh_testdir
	dh_testroot
	$(MAKE) clean
	rm -f Makefile.inc config.status canl-c.spec
	rm -f configure-stamp build-stamp
	dh_clean

install: build-stamp
	dh_testdir
	dh_testroot
	dh_prep
	$(MAKE) install DESTDIR=$(CURDIR)/debian/tmp
	rm -f debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/*.la
	# Documentation is installed by dh_installdocs
	rm -rf debian/tmp/usr/share/doc

binary-indep: install
	dh_testdir
	dh_testroot
	dh_installdocs -i
	dh_installchangelogs -i
	dh_install -i
	dh_missing -i --fail-missing
	dh_link -i
	dh_compress -i
	dh_fixperms -i
	dh_installdeb -i
	dh_gencontrol -i
	dh_md5sums -i
	dh_builddeb -i

binary-arch: install
	dh_testdir
	dh_testroot
	dh_installdocs -p $(p_examples) --link $(p_lib)
	dh_installdocs -a
	dh_installchangelogs -a ChangeLog
	dh_install -a
	dh_missing -a --fail-missing
	dh_link -a
	dh_strip -a --dbgsym-migration='$(p_examples)-dbg (<< 3.0.0)'
	dh_compress -a
	dh_fixperms -a
	dh_makeshlibs -a
	dh_installdeb -a
	dh_shlibdeps -a
	dh_gencontrol -a
	dh_md5sums -a
	dh_builddeb -a

binary: binary-arch binary-indep

.PHONY: binary binary-arch binary-indep build build-arch build-indep clean configure install