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 | prefix = @prefix@ |
---|
12 | exec_prefix = @exec_prefix@ |
---|
13 | bindir = @bindir@ |
---|
14 | libdir = @libdir@ |
---|
15 | includedir = @includedir@ |
---|
16 | target = @target@ |
---|
17 | manext = 1 |
---|
18 | mandir = @mandir@/man$(manext) |
---|
19 | program_prefix = @program_prefix@ |
---|
20 | |
---|
21 | export bindir |
---|
22 | |
---|
23 | RTEMS_ROOT = @top_srcdir@ |
---|
24 | PROJECT_ROOT = @PROJECT_ROOT@ |
---|
25 | |
---|
26 | INSTALL = @INSTALL@ |
---|
27 | |
---|
28 | VPATH=@srcdir@ |
---|
29 | |
---|
30 | ifeq ($(RTEMS_BSP),) |
---|
31 | RTEMS_BSP = @RTEMS_BSP_LIST@ |
---|
32 | endif |
---|
33 | |
---|
34 | include $(RTEMS_ROOT)/make/main.cfg |
---|
35 | |
---|
36 | MTARGETS = pre_install_src all install $(TARGET_VARIANTS) $(TARGET_VARIANTS:%=%_all) \ |
---|
37 | $(TARGET_VARIANTS:%=%_install) $(TARGET_VARIANTS:%=%_tests) \ |
---|
38 | clean_wrapup distclean clean_dirs clean_tools tests clean depend |
---|
39 | |
---|
40 | EXIT_CMD = exit 1 |
---|
41 | |
---|
42 | # Don't pass flags from previous make - especially NOT CFLAGS |
---|
43 | # NOTE: Previous versions overrode MAKEFLAGS, but this also disables |
---|
44 | # a lot of useful features |
---|
45 | # override MAKEFLAGS= |
---|
46 | |
---|
47 | $(MTARGETS): |
---|
48 | BASEDIR=`pwd`; \ |
---|
49 | for bsp in $(RTEMS_BSP) xxx; \ |
---|
50 | do if [ $$bsp != xxx ] ; then \ |
---|
51 | cd $$BASEDIR; \ |
---|
52 | cmd="cd c; $(MAKE) RTEMS_BSP=$$bsp $(FLAGS_TO_PASS) \ |
---|
53 | $@" ; \ |
---|
54 | eval $$cmd || $(EXIT_CMD); \ |
---|
55 | fi; done; |
---|
56 | |
---|
57 | ## Configuration stuff |
---|
58 | |
---|
59 | ACLOCAL = aclocal -I aclocal |
---|
60 | AUTOCONF = autoconf |
---|
61 | |
---|
62 | ACLOCAL_FILES := $(wildcard $(srcdir)/aclocal/*.m4) |
---|
63 | ACLOCAL_M4 = aclocal.m4 |
---|
64 | |
---|
65 | $(ACLOCAL_M4): configure.in $(ACLOCAL_FILES) |
---|
66 | -cd $(RTEMS_ROOT) && $(ACLOCAL) |
---|
67 | |
---|
68 | Makefile: Makefile.in config.status |
---|
69 | CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status |
---|
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 | |
---|