1 | # $Id: Makefile.kmk 42214 2012-07-18 18:02:58Z vboxsync $
|
---|
2 | ## @file
|
---|
3 | # Sub-Makefile for the VBox API testcases.
|
---|
4 | #
|
---|
5 |
|
---|
6 | #
|
---|
7 | # Copyright (C) 2004-2012 Oracle Corporation
|
---|
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 |
|
---|
18 | SUB_DEPTH = ../../../..
|
---|
19 | include $(KBUILD_PATH)/subheader.kmk
|
---|
20 |
|
---|
21 | #
|
---|
22 | # Target and globals (small mess)
|
---|
23 | #
|
---|
24 | ifndef VBOX_ONLY_SDK
|
---|
25 | if defined(VBOX_WITH_TESTCASES)
|
---|
26 | PROGRAMS += \
|
---|
27 | tstAPI \
|
---|
28 | $(if $(VBOX_OSE),,tstOVF) \
|
---|
29 | $(if $(VBOX_WITH_XPCOM),tstVBoxAPILinux,tstVBoxAPIWin) \
|
---|
30 | $(if $(VBOX_WITH_RESOURCE_USAGE_API),tstCollector,) \
|
---|
31 | $(if $(VBOX_WITH_GUEST_CONTROL),tstGuestCtrlParseBuffer,) \
|
---|
32 | $(if $(VBOX_WITH_GUEST_CONTROL),tstGuestCtrlContextID,)
|
---|
33 | PROGRAMS.linux += \
|
---|
34 | $(if $(VBOX_WITH_USB),tstUSBProxyLinux,)
|
---|
35 | endif # !VBOX_WITH_TESTCASES
|
---|
36 | endif # !VBOX_ONLY_SDK
|
---|
37 | if defined(VBOX_ONLY_SDK) || !defined(VBOX_WITH_XPCOM)
|
---|
38 | INSTALLS += samplesMSCOM
|
---|
39 | endif
|
---|
40 | if defined(VBOX_ONLY_SDK) || defined(VBOX_WITH_XPCOM)
|
---|
41 | INSTALLS += samplesXPCOM
|
---|
42 | endif
|
---|
43 |
|
---|
44 |
|
---|
45 | #
|
---|
46 | # The samples
|
---|
47 | #
|
---|
48 | samplesMSCOM_MODE = a+r,u+w
|
---|
49 | samplesMSCOM_INST = $(INST_SDK)bindings/mscom/samples/
|
---|
50 | samplesMSCOM_SOURCES = tstVBoxAPIWin.cpp
|
---|
51 |
|
---|
52 | samplesXPCOM_MODE = a+r,u+w
|
---|
53 | samplesXPCOM_INST = $(INST_SDK)bindings/xpcom/samples/
|
---|
54 | samplesXPCOM_SOURCES = tstVBoxAPILinux.cpp makefile.tstVBoxAPILinux=>Makefile
|
---|
55 |
|
---|
56 |
|
---|
57 | #
|
---|
58 | # tstAPI
|
---|
59 | #
|
---|
60 | tstAPI_TEMPLATE = VBOXMAINCLIENTEXE
|
---|
61 | #tstAPI_INST = $(INST_SDK)bindings/gluecom/samples/
|
---|
62 | tstAPI_SOURCES = tstAPI.cpp
|
---|
63 | ifeq ($(KBUILD_TARGET),win) ## @todo just add this to the template.
|
---|
64 | tstAPI_DEPS = $(VBOX_PATH_SDK)/bindings/mscom/include/VirtualBox.h
|
---|
65 | else
|
---|
66 | tstAPI_DEPS = $(VBOX_PATH_SDK)/bindings/xpcom/include/VirtualBox_XPCOM.h
|
---|
67 | endif
|
---|
68 | ifdef VBOX_WITH_RESOURCE_USAGE_API
|
---|
69 | tstAPI_DEFS += VBOX_WITH_RESOURCE_USAGE_API
|
---|
70 | endif
|
---|
71 |
|
---|
72 |
|
---|
73 | #
|
---|
74 | # tstOVF
|
---|
75 | #
|
---|
76 | tstOVF_TEMPLATE = VBOXMAINCLIENTEXE
|
---|
77 | #tstOVF_INST = $(INST_SDK)bindings/gluecom/samples/
|
---|
78 | tstOVF_SOURCES = tstOVF.cpp
|
---|
79 | ifeq ($(KBUILD_TARGET),win) ## @todo just add this to the template.
|
---|
80 | tstOVF_DEPS = $(VBOX_PATH_SDK)/bindings/mscom/include/VirtualBox.h
|
---|
81 | else
|
---|
82 | tstOVF_DEPS = $(VBOX_PATH_SDK)/bindings/xpcom/include/VirtualBox_XPCOM.h
|
---|
83 | endif
|
---|
84 | ifdef VBOX_WITH_RESOURCE_USAGE_API
|
---|
85 | tstOVF_DEFS += VBOX_WITH_RESOURCE_USAGE_API
|
---|
86 | endif
|
---|
87 |
|
---|
88 | ifndef VBOX_OSE
|
---|
89 | #
|
---|
90 | # OVF test data.
|
---|
91 | #
|
---|
92 | INSTALLS += ovf-testcases
|
---|
93 | ovf-testcases_MODE = a+r,u+w
|
---|
94 | ovf-testcases_INST = $(INST_BIN)ovf-testcases/
|
---|
95 | ovf-testcases_SOURCES = \
|
---|
96 | ovf-dummy.vmdk \
|
---|
97 | ovf-joomla-0.9/joomla-1.1.4-ovf.ovf=>ovf-joomla-0.9/joomla-1.1.4-ovf.ovf \
|
---|
98 | ovf-winhost-audio-nodisks/WinXP.ovf=>ovf-winhost-audio-nodisks/WinXP.ovf \
|
---|
99 | ovf-winxp-vbox-sharedfolders/winxp.ovf=>ovf-winxp-vbox-sharedfolders/winxp.ovf
|
---|
100 | endif
|
---|
101 |
|
---|
102 |
|
---|
103 | #
|
---|
104 | # tstVBoxAPILinux
|
---|
105 | #
|
---|
106 | # We only build the testcase here to make sure it builds.
|
---|
107 | # It comes with a custom makefile which should be tested as well!
|
---|
108 | #
|
---|
109 | tstVBoxAPILinux_TEMPLATE = VBOXR3EXE
|
---|
110 | tstVBoxAPILinux_SOURCES = tstVBoxAPILinux.cpp
|
---|
111 | tstVBoxAPILinux_CXXFLAGS = -Wno-non-virtual-dtor -fshort-wchar
|
---|
112 | tstVBoxAPILinux_LDFLAGS.solaris += '$(VBOX_GCC_RPATH_OPT)$$(VBOX_ORIGIN)/../../..'
|
---|
113 | ifdef VBOX_WITH_XPCOM_NAMESPACE_CLEANUP
|
---|
114 | tstVBoxAPILinux_DEFS += VBOX_WITH_XPCOM_NAMESPACE_CLEANUP
|
---|
115 | endif
|
---|
116 | tstVBoxAPILinux_INCS = \
|
---|
117 | $(VBOX_XPCOM_INCS) \
|
---|
118 | $(VBOX_PATH_SDK)/bindings/xpcom/include
|
---|
119 | tstVBoxAPILinux_LIBPATH = $(LIBPATH_XPCOM)
|
---|
120 | tstVBoxAPILinux_LIBS = $(LIB_XPCOM) $(LIB_RUNTIME)
|
---|
121 | tstVBoxAPILinux_DEPS = \
|
---|
122 | $(VBOX_PATH_SDK)/bindings/xpcom/include/VirtualBox_XPCOM.h
|
---|
123 |
|
---|
124 |
|
---|
125 | #
|
---|
126 | # tstVBoxAPIWin
|
---|
127 | #
|
---|
128 | tstVBoxAPIWin_TEMPLATE = VBOXMAINCLIENTEXE
|
---|
129 | tstVBoxAPIWin_SOURCES = \
|
---|
130 | tstVBoxAPIWin.cpp \
|
---|
131 | $(VBOX_PATH_SDK)/bindings/mscom/lib/VirtualBox_i.c
|
---|
132 | tstVBoxAPIWin_DEPS = \
|
---|
133 | $(VBOX_PATH_SDK)/bindings/mscom/include/VirtualBox.h
|
---|
134 |
|
---|
135 |
|
---|
136 | #
|
---|
137 | # tstCollector
|
---|
138 | #
|
---|
139 | tstCollector_TEMPLATE = VBOXMAINCLIENTEXE
|
---|
140 | tstCollector_SOURCES = \
|
---|
141 | tstCollector.cpp \
|
---|
142 | ../src-server/Performance.cpp
|
---|
143 | tstCollector_INCS = ../include
|
---|
144 | tstCollector_DEFS += VBOX_COLLECTOR_TEST_CASE
|
---|
145 | tstCollector_LDFLAGS.darwin += -lproc
|
---|
146 | tstCollector_LDFLAGS.solaris += -lkstat
|
---|
147 | tstCollector_LDFLAGS.win += psapi.lib powrprof.lib
|
---|
148 |
|
---|
149 |
|
---|
150 | #
|
---|
151 | # tstGuestCtrlParseBuffer
|
---|
152 | #
|
---|
153 | tstGuestCtrlParseBuffer_TEMPLATE = VBOXMAINCLIENTEXE
|
---|
154 | tstGuestCtrlParseBuffer_DEFS += VBOX_WITH_HGCM VBOX_WITH_GUEST_CONTROL
|
---|
155 | tstGuestCtrlParseBuffer_SOURCES = \
|
---|
156 | tstGuestCtrlParseBuffer.cpp \
|
---|
157 | ../src-client/GuestCtrlPrivate.cpp
|
---|
158 | tstGuestCtrlParseBuffer_INCS = ../include
|
---|
159 | ifeq ($(KBUILD_TARGET),win) ## @todo just add this to the template.
|
---|
160 | tstGuestCtrlParseBuffer_DEPS = $(VBOX_PATH_SDK)/bindings/mscom/include/VirtualBox.h
|
---|
161 | else
|
---|
162 | tstGuestCtrlParseBuffer_DEPS = $(VBOX_PATH_SDK)/bindings/xpcom/include/VirtualBox_XPCOM.h
|
---|
163 | endif
|
---|
164 |
|
---|
165 |
|
---|
166 | #
|
---|
167 | # tstGuestCtrlContextID
|
---|
168 | #
|
---|
169 | tstGuestCtrlContextID_TEMPLATE = VBOXMAINCLIENTEXE
|
---|
170 | tstGuestCtrlContextID_DEFS += VBOX_WITH_HGCM VBOX_WITH_GUEST_CONTROL
|
---|
171 | tstGuestCtrlContextID_SOURCES = \
|
---|
172 | tstGuestCtrlContextID.cpp \
|
---|
173 | ../src-client/GuestCtrlPrivate.cpp
|
---|
174 | tstGuestCtrlContextID_INCS = ../include
|
---|
175 | ifeq ($(KBUILD_TARGET),win) ## @todo just add this to the template.
|
---|
176 | tstGuestCtrlContextID_DEPS = $(VBOX_PATH_SDK)/bindings/mscom/include/VirtualBox.h
|
---|
177 | else
|
---|
178 | tstGuestCtrlContextID_DEPS = $(VBOX_PATH_SDK)/bindings/xpcom/include/VirtualBox_XPCOM.h
|
---|
179 | endif
|
---|
180 |
|
---|
181 |
|
---|
182 | #
|
---|
183 | # tstUSBProxyLinux
|
---|
184 | #
|
---|
185 | tstUSBProxyLinux_TEMPLATE = VBOXR3TSTNPEXE
|
---|
186 | tstUSBProxyLinux_SOURCES = \
|
---|
187 | tstUSBProxyLinux.cpp \
|
---|
188 | ../src-server/linux/USBProxyServiceLinux.cpp \
|
---|
189 | ../src-server/linux/USBGetDevices.cpp
|
---|
190 | tstUSBProxyLinux_INCS = \
|
---|
191 | . \
|
---|
192 | ../include \
|
---|
193 | $(VBOX_PATH_SDK)/bindings/xpcom/include \
|
---|
194 | $(VBOX_PATH_SDK)/bindings/xpcom/include/nsprpub \
|
---|
195 | $(VBOX_PATH_SDK)/bindings/xpcom/include/xpcom
|
---|
196 | tstUSBProxyLinux_DEFS = \
|
---|
197 | UNIT_TEST \
|
---|
198 | VBOX_WITH_USB \
|
---|
199 | VBOX_USB_WITH_SYSFS \
|
---|
200 | VBOX_WITH_XPCOM
|
---|
201 | tstUSBProxyLinux_DEPS = \
|
---|
202 | $(VBOX_PATH_SDK)/bindings/xpcom/include/VirtualBox_XPCOM.h
|
---|
203 | tstUSBProxyLinux_LIBS += \
|
---|
204 | $(PATH_OUT)/lib/USBLib.a \
|
---|
205 | $(PATH_OUT)/lib/VBoxCOM.a
|
---|
206 |
|
---|
207 |
|
---|
208 | # generate rules.
|
---|
209 | include $(FILE_KBUILD_SUB_FOOTER)
|
---|
210 |
|
---|