Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Split the objcopy stage out of final image preparation to a separate
bin/%.bin target.
  • Loading branch information
Michael Brown committed Jul 16, 2007
1 parent 6d2e4e7 commit 37fa9a8
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/Makefile
Expand Up @@ -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
Expand Down
13 changes: 10 additions & 3 deletions src/Makefile.housekeeping
Expand Up @@ -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 > $@
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 37fa9a8

Please sign in to comment.