3 # Author: Paul Corner <paul_c@gna.org>
4 # Created on: Sat Mar 3 12:00 GMT 2007
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 \
22 ifneq ($(DEB_HOST_GNU_TYPE
),$(DEB_BUILD_GNU_TYPE
))
23 CONFIG_OPTS
+= --build
$(DEB_BUILD_GNU_TYPE
) --host
$(DEB_HOST_GNU_TYPE
)
25 CONFIG_OPTS
+= --build
$(DEB_BUILD_GNU_TYPE
)
28 build
: build-arch build-indep
30 build-arch
: build-arch-stamp
31 build-arch-stamp
: config.status
34 touch build-arch-stamp
36 build-indep
: build-indep-stamp
37 build-indep-stamp
: config.status
39 touch build-indep-stamp
41 config.status
: configure-stamp
44 .
/configure
$(CONFIG_OPTS
)
50 rm -f configure-stamp build-indep-stamp build-arch-stamp
51 -if
test -f Makefile
; then \
56 rm -f
$(CURDIR
)/*.patch
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
80 dh_installdocs
-i
-A CREDITS README.INSTALL TROUBLESHOOTING
82 dh_installchangelogs
-i
93 # Build architecture-dependent files here.
94 binary-arch
: build
install
97 dh_installinit
-s
--name
=xenomai
99 dh_installdocs
-s
-A CREDITS README.INSTALL TROUBLESHOOTING
101 dh_installchangelogs
-s
102 dh_strip
-pxenomai-runtime
--dbg-package
=xenomai-runtime-dbg
103 dh_strip
-plibxenomai1
--dbg-package
=libxenomai1-dbg
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
120 # We have nothing to do by default.
122 binary
: binary-indep binary-arch
123 .PHONY
: build
clean binary-indep binary-arch binary
install