Build-system support for ported 3rd-party code
The new 'select_from_ports' function allows a target description file to query the path to an installed port. All ports are stored in a central location specified as CONTRIB_DIR. By default, CONTRIB_DIR is defined as '<genode-dir>/contrib'. Ports of 3rd-party source code are managed using the tools at '<genode-dir>/tool/ports/'. Issue #1082
This commit is contained in:
@@ -61,6 +61,8 @@ GENODE_DIR ?= $(realpath $(dir $(MAKEFILE_LIST))/..)
|
||||
#
|
||||
BUILD_DIR ?= $(GENODE_DIR)/build/$(PLATFORM)
|
||||
|
||||
SHELL := bash
|
||||
|
||||
ifneq ($(wildcard $(BUILD_DIR)),)
|
||||
$(PLATFORM):: build_dir_already_exists
|
||||
build_dir_already_exists:
|
||||
@@ -75,6 +77,18 @@ endif
|
||||
#
|
||||
GENODE_ABS_DIR := $(realpath $(shell echo $(GENODE_DIR)))
|
||||
|
||||
#
|
||||
# Define absolute path to the contrib directory as written to the
|
||||
# 'etc/build.conf' file. We use 'abs_path' instead of 'realpath' because the
|
||||
# contrib directory may not exist when the build directory is created. In this
|
||||
# case, 'realpath' would return an empty string.
|
||||
#
|
||||
ifeq ($(CONTRIB_DIR),)
|
||||
CONTRIB_ABS_DIR := $$(GENODE_DIR)/contrib
|
||||
else
|
||||
CONTRIB_ABS_DIR := $(abspath $(shell echo $(CONTRIB_DIR)))
|
||||
endif
|
||||
|
||||
#
|
||||
# Generic build-directory preparation rules
|
||||
#
|
||||
@@ -87,6 +101,7 @@ $(BUILD_DIR)/etc:
|
||||
$(BUILD_DIR)/etc/build.conf:: $(BUILD_CONF_PLATFORM)
|
||||
@echo "GENODE_DIR = $(GENODE_ABS_DIR)" > $@
|
||||
@echo 'BASE_DIR = $$(GENODE_DIR)/repos/base' >> $@
|
||||
@echo 'CONTRIB_DIR = $(CONTRIB_ABS_DIR)' >> $@
|
||||
|
||||
#
|
||||
# Supply -no-kvm argument to Qemu for kernels that are incompatible with KVM
|
||||
|
||||
Reference in New Issue
Block a user