1 ACLOCAL_AMFLAGS=-I config
5 SUBDIRS = src include config @XENO_MAYBE_DOCDIR@ scripts
7 EXTRA_DIST = CREDITS README.INSTALL TROUBLESHOOTING ksrc examples debian
10 rm -fr `find $(distdir) -name '.svn' -o -name CVS -o -name '.#*' \
11 -o -name '*~' -o -name autom4te.cache`
12 test -e $(srcdir)/doc || rm -rf $(distdir)/doc
15 @$(mkinstalldirs) $(DESTDIR)/dev; \
16 if test x`id -u` = x0; then \
18 else if test \! "x`type $(SUDO)`" = x ; then \
19 echo "sudo found (sudo is $(SUDO)), testing it..." ; \
20 $(SUDO) sh -c "( mknod $(DESTDIR)/dev/dummy c 150 0 && rm -f $(DESTDIR)/dev/dummy )" && \
22 echo '*** Warning: you are not super-user and sudo does not work, real-time devices' ; \
23 echo '*** nodes will not be created.' ; \
24 echo '*** If you do not create these devices by hand, Xenomai test programs will not' ; \
26 echo '*** To create these devices please run "make devices" with super-user' ; \
27 echo '*** privileges.' ; \
29 echo 'sudo is working.' ; \
32 if test -r $(DESTDIR)/etc/udev/udev.rules ; then \
33 for f in $(srcdir)/ksrc/nucleus/udev/*.rules ; do \
35 grep -q Xenomai:`basename $$b .rules` $(DESTDIR)/etc/udev/udev.rules || \
36 $$sudo sh -c "( echo ; cat $$f ) >> $(DESTDIR)/etc/udev/udev.rules" ; \
38 else if test -d $(DESTDIR)/etc/udev/rules.d ; then \
39 for f in $(srcdir)/ksrc/nucleus/udev/*.rules ; do \
40 $$sudo cp $$f $(DESTDIR)/etc/udev/rules.d/ ; \
44 for n in `seq 0 31` ; do \
45 f="$(DESTDIR)/dev/rtp$$n" ; \
46 if test \! -c $$f ; then \
47 $$sudo mknod -m 666 $$f c 150 $$n ; \
50 if test \! -c $(DESTDIR)/dev/rtheap ; then \
51 $$sudo mknod -m 666 $(DESTDIR)/dev/rtheap c 10 254 ; \
54 install-exec-local: devices
57 $(MAKE) SUDO=false install