source: rtems/c/src/make/Makefile.am @ 270c5df5

5
Last change on this file since 270c5df5 was 270c5df5, checked in by Chris Johns <chrisj@…>, on 07/17/19 at 12:19:04

Makefile.inc: Add support for staged builds.

  • Allow the RTEMS_ROOT to be conditionally supplied. This can be a staging area before being moved to the final install prefix location.
  • Update the default.cfg to use RTEMS_ROOT and to not rely on the exec_prefix so it's paths can be staged.
  • Fix and add the needed configure subs.

Closes #3768

  • Property mode set to 100644
File size: 2.6 KB
Line 
1ACLOCAL_AMFLAGS = -I aclocal -I ../aclocal
2
3CLEANFILES =
4
5rtems_makedir = $(pkgdatadir)/make
6
7GENERIC_FILES = host.cfg
8
9MAKE_FILES = README directory.cfg lib.cfg
10
11rtems_make_DATA = $(MAKE_FILES) $(GENERIC_FILES)
12
13noinst_DATA = leaf.cfg
14
15rtemsdir = $(exec_prefix)
16rtems_bspdir = $(rtemsdir)/@RTEMS_BSP@
17rtems_bsp_DATA = Makefile.inc
18
19rtems_bsp_makedir = $(rtems_bspdir)/make
20rtems_bsp_make_DATA = bsp.cfg target.cfg
21
22bsp.cfg: bsp.cfg.in Makefile
23        sed \
24        -e "s|[@]HAS_MP[@]|$(HAS_MP)|" \
25        -e "s|[@]HAS_POSIX_API[@]|$(HAS_POSIX_API)|" \
26        -e "s|[@]HAS_CPLUSPLUS[@]|$(HAS_CPLUSPLUS)|" \
27        -e "s|[@]HAS_NETWORKING[@]|$(HAS_NETWORKING)|" \
28        < $(srcdir)/bsp.cfg.in > bsp.cfg
29CLEANFILES += bsp.cfg
30
31target.cfg: target.cfg.in Makefile
32        sed \
33        -e "s|[@]RTEMS_API[@]|$(RTEMS_API)|" \
34        -e "s|[@]CPPFLAGS[@]|$(CPPFLAGS)|" \
35        -e "s|[@]CFLAGS[@]|$(CFLAGS)|" \
36        -e "s|[@]LIBS[@]|$(LIBS)|" \
37        -e "s|[@]CC[@]|$(CC)|" \
38        -e "s|[@]CXX[@]|$(CXX)|" \
39        -e "s|[@]AS[@]|$(AS)|" \
40        -e "s|[@]AR[@]|$(AR)|" \
41        -e "s|[@]NM[@]|$(NM)|" \
42        -e "s|[@]LD[@]|$(LD)|" \
43        -e "s|[@]SIZE[@]|$(SIZE)|" \
44        -e "s|[@]STRIP[@]|$(STRIP)|" \
45        -e "s|[@]RANLIB[@]|$(RANLIB)|" \
46        -e "s|[@]OBJCOPY[@]|$(OBJCOPY)|" \
47        -e "s|[@]RTEMS_CPU[@]|$(RTEMS_CPU)|" \
48        -e "s|[@]RTEMS_HAS_MULTIPROCESSING[@]|$(HAS_MP)|" \
49        -e "s|[@]RTEMS_HAS_POSIX_API[@]|$(HAS_POSIX_API)|" \
50        -e "s|[@]RTEMS_HAS_CPLUSPLUS[@]|$(HAS_CPLUSPLUS)|" \
51        -e "s|[@]RTEMS_HAS_NETWORKING[@]|$(HAS_NETWORKING)|" \
52        < $(srcdir)/target.cfg.in > target.cfg
53CLEANFILES += target.cfg
54
55host.cfg: host.cfg.in Makefile
56        sed \
57        -e "s|[@]CP[@]|$(CP)|" \
58        -e "s|[@]MV[@]|$(MV)|" \
59        -e "s|[@]LN[@]|$(LN)|" \
60        -e "s|[@]SHELL[@]|$(SHELL)|" \
61        -e "s|[@]KSH[@]|$(KSH)|" \
62        < $(srcdir)/host.cfg.in > host.cfg
63CLEANFILES += host.cfg
64
65Makefile.inc: Makefile.inc.in Makefile
66        sed \
67        -e "s|[@]prefix[@]|$(prefix)|" \
68        -e "s|[@]exec_prefix[@]|$(exec_prefix)|" \
69        -e "s|[@]pkgdatadir[@]|$(pkgdatadir)|" \
70        -e "s|[@]RTEMS_BSP[@]|$(RTEMS_BSP)|" \
71        -e "s|[@]RTEMS_CPU[@]|$(RTEMS_CPU)|" \
72        -e "s|[@]RTEMS_API[@]|$(RTEMS_API)|" \
73        -e "s|[@]CC[@]|$(CC)|" \
74        -e "s|[@]CXX[@]|$(CXX)|" \
75        -e "s|[@]AS[@]|$(AS)|" \
76        -e "s|[@]AR[@]|$(AR)|" \
77        -e "s|[@]NM[@]|$(NM)|" \
78        -e "s|[@]LD[@]|$(LD)|" \
79        -e "s|[@]SIZE[@]|$(SIZE)|" \
80        -e "s|[@]OBJCOPY[@]|$(OBJCOPY)|" \
81        -e "s|[@]RTEMS_HAS_POSIX_API[@]|$(HAS_POSIX_API)|" \
82        -e "s|[@]RTEMS_HAS_CPLUSPLUS[@]|$(HAS_CPLUSPLUS)|" \
83        < $(srcdir)/Makefile.inc.in > Makefile.inc
84CLEANFILES += Makefile.inc
85
86## At the moment all actively supported configurations
87## use gcc-target-default.cfg only.
88rtems_make_compilersdir = $(rtems_makedir)/compilers
89dist_rtems_make_compilers_DATA = compilers/gcc-target-default.cfg
Note: See TracBrowser for help on using the repository browser.