1 | # $Id: Makefile.kmk 28800 2010-04-27 08:22:32Z 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)" == "dmik"
|
---|
26 | PROGRAMS += \
|
---|
27 | tstAPI \
|
---|
28 | $(if $(VBOX_WITH_XPCOM),tstVBoxAPILinux,tstVBoxAPIWin) \
|
---|
29 | $(if $(VBOX_WITH_RESOURCE_USAGE_API),tstCollector,)
|
---|
30 | PROGRAMS.linux += \
|
---|
31 | $(if $(VBOX_WITH_USB),tstHostHardwareLinux,)
|
---|
32 | endif # !VBOX_WITH_TESTCASES
|
---|
33 | endif # !VBOX_ONLY_SDK
|
---|
34 | if defined(VBOX_ONLY_SDK) || !defined(VBOX_WITH_XPCOM)
|
---|
35 | INSTALLS += samplesMSCOM
|
---|
36 | endif
|
---|
37 | if defined(VBOX_ONLY_SDK) || defined(VBOX_WITH_XPCOM)
|
---|
38 | INSTALLS += samplesXPCOM
|
---|
39 | endif
|
---|
40 |
|
---|
41 |
|
---|
42 | #
|
---|
43 | # The samples
|
---|
44 | #
|
---|
45 | samplesMSCOM_MODE = a+r,u+w
|
---|
46 | samplesMSCOM_INST = $(INST_SDK)bindings/mscom/samples/
|
---|
47 | samplesMSCOM_SOURCES = tstVBoxAPIWin.cpp
|
---|
48 |
|
---|
49 | samplesXPCOM_MODE = a+r,u+w
|
---|
50 | samplesXPCOM_INST = $(INST_SDK)bindings/xpcom/samples/
|
---|
51 | samplesXPCOM_SOURCES = tstVBoxAPILinux.cpp makefile.tstVBoxAPILinux=>Makefile
|
---|
52 |
|
---|
53 |
|
---|
54 | #
|
---|
55 | # tstAPI
|
---|
56 | #
|
---|
57 | tstAPI_TEMPLATE = VBOXMAINCLIENTEXE
|
---|
58 | #tstAPI_INST = $(INST_SDK)bindings/gluecom/samples/
|
---|
59 | tstAPI_SOURCES = tstAPI.cpp
|
---|
60 | ifeq ($(KBUILD_TARGET),win) ## @todo just add this to the template.
|
---|
61 | tstAPI_DEPS = $(VBOX_PATH_SDK)/bindings/mscom/include/VirtualBox.h
|
---|
62 | else
|
---|
63 | tstAPI_DEPS = $(VBOX_PATH_SDK)/bindings/xpcom/include/VirtualBox_XPCOM.h
|
---|
64 | endif
|
---|
65 | ifdef VBOX_WITH_RESOURCE_USAGE_API
|
---|
66 | tstAPI_DEFS += VBOX_WITH_RESOURCE_USAGE_API
|
---|
67 | endif
|
---|
68 |
|
---|
69 |
|
---|
70 | #
|
---|
71 | # tstVBoxAPILinux
|
---|
72 | #
|
---|
73 | # We only build the testcase here to make sure it builds.
|
---|
74 | # It comes with a custom makefile which should be tested as well!
|
---|
75 | #
|
---|
76 | tstVBoxAPILinux_TEMPLATE = VBOXR3EXE
|
---|
77 | tstVBoxAPILinux_SOURCES = tstVBoxAPILinux.cpp
|
---|
78 | tstVBoxAPILinux_CXXFLAGS = -Wno-non-virtual-dtor -fshort-wchar
|
---|
79 | tstVBoxAPILinux_LDFLAGS.solaris += '$(VBOX_GCC_RPATH_OPT)$$(VBOX_ORIGIN)/../../..'
|
---|
80 | ifdef VBOX_WITH_XPCOM_NAMESPACE_CLEANUP
|
---|
81 | tstVBoxAPILinux_DEFS += VBOX_WITH_XPCOM_NAMESPACE_CLEANUP
|
---|
82 | endif
|
---|
83 | tstVBoxAPILinux_INCS = \
|
---|
84 | $(VBOX_XPCOM_INCS) \
|
---|
85 | $(VBOX_PATH_SDK)/bindings/xpcom/include
|
---|
86 | tstVBoxAPILinux_LIBPATH = $(LIBPATH_XPCOM)
|
---|
87 | tstVBoxAPILinux_LIBS = $(LIB_XPCOM) $(LIB_RUNTIME)
|
---|
88 | tstVBoxAPILinux_DEPS = \
|
---|
89 | $(VBOX_PATH_SDK)/bindings/xpcom/include/VirtualBox_XPCOM.h
|
---|
90 |
|
---|
91 |
|
---|
92 | #
|
---|
93 | # tstVBoxAPIWin
|
---|
94 | #
|
---|
95 | tstVBoxAPIWin_TEMPLATE = VBOXMAINCLIENTEXE
|
---|
96 | tstVBoxAPIWin_SOURCES = \
|
---|
97 | tstVBoxAPIWin.cpp \
|
---|
98 | $(VBOX_PATH_SDK)/bindings/mscom/lib/VirtualBox_i.c
|
---|
99 | tstVBoxAPIWin_DEPS = \
|
---|
100 | $(VBOX_PATH_SDK)/bindings/mscom/include/VirtualBox.h
|
---|
101 |
|
---|
102 |
|
---|
103 | #
|
---|
104 | # tstCollector
|
---|
105 | #
|
---|
106 | tstCollector_TEMPLATE = VBOXMAINCLIENTEXE
|
---|
107 | tstCollector_SOURCES = \
|
---|
108 | tstCollector.cpp \
|
---|
109 | ../Performance.cpp
|
---|
110 | tstCollector_INCS = ../include
|
---|
111 | tstCollector_DEFS += VBOX_COLLECTOR_TEST_CASE
|
---|
112 | tstCollector_LDFLAGS.darwin += -lproc
|
---|
113 | tstCollector_LDFLAGS.solaris += -lkstat
|
---|
114 | tstCollector_LDFLAGS.win += psapi.lib powrprof.lib
|
---|
115 |
|
---|
116 |
|
---|
117 |
|
---|
118 | #
|
---|
119 | # tstHostHardwareLinux
|
---|
120 | #
|
---|
121 | tstHostHardwareLinux_TEMPLATE = VBOXR3TSTEXE
|
---|
122 | tstHostHardwareLinux_SOURCES = \
|
---|
123 | tstHostHardwareLinux.cpp \
|
---|
124 | ../linux/HostHardwareLinux.cpp
|
---|
125 | tstHostHardwareLinux_INCS = . ../include
|
---|
126 | tstHostHardwareLinux_DEFS = \
|
---|
127 | VBOX_TEST_USB_LINUX \
|
---|
128 | TESTCASE \
|
---|
129 | $(if $(VBOX_WITH_LINUX_COMPILER_H),VBOX_WITH_LINUX_COMPILER_H,) \
|
---|
130 | $(if $(VBOX_WITH_DBUS),$(if $(VBOX_USB_WITH_DBUS),VBOX_USB_WITH_DBUS,),) \
|
---|
131 | $(if $(VBOX_USB_WITH_SYSFS),VBOX_USB_WITH_SYSFS,) \
|
---|
132 | $(if $(VBOX_USB_WITH_FAM),VBOX_USB_WITH_FAM,)
|
---|
133 | tstHostHardwareLinux_LIBS += \
|
---|
134 | $(PATH_OUT)/lib/USBLib.a \
|
---|
135 | $(if $(VBOX_USB_WITH_FAM),fam,)
|
---|
136 |
|
---|
137 |
|
---|
138 | # generate rules.
|
---|
139 | include $(KBUILD_PATH)/subfooter.kmk
|
---|
140 |
|
---|