Changeset 2784 in vbox for trunk/src/VBox/Devices/PC
- Timestamp:
- May 23, 2007 12:10:23 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/PC/BIOS/Makefile.kmk
r2478 r2784 1 1 # $Id$ 2 2 ## @file 3 # PC BIOS makefile.3 # PC BIOS Sub-Makefile. 4 4 # 5 5 … … 20 20 # 21 21 22 DEPTH = ../../../../../ 23 include $(PATH_KBUILD)/header.kmk 22 DEPTH ?= ../../../../../ 23 SUBDEPTH = ../.. 24 include $(PATH_KBUILD)/subheader.kmk 24 25 25 BLDPROGS = biossums 26 LIBRARIES = PcBiosBin PcDefBiosLogo 26 VBOX_PATH_DEVICES_SRC = $(PATH_SUB_ROOT) 27 27 28 OTHERS = $(PATH_TARGET)/bios.bin 28 # 29 # Build program for calculating the PC BIOS checksums. 30 # 31 BLDPROGS += pcbiossums 32 pcbiossums_TEMPLATE = VBOXBLDPROG 33 pcbiossums_SOURCES = biossums.c 29 34 30 OTHER_CLEAN = \ 35 36 # 37 # The library containing the PC BIOS image. 38 # 39 LIBRARIES += PcBiosBin 40 PcBiosBin_TEMPLATE = VBOXR3 41 PcBiosBin_DEFS = IN_VBOXDD2 42 PcBiosBin_INCS = $(VBOX_PATH_DEVICES_SRC) 43 PcBiosBin_SOURCES = $(PATH_TARGET)/PcBiosBin.c 44 $(PATH_TARGET)/PcBiosBin.c_DEPS = $(PATH_TARGET)/pcbios-syms.h 45 PcBiosBin_CLEAN = \ 31 46 $(PATH_TARGET)/_rombios_.c \ 32 47 $(PATH_TARGET)/rombios0.s \ 33 48 $(PATH_TARGET)/rombios1.s \ 34 $(PATH_TARGET)/ bios.lst \35 $(PATH_TARGET)/ bios.tmp \36 $(PATH_TARGET)/ bios.bin \49 $(PATH_TARGET)/pcbios.lst \ 50 $(PATH_TARGET)/pcbios.tmp \ 51 $(PATH_TARGET)/pcbios.bin \ 37 52 $(PATH_TARGET)/PcBiosBin.c \ 38 53 $(PATH_TARGET)/PcDefBiosLogo.c \ 39 $(PATH_TARGET)/bios-syms.h 40 41 TEMPLATE = VBOXBLDPROG 42 biossums_SOURCES = biossums.c 43 44 PcBiosBin_TEMPLATE = VBOXR3 45 PcBiosBin_DEFS = IN_VBOXDD2 46 PcBiosBin_INCS = ../.. 47 PcBiosBin_SOURCES = $(PATH_TARGET)/PcBiosBin.c 48 $(PATH_TARGET)/PcBiosBin.c_DEPS = $(PATH_TARGET)/bios-syms.h 49 50 PcDefBiosLogo_TEMPLATE = VBOXR3 51 PcDefBiosLogo_INCS = ../.. 52 PcDefBiosLogo_SOURCES = $(PATH_TARGET)/PcDefBiosLogo.c 53 54 55 include $(PATH_KBUILD)/footer.kmk 56 54 $(PATH_TARGET)/pcbios-syms.h 57 55 58 56 # 59 57 # Rule for making the bios. 60 58 # 61 $(PATH_TARGET)/PcBiosBin.c: $(PATH_TARGET)/ bios.bin $(VBOX_BIN2C)59 $(PATH_TARGET)/PcBiosBin.c: $(PATH_TARGET)/pcbios.bin $(VBOX_BIN2C) 62 60 $(call MSG_TOOL,bin2c,PcBiosBin,$<,$@) 63 61 $(QUIET)$(VBOX_BIN2C) -min 64 -max 256 -mask 0xffff -ascii -export PcBiosBinary $< $@ 64 62 65 63 # 66 # Rule for making the bios logo. 67 # 68 $(PATH_TARGET)/PcDefBiosLogo.c: innotek_logo.bmp $(VBOX_BIN2C) 69 $(call MSG_TOOL,bin2c,PcBiosBin,$<,$@) 70 $(QUIET)$(VBOX_BIN2C) -max 64 PcDefBiosLogo $< $@ 71 72 # 73 # Six steps to bios.bin and bios-syms.h 64 # Six steps to pcbios.bin and pcbios-syms.h 74 65 # 75 66 76 67 # 1. precompile rombios.c 77 $(PATH_TARGET)/_rombios_.c: rombios.c logo.capmbios.S | $(call DIRDEP,$(TARGET_PATH))68 $(PATH_TARGET)/_rombios_.c: $(PATH_SUB_CURRENT)/rombios.c $(PATH_SUB_CURRENT)/logo.c $(PATH_SUB_CURRENT)/apmbios.S | $(call DIRDEP,$(TARGET_PATH)) 78 69 $(call MSG_TOOL,cpp,PcBiosBin,$<,$@) 79 $(QUIET)$(TOOL_$(VBOX_GCC_TOOL)_CC) -E -I$(PATH_TARGET) -I$( PATH_CURRENT)/..-I$(PATH_ROOT)/include -I$(PATH_OUT) -DBX_SMP_PROCESSORS=1 -DVBOX $(addprefix -D,$(DEFS) $(DEFS.$(BUILD_TYPE))) -P $< > $@70 $(QUIET)$(TOOL_$(VBOX_GCC_TOOL)_CC) -E -I$(PATH_TARGET) -I$(VBOX_PATH_DEVICES_SRC)/PC -I$(PATH_ROOT)/include -I$(PATH_OUT) -DBX_SMP_PROCESSORS=1 -DVBOX $(addprefix -D,$(DEFS) $(DEFS.$(BUILD_TYPE))) -P $< > $@ 80 71 81 72 # 2. compile to intermediate asm file. … … 90 81 91 82 # 4. assemble the intermediate asm file. (also creates a listing rombios.lst) 92 $(PATH_TARGET)/ bios.tmp $(PATH_TARGET)/bios.lst: $(PATH_TARGET)/rombios1.s83 $(PATH_TARGET)/pcbios.tmp $(PATH_TARGET)/pcbios.lst: $(PATH_TARGET)/rombios1.s 93 84 $(call MSG_COMPILE,PcBiosBin,$<,$@,AS) 94 $(QUIET)$(VBOX_AS86) -b $(PATH_TARGET)/ bios.tmp -u- -w- -g -0 -j -O -l $(PATH_TARGET)/bios.lst - < $^85 $(QUIET)$(VBOX_AS86) -b $(PATH_TARGET)/pcbios.tmp -u- -w- -g -0 -j -O -l $(PATH_TARGET)/pcbios.lst - < $^ 95 86 96 87 # 5. calculate checksums for the final BIOS image. 97 $(PATH_TARGET)/ bios.bin: $(PATH_TARGET)/bios.tmp $(TARGET_biossums)98 $(call MSG_TOOL, biossums,PcBiosBin,$<,$@)99 $(QUIET)$(CP) -f $(PATH_TARGET)/ bios.tmp $(PATH_TARGET)/bios.bin100 $(QUIET)$(TARGET_ biossums) $(PATH_TARGET)/bios.bin88 $(PATH_TARGET)/pcbios.bin: $(PATH_TARGET)/pcbios.tmp $$(TARGET_pcbiossums) 89 $(call MSG_TOOL,pcbiossums,PcBiosBin,$<,$@) 90 $(QUIET)$(CP) -f $(PATH_TARGET)/pcbios.tmp $(PATH_TARGET)/pcbios.bin 91 $(QUIET)$(TARGET_pcbiossums) $(PATH_TARGET)/pcbios.bin 101 92 102 93 # 6. create the symbol table. 103 $(PATH_TARGET)/ bios-syms.h: $(PATH_TARGET)/bios.lst Makefile.kmk104 $(call MSG_ TOOL,symtable,PcBiosBin,$<,$@)94 $(PATH_TARGET)/pcbios-syms.h: $(PATH_TARGET)/pcbios.lst $(MAKEFILE_CURRENT) 95 $(call MSG_GENERATE,PcBiosBin,$<,$@) 105 96 $(QUIET)$(SED) \ 106 97 -e '/^[0-9][0-9][0-9][0-9][0-9] 000[0-9A-F]* [[:space:]]*[a-zA-Z0-9_]*:/!d' \ 107 98 -e 's/^[0-9][0-9][0-9][0-9][0-9] \(000[0-9A-F]*\) [[:space:]]*\([a-zA-Z0-9_]*\):.*$$/ DEFSYM(0x\1, "\2"),/' \ 108 $(PATH_TARGET)/ bios.lst > $@99 $(PATH_TARGET)/pcbios.lst > $@ 109 100 101 102 # 103 # The PC BIOS Logo. 104 # 105 LIBRARIES += PcDefBiosLogo 106 PcDefBiosLogo_TEMPLATE = VBOXR3 107 PcDefBiosLogo_INCS = $(VBOX_PATH_DEVICES_SRC) 108 PcDefBiosLogo_SOURCES = $(PATH_TARGET)/PcDefBiosLogo.c 109 110 # 111 # Rule for making the bios logo. 112 # 113 $(PATH_TARGET)/PcDefBiosLogo.c: $(PATH_SUB_CURRENT)/innotek_logo.bmp $(VBOX_BIN2C) 114 $(call MSG_TOOL,bin2c,PcBiosBin,$<,$@) 115 $(QUIET)$(VBOX_BIN2C) -max 64 PcDefBiosLogo $< $@ 116 117 118 include $(PATH_KBUILD)/subfooter.kmk 119
Note:
See TracChangeset
for help on using the changeset viewer.