1 | # $Id: Makefile.kmk 5976 2007-12-06 04:25:40Z vboxsync $
|
---|
2 | ## @file
|
---|
3 | # Sub-Makefile for the Devices testcases.
|
---|
4 | #
|
---|
5 |
|
---|
6 | #
|
---|
7 | # Copyright (C) 2006-2007 innotek 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 | DEPTH ?= ../../../..
|
---|
18 | SUB_DEPTH = ..
|
---|
19 | include $(PATH_KBUILD)/subheader.kmk
|
---|
20 |
|
---|
21 | #
|
---|
22 | # We setup one 'other' target for executing the structure & alignment
|
---|
23 | # validation testcases. Perhaps a bit hackish, but extremely useful.
|
---|
24 | #
|
---|
25 | ifeq ($(BUILD_TARGET),$(BUILD_PLATFORM))
|
---|
26 | ifeq ($(filter-out x86.x86 amd64.amd64 x86.amd64, $(BUILD_TARGET_ARCH).$(BUILD_PLATFORM_ARCH)),)
|
---|
27 | OTHERS += \
|
---|
28 | $(PATH_TARGET)/tstDeviceStructSize.run
|
---|
29 | endif
|
---|
30 | endif
|
---|
31 |
|
---|
32 | #
|
---|
33 | # Globals
|
---|
34 | #
|
---|
35 | VBOX_PATH_DEVICES_SRC = $(PATH_SUB_ROOT)
|
---|
36 |
|
---|
37 | #
|
---|
38 | # The testcase generator.
|
---|
39 | #
|
---|
40 | PROGRAMS += tstDeviceStructSizeGC
|
---|
41 | tstDeviceStructSizeGC_TEMPLATE = VBOXGCEXE
|
---|
42 | tstDeviceStructSizeGC_DEFS =
|
---|
43 | ifdef VBOX_WITH_USB
|
---|
44 | tstDeviceStructSizeGC_DEFS += VBOX_WITH_USB IN_USB_GC
|
---|
45 | endif
|
---|
46 | ifdef VBOX_WITH_AHCI
|
---|
47 | tstDeviceStructSizeGC_DEFS += VBOX_WITH_AHCI
|
---|
48 | endif
|
---|
49 | tstDeviceStructSizeGC_SOURCES = tstDeviceStructSizeGC.cpp
|
---|
50 | tstDeviceStructSizeGC_INCS = \
|
---|
51 | $(VBOX_PATH_DEVICES_SRC) \
|
---|
52 | $(VBOX_PATH_DEVICES_SRC)/Bus \
|
---|
53 | $(PATH_TARGET)
|
---|
54 |
|
---|
55 | #
|
---|
56 | # The testcase it self.
|
---|
57 | #
|
---|
58 | PROGRAMS += tstDeviceStructSize
|
---|
59 | tstDeviceStructSize_TEMPLATE = VBOXR3EXE
|
---|
60 | tstDeviceStructSize_DEFS =
|
---|
61 | ifdef VBOX_WITH_USB
|
---|
62 | tstDeviceStructSize_DEFS += VBOX_WITH_USB IN_USB_GC
|
---|
63 | endif
|
---|
64 | ifdef VBOX_WITH_AHCI
|
---|
65 | tstDeviceStructSize_DEFS += VBOX_WITH_AHCI
|
---|
66 | endif
|
---|
67 | tstDeviceStructSize_INCS = \
|
---|
68 | $(VBOX_PATH_DEVICES_SRC) \
|
---|
69 | $(VBOX_PATH_DEVICES_SRC)/Bus \
|
---|
70 | $(PATH_TARGET)
|
---|
71 | tstDeviceStructSize_SOURCES = tstDeviceStructSize.cpp
|
---|
72 | tstDeviceStructSize_LIBS.l4 = $(LIB_RUNTIME)
|
---|
73 | tstDeviceStructSize_CLEAN = \
|
---|
74 | $(PATH_TARGET)/tstDeviceStructSizeGC.h \
|
---|
75 | $(PATH_TARGET)/tstDeviceStructSizeGC.run
|
---|
76 | tstDeviceStructSize.cpp_DEPS = $(PATH_TARGET)/tstDeviceStructSizeGC.h
|
---|
77 |
|
---|
78 | #
|
---|
79 | # Run rule for tstDeviceStructSize.
|
---|
80 | #
|
---|
81 |
|
---|
82 | # 1. Dump selected structure in the VMMGC.gc debug info.
|
---|
83 | # 2. Generate a testcase from the dump
|
---|
84 | ## future
|
---|
85 |
|
---|
86 | # 1&2. Manually dump selected structures and members.
|
---|
87 | $(PATH_TARGET)/tstDeviceStructSizeGC.h: $$(INSTARGET_tstDeviceStructSizeGC)
|
---|
88 | $(call MSG_GENERATE,,$@)
|
---|
89 | $(QUIET)$(REDIRECT) -wo $@ -- $(INSTARGET_tstDeviceStructSizeGC)
|
---|
90 |
|
---|
91 | # 3. run it.
|
---|
92 | $(PATH_TARGET)/tstDeviceStructSize.run: $$(INSTARGET_tstDeviceStructSize)
|
---|
93 | $(QUIET)$(RM) -f $@
|
---|
94 | $^
|
---|
95 | $(QUIET)$(APPEND) "$@" "done"
|
---|
96 |
|
---|
97 | # alias for the struct test.
|
---|
98 | run-struct-tests: $(PATH_TARGET)/tstDeviceStructSize.run
|
---|
99 |
|
---|
100 |
|
---|
101 | include $(PATH_KBUILD)/subfooter.kmk
|
---|
102 |
|
---|