1 | # $Id: Makefile.kmk 8991 2008-05-21 00:53:53Z vboxsync $
|
---|
2 | ## @file
|
---|
3 | # Sub-Makefile for the Devices 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 | DEPTH ?= ../../../..
|
---|
23 | SUB_DEPTH = ..
|
---|
24 | include $(KBUILD_PATH)/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 ($(KBUILD_TARGET),$(KBUILD_HOST))
|
---|
31 | ifeq ($(filter-out x86.x86 amd64.amd64 x86.amd64, $(KBUILD_TARGET_ARCH).$(KBUILD_HOST_ARCH)),)
|
---|
32 | OTHERS += \
|
---|
33 | $(PATH_TARGET)/tstDeviceStructSize.run
|
---|
34 | endif
|
---|
35 | endif
|
---|
36 |
|
---|
37 | # The normal testing pass.
|
---|
38 | TESTING += \
|
---|
39 | $(PATH_TARGET)/tstDeviceStructSize.run
|
---|
40 |
|
---|
41 |
|
---|
42 | #
|
---|
43 | # Globals
|
---|
44 | #
|
---|
45 | VBOX_PATH_DEVICES_SRC = $(PATH_SUB_ROOT)
|
---|
46 |
|
---|
47 | #
|
---|
48 | # The testcase generator.
|
---|
49 | #
|
---|
50 | PROGRAMS += tstDeviceStructSizeGC
|
---|
51 | tstDeviceStructSizeGC_TEMPLATE = VBOXGCEXE
|
---|
52 | tstDeviceStructSizeGC_DEFS =
|
---|
53 | ifdef VBOX_WITH_USB
|
---|
54 | tstDeviceStructSizeGC_DEFS += VBOX_WITH_USB IN_USB_GC
|
---|
55 | endif
|
---|
56 | ifdef VBOX_WITH_AHCI
|
---|
57 | tstDeviceStructSizeGC_DEFS += VBOX_WITH_AHCI
|
---|
58 | endif
|
---|
59 | ifdef VBOX_WITH_E1000
|
---|
60 | tstDeviceStructSizeGC_DEFS += VBOX_WITH_E1000
|
---|
61 | endif
|
---|
62 | tstDeviceStructSizeGC_SOURCES = tstDeviceStructSizeGC.cpp
|
---|
63 | tstDeviceStructSizeGC_INCS = \
|
---|
64 | $(VBOX_PATH_DEVICES_SRC) \
|
---|
65 | $(VBOX_PATH_DEVICES_SRC)/Bus \
|
---|
66 | $(PATH_TARGET)
|
---|
67 |
|
---|
68 | #
|
---|
69 | # The testcase it self.
|
---|
70 | #
|
---|
71 | PROGRAMS += tstDeviceStructSize
|
---|
72 | tstDeviceStructSize_TEMPLATE = VBOXR3EXE
|
---|
73 | tstDeviceStructSize_DEFS =
|
---|
74 | ifdef VBOX_WITH_USB
|
---|
75 | tstDeviceStructSize_DEFS += VBOX_WITH_USB IN_USB_GC
|
---|
76 | endif
|
---|
77 | ifdef VBOX_WITH_AHCI
|
---|
78 | tstDeviceStructSize_DEFS += VBOX_WITH_AHCI
|
---|
79 | endif
|
---|
80 | ifdef VBOX_WITH_E1000
|
---|
81 | tstDeviceStructSize_DEFS += VBOX_WITH_E1000
|
---|
82 | endif
|
---|
83 | tstDeviceStructSize_INCS = \
|
---|
84 | $(VBOX_PATH_DEVICES_SRC) \
|
---|
85 | $(VBOX_PATH_DEVICES_SRC)/Bus \
|
---|
86 | $(PATH_TARGET)
|
---|
87 | tstDeviceStructSize_SOURCES = tstDeviceStructSize.cpp
|
---|
88 | tstDeviceStructSize_LIBS.l4 = $(LIB_RUNTIME)
|
---|
89 | tstDeviceStructSize_CLEAN = \
|
---|
90 | $(PATH_TARGET)/tstDeviceStructSizeGC.h \
|
---|
91 | $(PATH_TARGET)/tstDeviceStructSizeGC.run
|
---|
92 | tstDeviceStructSize.cpp_DEPS = $(PATH_TARGET)/tstDeviceStructSizeGC.h
|
---|
93 |
|
---|
94 | #
|
---|
95 | # Run rule for tstDeviceStructSize.
|
---|
96 | #
|
---|
97 |
|
---|
98 | # 1. Dump selected structure in the VMMGC.gc debug info.
|
---|
99 | # 2. Generate a testcase from the dump
|
---|
100 | ## future
|
---|
101 |
|
---|
102 | # 1&2. Manually dump selected structures and members.
|
---|
103 | $(PATH_TARGET)/tstDeviceStructSizeGC.h: $$(INSTARGET_tstDeviceStructSizeGC)
|
---|
104 | $(call MSG_GENERATE,,$@)
|
---|
105 | $(QUIET)$(REDIRECT) -wo $@ -- $(INSTARGET_tstDeviceStructSizeGC)
|
---|
106 |
|
---|
107 | # 3. run it.
|
---|
108 | $(PATH_TARGET)/tstDeviceStructSize.run: $$(INSTARGET_tstDeviceStructSize)
|
---|
109 | $(QUIET)$(RM) -f $@
|
---|
110 | $^
|
---|
111 | $(QUIET)$(APPEND) "$@" "done"
|
---|
112 |
|
---|
113 | # alias for the struct test.
|
---|
114 | run-struct-tests: $(PATH_TARGET)/tstDeviceStructSize.run
|
---|
115 |
|
---|
116 |
|
---|
117 | include $(KBUILD_PATH)/subfooter.kmk
|
---|
118 |
|
---|