2
0
mirror of https://github.com/xcat2/xNBA.git synced 2024-12-13 23:01:31 +00:00

Split the objcopy stage out of final image preparation to a separate

bin/%.bin target.
This commit is contained in:
Michael Brown 2007-07-16 13:41:27 +01:00
parent 6d2e4e719c
commit 37fa9a8706
2 changed files with 11 additions and 3 deletions

View File

@ -73,6 +73,7 @@ CPP ?= gcc -E -Wp,-Wall
RM ?= rm -f
TOUCH ?= touch
MKDIR ?= mkdir
CP ?= cp
PERL ?= /usr/bin/perl
CC ?= $(CROSS_COMPILE)gcc
AS ?= $(CROSS_COMPILE)as

View File

@ -307,6 +307,12 @@ $(BIN)/%.tmp : $(BLIB) $(MAKEDEPS) $(LDSCRIPT)
$(BIN)/%.map : $(BIN)/%.tmp
@less $(BIN)/$*.tmp.map
# Build raw binary file from intermediate object file
#
$(BIN)/%.bin : $(BIN)/%.tmp
$(QM)echo " [BIN] $@"
$(Q)$(OBJCOPY) -O binary $< $@
# Build bochs symbol table
$(BIN)/%.bxs : $(BIN)/%.tmp
$(NM) $< | cut -d" " -f1,3 > $@
@ -350,9 +356,10 @@ define media_template
@$(MKDIR) -p $(dir $(2))
@$(RM) $(2)
@$(TOUCH) $(2)
@echo -e '$$(BIN)/%$(1) : $$(BIN)/%$(1).tmp' \
'\n\t$$(OBJCOPY) -O binary $$< $$@' \
'\n\t$$(FINALISE_$(1))' \
@echo -e '$$(BIN)/%$(1) : $$(BIN)/%$(1).bin' \
'\n\t$$(QM)echo " [FINISH] $$@"' \
'\n\t$$(Q)$$(CP) $$< $$@' \
'\n\t$$(Q)$$(FINALISE_$(1))' \
> $(2)
endef