2014-06-06, 02:31
Code:
# List of embedded images included in the last build of embedded.o.
# This is needed in order to correctly rebuild embedded.o whenever the
# list of objects changes.
#
EMBED := $(EMBEDDED_IMAGE) # Maintain backwards compatibility
EMBEDDED_LIST := $(BIN)/.embedded.list
ifeq ($(wildcard $(EMBEDDED_LIST)),)
EMBED_OLD := <invalid>
else
EMBED_OLD := $(shell cat $(EMBEDDED_LIST))
endif
ifneq ($(EMBED_OLD),$(EMBED))
$(shell $(ECHO) "$(EMBED)" > $(EMBEDDED_LIST))
endif
$(EMBEDDED_LIST) : $(MAKEDEPS)
VERYCLEANUP += $(EMBEDDED_LIST)
EMBEDDED_FILES := $(subst $(COMMA), ,$(EMBED))
EMBED_ALL := $(foreach i,$(call seq,1,$(words $(EMBEDDED_FILES))),\
EMBED ( $(i), \"$(word $(i), $(EMBEDDED_FILES))\",\
\"$(notdir $(word $(i),$(EMBEDDED_FILES)))\" ))
embedded_DEPS += $(EMBEDDED_FILES) $(EMBEDDED_LIST)
CFLAGS_embedded = -DEMBED_ALL="$(EMBED_ALL)"
I don't know the ture meaning of "embedded images". I suppose that "embedded images" is the disk img (such as grldr, ipxe.lkrn or PE.iso) or otherwise meanings.