1 | # $Id: Makefile.kmk 18837 2009-04-07 17:30:46Z vboxsync $
|
---|
2 | ## @file
|
---|
3 | # Sub-Makefile for the VMM testcases.
|
---|
4 | #
|
---|
5 |
|
---|
6 | #
|
---|
7 | # Copyright (C) 2006-2007 Sun Microsystems, Inc.
|
---|
8 | #
|
---|
9 | # This file is part of VirtualBox Open Source Edition (OSE), as
|
---|
10 | # available from http://www.virtualbox.org. This file is free software;
|
---|
11 | # you can redistribute it and/or modify it under the terms of the GNU
|
---|
12 | # General Public License (GPL) as published by the Free Software
|
---|
13 | # Foundation, in version 2 as it comes in the "COPYING" file of the
|
---|
14 | # VirtualBox OSE distribution. VirtualBox OSE is distributed in the
|
---|
15 | # hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
|
---|
16 | #
|
---|
17 | # Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
|
---|
18 | # Clara, CA 95054 USA or visit http://www.sun.com if you need
|
---|
19 | # additional information or have any questions.
|
---|
20 | #
|
---|
21 |
|
---|
22 | SUB_DEPTH = ../../../..
|
---|
23 | include $(KBUILD_PATH)/subheader.kmk
|
---|
24 |
|
---|
25 | #
|
---|
26 | # Target lists.
|
---|
27 | #
|
---|
28 | PROGRAMS += tstVMStructSize tstVMStructGC tstAsmStructs tstAsmStructsGC tstVMM tstVMM-HwAccm tstGlobalConfig tstInstrEmul
|
---|
29 | ifneq ($(KBUILD_TARGET),win)
|
---|
30 | PROGRAMS += tstVMMFork
|
---|
31 | endif
|
---|
32 | ifdef VBOX_WITH_TESTCASES
|
---|
33 | PROGRAMS += tstCFGM tstSSM tstMMHyperHeap tstVMM-2 tstVMREQ tstMicro tstCompiler tstVMMR0CallHost-1
|
---|
34 | ifneq ($(KBUILD_TARGET),l4)
|
---|
35 | PROGRAMS += tstAnimate
|
---|
36 | endif
|
---|
37 | SYSMODS += tstMicroGC
|
---|
38 | endif # VBOX_WITH_TESTCASES
|
---|
39 |
|
---|
40 | ifdef VBOX_WITH_PDM_ASYNC_COMPLETION
|
---|
41 | PROGRAMS += tstPDMAsyncCompletion
|
---|
42 | endif
|
---|
43 |
|
---|
44 | # Where we put our temporary files (just for simplicity)
|
---|
45 | VBOX_VMM_TESTCASE_OUT_DIR := $(PATH_TARGET)/VMM
|
---|
46 | BLDDIRS += $(VBOX_VMM_TESTCASE_OUT_DIR)
|
---|
47 |
|
---|
48 | #
|
---|
49 | # We setup two 'other' targets for executing the two structure & alignment
|
---|
50 | # validation testcases. Perhaps a bit hackish, but extremely useful.
|
---|
51 | #
|
---|
52 | ifeq ($(KBUILD_TARGET),$(KBUILD_HOST))
|
---|
53 | ifeq ($(filter-out x86.x86 amd64.amd64 x86.amd64, $(KBUILD_TARGET_ARCH).$(KBUILD_HOST_ARCH)),)
|
---|
54 | OTHERS += \
|
---|
55 | $(VBOX_VMM_TESTCASE_OUT_DIR)/tstAsmStructs.run \
|
---|
56 | $(VBOX_VMM_TESTCASE_OUT_DIR)/tstVMStructSize.run
|
---|
57 | endif
|
---|
58 | endif
|
---|
59 |
|
---|
60 | # The normal testing pass.
|
---|
61 | TESTING += \
|
---|
62 | $(VBOX_VMM_TESTCASE_OUT_DIR)/tstAsmStructs.run \
|
---|
63 | $(VBOX_VMM_TESTCASE_OUT_DIR)/tstVMStructSize.run \
|
---|
64 | $(VBOX_VMM_TESTCASE_OUT_DIR)/tstInstrEmul.run
|
---|
65 |
|
---|
66 | OTHER_CLEAN += \
|
---|
67 | $(VBOX_VMM_TESTCASE_OUT_DIR)/tstAsmStructs.run \
|
---|
68 | $(VBOX_VMM_TESTCASE_OUT_DIR)/tstVMStructSize.run \
|
---|
69 | $(VBOX_VMM_TESTCASE_OUT_DIR)/tstInstrEmul.run \
|
---|
70 | $(VBOX_VMM_TESTCASE_OUT_DIR)/tstAsmStructs.h \
|
---|
71 | $(VBOX_VMM_TESTCASE_OUT_DIR)/tstAsmStructsAsm.o \
|
---|
72 | $(VBOX_VMM_TESTCASE_OUT_DIR)/tstAsmStructsAsm.mac \
|
---|
73 | $(VBOX_VMM_TESTCASE_OUT_DIR)/tstAsmStructsAsm.mac.o \
|
---|
74 | $(VBOX_VMM_TESTCASE_OUT_DIR)/tstAsmStructsAsm.mac.lst \
|
---|
75 | $(VBOX_VMM_TESTCASE_OUT_DIR)/tstAsmStructs.h.dump \
|
---|
76 | $(VBOX_VMM_TESTCASE_OUT_DIR)/tstAsmStructsGC.h \
|
---|
77 | $(VBOX_VMM_TESTCASE_OUT_DIR)/tstAsmStructsHC.h \
|
---|
78 | $(VBOX_VMM_TESTCASE_OUT_DIR)/tstVMStructGC.h
|
---|
79 |
|
---|
80 | #
|
---|
81 | # Globals
|
---|
82 | #
|
---|
83 | VBOX_PATH_VMM_SRC = $(PATH_ROOT)/src/VBox/VMM
|
---|
84 |
|
---|
85 | #
|
---|
86 | # Targets
|
---|
87 | #
|
---|
88 | tstVMStructGC_TEMPLATE = VBOXGCEXE
|
---|
89 | tstVMStructGC_DEFS = IN_VMM_RC IN_DIS IN_RT_RC IN_RT_GC
|
---|
90 | ifdef VBOX_WITH_R0_LOGGING
|
---|
91 | tstVMStructGC_DEFS += VBOX_WITH_R0_LOGGING
|
---|
92 | endif
|
---|
93 | ifdef VBOX_WITH_NEW_RECOMPILER
|
---|
94 | tstVMStructGC_DEFS += VBOX_WITH_NEW_RECOMPILER
|
---|
95 | endif
|
---|
96 | tstVMStructGC_SOURCES = tstVMStructGC.cpp
|
---|
97 | tstVMStructGC_INCS = $(VBOX_PATH_VMM_SRC) $(VBOX_PATH_VMM_SRC)/PATM
|
---|
98 |
|
---|
99 | tstVMStructSize_TEMPLATE= VBOXR3AUTOTST
|
---|
100 | tstVMStructSize_DEFS = IN_VMM_R3 IN_DIS
|
---|
101 | tstVMStructSize_INCS = $(VBOX_PATH_VMM_SRC) $(VBOX_PATH_VMM_SRC)/PATM $(VBOX_VMM_TESTCASE_OUT_DIR)
|
---|
102 | tstVMStructSize_SOURCES = tstVMStructSize.cpp
|
---|
103 | tstVMStructSize.cpp_DEPS= $(VBOX_VMM_TESTCASE_OUT_DIR)/tstVMStructGC.h
|
---|
104 | ifdef VBOX_WITH_R0_LOGGING
|
---|
105 | tstVMStructSize_DEFS += VBOX_WITH_R0_LOGGING
|
---|
106 | endif
|
---|
107 | ifdef VBOX_WITH_NEW_RECOMPILER
|
---|
108 | tstVMStructSize_DEFS += VBOX_WITH_NEW_RECOMPILER
|
---|
109 | endif
|
---|
110 | ifdef VBOX_WITH_VMI
|
---|
111 | tstVMStructSize_DEFS += VBOX_WITH_VMI
|
---|
112 | tstVMStructSize_INCS += $(VBOX_PATH_VMM_SRC)/PARAV
|
---|
113 | endif
|
---|
114 |
|
---|
115 | tstAsmStructs_TEMPLATE = VBOXR3AUTOTST
|
---|
116 | tstAsmStructs_DEFS = IN_VMM_R3 IN_DIS
|
---|
117 | ifdef VBOX_WITH_R0_LOGGING
|
---|
118 | tstAsmStructs_DEFS += VBOX_WITH_R0_LOGGING
|
---|
119 | endif
|
---|
120 | ifdef VBOX_WITH_NEW_RECOMPILER
|
---|
121 | tstAsmStruct_DEFS += VBOX_WITH_NEW_RECOMPILER
|
---|
122 | endif
|
---|
123 | tstAsmStructs_INCS = $(VBOX_PATH_VMM_SRC) $(VBOX_VMM_TESTCASE_OUT_DIR)
|
---|
124 | tstAsmStructs_SOURCES = tstAsmStructs.cpp
|
---|
125 |
|
---|
126 | tstAsmStructsGC_TEMPLATE= VBOXGCEXE
|
---|
127 | tstAsmStructsGC_DEFS = IN_VMM_RC IN_DIS IN_RT_RC IN_RT_GC
|
---|
128 | ifdef VBOX_WITH_R0_LOGGING
|
---|
129 | tstAsmStructsGC_DEFS += VBOX_WITH_R0_LOGGING
|
---|
130 | endif
|
---|
131 | ifdef VBOX_WITH_NEW_RECOMPILER
|
---|
132 | tstAsmStructGC_DEFS += VBOX_WITH_NEW_RECOMPILER
|
---|
133 | endif
|
---|
134 | tstAsmStructsGC_INCS = $(VBOX_PATH_VMM_SRC) $(VBOX_VMM_TESTCASE_OUT_DIR)
|
---|
135 | tstAsmStructsGC_SOURCES = tstAsmStructs.cpp
|
---|
136 |
|
---|
137 | tstAsmStructs.cpp_DEPS = $(VBOX_VMM_TESTCASE_OUT_DIR)/tstAsmStructsHC.h $(VBOX_VMM_TESTCASE_OUT_DIR)/tstAsmStructsGC.h
|
---|
138 |
|
---|
139 |
|
---|
140 | tstGlobalConfig_TEMPLATE= VBOXR3TSTEXE
|
---|
141 | tstGlobalConfig_SOURCES = tstGlobalConfig.cpp
|
---|
142 | tstGlobalConfig_LIBS = $(LIB_RUNTIME)
|
---|
143 |
|
---|
144 | tstMMHyperHeap_TEMPLATE = VBOXR3TSTEXE
|
---|
145 | tstMMHyperHeap_SOURCES = tstMMHyperHeap.cpp
|
---|
146 | tstMMHyperHeap_LIBS = $(LIB_VMM) $(LIB_REM) $(LIB_RUNTIME)
|
---|
147 |
|
---|
148 | tstSSM_TEMPLATE = VBOXR3TSTEXE
|
---|
149 | tstSSM_SOURCES = tstSSM.cpp
|
---|
150 | tstSSM_LIBS = $(LIB_VMM) $(LIB_REM) $(LIB_RUNTIME)
|
---|
151 |
|
---|
152 | tstInstrEmul_TEMPLATE = VBOXR3EXE
|
---|
153 | tstInstrEmul_SOURCES = tstInstrEmul.cpp ../VMMAll/EMAllA.asm
|
---|
154 | tstInstrEmul_LIBS = $(LIB_VMM) $(LIB_REM) $(LIB_RUNTIME)
|
---|
155 |
|
---|
156 | tstCFGM_TEMPLATE = VBOXR3TSTEXE
|
---|
157 | tstCFGM_SOURCES = tstCFGM.cpp
|
---|
158 | tstCFGM_LIBS = $(LIB_VMM) $(LIB_REM) $(LIB_RUNTIME)
|
---|
159 |
|
---|
160 | tstVMM_TEMPLATE = VBOXR3EXE
|
---|
161 | tstVMM_SOURCES = tstVMM.cpp
|
---|
162 | tstVMM_LIBS = $(LIB_VMM) $(LIB_REM) $(LIB_RUNTIME)
|
---|
163 |
|
---|
164 | tstVMM-HwAccm_TEMPLATE = VBOXR3EXE
|
---|
165 | tstVMM-HwAccm_SOURCES = tstVMM-HwAccm.cpp
|
---|
166 | tstVMM-HwAccm_LIBS = $(LIB_VMM) $(LIB_REM) $(LIB_RUNTIME)
|
---|
167 |
|
---|
168 | tstVMMFork_TEMPLATE = VBOXR3EXE
|
---|
169 | tstVMMFork_SOURCES = tstVMMFork.cpp
|
---|
170 | tstVMMFork_LIBS = $(LIB_VMM) $(LIB_REM) $(LIB_RUNTIME)
|
---|
171 |
|
---|
172 | tstVMM-2_TEMPLATE = VBOXR3EXE
|
---|
173 | tstVMM-2_SOURCES = tstVMM-2.cpp
|
---|
174 | tstVMM-2_LIBS = $(LIB_VMM) $(LIB_REM) $(LIB_RUNTIME)
|
---|
175 |
|
---|
176 | tstVMMR0CallHost-1_TEMPLATE = VBOXR3EXE
|
---|
177 | tstVMMR0CallHost-1_INCS = $(VBOX_PATH_VMM_SRC)
|
---|
178 | tstVMMR0CallHost-1_SOURCES = \
|
---|
179 | tstVMMR0CallHost-1.cpp \
|
---|
180 | $(VBOX_PATH_VMM_SRC)/VMMR0/VMMR0A.asm
|
---|
181 | tstVMMR0CallHost-1_LIBS = $(LIB_VMM) $(LIB_REM) $(LIB_RUNTIME)
|
---|
182 |
|
---|
183 | tstVMREQ_TEMPLATE = VBOXR3EXE
|
---|
184 | tstVMREQ_SOURCES = tstVMREQ.cpp
|
---|
185 | tstVMREQ_LIBS = $(LIB_VMM) $(LIB_REM) $(LIB_RUNTIME)
|
---|
186 |
|
---|
187 | tstAnimate_TEMPLATE = VBOXR3EXE
|
---|
188 | tstAnimate_SOURCES = tstAnimate.cpp
|
---|
189 | tstAnimate_LIBS = $(LIB_VMM) $(LIB_REM) $(LIB_RUNTIME)
|
---|
190 |
|
---|
191 | tstCompiler_TEMPLATE = VBOXR3TSTEXE
|
---|
192 | tstCompiler_SOURCES = tstCompiler.cpp
|
---|
193 | tstCompiler_LIBS = $(LIB_VMM) $(LIB_REM) $(LIB_RUNTIME)
|
---|
194 |
|
---|
195 | tstMicro_TEMPLATE = VBOXR3EXE
|
---|
196 | tstMicro_SOURCES = tstMicro.cpp
|
---|
197 | tstMicro_LIBS = $(LIB_VMM) $(LIB_REM) $(LIB_RUNTIME)
|
---|
198 |
|
---|
199 | # tstMicroGC.gc
|
---|
200 | tstMicroGC_TEMPLATE = VBOXGC
|
---|
201 | tstMicroGC_SOURCES = tstMicroGC.cpp tstMicroGCA.asm
|
---|
202 | tstMicroGC_DEFS =
|
---|
203 | tstMicroGC_INCS = $(VBOX_PATH_VMM_SRC)/testcase
|
---|
204 | ifeq ($(VBOX_LDR_FMT32),pe)
|
---|
205 | tstMicroGC_LDFLAGS = -Entry:tstMicroGC
|
---|
206 | endif
|
---|
207 | tstMicroGC_SYSSUFF = .gc
|
---|
208 | tstMicroGC_LIBS = \
|
---|
209 | $(PATH_LIB)/DisasmGC$(VBOX_SUFF_LIB) \
|
---|
210 | $(PATH_LIB)/RuntimeGC$(VBOX_SUFF_LIB)
|
---|
211 | ifeq ($(filter-out pe lx,$(VBOX_LDR_FMT32)),)
|
---|
212 | tstMicroGC_LIBS += \
|
---|
213 | $(PATH_LIB)/VMMGCBuiltin$(VBOX_SUFF_LIB) \
|
---|
214 | $(LIB_VMMGC)
|
---|
215 | endif
|
---|
216 | tstMicroGC_SOURCES.win = tstMicroGC.def
|
---|
217 |
|
---|
218 | ifdef VBOX_WITH_PDM_ASYNC_COMPLETION
|
---|
219 | tstPDMAsyncCompletion_TEMPLATE = VBOXR3EXE
|
---|
220 | tstPDMAsyncCompletion_SOURCES = tstPDMAsyncCompletion.cpp
|
---|
221 | tstPDMAsyncCompletion_LIBS = $(LIB_VMM) $(LIB_REM) $(LIB_RUNTIME)
|
---|
222 | endif
|
---|
223 |
|
---|
224 | include $(KBUILD_PATH)/subfooter.kmk
|
---|
225 |
|
---|
226 |
|
---|
227 | #
|
---|
228 | # Run rule for tstInstrEmul.
|
---|
229 | #
|
---|
230 | $(VBOX_VMM_TESTCASE_OUT_DIR)/tstInstrEmul.run: $$(INSTARGET_tstInstrEmul) | $$(dir $$@)
|
---|
231 | $(QUIET)$(RM) -f $@
|
---|
232 | $(QUIET)$(REDIRECT) -E 'VBOX_LOG_FLAGS=disabled' -E 'VBOX_LOG_DEST=nofile' \
|
---|
233 | $(if $(eq $(KBUILD_TARGET),darwin), -E 'DYLD_FALLBACK_LIBRARY_PATH=$(dir $(LIB_RUNTIME))') \
|
---|
234 | -- \
|
---|
235 | $(INSTARGET_tstInstrEmul)
|
---|
236 | $(QUIET)$(APPEND) "$@" "done"
|
---|
237 |
|
---|
238 |
|
---|
239 | #
|
---|
240 | # Some handcrafted support targets for tstAsmStructs.
|
---|
241 | #
|
---|
242 |
|
---|
243 | ifeq ($(KBUILD_HOST),win)
|
---|
244 | ifndef TOOL_MINGW32
|
---|
245 | include $(KBUILD_PATH)/tools/MINGW32.kmk
|
---|
246 | endif
|
---|
247 | VBOX_NM ?= $(PATH_TOOL_MINGW32)/bin/nm.exe -p
|
---|
248 | else
|
---|
249 | VBOX_NM ?= nm -p
|
---|
250 | endif
|
---|
251 |
|
---|
252 | MY_ASA_ASM_STUFF = \
|
---|
253 | $(addprefix -D, \
|
---|
254 | $(DEFS) \
|
---|
255 | $(DEFS.$(KBUILD_TYPE)) \
|
---|
256 | $(DEFS.$(KBUILD_TARGET)) \
|
---|
257 | IN_RING3 $(ARCH_BITS_DEFS) \
|
---|
258 | $(DEFS.$(KBUILD_TARGET_ARCH)) \
|
---|
259 | $(DEFS.$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH)) \
|
---|
260 | ) \
|
---|
261 | -f $(if $(eq $(KBUILD_TARGET),darwin),macho,elf) \
|
---|
262 | $(foreach inc,$(INCS) $(VBOX_PATH_VMM_SRC)/testcase $(VBOX_VMM_TESTCASE_OUT_DIR),-I$(inc)/)
|
---|
263 |
|
---|
264 | # 1a. make a header file which makes all the structures+members globals.
|
---|
265 | $(VBOX_VMM_TESTCASE_OUT_DIR)/tstAsmStructsAsm.mac: \
|
---|
266 | $(VBOX_PATH_VMM_SRC)/testcase/tstAsmStructsAsm.asm \
|
---|
267 | $(VBOX_PATH_VMM_SRC)/testcase/tstAsmStructsAsm-lst.sed \
|
---|
268 | $(DEPTH)/include/iprt/asmdefs.mac \
|
---|
269 | $(DEPTH)/include/VBox/cpum.mac \
|
---|
270 | $(DEPTH)/include/VBox/sup.mac \
|
---|
271 | $(DEPTH)/include/VBox/vm.mac \
|
---|
272 | $(VBOX_PATH_VMM_SRC)/CPUMInternal.mac \
|
---|
273 | $(VBOX_PATH_VMM_SRC)/TRPMInternal.mac \
|
---|
274 | $(VBOX_PATH_VMM_SRC)/HWACCMInternal.mac \
|
---|
275 | $(VBOX_PATH_VMM_SRC)/VMMInternal.mac \
|
---|
276 | $(VBOX_PATH_VMM_SRC)/testcase/Makefile.kmk \
|
---|
277 | $(PATH_ROOT)/Config.kmk $(LOCALCFG) $(AUTOCFG) \
|
---|
278 | | $$(dir $$@)
|
---|
279 | $(call MSG_GENERATE,tstVMStructSize,$@,$<)
|
---|
280 | ifndef DONT_USE_YASM
|
---|
281 | $(QUIET)$(TOOL_YASM_AS) $(MY_ASA_ASM_STUFF) -o $@.o -l $@.lst $<
|
---|
282 | $(SED) -f $(VBOX_PATH_VMM_SRC)/testcase/tstAsmStructsAsm-lst.sed --output $@ $@.lst
|
---|
283 | else
|
---|
284 | $(QUIET)$(TOOL_NASM_AS) -g $(MY_ASA_ASM_STUFF) -o $@.o -l $@.lst $<
|
---|
285 | $(VBOX_NM) $@.o | $(SED) \
|
---|
286 | -e '/[0-9a-fA-F][0-9a-fA-F]* [^a] /d' \
|
---|
287 | -e 's/[0-9a-fA-F][0-9a-fA-F]* a \([^ ]*\)/global \1/' \
|
---|
288 | > $@
|
---|
289 | endif
|
---|
290 |
|
---|
291 | # 1b. make an elf/macho object containing the offsets.
|
---|
292 | $(VBOX_VMM_TESTCASE_OUT_DIR)/tstAsmStructsAsm.o: \
|
---|
293 | $(VBOX_PATH_VMM_SRC)/testcase/tstAsmStructsAsm.asm \
|
---|
294 | $(VBOX_VMM_TESTCASE_OUT_DIR)/tstAsmStructsAsm.mac \
|
---|
295 | $(VBOX_PATH_VMM_SRC)/testcase/Makefile.kmk \
|
---|
296 | | $$(dir $$@)
|
---|
297 | $(call MSG_COMPILE,tstAsmStructsasm,$<,$@,AS)
|
---|
298 | ifndef DONT_USE_YASM
|
---|
299 | $(QUIET)$(TOOL_YASM_AS) $(MY_ASA_ASM_STUFF) -DDO_GLOBALS -o $@ $<
|
---|
300 | else
|
---|
301 | $(QUIET)$(TOOL_NASM_AS) $(MY_ASA_ASM_STUFF) -DDO_GLOBALS -o $@ $<
|
---|
302 | endif
|
---|
303 |
|
---|
304 | # 2. use nm and sed to transform this into the header we want.
|
---|
305 | $(VBOX_VMM_TESTCASE_OUT_DIR)/tstAsmStructsHC.h: $(VBOX_VMM_TESTCASE_OUT_DIR)/tstAsmStructsAsm.o
|
---|
306 | $(call MSG_GENERATE,tstVMStructSize,$@,$<)
|
---|
307 | $(QUIET)$(RM) -f $@ $@.dump $@.tmp
|
---|
308 | $(QUIET)$(REDIRECT) -wo $@.dump -- $(VBOX_NM) $<
|
---|
309 | $(QUIET)$(SED) -e '/STAMPROFILEADV/d' \
|
---|
310 | -e '/00[0-9a-fA-F]* [aA] [^_.]*\./!d' -e 's/\(00[0-9a-fA-F]*\) [aA] \([^.]*\)\.\(.*$$\)/ CHECK_OFF(\2, 0x0\1, \3);/' \
|
---|
311 | --output $@.tmp $@.dump
|
---|
312 | $(QUIET)$(SED) -e '/VM_size$$/d' -e '/VMCPU_size$$/d' \
|
---|
313 | -e '/00[0-9a-fA-F]* [aA] [^_.]*_size$$/!d' -e 's/\(00[0-9a-fA-F]*\) [aA] \([^_.]*\)_size/ CHECK_SIZE(\2, 0x0\1);/' \
|
---|
314 | --append $@.tmp $@.dump
|
---|
315 | $(QUIET)$(MV) -f $@.tmp $@
|
---|
316 | $(QUIET)$(RM) -f $@.dump
|
---|
317 |
|
---|
318 | # 3. transform the HC header into a GC one by omitting some HC only structures.
|
---|
319 | $(VBOX_VMM_TESTCASE_OUT_DIR)/tstAsmStructsGC.h: $(VBOX_VMM_TESTCASE_OUT_DIR)/tstAsmStructsHC.h
|
---|
320 | $(call MSG_GENERATE,tstVMStructSize,$@,$<)
|
---|
321 | $(QUIET)$(SED) -e '/VMMSWITCHERDEF/d' --output $@ $^
|
---|
322 |
|
---|
323 | ## @todo make this default kBuild behaviour.
|
---|
324 | .SECONDEXPANSION:
|
---|
325 |
|
---|
326 | # 4. run it.
|
---|
327 | $(VBOX_VMM_TESTCASE_OUT_DIR)/tstAsmStructs.run: $$(INSTARGET_tstAsmStructs) $$(INSTARGET_tstAsmStructsGC)
|
---|
328 | $(QUIET)$(RM) -f $@
|
---|
329 | $(INSTARGET_tstAsmStructs)
|
---|
330 | $(INSTARGET_tstAsmStructsGC)
|
---|
331 | $(QUIET)$(APPEND) "$@" "done"
|
---|
332 |
|
---|
333 |
|
---|
334 |
|
---|
335 | #
|
---|
336 | # Run rule for tstVMStructSize.
|
---|
337 | #
|
---|
338 |
|
---|
339 | # 1. Manually dump selected structures and members.
|
---|
340 | $(VBOX_VMM_TESTCASE_OUT_DIR)/tstVMStructGC.h: $$(INSTARGET_tstVMStructGC) | $$(dir $$@)
|
---|
341 | $(call MSG_GENERATE,tstVMStructSize,$@)
|
---|
342 | $(QUIET)$(REDIRECT) -wo $@ -- $<
|
---|
343 |
|
---|
344 | # 2. run it.
|
---|
345 | $(VBOX_VMM_TESTCASE_OUT_DIR)/tstVMStructSize.run: $$(INSTARGET_tstVMStructSize) | $$(dir $$@)
|
---|
346 | $(QUIET)$(RM) -f $@
|
---|
347 | $<
|
---|
348 | $(QUIET)$(APPEND) "$@" "done"
|
---|
349 |
|
---|
350 | # alias for the two struct tests.
|
---|
351 | run-struct-tests: $(VBOX_VMM_TESTCASE_OUT_DIR)/tstAsmStructs.run $(VBOX_VMM_TESTCASE_OUT_DIR)/tstVMStructSize.run
|
---|
352 |
|
---|
353 |
|
---|