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