VirtualBox

Changeset 2784 in vbox for trunk/src/VBox/Devices/PC


Ignore:
Timestamp:
May 23, 2007 12:10:23 AM (18 years ago)
Author:
vboxsync
Message:

Converted to sub-makefiles.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/PC/BIOS/Makefile.kmk

    r2478 r2784  
    11# $Id$
    22## @file
    3 # PC BIOS makefile.
     3# PC BIOS Sub-Makefile.
    44#
    55
     
    2020#
    2121
    22 DEPTH = ../../../../../
    23 include $(PATH_KBUILD)/header.kmk
     22DEPTH ?= ../../../../../
     23SUBDEPTH = ../..
     24include $(PATH_KBUILD)/subheader.kmk
    2425
    25 BLDPROGS    = biossums
    26 LIBRARIES   = PcBiosBin PcDefBiosLogo
     26VBOX_PATH_DEVICES_SRC = $(PATH_SUB_ROOT)
    2727
    28 OTHERS      = $(PATH_TARGET)/bios.bin
     28#
     29# Build program for calculating the PC BIOS checksums.
     30#
     31BLDPROGS += pcbiossums
     32pcbiossums_TEMPLATE = VBOXBLDPROG
     33pcbiossums_SOURCES  = biossums.c
    2934
    30 OTHER_CLEAN = \
     35
     36#
     37# The library containing the PC BIOS image.
     38#
     39LIBRARIES += PcBiosBin
     40PcBiosBin_TEMPLATE  = VBOXR3
     41PcBiosBin_DEFS      = IN_VBOXDD2
     42PcBiosBin_INCS      = $(VBOX_PATH_DEVICES_SRC)
     43PcBiosBin_SOURCES   = $(PATH_TARGET)/PcBiosBin.c
     44$(PATH_TARGET)/PcBiosBin.c_DEPS = $(PATH_TARGET)/pcbios-syms.h
     45PcBiosBin_CLEAN     = \
    3146        $(PATH_TARGET)/_rombios_.c \
    3247        $(PATH_TARGET)/rombios0.s \
    3348        $(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 \
    3752        $(PATH_TARGET)/PcBiosBin.c \
    3853        $(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
    5755
    5856#
    5957# Rule for making the bios.
    6058#
    61 $(PATH_TARGET)/PcBiosBin.c: $(PATH_TARGET)/bios.bin $(VBOX_BIN2C)
     59$(PATH_TARGET)/PcBiosBin.c: $(PATH_TARGET)/pcbios.bin $(VBOX_BIN2C)
    6260        $(call MSG_TOOL,bin2c,PcBiosBin,$<,$@)
    6361        $(QUIET)$(VBOX_BIN2C) -min 64 -max 256 -mask 0xffff -ascii -export PcBiosBinary $< $@
    6462
    6563#
    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
    7465#
    7566
    7667# 1. precompile rombios.c
    77 $(PATH_TARGET)/_rombios_.c: rombios.c logo.c apmbios.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))
    7869        $(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 $< > $@
    8071
    8172# 2. compile to intermediate asm file.
     
    9081
    9182# 4. assemble the intermediate asm file. (also creates a listing rombios.lst)
    92 $(PATH_TARGET)/bios.tmp $(PATH_TARGET)/bios.lst: $(PATH_TARGET)/rombios1.s
     83$(PATH_TARGET)/pcbios.tmp $(PATH_TARGET)/pcbios.lst: $(PATH_TARGET)/rombios1.s
    9384        $(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 - < $^
    9586
    9687# 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.bin
    100         $(QUIET)$(TARGET_biossums) $(PATH_TARGET)/bios.bin
     88$(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
    10192
    10293# 6. create the symbol table.
    103 $(PATH_TARGET)/bios-syms.h: $(PATH_TARGET)/bios.lst Makefile.kmk
    104         $(call MSG_TOOL,symtable,PcBiosBin,$<,$@)
     94$(PATH_TARGET)/pcbios-syms.h: $(PATH_TARGET)/pcbios.lst $(MAKEFILE_CURRENT)
     95        $(call MSG_GENERATE,PcBiosBin,$<,$@)
    10596        $(QUIET)$(SED) \
    10697                -e  '/^[0-9][0-9][0-9][0-9][0-9]                       000[0-9A-F]*            [[:space:]]*[a-zA-Z0-9_]*:/!d' \
    10798                -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 > $@
    109100
     101
     102#
     103# The PC BIOS Logo.
     104#
     105LIBRARIES += PcDefBiosLogo
     106PcDefBiosLogo_TEMPLATE  = VBOXR3
     107PcDefBiosLogo_INCS      = $(VBOX_PATH_DEVICES_SRC)
     108PcDefBiosLogo_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
     118include $(PATH_KBUILD)/subfooter.kmk
     119
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette