Makefile revision 677833bc953b6cb418c701facbdcf4aa18d6c44e
#
# Makefile for the VMM testcases.
#
#
# Copyright (C) 2006 InnoTek Systemberatung GmbH
#
# This file is part of VirtualBox Open Source Edition (OSE), as
# available from http://www.virtualbox.org. This file is free software;
# General Public License as published by the Free Software Foundation,
# in version 2 as it comes in the "COPYING" file of the VirtualBox OSE
# distribution. VirtualBox OSE is distributed in the hope that it will
# be useful, but WITHOUT ANY WARRANTY of any kind.
#
# If you received this file as part of a commercial VirtualBox
# distribution, then only the terms of your commercial VirtualBox
# license agreement apply instead of the previous paragraph.
#
DEPTH = ../../../..
#
# Target lists.
#
#LIBRARIES = tstHelp
#PROGRAMS += tstProg1 tstProg2 tstProg3
endif # VBOX_WITH_TESTCASES
#
# We setup two 'other' targets for executing the two structure & alignment
# validation testcases. Perhaps a bit hackish, but extremely useful.
#
OTHERS += \
OTHER_CLEAN += \
#
# Globals.
#
#
# Targets
#
tstVMStructGC_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
tstVMStructGC_INCS = .. ../PATM
tstVMStructSize_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
tstAsmStructs_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
tstAsmStructs_INCS = .. $(PATH_TARGET)
tstAsmStructsGC_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
tstAsmStructsGC_INCS = .. $(PATH_TARGET)
../VMMR0/VMMR0A.asm
tstMicroGC_LIBS = \
tstMicroGC_LIBS += \
$(LIB_VMMGC)
#
# Some handcrafted support for tstAsmStructs.
#
# 1. make an aout object containing the offsets.
../CPUMInternal.mac \
../TRPMInternal.mac \
../VMMInternal.mac \
$(QUIET)$(TOOL_YASM_AS) \
$(addprefix -D, \
IN_RING3 \
) \
else
$(QUIET)$(TOOL_NASM_AS) \
$(addprefix -D, \
IN_RING3 \
) \
# 2. use objdump and sed to transform this into the header we want.
$(call MSG_L1,Generating $@)
else
-e '/ l[[:space:]]*\*ABS\*[[:space:]]*00000000[[:space:]]*[^_.]*\./!d' -e 's/^[0]*\(.*\) l.*00000000 \([^.]*\)\.\(.*$$\)/ CHECK_OFF(\2, 0x0\1, \3);/' \
-e '/ l[[:space:]]*\*ABS\*[[:space:]]*00000000[[:space:]]*[^_.]*\_size/!d' -e 's/^[0]*\(.*\) l.*00000000 \([^.]*\)\_size/ CHECK_SIZE(\2, 0x0\1);/' \
# 3. transform the HC header into a GC one by omitting some HC only structures.
$(call MSG_L1,Generating $@)
$^ > $@
# 4. run it.
#
# Run rule for tstVMStructSize.
#
# 1. Dump selected structure in the VMMGC.gc debug info.
# 2. Generate a testcase from the dump
## future
# 1&2. Manually dump selected structures and members.
$(call MSG_L1,Generating $<)
$(QUIET)$(INSTARGET_tstVMStructGC) > $@
# 3. run it.
$^
# alias for the two struct tests.