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
RevLine 
[bffb938]1# make/main.cfg
2#
3#   Make(1) configuration file include'd by all Makefile's
4#
5
[393d271]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
[bffb938]14#
15# where things are relative to PROJECT_ROOT; shouldn't need to change,
16# but could be overridden in custom files.
17#
18
[270c5df5]19PROJECT_RELEASE ?= $(exec_prefix)/$(RTEMS_BSP)
20PROJECT_BIN = $(PROJECT_ROOT)/bin
21PROJECT_INCLUDE = $(PROJECT_RELEASE)/lib/include
[bffb938]22PROJECT_TOOLS = $(PROJECT_RELEASE)/build-tools
23
[393d271]24## translate VARIANT into VARIANT_V
[c2646c8]25ifeq ($(VARIANT),)
[393d271]26VARIANT = OPTIMIZE
[c2646c8]27endif
[bffb938]28
[393d271]29VARIANT_OPTIMIZE_V = OPTIMIZE
30VARIANT_DEBUG_V = DEBUG
31VARIANT_optimize_V = OPTIMIZE
32VARIANT_debug_V = DEBUG
[bffb938]33
[393d271]34VARIANT_V = $(VARIANT_$(VARIANT)_V)
[bffb938]35
[393d271]36## Setup the variant build subdirectory
37ARCH_OPTIMIZE_V = o-optimize
38ARCH_DEBUG_V = o-debug
[bffb938]39
[393d271]40ARCH__V = $(ARCH_OPTIMIZE_V)
41ARCH = $(ARCH_$(VARIANT_V)_V)
42
43$(ARCH):
44        test -d ${ARCH} || mkdir $(ARCH)
[bffb938]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#
[888622c4]55TARGET_VARIANTS = optimize debug
[bffb938]56
57#
[888622c4]58# Generate list of object directories: o-optimize, o-debug
[bffb938]59#
[d6c83529]60VARIANTS=${TARGET_VARIANTS:%=o-%}
[bffb938]61
62#
63# List of "recursion-able" targets for directory Makefiles
64#
65
[29e68b75]66RECURSE_TARGETS=all depend install \
[6693a68]67preinstall-recursive \
[29e68b75]68$(TARGET_VARIANTS)
[bffb938]69
[9608320]70ifndef AUTOMAKE
[29e68b75]71distclean-generic:
[df49c60]72        -$(RM) .#* $(CONFIG_CLEAN_FILES)
[29e68b75]73        -$(RM) -r $(CLOBBER_ADDITIONS)
74
75clean-generic:
76        -$(RM) a.out core mon.out gmon.out
77        -$(RM) -r $(CLEAN_ADDITIONS)
[9608320]78endif
[29e68b75]79
[270c5df5]80.PHONY: $(RECURSE_TARGETS)
[29e68b75]81.PHONY: clean-generic
82.PHONY: distclean-generic
Note: See TracBrowser for help on using the repository browser.