summaryrefslogtreecommitdiffstats
path: root/Makefile.in
blob: 66f73c28f4f8e98a196471b84b2be789e9c8d7b2 (plain) (blame)
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
#
# top level directory for RTEMS build tree
#
# Modified by Jiri to implement autoconf and cygnus one-tree build
#
#  $Id$
#

@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
top_builddir = .

INSTALL = @INSTALL@

RTEMS_ROOT = $(top_srcdir)/@RTEMS_TOPdir@
PROJECT_ROOT = @PROJECT_ROOT@

prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = @bindir@
libdir = @libdir@
includedir = @includedir@
target = @target@
manext = 1
mandir = @mandir@/man$(manext)
program_prefix = @program_prefix@

export bindir

VPATH=@srcdir@

ifeq (${RTEMS_BSP},)
  RTEMS_BSP = @RTEMS_BSP_LIST@
endif

include $(RTEMS_ROOT)/make/main.cfg

MTARGETS = pre_install_src all install $(TARGET_VARIANTS) $(TARGET_VARIANTS:%=%_all) \
  $(TARGET_VARIANTS:%=%_install) $(TARGET_VARIANTS:%=%_tests) \
  clean_wrapup distclean clean_dirs clean_tools tests clean depend

EXIT_CMD = exit 1

# Don't pass flags from previous make - especially NOT CFLAGS  
# NOTE: Previous versions overrode MAKEFLAGS, but this also disables 
# a lot of useful features
# override MAKEFLAGS=

$(MTARGETS): 
	BASEDIR=`pwd`; \
	for bsp in ${RTEMS_BSP} xxx; \
	do if [ $$bsp != xxx ] ; then  \
	    cd $$BASEDIR; \
	    cmd="cd c; $(MAKE) RTEMS_BSP=$$bsp $(FLAGS_TO_PASS) \
            $@" ; \
	    eval $$cmd || $(EXIT_CMD); \
	fi; done; 

## Configuration stuff

ACLOCAL = aclocal -I aclocal
AUTOCONF = autoconf

ACLOCAL_FILES := $(wildcard $(srcdir)/aclocal/*.m4)
ACLOCAL_M4 = aclocal.m4

$(ACLOCAL_M4): configure.in $(ACLOCAL_FILES)
	-cd $(RTEMS_ROOT) && $(ACLOCAL)

config.status: $(RTEMS_ROOT)/configure
	$(SHELL) ./config.status --recheck

$(RTEMS_ROOT)/configure: $(RTEMS_ROOT)/configure.in $(ACLOCAL_M4)
	-cd $(RTEMS_ROOT) && $(AUTOCONF)

.PRECIOUS: $(ACLOCAL_M4) configure Makefile config.status

Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
	cd $(top_builddir) \
	 && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status