mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-23 23:42:32 +00:00
build system: support for CUSTOM_TARGET_DEPS
This commit is contained in:
parent
99f4b3cd07
commit
f3f8d9a6de
@ -362,6 +362,20 @@ in its 'LIBS' declaration and refers to the tools relative to
|
||||
'$(BUILD_BASE_DIR)'.
|
||||
|
||||
|
||||
Building additional custom targets accompanying library or program
|
||||
==================================================================
|
||||
|
||||
There are cases when it is important to build additional targets
|
||||
besides standard files built for library or program. Of course there
|
||||
is no problem with writing specific make rules for commands that
|
||||
generate those target files but for them to be built a proper
|
||||
dependency must be specified. To achieve it those additional targets
|
||||
should be added to 'CUSTOM_TARGET_DEPS' variable like e.g. in
|
||||
iwl_firmware library from dde_linux repository:
|
||||
|
||||
! CUSTOM_TARGET_DEPS += $(addprefix $(BIN_DIR)/,$(IMAGES))
|
||||
|
||||
|
||||
Automated integration and testing
|
||||
#################################
|
||||
|
||||
|
@ -165,6 +165,11 @@ all: $(LIB_TAG)
|
||||
#
|
||||
$(LIB_TAG) $(OBJECTS): $(HOST_TOOLS)
|
||||
|
||||
#
|
||||
# Trigger build of additional library specific targets
|
||||
#
|
||||
$(LIB_TAG): $(CUSTOM_TARGET_DEPS)
|
||||
|
||||
$(LIB_TAG): $(LIB_A) $(LIB_SO) $(LIB_CHECKED) $(ABI_SO) $(INSTALL_SO) $(DEBUG_SO)
|
||||
@touch $@
|
||||
|
||||
|
@ -180,6 +180,11 @@ LINK_ITEMS_BRIEF := $(subst $(LIB_CACHE_DIR),$$libs,$(LINK_ITEMS))
|
||||
#
|
||||
$(LINK_ITEMS) $(TARGET): $(HOST_TOOLS)
|
||||
|
||||
#
|
||||
# Trigger build of additional program specific targets
|
||||
#
|
||||
$(TARGET): $(CUSTOM_TARGET_DEPS)
|
||||
|
||||
LD_CMD += -Wl,--whole-archive -Wl,--start-group
|
||||
LD_CMD += $(LINK_ITEMS_BRIEF)
|
||||
LD_CMD += $(EXT_OBJECTS)
|
||||
|
Loading…
Reference in New Issue
Block a user