1 | # $Id: Makefile.kmk 30876 2010-07-16 11:32:38Z vboxsync $
|
---|
2 | ## @file
|
---|
3 | # Sub-Makefile for the VBox API testcases.
|
---|
4 | #
|
---|
5 |
|
---|
6 | #
|
---|
7 | # Copyright (C) 2006-2007 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) || "$(USERNAME)" == "umoeller"
|
---|
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 | PROGRAMS.linux += \
|
---|
32 | $(if $(VBOX_WITH_USB),tstHostHardwareLinux,)
|
---|
33 | endif # !VBOX_WITH_TESTCASES
|
---|
34 | endif # !VBOX_ONLY_SDK
|
---|
35 | if defined(VBOX_ONLY_SDK) || !defined(VBOX_WITH_XPCOM)
|
---|
36 | INSTALLS += samplesMSCOM
|
---|
37 | endif
|
---|
38 | if defined(VBOX_ONLY_SDK) || defined(VBOX_WITH_XPCOM)
|
---|
39 | INSTALLS += samplesXPCOM
|
---|
40 | endif
|
---|
41 |
|
---|
42 |
|
---|
43 | #
|
---|
44 | # The samples
|
---|
45 | #
|
---|
46 | samplesMSCOM_MODE = a+r,u+w
|
---|
47 | samplesMSCOM_INST = $(INST_SDK)bindings/mscom/samples/
|
---|
48 | samplesMSCOM_SOURCES = tstVBoxAPIWin.cpp
|
---|
49 |
|
---|
50 | samplesXPCOM_MODE = a+r,u+w
|
---|
51 | samplesXPCOM_INST = $(INST_SDK)bindings/xpcom/samples/
|
---|
52 | samplesXPCOM_SOURCES = tstVBoxAPILinux.cpp makefile.tstVBoxAPILinux=>Makefile
|
---|
53 |
|
---|
54 |
|
---|
55 | #
|
---|
56 | # tstAPI
|
---|
57 | #
|
---|
58 | tstAPI_TEMPLATE = VBOXMAINCLIENTEXE
|
---|
59 | #tstAPI_INST = $(INST_SDK)bindings/gluecom/samples/
|
---|
60 | tstAPI_SOURCES = tstAPI.cpp
|
---|
61 | ifeq ($(KBUILD_TARGET),win) ## @todo just add this to the template.
|
---|
62 | tstAPI_DEPS = $(VBOX_PATH_SDK)/bindings/mscom/include/VirtualBox.h
|
---|
63 | else
|
---|
64 | tstAPI_DEPS = $(VBOX_PATH_SDK)/bindings/xpcom/include/VirtualBox_XPCOM.h
|
---|
65 | endif
|
---|
66 | ifdef VBOX_WITH_RESOURCE_USAGE_API
|
---|
67 | tstAPI_DEFS += VBOX_WITH_RESOURCE_USAGE_API
|
---|
68 | endif
|
---|
69 |
|
---|
70 | #
|
---|
71 | # tstOVF
|
---|
72 | #
|
---|
73 | tstOVF_TEMPLATE = VBOXMAINCLIENTEXE
|
---|
74 | #tstOVF_INST = $(INST_SDK)bindings/gluecom/samples/
|
---|
75 | tstOVF_SOURCES = tstOVF.cpp
|
---|
76 | ifeq ($(KBUILD_TARGET),win) ## @todo just add this to the template.
|
---|
77 | tstOVF_DEPS = $(VBOX_PATH_SDK)/bindings/mscom/include/VirtualBox.h
|
---|
78 | else
|
---|
79 | tstOVF_DEPS = $(VBOX_PATH_SDK)/bindings/xpcom/include/VirtualBox_XPCOM.h
|
---|
80 | endif
|
---|
81 | ifdef VBOX_WITH_RESOURCE_USAGE_API
|
---|
82 | tstOVF_DEFS += VBOX_WITH_RESOURCE_USAGE_API
|
---|
83 | endif
|
---|
84 |
|
---|
85 | ifndef VBOX_OSE
|
---|
86 | #
|
---|
87 | # OVF test data.
|
---|
88 | #
|
---|
89 | INSTALLS += ovf-testcases
|
---|
90 | ovf-testcases_MODE = a+r,u+w
|
---|
91 | ovf-testcases_INST = $(INST_BIN)ovf-testcases/
|
---|
92 | ovf-testcases_SOURCES = \
|
---|
93 | ovf-dummy.vmdk \
|
---|
94 | ovf-joomla-0.9/joomla-1.1.4-ovf.ovf=>ovf-joomla-0.9/joomla-1.1.4-ovf.ovf \
|
---|
95 | ovf-winxp-vbox-sharedfolders/winxp.ovf=>ovf-winxp-vbox-sharedfolders/winxp.ovf
|
---|
96 | endif
|
---|
97 |
|
---|
98 | #
|
---|
99 | # tstVBoxAPILinux
|
---|
100 | #
|
---|
101 | # We only build the testcase here to make sure it builds.
|
---|
102 | # It comes with a custom makefile which should be tested as well!
|
---|
103 | #
|
---|
104 | tstVBoxAPILinux_TEMPLATE = VBOXR3EXE
|
---|
105 | tstVBoxAPILinux_SOURCES = tstVBoxAPILinux.cpp
|
---|
106 | tstVBoxAPILinux_CXXFLAGS = -Wno-non-virtual-dtor -fshort-wchar
|
---|
107 | tstVBoxAPILinux_LDFLAGS.solaris += '$(VBOX_GCC_RPATH_OPT)$$(VBOX_ORIGIN)/../../..'
|
---|
108 | ifdef VBOX_WITH_XPCOM_NAMESPACE_CLEANUP
|
---|
109 | tstVBoxAPILinux_DEFS += VBOX_WITH_XPCOM_NAMESPACE_CLEANUP
|
---|
110 | endif
|
---|
111 | tstVBoxAPILinux_INCS = \
|
---|
112 | $(VBOX_XPCOM_INCS) \
|
---|
113 | $(VBOX_PATH_SDK)/bindings/xpcom/include
|
---|
114 | tstVBoxAPILinux_LIBPATH = $(LIBPATH_XPCOM)
|
---|
115 | tstVBoxAPILinux_LIBS = $(LIB_XPCOM) $(LIB_RUNTIME)
|
---|
116 | tstVBoxAPILinux_DEPS = \
|
---|
117 | $(VBOX_PATH_SDK)/bindings/xpcom/include/VirtualBox_XPCOM.h
|
---|
118 |
|
---|
119 |
|
---|
120 | #
|
---|
121 | # tstVBoxAPIWin
|
---|
122 | #
|
---|
123 | tstVBoxAPIWin_TEMPLATE = VBOXMAINCLIENTEXE
|
---|
124 | tstVBoxAPIWin_SOURCES = \
|
---|
125 | tstVBoxAPIWin.cpp \
|
---|
126 | $(VBOX_PATH_SDK)/bindings/mscom/lib/VirtualBox_i.c
|
---|
127 | tstVBoxAPIWin_DEPS = \
|
---|
128 | $(VBOX_PATH_SDK)/bindings/mscom/include/VirtualBox.h
|
---|
129 |
|
---|
130 |
|
---|
131 | #
|
---|
132 | # tstCollector
|
---|
133 | #
|
---|
134 | tstCollector_TEMPLATE = VBOXMAINCLIENTEXE
|
---|
135 | tstCollector_SOURCES = \
|
---|
136 | tstCollector.cpp \
|
---|
137 | ../Performance.cpp
|
---|
138 | tstCollector_INCS = ../include
|
---|
139 | tstCollector_DEFS += VBOX_COLLECTOR_TEST_CASE
|
---|
140 | tstCollector_LDFLAGS.darwin += -lproc
|
---|
141 | tstCollector_LDFLAGS.solaris += -lkstat
|
---|
142 | tstCollector_LDFLAGS.win += psapi.lib powrprof.lib
|
---|
143 |
|
---|
144 |
|
---|
145 |
|
---|
146 | #
|
---|
147 | # tstHostHardwareLinux
|
---|
148 | #
|
---|
149 | tstHostHardwareLinux_TEMPLATE = VBOXR3TSTNPEXE
|
---|
150 | tstHostHardwareLinux_SOURCES = \
|
---|
151 | tstHostHardwareLinux.cpp \
|
---|
152 | ../linux/HostHardwareLinux.cpp
|
---|
153 | tstHostHardwareLinux_INCS = . ../include
|
---|
154 | tstHostHardwareLinux_DEFS = \
|
---|
155 | VBOX_TEST_USB_LINUX \
|
---|
156 | TESTCASE \
|
---|
157 | $(if $(VBOX_WITH_LINUX_COMPILER_H),VBOX_WITH_LINUX_COMPILER_H,) \
|
---|
158 | $(if $(VBOX_WITH_DBUS),$(if $(VBOX_USB_WITH_DBUS),VBOX_USB_WITH_DBUS,),) \
|
---|
159 | $(if $(VBOX_USB_WITH_SYSFS),VBOX_USB_WITH_SYSFS,) \
|
---|
160 | $(if $(VBOX_USB_WITH_INOTIFY),VBOX_USB_WITH_INOTIFY,)
|
---|
161 | tstHostHardwareLinux_LIBS += \
|
---|
162 | $(PATH_OUT)/lib/USBLib.a
|
---|
163 |
|
---|
164 |
|
---|
165 | # generate rules.
|
---|
166 | include $(KBUILD_PATH)/subfooter.kmk
|
---|
167 |
|
---|