VirtualBox

Changeset 2517 in vbox for trunk/src/VBox/VMM


Ignore:
Timestamp:
May 5, 2007 3:08:03 AM (18 years ago)
Author:
vboxsync
Message:

Converted to sub-makefile.

Location:
trunk/src/VBox/VMM
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/Makefile.kmk

    r2482 r2517  
    11# $Id$
    22## @file
    3 # Makefile for the VMM.
     3# Top-level makefile for the VMM.
    44#
    55
     
    2121
    2222DEPTH = ../../..
    23 include $(PATH_KBUILD)/header.kmk
    24 
    25 LIBRARIES       = VMMR3
    26 ifneq ($(BUILD_TARGET),darwin)
    27 LIBRARIES      += VMMGCBuiltin VMMGCImp VMMR0Imp
    28 endif
    29 SYSMODS         = VMMGC VMMR0
    30 DLLS            = VBoxVMM
    31 
    32 # Walk
    33 SUBDIRS_AFTER_BINARIES = testcase
    34 SUBDIRS_AFTER_OTHERS   = testcase
    35 SUBDIRS_AFTER_CLEAN    = testcase
    36 SUBDIRS_AFTER_NOTHING  = testcase
    37 
     23include $(PATH_KBUILD)/subheader.kmk
     24
     25## @todo get rid of these.
    3826# Enable the PDM lock.
    3927#DEFS += VBOX_WITH_PDM_LOCK
     
    4230endif
    4331
     32# Include sub-makefiles.
     33include $(PATH_SUB_CURRENT)/testcase/Makefile.kmk
     34
    4435
    4536#
    4637# VMMR3.dll
    4738#
     39LIBRARIES += VMMR3
     40
    4841VMMR3_TEMPLATE  = VBOXR3
    4942VMMR3_DEFS      = IN_VMM_R3  IN_PDM_R3  IN_CFGM_R3 IN_IOM_R3  IN_VM_R3   IN_CPUM_R3 IN_SELM_R3 IN_PGM_R3 IN_TRPM_R3 IN_MM_R3 IN_DBG_R3 \
     
    5447 endif
    5548endif               
    56 VMMR3_INCS      := \
     49VMMR3_INCS     := \
    5750        PATM \
    5851        $(PATH_SUB_CURRENT)
     
    146139
    147140#
     141# The VMM DLL.
     142#
     143DLLS += VBoxVMM
     144VBoxVMM_TEMPLATE = VBOXR3
     145VBoxVMM_DEFS     = $(VMMR3_DEFS)
     146VBoxVMM_SOURCES  = VBoxVMMDeps.cpp
     147VBoxVMM_SONAME.linux = VBoxVMM.so
     148
     149VBoxVMM_LIBS     = \
     150        $(PATH_LIB)/VMMR3$(VBOX_SUFF_LIB) \
     151        $(PATH_LIB)/Debugger$(VBOX_SUFF_LIB) \
     152        $(PATH_LIB)/DisasmR3$(VBOX_SUFF_LIB) \
     153        $(LIB_REM) \
     154        $(LIB_RUNTIME)
     155
     156VBoxVMM_LIBS.win = $(PATH_TOOL_$(VBOX_VCC_TOOL)_LIB)/delayimp.lib
     157VBoxVMM_LDFLAGS.win = /DELAYLOAD:dbghelp.dll
     158VBoxVMM_LDFLAGS.linux = -Wl,--no-undefined
     159VBoxVMM_LDFLAGS.darwin = -install_name @executable_path/VBoxVMM.dylib
     160
     161
     162#
    148163# VMMGCBuiltin.lib
    149164#
     165ifneq ($(BUILD_TARGET),darwin)
     166LIBRARIES += VMMGCBuiltin
    150167VMMGCBuiltin_TEMPLATE = VBOXGC
    151168ifeq ($(VBOX_LDR_FMT32),pe)
     
    158175        $(MV) -f [email protected] $@
    159176endif
     177endif # !darwin
     178
    160179
    161180#
    162181# VMMGCImp.lib
    163182#
     183ifneq ($(BUILD_TARGET),darwin)
     184LIBRARIES += VMMGCImp
    164185VMMGCImp_TEMPLATE = VBOXGC
    165186ifeq ($(VBOX_LDR_FMT32),pe)
     
    174195        $(MV) -f [email protected] $@
    175196endif
     197endif # !darwin
     198
    176199
    177200#
    178201# VMMR0Imp.lib
    179202#
     203ifneq ($(BUILD_TARGET),darwin)
     204LIBRARIES += VMMR0Imp
    180205VMMR0Imp_TEMPLATE = VBOXR0
    181206ifeq ($(VBOX_LDR_FMT),pe)
     
    190215        $(MV) -f [email protected] $@
    191216endif
     217endif # !darwin
     218
    192219
    193220#
    194221# VMMGC.gc
    195222#
     223SYSMODS += VMMGC
    196224VMMGC_TEMPLATE  = VBOXGC
    197225VMMGC_INCS     := \
     
    276304# VMMR0.r0
    277305#
     306SYSMODS += VMMR0
    278307VMMR0_TEMPLATE  = VBOXR0
    279308VMMR0_INCS     := \
     
    350379
    351380
    352 #
    353 # The VMM DLL.
    354 #
    355 VBoxVMM_TEMPLATE = VBOXR3
    356 VBoxVMM_DEFS     = $(VMMR3_DEFS)
    357 VBoxVMM_SOURCES  = VBoxVMMDeps.cpp
    358 VBoxVMM_SONAME.linux = VBoxVMM.so
    359 
    360 VBoxVMM_LIBS     = \
    361         $(PATH_LIB)/VMMR3$(VBOX_SUFF_LIB) \
    362         $(PATH_LIB)/Debugger$(VBOX_SUFF_LIB) \
    363         $(PATH_LIB)/DisasmR3$(VBOX_SUFF_LIB) \
    364         $(LIB_REM) \
    365         $(LIB_RUNTIME)
    366 
    367 VBoxVMM_LIBS.win = $(PATH_TOOL_$(VBOX_VCC_TOOL)_LIB)/delayimp.lib
    368 VBoxVMM_LDFLAGS.win = /DELAYLOAD:dbghelp.dll
    369 VBoxVMM_LDFLAGS.linux = -Wl,--no-undefined
    370 VBoxVMM_LDFLAGS.darwin = -install_name @executable_path/VBoxVMM.dylib
    371 
    372 include $(PATH_KBUILD)/footer.kmk
     381include $(PATH_KBUILD)/subfooter.kmk
    373382
    374383
  • trunk/src/VBox/VMM/testcase/Makefile.kmk

    r2478 r2517  
    11# $Id$
    22## @file
    3 # Makefile for the VMM testcases.
     3# Sub-Makefile for the VMM testcases.
    44#
    55
     
    2020#
    2121
    22 DEPTH = ../../../..
    23 include $(PATH_KBUILD)/header.kmk
     22DEPTH ?= ../../../..
     23SUB_DEPTH = ..
     24include $(PATH_KBUILD)/subheader.kmk
    2425
    2526#
    2627# Target lists.
    2728#
    28 PROGRAMS        = tstVMStructSize tstVMStructGC tstAsmStructs tstAsmStructsGC tstVMM tstVMM-HwAccm
     29PROGRAMS   += tstVMStructSize tstVMStructGC tstAsmStructs tstAsmStructsGC tstVMM tstVMM-HwAccm
    2930ifdef VBOX_WITH_TESTCASES
    30  PROGRAMS       += tstCFGM tstSSM tstMMHyperHeap tstVMM-2 tstVMREQ tstMicro tstCompiler tstVMMR0CallHost-1
     31 PROGRAMS  += tstCFGM tstSSM tstMMHyperHeap tstVMM-2 tstVMREQ tstMicro tstCompiler tstVMMR0CallHost-1
    3132 ifneq ($(BUILD_TARGET),l4)
    32   PROGRAMS      += tstAnimate
     33  PROGRAMS += tstAnimate
    3334 endif
    34  SYSMODS         = tstMicroGC
     35 SYSMODS   += tstMicroGC
    3536endif # VBOX_WITH_TESTCASES
    3637
     
    5758
    5859#
    59 # Globals.
    60 #
    61 TEMPLATE = VBOXR3TSTEXE
     60# Globals
     61#
     62VBOX_PATH_VMM_SRC = $(PATH_SUB_ROOT)
    6263
    6364#
     
    6768tstVMStructGC_DEFS      = IN_VMM_GC IN_PDM_GC IN_CFGM_GC IN_IOM_GC IN_VM_GC IN_CPUM_GC IN_SELM_GC IN_PGM_GC IN_TRPM_GC IN_MM_GC IN_PDM_GC IN_DBGF_GC IN_PATM_GC IN_DIS_GC IN_STAM_GC IN_VGADEVICE_GC IN_CSAM_GC IN_SSM_GC IN_REM_GC IN_RRM_GC
    6869tstVMStructGC_SOURCES   = tstVMStructGC.cpp
    69 tstVMStructGC_INCS      = .. ../PATM
    70 
     70tstVMStructGC_INCS      = $(VBOX_PATH_VMM_SRC) $(VBOX_PATH_VMM_SRC)/PATM
     71
     72tstVMStructSize_TEMPLATE= VBOXR3TSTEXE
    7173tstVMStructSize_DEFS    = IN_VMM_R3 IN_PDM_R3 IN_CFGM_R3 IN_IOM_R3 IN_VM_R3 IN_CPUM_R3 IN_SELM_R3 IN_PGM_R3 IN_TRPM_R3 IN_MM_R3 IN_PDM_R3 IN_DBGF_R3 IN_PATM_R3 IN_DIS_R3 IN_STAM_R3 IN_VGADEVICE_R3 IN_CSAM_R3 IN_SSM_R3 IN_REM_R3
    72 tstVMStructSize_INCS    = .. ../PATM $(PATH_TARGET)
     74tstVMStructSize_INCS    = $(VBOX_PATH_VMM_SRC) $(VBOX_PATH_VMM_SRC)/PATM $(PATH_TARGET)
    7375tstVMStructSize_SOURCES = tstVMStructSize.cpp
    7476tstVMStructSize_LIBS.l4 = $(LIB_RUNTIME)
    7577tstVMStructSize.cpp_DEPS= $(PATH_TARGET)/tstVMStructGC.h
    7678
     79tstAsmStructs_TEMPLATE  = VBOXR3TSTEXE
    7780tstAsmStructs_DEFS      = IN_VMM_R3 IN_PDM_R3 IN_CFGM_R3 IN_IOM_R3 IN_VM_R3 IN_CPUM_R3 IN_SELM_R3 IN_PGM_R3 IN_TRPM_R3 IN_MM_R3 IN_PDM_R3 IN_DBGF_R3 IN_PATM_R3 IN_DIS_R3 IN_STAM_R3 IN_VGADEVICE_R3 IN_CSAM_R3 IN_SSM_R3
    78 tstAsmStructs_INCS      = .. $(PATH_TARGET)
     81tstAsmStructs_INCS      = $(VBOX_PATH_VMM_SRC) $(PATH_TARGET)
    7982tstAsmStructs_SOURCES   = tstAsmStructs.cpp
    8083tstAsmStructs_LIBS.l4   = $(LIB_RUNTIME)
     
    8285tstAsmStructsGC_TEMPLATE= VBOXGCEXE
    8386tstAsmStructsGC_DEFS    = IN_VMM_GC IN_PDM_GC IN_CFGM_GC IN_IOM_GC IN_VM_GC IN_CPUM_GC IN_SELM_GC IN_PGM_GC IN_TRPM_GC IN_MM_GC IN_PDM_GC IN_DBGF_GC IN_PATM_GC IN_DIS_GC IN_STAM_GC IN_VGADEVICE_GC IN_CSAM_GC IN_SSM_GC IN_RRM_GC
    84 tstAsmStructsGC_INCS    = .. $(PATH_TARGET)
     87tstAsmStructsGC_INCS    = $(VBOX_PATH_VMM_SRC) $(PATH_TARGET)
    8588tstAsmStructsGC_SOURCES = tstAsmStructs.cpp
    8689
     
    8891
    8992
     93tstMMHyperHeap_TEMPLATE = VBOXR3TSTEXE
    9094tstMMHyperHeap_SOURCES  = tstMMHyperHeap.cpp
    9195tstMMHyperHeap_LIBS     = $(LIB_VMM) $(LIB_REM) $(LIB_RUNTIME)
    9296
     97tstSSM_TEMPLATE         = VBOXR3TSTEXE
    9398tstSSM_SOURCES          = tstSSM.cpp
    9499tstSSM_LIBS             = $(LIB_VMM) $(LIB_REM) $(LIB_RUNTIME)
    95100
     101tstCFGM_TEMPLATE        = VBOXR3TSTEXE
    96102tstCFGM_SOURCES         = tstCFGM.cpp
    97103tstCFGM_LIBS            = $(LIB_VMM) $(LIB_REM) $(LIB_RUNTIME)
    98104
     105tstVMM_TEMPLATE         = VBOXR3EXE
    99106tstVMM_SOURCES          = tstVMM.cpp
    100 tstVMM_TEMPLATE         = VBOXR3EXE
    101107tstVMM_LIBS             = $(LIB_VMM) $(LIB_REM) $(LIB_RUNTIME)
    102108
     109tstVMM-HwAccm_TEMPLATE  = VBOXR3EXE
    103110tstVMM-HwAccm_SOURCES   = tstVMM-HwAccm.cpp
    104 tstVMM-HwAccm_TEMPLATE  = VBOXR3EXE
    105111tstVMM-HwAccm_LIBS      = $(LIB_VMM) $(LIB_REM) $(LIB_RUNTIME)
    106112
     113tstVMM-2_TEMPLATE       = VBOXR3EXE
    107114tstVMM-2_SOURCES        = tstVMM-2.cpp
    108 tstVMM-2_TEMPLATE       = VBOXR3EXE
    109115tstVMM-2_LIBS           = $(LIB_VMM) $(LIB_REM) $(LIB_RUNTIME)
    110116
    111117tstVMMR0CallHost-1_TEMPLATE = VBOXR3EXE
    112 tstVMMR0CallHost-1_INCS  = ..
    113 tstVMMR0CallHost-1_SOURCES  = \
     118tstVMMR0CallHost-1_INCS  = $(VBOX_PATH_VMM_SRC)
     119tstVMMR0CallHost-1_SOURCES = \
    114120        tstVMMR0CallHost-1.cpp \
    115         ../VMMR0/VMMR0A.asm
    116 tstVMMR0CallHost-1_LIBS     = $(LIB_VMM) $(LIB_REM) $(LIB_RUNTIME)
    117 
     121        $(VBOX_PATH_VMM_SRC)/VMMR0/VMMR0A.asm
     122tstVMMR0CallHost-1_LIBS  = $(LIB_VMM) $(LIB_REM) $(LIB_RUNTIME)
     123
     124tstVMREQ_TEMPLATE       = VBOXR3EXE
    118125tstVMREQ_SOURCES        = tstVMREQ.cpp
    119 tstVMREQ_TEMPLATE       = VBOXR3EXE
    120126tstVMREQ_LIBS           = $(LIB_VMM) $(LIB_REM) $(LIB_RUNTIME)
    121127
     128tstAnimate_TEMPLATE     = VBOXR3EXE
    122129tstAnimate_SOURCES      = tstAnimate.cpp
    123 tstAnimate_TEMPLATE     = VBOXR3EXE
    124130tstAnimate_LIBS         = $(LIB_VMM) $(LIB_REM) $(LIB_RUNTIME)
    125131
     132tstCompiler_TEMPLATE    = VBOXR3TSTEXE
    126133tstCompiler_SOURCES     = tstCompiler.cpp
    127134tstCompiler_LIBS        = $(LIB_VMM) $(LIB_REM) $(LIB_RUNTIME)
    128135
     136tstMicro_TEMPLATE       = VBOXR3EXE
    129137tstMicro_SOURCES        = tstMicro.cpp
    130 tstMicro_TEMPLATE       = VBOXR3EXE
    131138tstMicro_LIBS           = $(LIB_VMM) $(LIB_REM) $(LIB_RUNTIME)
    132139
     
    150157
    151158
    152 include $(PATH_KBUILD)/footer.kmk
    153 
    154 
    155 #
    156 # Some handcrafted support for tstAsmStructs.
     159
     160
     161include $(PATH_KBUILD)/subfooter.kmk
     162
     163
     164# temporary hack.
     165.NOTPARALLEL: $(TARGET_tstMicroGC) $(LIB_VMMGC)
     166
     167
     168#
     169# Some handcrafted support targets for tstAsmStructs.
    157170#
    158171
     
    165178
    166179# 1a. make a header file which makes all the structures+members globals.
    167 $(PATH_TARGET)/tstAsmStructsAsm.mac: tstAsmStructsAsm.asm tstAsmStructsAsm-lst.sed \
     180$(PATH_TARGET)/tstAsmStructsAsm.mac: \
     181                $(VBOX_PATH_VMM_SRC)/testcase/tstAsmStructsAsm.asm \
     182                $(VBOX_PATH_VMM_SRC)/testcase/tstAsmStructsAsm-lst.sed \
    168183                $(DEPTH)/include/iprt/asmdefs.mac \
    169184                $(DEPTH)/include/VBox/cpum.mac \
    170185                $(DEPTH)/include/VBox/vm.mac \
    171                 ../CPUMInternal.mac \
    172                 ../TRPMInternal.mac \
    173                 ../VMMInternal.mac \
    174                 Makefile.kmk \
     186                $(VBOX_PATH_VMM_SRC)/CPUMInternal.mac \
     187                $(VBOX_PATH_VMM_SRC)/TRPMInternal.mac \
     188                $(VBOX_PATH_VMM_SRC)/VMMInternal.mac \
     189                $(VBOX_PATH_VMM_SRC)/testcase/Makefile.kmk \
    175190                | $(call DIRDEP,$(PATH_TARGET))
    176         $(call MSG_COMPILE,tstAsmStructsAsm,$<,$@,AS)
     191        $(call MSG_GENERATE,tstVMStructSize,$@,$<)
    177192ifndef DONT_USE_YASM
    178193        $(QUIET)$(TOOL_YASM_AS) \
     
    187202                -f $(if $(eq $(BUILD_TARGET),darwin),macho,elf) \
    188203                $(foreach inc,$(INCS),-I$(inc)/) -o [email protected] -l [email protected] $<
    189         $(SED) -f tstAsmStructsAsm-lst.sed [email protected] > $@
     204        $(SED) -f $(VBOX_PATH_VMM_SRC)/testcase/tstAsmStructsAsm-lst.sed [email protected] > $@
    190205else
    191206        $(QUIET)$(TOOL_NASM_AS) \
     
    207222endif
    208223
    209 
    210 
    211224# 1b. make an elf/macho object containing the offsets.
    212 $(PATH_TARGET)/tstAsmStructsAsm.o: tstAsmStructsAsm.asm $(PATH_TARGET)/tstAsmStructsAsm.mac \
    213                 Makefile.kmk \
     225$(PATH_TARGET)/tstAsmStructsAsm.o: \
     226                $(VBOX_PATH_VMM_SRC)/testcase/tstAsmStructsAsm.asm \
     227                $(PATH_TARGET)/tstAsmStructsAsm.mac \
     228                $(VBOX_PATH_VMM_SRC)/testcase/Makefile.kmk \
    214229                | $(call DIRDEP,$(PATH_TARGET))
    215230        $(call MSG_COMPILE,tstAsmStructsasm,$<,$@,AS)
     
    244259# 2. use nm and sed to transform this into the header we want.
    245260$(PATH_TARGET)/tstAsmStructsHC.h: $(PATH_TARGET)/tstAsmStructsAsm.o
    246         $(call MSG_GENERATE,,$@,$<)
     261        $(call MSG_GENERATE,tstVMStructSize,$@,$<)
    247262        $(QUIET)$(RM) -f $@ [email protected] [email protected]
    248263        $(VBOX_NM) $< > [email protected]
     
    258273# 3. transform the HC header into a GC one by omitting some HC only structures.
    259274$(PATH_TARGET)/tstAsmStructsGC.h: $(PATH_TARGET)/tstAsmStructsHC.h
    260         $(call MSG_GENERATE,,$@,$<)
     275        $(call MSG_GENERATE,tstVMStructSize,$@,$<)
    261276        $(QUIET)$(SED) -e '/VMMSWITCHERDEF/d' \
    262277                $^ > $@
     
    269284        $(QUIET)$(APPEND) "$@" "done"
    270285
     286
     287
    271288#
    272289# Run rule for tstVMStructSize.
    273290#
    274291
    275 # 1. Dump selected structure in the VMMGC.gc debug info.
    276 # 2. Generate a testcase from the dump
    277 ## future
    278 
    279 # 1&2. Manually dump selected structures and members.
     292# 1. Manually dump selected structures and members.
    280293$(PATH_TARGET)/tstVMStructGC.h: $(INSTARGET_tstVMStructGC)
    281         $(call MSG_GENERATE,,$@)
     294        $(call MSG_GENERATE,tstVMStructSize,$@)
    282295        $(QUIET)$(INSTARGET_tstVMStructGC) > $@
    283296
    284 # 3. run it.
     297# 2. run it.
    285298$(PATH_TARGET)/tstVMStructSize.run: $(INSTARGET_tstVMStructSize)
    286299        $(QUIET)$(RM) -f $@
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