bfin: remove inline keyword
[xenomai-head.git] / debian / rules
blobfb485a8ba3ce5fa3f2321fcd5a5a9b627ea34467
1 #!/usr/bin/make -f
3 # Author: Paul Corner <paul_c@gna.org>
4 # Created on: Sat Mar 3 12:00 GMT 2007
5 # License: GPL Ver. 2
7 #export DH_VERBOSE=1
9 export DEB_BUILD_HARDENING=1
11 DEB_HOST_GNU_CPU ?= $(shell dpkg-architecture -qDEB_HOST_GNU_CPU)
12 DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
13 DEB_HOST_GNU_TYPE=$(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
14 DEB_BUILD_GNU_TYPE=$(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
16 CONFIG_OPTS = --prefix=/usr \
17 --includedir=/usr/include/xenomai \
18 --mandir=/usr/share/man \
19 --with-testdir=/usr/lib/xenomai/testsuite \
20 --enable-debug
22 ifneq ($(DEB_HOST_GNU_TYPE),$(DEB_BUILD_GNU_TYPE))
23 CONFIG_OPTS += --build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE)
24 else
25 CONFIG_OPTS += --build $(DEB_BUILD_GNU_TYPE)
26 endif
28 build: build-arch build-indep
30 build-arch: build-arch-stamp
31 build-arch-stamp: config.status
32 dh_testdir
33 $(MAKE)
34 touch build-arch-stamp
36 build-indep: build-indep-stamp
37 build-indep-stamp: config.status
38 dh_testdir
39 touch build-indep-stamp
41 config.status: configure-stamp
42 configure-stamp:
43 dh_testdir
44 ./configure $(CONFIG_OPTS)
45 touch configure-stamp
47 clean:
48 dh_testdir
49 dh_testroot
50 rm -f configure-stamp build-indep-stamp build-arch-stamp
51 -if test -f Makefile ; then \
52 $(MAKE) distclean ; \
54 dh_clean
55 rm -fR $(CURDIR)/tmp
56 rm -f $(CURDIR)/*.patch
58 install: build
59 dh_testdir
60 dh_testroot
61 dh_prep
62 dh_installdirs
63 $(MAKE) install DESTDIR=$(CURDIR)/debian/tmp/
64 dh_install --sourcedir=$(CURDIR)/debian/tmp
65 # xeno-config should be only in libxenomai-dev
66 rm -f $(CURDIR)/debian/xenomai-runtime/usr/bin/xeno-config
67 rm -f $(CURDIR)/debian/xenomai-runtime/usr/share/man/man1/xeno-config.1
68 install -m 644 debian/libxenomai1.modprobe $(CURDIR)/debian/libxenomai1/etc/modprobe.d/xenomai.conf
69 # remove empty directory
70 rm -rf $(CURDIR)/debian/xenomai-doc/usr/share/doc/xenomai-doc/ps
71 cp debian/libxenomai1.lintian $(CURDIR)/debian/libxenomai1/usr/share/lintian/overrides/libxenomai1
72 cp debian/libxenomai-dev.lintian $(CURDIR)/debian/libxenomai-dev/usr/share/lintian/overrides/libxenomai-dev
73 mkdir -p $(CURDIR)/debian/xenomai-kernel-source/usr/src/xenomai-kernel-source $(CURDIR)/debian/xenomai-kernel-source/usr/share/doc/xenomai-kernel-source
74 cp -a config ksrc include scripts $(CURDIR)/debian/xenomai-kernel-source/usr/src/xenomai-kernel-source
76 # Build architecture-independent files here.
77 binary-indep: build install
78 dh_testdir -i
79 dh_testroot -i
80 dh_installdocs -i -A CREDITS README.INSTALL TROUBLESHOOTING
81 dh_link -i
82 dh_installchangelogs -i
83 dh_strip -i
84 dh_compress -i -X.pdf
85 dh_fixperms -i
86 dh_makeshlibs -i
87 dh_installdeb -i
88 dh_shlibdeps -i
89 dh_gencontrol -i
90 dh_md5sums -i
91 dh_builddeb -i
93 # Build architecture-dependent files here.
94 binary-arch: build install
95 dh_testdir -s
96 dh_testroot -s
97 dh_installinit -s --name=xenomai
98 dh_installman -s
99 dh_installdocs -s -A CREDITS README.INSTALL TROUBLESHOOTING
100 dh_link -s
101 dh_installchangelogs -s
102 dh_strip -pxenomai-runtime --dbg-package=xenomai-runtime-dbg
103 dh_strip -plibxenomai1 --dbg-package=libxenomai1-dbg
104 dh_compress -s
105 dh_fixperms -s
106 dh_makeshlibs -s
107 dh_installdeb -s
108 dh_shlibdeps -s
109 dh_gencontrol -s
110 # Echo config options to control.
111 echo " ." >> $(CURDIR)/debian/libxenomai1/DEBIAN/control
112 echo " Compiled with the following options." >> \
113 $(CURDIR)/debian/libxenomai1/DEBIAN/control
114 echo "$(CONFIG_OPTS)" | awk '{ for ( i=1 ; i<=NF ; i++ ) print " "$$i }' >> \
115 $(CURDIR)/debian/libxenomai1/DEBIAN/control
116 # End of hackery.
117 dh_md5sums -s
118 dh_builddeb -s
120 # We have nothing to do by default.
122 binary: binary-indep binary-arch
123 .PHONY: build clean binary-indep binary-arch binary install