1 | # |
---|
2 | # top level directory for RTEMS build tree |
---|
3 | # |
---|
4 | # Modified by Jiri to implement autoconf and cygnus one-tree build |
---|
5 | # |
---|
6 | # $Id$ |
---|
7 | # |
---|
8 | |
---|
9 | @SET_MAKE@ |
---|
10 | srcdir = @srcdir@ |
---|
11 | top_srcdir = @top_srcdir@ |
---|
12 | top_builddir = . |
---|
13 | |
---|
14 | INSTALL = @INSTALL@ |
---|
15 | |
---|
16 | RTEMS_ROOT = $(top_srcdir)/@RTEMS_TOPdir@ |
---|
17 | PROJECT_ROOT = @PROJECT_ROOT@ |
---|
18 | |
---|
19 | prefix = @prefix@ |
---|
20 | exec_prefix = @exec_prefix@ |
---|
21 | bindir = @bindir@ |
---|
22 | libdir = @libdir@ |
---|
23 | includedir = @includedir@ |
---|
24 | target = @target@ |
---|
25 | manext = 1 |
---|
26 | mandir = @mandir@/man$(manext) |
---|
27 | program_prefix = @program_prefix@ |
---|
28 | |
---|
29 | export bindir |
---|
30 | |
---|
31 | VPATH=@srcdir@ |
---|
32 | |
---|
33 | ifeq (${RTEMS_BSP},) |
---|
34 | RTEMS_BSP = @RTEMS_BSP_LIST@ |
---|
35 | endif |
---|
36 | |
---|
37 | include $(RTEMS_ROOT)/make/main.cfg |
---|
38 | |
---|
39 | MTARGETS = pre_install_src all install $(TARGET_VARIANTS) $(TARGET_VARIANTS:%=%_all) \ |
---|
40 | $(TARGET_VARIANTS:%=%_install) $(TARGET_VARIANTS:%=%_tests) \ |
---|
41 | clean_wrapup distclean clean_dirs clean_tools tests clean depend |
---|
42 | |
---|
43 | EXIT_CMD = exit 1 |
---|
44 | |
---|
45 | # Don't pass flags from previous make - especially NOT CFLAGS |
---|
46 | # NOTE: Previous versions overrode MAKEFLAGS, but this also disables |
---|
47 | # a lot of useful features |
---|
48 | # override MAKEFLAGS= |
---|
49 | |
---|
50 | $(MTARGETS): |
---|
51 | BASEDIR=`pwd`; \ |
---|
52 | for bsp in ${RTEMS_BSP} xxx; \ |
---|
53 | do if [ $$bsp != xxx ] ; then \ |
---|
54 | cd $$BASEDIR; \ |
---|
55 | cmd="cd c; $(MAKE) RTEMS_BSP=$$bsp $(FLAGS_TO_PASS) \ |
---|
56 | $@" ; \ |
---|
57 | eval $$cmd || $(EXIT_CMD); \ |
---|
58 | fi; done; |
---|
59 | |
---|
60 | ## Configuration stuff |
---|
61 | |
---|
62 | ACLOCAL = aclocal -I aclocal |
---|
63 | AUTOCONF = autoconf |
---|
64 | |
---|
65 | ACLOCAL_FILES := $(wildcard $(srcdir)/aclocal/*.m4) |
---|
66 | ACLOCAL_M4 = aclocal.m4 |
---|
67 | |
---|
68 | $(ACLOCAL_M4): configure.in $(ACLOCAL_FILES) |
---|
69 | -cd $(RTEMS_ROOT) && $(ACLOCAL) |
---|
70 | |
---|
71 | config.status: $(RTEMS_ROOT)/configure |
---|
72 | $(SHELL) ./config.status --recheck |
---|
73 | |
---|
74 | $(RTEMS_ROOT)/configure: $(RTEMS_ROOT)/configure.in $(ACLOCAL_M4) |
---|
75 | -cd $(RTEMS_ROOT) && $(AUTOCONF) |
---|
76 | |
---|
77 | .PRECIOUS: $(ACLOCAL_M4) configure Makefile config.status |
---|
78 | |
---|
79 | Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status |
---|
80 | cd $(top_builddir) \ |
---|
81 | && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status |
---|