genode/repos/base/src/core/target.inc
Stefan Kalkowski a1e70b9ba4 kernel: differentiate board-specific components
Components like kernel, core, and bootstrap that are built for a
specific board need to reside inside the same architectural dependent
build directory. For instance there are sel4, foc, and hw kernel builds
for imx6q_sabrelite and imx7d_sabre, which have to reside inside the same
arm_v7 build directory.
This commit names those components explicitely, and adapts the run-tool to it.

Fix #3316
2019-05-27 14:46:52 +02:00

28 lines
653 B
PHP

TARGET ?= core
CORE_OBJ ?= core.o
$(TARGET):
@true
ifneq ($(INSTALL_DIR),)
ifneq ($(DEBUG_DIR),)
$(TARGET): $(INSTALL_DIR)/$(CORE_OBJ) $(DEBUG_DIR)/$(CORE_OBJ)
$(CORE_OBJ).stripped: $(CORE_OBJ)
$(VERBOSE)$(STRIP) --strip-debug -o $@ $<
$(INSTALL_DIR)/$(CORE_OBJ) : $(CORE_OBJ).stripped
$(VERBOSE)ln -sf $(CURDIR)/$< $(INSTALL_DIR)/$(CORE_OBJ)
$(DEBUG_DIR)/$(CORE_OBJ) : $(CORE_OBJ)
$(VERBOSE)ln -sf $(CURDIR)/$< $(DEBUG_DIR)/$(CORE_OBJ)
endif
endif
.PHONY: $(CORE_OBJ)
$(CORE_OBJ):
$(VERBOSE)$(LD) $(LD_MARCH) -u _start --whole-archive -r $(LINK_ITEMS) $(LIBCXX_GCC) -o $@
clean cleanall:
$(VERBOSE)rm -f $(CORE_OBJ) $(CORE_OBJ).stripped