source: rtems/make/main.cfg @ 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: 1.6 KB
Line 
1# make/main.cfg
2#
3#   Make(1) configuration file include'd by all Makefile's
4#
5
6#
7# Initial target for make(1)
8#  Once this is established we can safely include other targets
9#  within this make-include file.
10#
11
12default_target: all
13
14#
15# where things are relative to PROJECT_ROOT; shouldn't need to change,
16# but could be overridden in custom files.
17#
18
19PROJECT_RELEASE ?= $(exec_prefix)/$(RTEMS_BSP)
20PROJECT_BIN = $(PROJECT_ROOT)/bin
21PROJECT_INCLUDE = $(PROJECT_RELEASE)/lib/include
22PROJECT_TOOLS = $(PROJECT_RELEASE)/build-tools
23
24## translate VARIANT into VARIANT_V
25ifeq ($(VARIANT),)
26VARIANT = OPTIMIZE
27endif
28
29VARIANT_OPTIMIZE_V = OPTIMIZE
30VARIANT_DEBUG_V = DEBUG
31VARIANT_optimize_V = OPTIMIZE
32VARIANT_debug_V = DEBUG
33
34VARIANT_V = $(VARIANT_$(VARIANT)_V)
35
36## Setup the variant build subdirectory
37ARCH_OPTIMIZE_V = o-optimize
38ARCH_DEBUG_V = o-debug
39
40ARCH__V = $(ARCH_OPTIMIZE_V)
41ARCH = $(ARCH_$(VARIANT_V)_V)
42
43$(ARCH):
44        test -d ${ARCH} || mkdir $(ARCH)
45#
46# Default makefile name
47# May be overridden by command line macro assignment
48#
49
50MAKEFILE=Makefile
51
52#
53# Target variant names
54#
55TARGET_VARIANTS = optimize debug
56
57#
58# Generate list of object directories: o-optimize, o-debug
59#
60VARIANTS=${TARGET_VARIANTS:%=o-%}
61
62#
63# List of "recursion-able" targets for directory Makefiles
64#
65
66RECURSE_TARGETS=all depend install \
67preinstall-recursive \
68$(TARGET_VARIANTS)
69
70ifndef AUTOMAKE
71distclean-generic:
72        -$(RM) .#* $(CONFIG_CLEAN_FILES)
73        -$(RM) -r $(CLOBBER_ADDITIONS)
74
75clean-generic:
76        -$(RM) a.out core mon.out gmon.out
77        -$(RM) -r $(CLEAN_ADDITIONS)
78endif
79
80.PHONY: $(RECURSE_TARGETS)
81.PHONY: clean-generic
82.PHONY: distclean-generic
Note: See TracBrowser for help on using the repository browser.