forked from Imagelibrary/rtems
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
This commit is contained in:
@@ -68,6 +68,8 @@ Makefile.inc: Makefile.inc.in Makefile
|
|||||||
-e "s|[@]exec_prefix[@]|$(exec_prefix)|" \
|
-e "s|[@]exec_prefix[@]|$(exec_prefix)|" \
|
||||||
-e "s|[@]pkgdatadir[@]|$(pkgdatadir)|" \
|
-e "s|[@]pkgdatadir[@]|$(pkgdatadir)|" \
|
||||||
-e "s|[@]RTEMS_BSP[@]|$(RTEMS_BSP)|" \
|
-e "s|[@]RTEMS_BSP[@]|$(RTEMS_BSP)|" \
|
||||||
|
-e "s|[@]RTEMS_CPU[@]|$(RTEMS_CPU)|" \
|
||||||
|
-e "s|[@]RTEMS_API[@]|$(RTEMS_API)|" \
|
||||||
-e "s|[@]CC[@]|$(CC)|" \
|
-e "s|[@]CC[@]|$(CC)|" \
|
||||||
-e "s|[@]CXX[@]|$(CXX)|" \
|
-e "s|[@]CXX[@]|$(CXX)|" \
|
||||||
-e "s|[@]AS[@]|$(AS)|" \
|
-e "s|[@]AS[@]|$(AS)|" \
|
||||||
@@ -85,4 +87,3 @@ CLEANFILES += Makefile.inc
|
|||||||
## use gcc-target-default.cfg only.
|
## use gcc-target-default.cfg only.
|
||||||
rtems_make_compilersdir = $(rtems_makedir)/compilers
|
rtems_make_compilersdir = $(rtems_makedir)/compilers
|
||||||
dist_rtems_make_compilers_DATA = compilers/gcc-target-default.cfg
|
dist_rtems_make_compilers_DATA = compilers/gcc-target-default.cfg
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,13 @@
|
|||||||
#
|
#
|
||||||
# BSP specific settings. To be included in application Makefiles
|
# BSP specific settings. To be included in application Makefiles
|
||||||
#
|
#
|
||||||
|
# This support will be removed from RTEMS. Please consider other
|
||||||
|
# ways to build applications.
|
||||||
|
#
|
||||||
|
|
||||||
|
RTEMS_API = @RTEMS_API@
|
||||||
|
|
||||||
|
RTEMS_CPU = @RTEMS_CPU@
|
||||||
RTEMS_BSP = @RTEMS_BSP@
|
RTEMS_BSP = @RTEMS_BSP@
|
||||||
|
|
||||||
prefix = @prefix@
|
prefix = @prefix@
|
||||||
@@ -16,8 +22,6 @@ LD_FOR_TARGET = @LD@
|
|||||||
SIZE_FOR_TARGET = @SIZE@
|
SIZE_FOR_TARGET = @SIZE@
|
||||||
OBJCOPY_FOR_TARGET = @OBJCOPY@
|
OBJCOPY_FOR_TARGET = @OBJCOPY@
|
||||||
|
|
||||||
RTEMS_API = @RTEMS_API@
|
|
||||||
|
|
||||||
CC= $(CC_FOR_TARGET)
|
CC= $(CC_FOR_TARGET)
|
||||||
CXX= $(CXX_FOR_TARGET)
|
CXX= $(CXX_FOR_TARGET)
|
||||||
AS= $(AS_FOR_TARGET)
|
AS= $(AS_FOR_TARGET)
|
||||||
@@ -36,10 +40,10 @@ export AR
|
|||||||
export SIZE
|
export SIZE
|
||||||
export OBJCOPY
|
export OBJCOPY
|
||||||
|
|
||||||
RTEMS_ROOT = $(prefix)
|
RTEMS_ROOT ?= $(prefix)
|
||||||
PROJECT_ROOT = $(RTEMS_ROOT)
|
PROJECT_ROOT = $(RTEMS_ROOT)
|
||||||
RTEMS_CUSTOM = $(RTEMS_ROOT)/make/custom/$(RTEMS_BSP).cfg
|
RTEMS_CUSTOM = $(RTEMS_ROOT)/make/custom/$(RTEMS_BSP).cfg
|
||||||
RTEMS_SHARE = $(RTEMS_ROOT)/share/rtems$(RTEMS_API)
|
RTEMS_SHARE = $(RTEMS_ROOT)/share/rtems$(RTEMS_API)
|
||||||
|
|
||||||
RTEMS_USE_OWN_PDIR = no
|
RTEMS_USE_OWN_PDIR = no
|
||||||
RTEMS_HAS_POSIX_API = @RTEMS_HAS_POSIX_API@
|
RTEMS_HAS_POSIX_API = @RTEMS_HAS_POSIX_API@
|
||||||
@@ -49,4 +53,3 @@ RTEMS_HAS_CPLUSPLUS = @RTEMS_HAS_CPLUSPLUS@
|
|||||||
export RTEMS_BSP
|
export RTEMS_BSP
|
||||||
export RTEMS_CUSTOM
|
export RTEMS_CUSTOM
|
||||||
export PROJECT_ROOT
|
export PROJECT_ROOT
|
||||||
|
|
||||||
|
|||||||
@@ -5,11 +5,13 @@
|
|||||||
# Created by Jiri Gaisler, 16-03-97 (who is owed a debt of gratitude
|
# Created by Jiri Gaisler, 16-03-97 (who is owed a debt of gratitude
|
||||||
# for the initial RTEMS autoconf support. Thanks. --joel)
|
# for the initial RTEMS autoconf support. Thanks. --joel)
|
||||||
|
|
||||||
include $(exec_prefix)/$(RTEMS_BSP)/make/target.cfg
|
RTEMS_TARGET = $(RTEMS_CPU)-rtems$(RTEMS_API)
|
||||||
|
|
||||||
|
include $(RTEMS_ROOT)/$(RTEMS_TARGET)/$(RTEMS_BSP)/make/target.cfg
|
||||||
include $(RTEMS_SHARE)/make/host.cfg
|
include $(RTEMS_SHARE)/make/host.cfg
|
||||||
|
|
||||||
include $(RTEMS_ROOT)/make/main.cfg
|
include $(RTEMS_ROOT)/make/main.cfg
|
||||||
include $(exec_prefix)/$(RTEMS_BSP)/make/bsp.cfg
|
include $(RTEMS_ROOT)/$(RTEMS_TARGET)/$(RTEMS_BSP)/make/bsp.cfg
|
||||||
|
|
||||||
## Target compiler config file, if any
|
## Target compiler config file, if any
|
||||||
CONFIG.CC = $(RTEMS_SHARE)/make/compilers/gcc-target-default.cfg
|
CONFIG.CC = $(RTEMS_SHARE)/make/compilers/gcc-target-default.cfg
|
||||||
|
|||||||
@@ -16,9 +16,9 @@ default_target: all
|
|||||||
# but could be overridden in custom files.
|
# but could be overridden in custom files.
|
||||||
#
|
#
|
||||||
|
|
||||||
PROJECT_RELEASE=$(exec_prefix)/$(RTEMS_BSP)
|
PROJECT_RELEASE ?= $(exec_prefix)/$(RTEMS_BSP)
|
||||||
PROJECT_BIN=$(PROJECT_ROOT)/bin
|
PROJECT_BIN = $(PROJECT_ROOT)/bin
|
||||||
PROJECT_INCLUDE=$(PROJECT_RELEASE)/lib/include
|
PROJECT_INCLUDE = $(PROJECT_RELEASE)/lib/include
|
||||||
PROJECT_TOOLS = $(PROJECT_RELEASE)/build-tools
|
PROJECT_TOOLS = $(PROJECT_RELEASE)/build-tools
|
||||||
|
|
||||||
## translate VARIANT into VARIANT_V
|
## translate VARIANT into VARIANT_V
|
||||||
@@ -77,6 +77,6 @@ clean-generic:
|
|||||||
-$(RM) -r $(CLEAN_ADDITIONS)
|
-$(RM) -r $(CLEAN_ADDITIONS)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
.PHONY: $(RECURSE_TARGETS)
|
.PHONY: $(RECURSE_TARGETS)
|
||||||
.PHONY: clean-generic
|
.PHONY: clean-generic
|
||||||
.PHONY: distclean-generic
|
.PHONY: distclean-generic
|
||||||
|
|||||||
Reference in New Issue
Block a user