1 | # $Id: Makefile.kmk 2788 2007-05-23 02:16:03Z vboxsync $
|
---|
2 | ## @file
|
---|
3 | # Sub-Makefile for the Devices testcases.
|
---|
4 | #
|
---|
5 |
|
---|
6 | #
|
---|
7 | # Copyright (C) 2006 InnoTek Systemberatung GmbH
|
---|
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 as published by the Free Software Foundation,
|
---|
13 | # in version 2 as it comes in the "COPYING" file of the VirtualBox OSE
|
---|
14 | # distribution. VirtualBox OSE is distributed in the hope that it will
|
---|
15 | # be useful, but WITHOUT ANY WARRANTY of any kind.
|
---|
16 | #
|
---|
17 | # If you received this file as part of a commercial VirtualBox
|
---|
18 | # distribution, then only the terms of your commercial VirtualBox
|
---|
19 | # license agreement apply instead of the previous paragraph.
|
---|
20 | #
|
---|
21 |
|
---|
22 | DEPTH ?= ../../../..
|
---|
23 | SUB_DEPTH = ..
|
---|
24 | include $(PATH_KBUILD)/subheader.kmk
|
---|
25 |
|
---|
26 | #
|
---|
27 | # We setup one 'other' target for executing the structure & alignment
|
---|
28 | # validation testcases. Perhaps a bit hackish, but extremely useful.
|
---|
29 | #
|
---|
30 | ifeq ($(BUILD_TARGET),$(BUILD_PLATFORM))
|
---|
31 | ifeq ($(filter-out x86.x86 amd64.amd64 x86.amd64, $(BUILD_TARGET_ARCH).$(BUILD_PLATFORM_ARCH)),)
|
---|
32 | OTHERS += \
|
---|
33 | $(PATH_TARGET)/tstDeviceStructSize.run
|
---|
34 | endif
|
---|
35 | endif
|
---|
36 |
|
---|
37 | #
|
---|
38 | # Globals
|
---|
39 | #
|
---|
40 | VBOX_PATH_DEVICES_SRC = $(PATH_SUB_ROOT)
|
---|
41 |
|
---|
42 | #
|
---|
43 | # The testcase generator.
|
---|
44 | #
|
---|
45 | PROGRAMS += tstDeviceStructSizeGC
|
---|
46 | tstDeviceStructSizeGC_TEMPLATE = VBOXGCEXE
|
---|
47 | tstDeviceStructSizeGC_DEFS =
|
---|
48 | ifdef VBOX_WITH_USB
|
---|
49 | tstDeviceStructSizeGC_DEFS += VBOX_WITH_USB IN_USB_GC
|
---|
50 | endif
|
---|
51 | tstDeviceStructSizeGC_SOURCES = tstDeviceStructSizeGC.cpp
|
---|
52 | tstDeviceStructSizeGC_INCS = \
|
---|
53 | $(VBOX_PATH_DEVICES_SRC) \
|
---|
54 | $(VBOX_PATH_DEVICES_SRC)/Bus \
|
---|
55 | $(PATH_TARGET)
|
---|
56 |
|
---|
57 | #
|
---|
58 | # The testcase it self.
|
---|
59 | #
|
---|
60 | PROGRAMS += tstDeviceStructSize
|
---|
61 | tstDeviceStructSize_TEMPLATE = VBOXR3EXE
|
---|
62 | tstDeviceStructSize_DEFS =
|
---|
63 | ifdef VBOX_WITH_USB
|
---|
64 | tstDeviceStructSize_DEFS += VBOX_WITH_USB IN_USB_GC
|
---|
65 | endif
|
---|
66 | tstDeviceStructSize_INCS = \
|
---|
67 | $(VBOX_PATH_DEVICES_SRC) \
|
---|
68 | $(VBOX_PATH_DEVICES_SRC)/Bus \
|
---|
69 | $(PATH_TARGET)
|
---|
70 | tstDeviceStructSize_SOURCES = tstDeviceStructSize.cpp
|
---|
71 | tstDeviceStructSize_LIBS.l4 = $(LIB_RUNTIME)
|
---|
72 | tstDeviceStructSize_CLEAN = \
|
---|
73 | $(PATH_TARGET)/tstDeviceStructSizeGC.h \
|
---|
74 | $(PATH_TARGET)/tstDeviceStructSizeGC.run
|
---|
75 | tstDeviceStructSize.cpp_DEPS = $(PATH_TARGET)/tstDeviceStructSizeGC.h
|
---|
76 |
|
---|
77 | #
|
---|
78 | # Run rule for tstDeviceStructSize.
|
---|
79 | #
|
---|
80 |
|
---|
81 | # 1. Dump selected structure in the VMMGC.gc debug info.
|
---|
82 | # 2. Generate a testcase from the dump
|
---|
83 | ## future
|
---|
84 |
|
---|
85 | # 1&2. Manually dump selected structures and members.
|
---|
86 | $(PATH_TARGET)/tstDeviceStructSizeGC.h: $$(INSTARGET_tstDeviceStructSizeGC)
|
---|
87 | $(call MSG_GENERATE,,$@)
|
---|
88 | $(QUIET)$(INSTARGET_tstDeviceStructSizeGC) > $@
|
---|
89 |
|
---|
90 | # 3. run it.
|
---|
91 | $(PATH_TARGET)/tstDeviceStructSize.run: $$(INSTARGET_tstDeviceStructSize)
|
---|
92 | $(QUIET)$(RM) -f $@
|
---|
93 | $^
|
---|
94 | $(QUIET)$(APPEND) "$@" "done"
|
---|
95 |
|
---|
96 | # alias for the struct test.
|
---|
97 | run-struct-tests: $(PATH_TARGET)/tstDeviceStructSize.run
|
---|
98 |
|
---|
99 |
|
---|
100 | include $(PATH_KBUILD)/subfooter.kmk
|
---|
101 |
|
---|