Browse Source

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

bin/%.bin target.
tags/v0.9.3
Michael Brown 17 years ago
parent
commit
37fa9a8706
2 changed files with 11 additions and 3 deletions
  1. 1
    0
      src/Makefile
  2. 10
    3
      src/Makefile.housekeeping

+ 1
- 0
src/Makefile View File

73
 RM		?= rm -f
73
 RM		?= rm -f
74
 TOUCH		?= touch
74
 TOUCH		?= touch
75
 MKDIR		?= mkdir
75
 MKDIR		?= mkdir
76
+CP		?= cp
76
 PERL		?= /usr/bin/perl
77
 PERL		?= /usr/bin/perl
77
 CC		?= $(CROSS_COMPILE)gcc
78
 CC		?= $(CROSS_COMPILE)gcc
78
 AS		?= $(CROSS_COMPILE)as
79
 AS		?= $(CROSS_COMPILE)as

+ 10
- 3
src/Makefile.housekeeping View File

307
 $(BIN)/%.map : $(BIN)/%.tmp
307
 $(BIN)/%.map : $(BIN)/%.tmp
308
 	@less $(BIN)/$*.tmp.map
308
 	@less $(BIN)/$*.tmp.map
309
 
309
 
310
+# Build raw binary file from intermediate object file
311
+#
312
+$(BIN)/%.bin : $(BIN)/%.tmp
313
+	$(QM)echo "  [BIN] $@"
314
+	$(Q)$(OBJCOPY) -O binary $< $@
315
+
310
 # Build bochs symbol table
316
 # Build bochs symbol table
311
 $(BIN)/%.bxs : $(BIN)/%.tmp
317
 $(BIN)/%.bxs : $(BIN)/%.tmp
312
 	$(NM) $< | cut -d" " -f1,3 > $@
318
 	$(NM) $< | cut -d" " -f1,3 > $@
350
 	@$(MKDIR) -p $(dir $(2))
356
 	@$(MKDIR) -p $(dir $(2))
351
 	@$(RM) $(2)
357
 	@$(RM) $(2)
352
 	@$(TOUCH) $(2)
358
 	@$(TOUCH) $(2)
353
-	@echo -e '$$(BIN)/%$(1) : $$(BIN)/%$(1).tmp' \
354
-		  '\n\t$$(OBJCOPY) -O binary $$< $$@' \
355
-		  '\n\t$$(FINALISE_$(1))' \
359
+	@echo -e '$$(BIN)/%$(1) : $$(BIN)/%$(1).bin' \
360
+		  '\n\t$$(QM)echo "  [FINISH] $$@"' \
361
+		  '\n\t$$(Q)$$(CP) $$< $$@' \
362
+		  '\n\t$$(Q)$$(FINALISE_$(1))' \
356
 		> $(2)
363
 		> $(2)
357
 
364
 
358
 endef
365
 endef

Loading…
Cancel
Save