summaryrefslogtreecommitdiff
path: root/polux/devkit/rtai-3.1-2.6/GNUmakefile.am
blob: 52970373add54bcb149d98fbd8fa337278b9c161 (plain)
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
ACLOCAL_AMFLAGS=-I rtai-core/config/autoconf

OPTDIRS =

if CONFIG_RTAI_TESTSUITE
OPTDIRS += rtai-testsuite
endif

if CONFIG_RTAI_COMPAT
OPTDIRS += rtai-compat
endif

if CONFIG_RTAI_ADDONS
OPTDIRS += rtai-addons
endif

if CONFIG_RTAI_LAB
OPTDIRS += rtai-lab
endif

SUBDIRS = rtai-core @RTAI_MAYBE_DOCDIR@ $(OPTDIRS) $(subdirs)

DIST_SUBDIRS = \
	@RTAI_MAYBE_DOCDIR@ \
	$(subdirs) \
	rtai-core \
	rtai-testsuite \
	rtai-compat \
	rtai-addons \
	rtai-lab

EXTRA_DIST = makefile README.INSTALL @RTAI_MAYBE_SIMDIR@

DISTCLEANFILES = .rtai_config .rtai_config.old .cfok .cfchanged

all-recursive install-recursive: rtai-core/GNUmakefile clean-if-reconfigured

rtai-core/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)/rtai-core/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)/rtai-core/config && \
	$(MAKE) -C $(top_builddir)/rtai-core/config/kconfig \
	-f @abs_srcdir@/rtai-core/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)

install-exec-local: devices

dist-hook:
	$(MAKE) -C $(distdir)/rtai-core/config/kconfig \
	-f Makefile.kconfig distclean srctree=$(distdir)
	rm -fr `find $(distdir) -name CVS`
	test -e $(srcdir)/rtai-doc || rm -fr $(distdir)/rtai-doc

dev devices:
	@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