forked from ShabbyX/RTAI
-
Notifications
You must be signed in to change notification settings - Fork 0
/
GNUmakefile.am
131 lines (109 loc) · 3.7 KB
/
GNUmakefile.am
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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
ACLOCAL_AMFLAGS=-I base/config/autoconf
OPTDIRS =
if CONFIG_RTAI_TESTSUITE
OPTDIRS += testsuite
endif
if CONFIG_RTAI_ADDONS
OPTDIRS += addons
endif
if CONFIG_RTAI_LAB
OPTDIRS += rtai-lab
endif
OPTDIRS += rtai-py
SUBDIRS = base @RTAI_MAYBE_DOCDIR@ $(OPTDIRS)
DIST_SUBDIRS = \
@RTAI_MAYBE_DOCDIR@ \
base \
testsuite \
addons \
rtai-lab \
rtai-py
EXTRA_DIST = \
makefile \
README.INSTALL \
README.ISOLCPUS \
README.LINUX_SERVER \
README.LXRT_EXTS_IN_USE \
README.SMI \
@RTAI_MAYBE_SIMDIR@
DISTCLEANFILES = .rtai_config .rtai_config.old .cfok .cfchanged Module.symvers
moduledir = @RTAI_MODULE_DIR@
all-recursive install-recursive: base/GNUmakefile clean-if-reconfigured
base/GNUmakefile: @RTAI_LINUX_DIR@/.config
@echo "*****************************************" ; \
echo "* The Linux configuration has changed *" ; \
echo "* forcing 'make reconfig' ... *" ; \
echo "*****************************************" ; \
$(MAKE) reconfig
clean-if-reconfigured:
@if test -r .cfchanged ; then \
rm -f .cfchanged ; \
echo "****************************************" ; \
echo "* Your RTAI configuration has changed *" ; \
echo "* forcing 'make clean' ... *" ; \
echo "****************************************" ; \
$(MAKE) clean ; \
fi
reconfig xconfig gconfig mconfig menuconfig config oldconfig:
@$(MAKE) -f $(srcdir)/makefile $@ \
srctree=$(srcdir) ARCH=@RTAI_HOST_STRING@ CROSS_COMPILE=@CROSS_COMPILE@
if CONFIG_RTAI_OLD_FASHIONED_BUILD
clean-local:
rm -fr modules .cfchanged
distclean-local:
$(MAKE) -C $(srcdir)/base/config/kconfig \
-f Makefile.kconfig distclean srctree=$(srcdir)
find . -name autom4te.cache | xargs rm -fr
else
clean-local:
rm -f .cfchanged
distclean-local:
test -d $(top_builddir)/base/config && \
$(MAKE) -C $(top_builddir)/base/config/kconfig \
-f @abs_srcdir@/base/config/kconfig/Makefile.kconfig distclean srctree=@abs_srcdir@
endif
install-data-local: .rtai_config
$(mkinstalldirs) $(DESTDIR)$(pkgdatadir)
$(INSTALL_DATA) .rtai_config $(DESTDIR)$(pkgdatadir)/config-rtai-$(VERSION)
if test -f Module.symvers ; then \
$(INSTALL_DATA) Module.symvers $(DESTDIR)$(moduledir)/Module.symvers ; \
fi
install-exec-local: devices
dist-hook:
$(MAKE) -C $(distdir)/base/config/kconfig \
-f Makefile.kconfig distclean srctree=$(distdir)
rm -fr `find $(distdir) -name CVS`
test -e $(srcdir)/doc || rm -fr $(distdir)/doc
dev devices:
@if test -r $(DESTDIR)/etc/udev/udev.rules ; then \
for f in \
$(srcdir)/base/ipc/shm/rtai_shm.udev \
$(srcdir)/base/ipc/fifos/rtai_fifos.udev \
; do \
b=`basename $$f` ; \
grep -q RTAI:`basename $$b .udev` $(DESTDIR)/etc/udev/udev.rules || \
$$sudo sh -c "( echo ; cat $$f ) >> $(DESTDIR)/etc/udev/udev.rules" ; \
done ; \
elif test -d $(DESTDIR)/etc/udev/rules.d ; then \
for f in \
$(srcdir)/base/ipc/shm/rtai_shm.udev \
$(srcdir)/base/ipc/fifos/rtai_fifos.udev \
; do \
b=`basename $$f` ; \
grep -q RTAI:`basename $$b .udev` $(DESTDIR)/etc/udev/rules.d/99-rtai.rules || \
$$sudo sh -c "( echo ; cat $$f ) >> $(DESTDIR)/etc/udev/rules.d/99-rtai.rules" ; \
done ; \
fi ; \
if test x$(DESTDIR) = x; then \
if test \! "x`type -t sudo`" = x; then sudo=sudo; else sudo=; fi; \
if test \! -c $(DESTDIR)/dev/rtai_shm; then \
$$sudo mknod -m 666 $(DESTDIR)/dev/rtai_shm c 10 254; \
fi; \
for n in `seq 0 9`; do \
f="$(DESTDIR)/dev/rtf$$n"; \
if test \! -c $$f; then \
$$sudo mknod -m 666 $$f c 150 $$n; \
fi; \
done ; \
fi
.PHONY: reconfig xconfig gconfig mconfig menuconfig config oldconfig clean-if-reconfigured dev devices