Makefile.kmk revision d91a526ad5d8b0f8724fce176d825e98c6990fab
b0ab7e3ff45cca3c9755432dde464562cdde61f0vboxsync# Sub-Makefile for the VMM testcases.
b0ab7e3ff45cca3c9755432dde464562cdde61f0vboxsync# Copyright (C) 2006-2007 Sun Microsystems, Inc.
b0ab7e3ff45cca3c9755432dde464562cdde61f0vboxsync# This file is part of VirtualBox Open Source Edition (OSE), as
b0ab7e3ff45cca3c9755432dde464562cdde61f0vboxsync# available from http://www.virtualbox.org. This file is free software;
b0ab7e3ff45cca3c9755432dde464562cdde61f0vboxsync# you can redistribute it and/or modify it under the terms of the GNU
b0ab7e3ff45cca3c9755432dde464562cdde61f0vboxsync# General Public License (GPL) as published by the Free Software
b0ab7e3ff45cca3c9755432dde464562cdde61f0vboxsync# Foundation, in version 2 as it comes in the "COPYING" file of the
b0ab7e3ff45cca3c9755432dde464562cdde61f0vboxsync# VirtualBox OSE distribution. VirtualBox OSE is distributed in the
b0ab7e3ff45cca3c9755432dde464562cdde61f0vboxsync# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
b0ab7e3ff45cca3c9755432dde464562cdde61f0vboxsync# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
b0ab7e3ff45cca3c9755432dde464562cdde61f0vboxsync# Clara, CA 95054 USA or visit http://www.sun.com if you need
b0ab7e3ff45cca3c9755432dde464562cdde61f0vboxsync# additional information or have any questions.
b0ab7e3ff45cca3c9755432dde464562cdde61f0vboxsyncSUB_DEPTH = ../../../..
b0ab7e3ff45cca3c9755432dde464562cdde61f0vboxsyncinclude $(KBUILD_PATH)/subheader.kmk
b0ab7e3ff45cca3c9755432dde464562cdde61f0vboxsync# Target lists.
b0ab7e3ff45cca3c9755432dde464562cdde61f0vboxsyncPROGRAMS += tstVMStructSize tstVMStructGC tstAsmStructs tstAsmStructsGC tstVMM tstVMM-HwAccm tstGlobalConfig
b0ab7e3ff45cca3c9755432dde464562cdde61f0vboxsyncifneq ($(KBUILD_TARGET),win)
b0ab7e3ff45cca3c9755432dde464562cdde61f0vboxsyncPROGRAMS += tstVMMFork
b0ab7e3ff45cca3c9755432dde464562cdde61f0vboxsyncifdef VBOX_WITH_TESTCASES
b0ab7e3ff45cca3c9755432dde464562cdde61f0vboxsync PROGRAMS += tstCFGM tstSSM tstMMHyperHeap tstVMM-2 tstVMREQ tstMicro tstCompiler tstVMMR0CallHost-1
b0ab7e3ff45cca3c9755432dde464562cdde61f0vboxsync ifneq ($(KBUILD_TARGET),l4)
590bfe12ce22cd3716448fbb9f4dc51664bfe5e2vboxsync PROGRAMS += tstAnimate
b0ab7e3ff45cca3c9755432dde464562cdde61f0vboxsync SYSMODS += tstMicroGC
b0ab7e3ff45cca3c9755432dde464562cdde61f0vboxsyncendif # VBOX_WITH_TESTCASES
b0ab7e3ff45cca3c9755432dde464562cdde61f0vboxsyncifdef VBOX_WITH_PDM_ASYNC_COMPLETION
b0ab7e3ff45cca3c9755432dde464562cdde61f0vboxsync PROGRAMS += tstPDMAsyncCompletion
b0ab7e3ff45cca3c9755432dde464562cdde61f0vboxsync# Where we put our temporary files (just for simplicity)
b0ab7e3ff45cca3c9755432dde464562cdde61f0vboxsyncVBOX_VMM_TESTCASE_OUT_DIR := $(PATH_TARGET)/VMM
b0ab7e3ff45cca3c9755432dde464562cdde61f0vboxsyncBLDDIRS += $(VBOX_VMM_TESTCASE_OUT_DIR)
b0ab7e3ff45cca3c9755432dde464562cdde61f0vboxsync# We setup two 'other' targets for executing the two structure & alignment
b0ab7e3ff45cca3c9755432dde464562cdde61f0vboxsync# validation testcases. Perhaps a bit hackish, but extremely useful.
b0ab7e3ff45cca3c9755432dde464562cdde61f0vboxsyncifeq ($(KBUILD_TARGET),$(KBUILD_HOST))
b0ab7e3ff45cca3c9755432dde464562cdde61f0vboxsync ifeq ($(filter-out x86.x86 amd64.amd64 x86.amd64, $(KBUILD_TARGET_ARCH).$(KBUILD_HOST_ARCH)),)
b0ab7e3ff45cca3c9755432dde464562cdde61f0vboxsync OTHERS += \
b0ab7e3ff45cca3c9755432dde464562cdde61f0vboxsync $(VBOX_VMM_TESTCASE_OUT_DIR)/tstAsmStructs.run \
b0ab7e3ff45cca3c9755432dde464562cdde61f0vboxsync $(VBOX_VMM_TESTCASE_OUT_DIR)/tstVMStructSize.run
b0ab7e3ff45cca3c9755432dde464562cdde61f0vboxsync# The normal testing pass.
b0ab7e3ff45cca3c9755432dde464562cdde61f0vboxsyncTESTING += \
b0ab7e3ff45cca3c9755432dde464562cdde61f0vboxsync $(VBOX_VMM_TESTCASE_OUT_DIR)/tstAsmStructs.run \
b0ab7e3ff45cca3c9755432dde464562cdde61f0vboxsync $(VBOX_VMM_TESTCASE_OUT_DIR)/tstVMStructSize.run
b0ab7e3ff45cca3c9755432dde464562cdde61f0vboxsyncOTHER_CLEAN += \
b0ab7e3ff45cca3c9755432dde464562cdde61f0vboxsync $(VBOX_VMM_TESTCASE_OUT_DIR)/tstAsmStructs.run \
b0ab7e3ff45cca3c9755432dde464562cdde61f0vboxsync $(VBOX_VMM_TESTCASE_OUT_DIR)/tstVMStructSize.run \
b0ab7e3ff45cca3c9755432dde464562cdde61f0vboxsync $(VBOX_VMM_TESTCASE_OUT_DIR)/tstAsmStructs.h \
b0ab7e3ff45cca3c9755432dde464562cdde61f0vboxsync $(VBOX_VMM_TESTCASE_OUT_DIR)/tstAsmStructsAsm.o \
b0ab7e3ff45cca3c9755432dde464562cdde61f0vboxsync $(VBOX_VMM_TESTCASE_OUT_DIR)/tstAsmStructsAsm.mac \
b0ab7e3ff45cca3c9755432dde464562cdde61f0vboxsync $(VBOX_VMM_TESTCASE_OUT_DIR)/tstAsmStructsAsm.mac.o \
b0ab7e3ff45cca3c9755432dde464562cdde61f0vboxsync $(VBOX_VMM_TESTCASE_OUT_DIR)/tstAsmStructsAsm.mac.lst \
b0ab7e3ff45cca3c9755432dde464562cdde61f0vboxsync $(VBOX_VMM_TESTCASE_OUT_DIR)/tstAsmStructs.h.dump \
b0ab7e3ff45cca3c9755432dde464562cdde61f0vboxsync $(VBOX_VMM_TESTCASE_OUT_DIR)/tstAsmStructsGC.h \
b0ab7e3ff45cca3c9755432dde464562cdde61f0vboxsync $(VBOX_VMM_TESTCASE_OUT_DIR)/tstAsmStructsHC.h \
b0ab7e3ff45cca3c9755432dde464562cdde61f0vboxsync $(VBOX_VMM_TESTCASE_OUT_DIR)/tstVMStructGC.h
b0ab7e3ff45cca3c9755432dde464562cdde61f0vboxsyncVBOX_PATH_VMM_SRC = $(PATH_ROOT)/src/VBox/VMM
b0ab7e3ff45cca3c9755432dde464562cdde61f0vboxsynctstVMStructGC_TEMPLATE = VBOXGCEXE
b0ab7e3ff45cca3c9755432dde464562cdde61f0vboxsynctstVMStructGC_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
b0ab7e3ff45cca3c9755432dde464562cdde61f0vboxsyncifdef VBOX_WITH_IDT_PATCHING
b0ab7e3ff45cca3c9755432dde464562cdde61f0vboxsynctstVMStructGC_DEFS += VBOX_WITH_IDT_PATCHING
b0ab7e3ff45cca3c9755432dde464562cdde61f0vboxsynctstVMStructGC_SOURCES = tstVMStructGC.cpp
b0ab7e3ff45cca3c9755432dde464562cdde61f0vboxsynctstVMStructGC_INCS = $(VBOX_PATH_VMM_SRC) $(VBOX_PATH_VMM_SRC)/PATM
b0ab7e3ff45cca3c9755432dde464562cdde61f0vboxsynctstVMStructSize_TEMPLATE= VBOXR3AUTOTST
b0ab7e3ff45cca3c9755432dde464562cdde61f0vboxsynctstVMStructSize_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
b0ab7e3ff45cca3c9755432dde464562cdde61f0vboxsyncifdef VBOX_WITH_IDT_PATCHING
b0ab7e3ff45cca3c9755432dde464562cdde61f0vboxsynctstVMStructSize_DEFS += VBOX_WITH_IDT_PATCHING
b0ab7e3ff45cca3c9755432dde464562cdde61f0vboxsynctstVMStructSize_INCS = $(VBOX_PATH_VMM_SRC) $(VBOX_PATH_VMM_SRC)/PATM $(VBOX_VMM_TESTCASE_OUT_DIR)
b0ab7e3ff45cca3c9755432dde464562cdde61f0vboxsynctstVMStructSize_SOURCES = tstVMStructSize.cpp
b0ab7e3ff45cca3c9755432dde464562cdde61f0vboxsynctstVMStructSize.cpp_DEPS= $(VBOX_VMM_TESTCASE_OUT_DIR)/tstVMStructGC.h
b0ab7e3ff45cca3c9755432dde464562cdde61f0vboxsynctstAsmStructs_TEMPLATE = VBOXR3AUTOTST
b0ab7e3ff45cca3c9755432dde464562cdde61f0vboxsynctstAsmStructs_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
b0ab7e3ff45cca3c9755432dde464562cdde61f0vboxsyncifdef VBOX_WITH_IDT_PATCHING
b0ab7e3ff45cca3c9755432dde464562cdde61f0vboxsynctstAsmStructs_DEFS += VBOX_WITH_IDT_PATCHING
b0ab7e3ff45cca3c9755432dde464562cdde61f0vboxsynctstAsmStructs_INCS = $(VBOX_PATH_VMM_SRC) $(VBOX_VMM_TESTCASE_OUT_DIR)
b0ab7e3ff45cca3c9755432dde464562cdde61f0vboxsynctstAsmStructs_SOURCES = tstAsmStructs.cpp
b0ab7e3ff45cca3c9755432dde464562cdde61f0vboxsynctstAsmStructsGC_TEMPLATE= VBOXGCEXE
df5f1b4303be82a000284349e9392beb9f1b6f11vboxsynctstAsmStructsGC_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
df5f1b4303be82a000284349e9392beb9f1b6f11vboxsyncifdef VBOX_WITH_IDT_PATCHING
df5f1b4303be82a000284349e9392beb9f1b6f11vboxsynctstAsmStructsGC_DEFS += VBOX_WITH_IDT_PATCHING
df5f1b4303be82a000284349e9392beb9f1b6f11vboxsynctstAsmStructsGC_INCS = $(VBOX_PATH_VMM_SRC) $(VBOX_VMM_TESTCASE_OUT_DIR)
b0ab7e3ff45cca3c9755432dde464562cdde61f0vboxsynctstAsmStructsGC_SOURCES = tstAsmStructs.cpp
b0ab7e3ff45cca3c9755432dde464562cdde61f0vboxsynctstAsmStructs.cpp_DEPS = $(VBOX_VMM_TESTCASE_OUT_DIR)/tstAsmStructsHC.h $(VBOX_VMM_TESTCASE_OUT_DIR)/tstAsmStructsGC.h
b0ab7e3ff45cca3c9755432dde464562cdde61f0vboxsynctstGlobalConfig_TEMPLATE= VBOXR3TSTEXE
b0ab7e3ff45cca3c9755432dde464562cdde61f0vboxsynctstGlobalConfig_SOURCES = tstGlobalConfig.cpp
tstMMHyperHeap_SOURCES = tstMMHyperHeap.cpp
tstSSM_SOURCES = tstSSM.cpp
tstCFGM_SOURCES = tstCFGM.cpp
tstVMM_SOURCES = tstVMM.cpp
tstVMM-HwAccm_SOURCES = tstVMM-HwAccm.cpp
tstVMMFork_SOURCES = tstVMMFork.cpp
tstVMM-2_SOURCES = tstVMM-2.cpp
$(VBOX_PATH_VMM_SRC)/VMMR0/VMMR0A.asm
tstVMREQ_SOURCES = tstVMREQ.cpp
tstAnimate_SOURCES = tstAnimate.cpp
tstCompiler_SOURCES = tstCompiler.cpp
tstMicro_SOURCES = tstMicro.cpp
tstPDMAsyncCompletion_SOURCES = tstPDMAsyncCompletion.cpp
include $(KBUILD_PATH)/subfooter.kmk
include $(KBUILD_PATH)/tools/MINGW32.kmk
VBOX_NM ?= $(PATH_TOOL_MINGW32)/bin/nm.exe -p
$(VBOX_VMM_TESTCASE_OUT_DIR)/tstAsmStructsAsm.mac: \
$(VBOX_PATH_VMM_SRC)/testcase/tstAsmStructsAsm.asm \
$(VBOX_PATH_VMM_SRC)/testcase/tstAsmStructsAsm-lst.sed \
$(DEPTH)/include/iprt/asmdefs.mac \
$(DEPTH)/include/VBox/cpum.mac \
$(DEPTH)/include/VBox/sup.mac \
$(DEPTH)/include/VBox/vm.mac \
$(VBOX_PATH_VMM_SRC)/CPUMInternal.mac \
$(VBOX_PATH_VMM_SRC)/TRPMInternal.mac \
$(VBOX_PATH_VMM_SRC)/VMMInternal.mac \
$(VBOX_PATH_VMM_SRC)/testcase/Makefile.kmk \
$(PATH_ROOT)/Config.kmk $(LOCALCFG) $(AUTOCFG) \
$(SED) -f $(VBOX_PATH_VMM_SRC)/testcase/tstAsmStructsAsm-lst.sed --output $@ $@.lst
# 1b. make an elf/macho object containing the offsets.
$(VBOX_VMM_TESTCASE_OUT_DIR)/tstAsmStructsAsm.o: \
$(VBOX_PATH_VMM_SRC)/testcase/tstAsmStructsAsm.asm \
$(VBOX_VMM_TESTCASE_OUT_DIR)/tstAsmStructsAsm.mac \
$(VBOX_PATH_VMM_SRC)/testcase/Makefile.kmk \
-e '/00[0-9a-fA-F]* [aA] [^_.]*\./!d' -e 's/\(00[0-9a-fA-F]*\) [aA] \([^.]*\)\.\(.*$$\)/ CHECK_OFF(\2, 0x0\1, \3);/' \
-e '/00[0-9a-fA-F]* [aA] [^_.]*_size$$/!d' -e 's/\(00[0-9a-fA-F]*\) [aA] \([^_.]*\)_size/ CHECK_SIZE(\2, 0x0\1);/' \
$(VBOX_VMM_TESTCASE_OUT_DIR)/tstAsmStructs.run: $$(INSTARGET_tstAsmStructs) $$(INSTARGET_tstAsmStructsGC)
$(VBOX_VMM_TESTCASE_OUT_DIR)/tstVMStructGC.h: $$(INSTARGET_tstVMStructGC) | $$(dir $$@)
$(VBOX_VMM_TESTCASE_OUT_DIR)/tstVMStructSize.run: $$(INSTARGET_tstVMStructSize) | $$(dir $$@)
run-struct-tests: $(VBOX_VMM_TESTCASE_OUT_DIR)/tstAsmStructs.run $(VBOX_VMM_TESTCASE_OUT_DIR)/tstVMStructSize.run