libamxrt  0.4.2
Ambiorix Run Time Library
rules
Go to the documentation of this file.
1 #!/usr/bin/make -f
2 # debian/rules for alien
3 
4 PACKAGE=$(shell dh_listpackages)
5 MACHINE = $(shell $(CC) -dumpmachine)
6 VERSION ?= $(subst $(VERSION_PREFIX)v,,$(strip $(shell git describe --tags)))
7 VERSION_PARTS = $(subst ., ,$(VERSION))
8 VMAJOR = $(word 1,$(VERSION_PARTS))
9 VMINOR = $(word 2,$(VERSION_PARTS))
10 VBUILD_FULL = $(word 3,$(VERSION_PARTS))
11 VBUILD = $(word 1,$(subst -, ,$(VBUILD_FULL)))
12 
13 build:
14  dh_testdir
15 
16 clean:
17  dh_testdir
18  dh_testroot
19  dh_clean -d
20 
21 binary-indep: build
22 
23 binary-arch: build
24  echo $(VERSION_PREFIX)
25  dh_testdir
26  dh_testroot
27  dh_prep
28  dh_installdirs
29 
30  dh_installdocs
31  dh_installchangelogs
32 
33 # Copy the packages's files.
34  find . -maxdepth 1 -mindepth 1 -not -name debian -print0 | \
35  xargs -0 -r -i cp -a {} debian/$(PACKAGE)
36 
37  dh_link usr/lib/$(MACHINE)/libamxrt.so.$(VERSION) usr/lib/$(MACHINE)/libamxrt.so
38  dh_link usr/lib/$(MACHINE)/libamxrt.so.$(VERSION) usr/lib/$(MACHINE)/libamxrt.so.$(VMAJOR)
39  dh_compress
40  dh_fixperms
41  dh_makeshlibs
42  dh_installdeb
43  -dh_shlibdeps -Llibyajl.so.2
44  dh_gencontrol
45  dh_md5sums
46  dh_builddeb
47 
48 binary: binary-indep binary-arch
49 .PHONY: build clean binary-indep binary-arch binary