1 | # $Id: Makefile.kmk 97275 2022-10-24 10:00:13Z vboxsync $
|
---|
2 | ## @file
|
---|
3 | # Sub-Makefile for the Shared Clipboard Host Service testcases.
|
---|
4 | #
|
---|
5 |
|
---|
6 | #
|
---|
7 | # Copyright (C) 2011-2022 Oracle and/or its affiliates.
|
---|
8 | #
|
---|
9 | # This file is part of VirtualBox base platform packages, as
|
---|
10 | # available from https://www.virtualbox.org.
|
---|
11 | #
|
---|
12 | # This program is free software; you can redistribute it and/or
|
---|
13 | # modify it under the terms of the GNU General Public License
|
---|
14 | # as published by the Free Software Foundation, in version 3 of the
|
---|
15 | # License.
|
---|
16 | #
|
---|
17 | # This program is distributed in the hope that it will be useful, but
|
---|
18 | # WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
19 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
---|
20 | # General Public License for more details.
|
---|
21 | #
|
---|
22 | # You should have received a copy of the GNU General Public License
|
---|
23 | # along with this program; if not, see <https://www.gnu.org/licenses>.
|
---|
24 | #
|
---|
25 | # SPDX-License-Identifier: GPL-3.0-only
|
---|
26 | #
|
---|
27 |
|
---|
28 | SUB_DEPTH = ../../../../..
|
---|
29 | include $(KBUILD_PATH)/subheader.kmk
|
---|
30 |
|
---|
31 | if defined(VBOX_WITH_TESTCASES) && !defined(VBOX_ONLY_ADDITIONS) && !defined(VBOX_ONLY_SDK)
|
---|
32 |
|
---|
33 | #
|
---|
34 | # Testcase which mocks HGCM to also test the VbglR3-side of Shared Clipboard.
|
---|
35 | #
|
---|
36 | # Goal is to use and test as much guest side code as possible as a self-contained
|
---|
37 | # binary on the host here.
|
---|
38 | #
|
---|
39 | # Note: No #ifdef TESTCASE hacks or similar allowed, has to run
|
---|
40 | # without #ifdef modifications to the core code!
|
---|
41 | #
|
---|
42 | tstClipboardMockHGCM_TEMPLATE = VBOXR3TSTEXE
|
---|
43 | tstClipboardMockHGCM_DEFS = VBOX_WITH_HGCM VBOX_WITH_SHARED_CLIPBOARD
|
---|
44 | tstClipboardMockHGCM_SOURCES = \
|
---|
45 | ../VBoxSharedClipboardSvc.cpp \
|
---|
46 | $(PATH_ROOT)/src/VBox/GuestHost/SharedClipboard/clipboard-common.cpp \
|
---|
47 | $(PATH_ROOT)/src/VBox/Additions/common/VBoxGuest/lib/VBoxGuestR3LibClipboard.cpp \
|
---|
48 | $(PATH_ROOT)/src/VBox/HostServices/common/message.cpp \
|
---|
49 | tstClipboardMockHGCM.cpp
|
---|
50 | tstClipboardMockHGCM_LIBS = $(LIB_RUNTIME)
|
---|
51 |
|
---|
52 | if1of ($(KBUILD_TARGET), linux solaris)
|
---|
53 | PROGRAMS += tstClipboardMockHGCM
|
---|
54 | tstClipboardMockHGCM_SOURCES += \
|
---|
55 | $(PATH_ROOT)/src/VBox/GuestHost/SharedClipboard/clipboard-x11.cpp \
|
---|
56 | ../VBoxSharedClipboardSvc-x11.cpp
|
---|
57 | tstClipboardMockHGCM_LIBPATH = \
|
---|
58 | $(VBOX_LIBPATH_X11)
|
---|
59 | tstClipboardMockHGCM_LIBS += \
|
---|
60 | Xt \
|
---|
61 | X11
|
---|
62 | endif
|
---|
63 | if1of ($(KBUILD_TARGET), win)
|
---|
64 | PROGRAMS += tstClipboardMockHGCM
|
---|
65 | tstClipboardMockHGCM_SOURCES += \
|
---|
66 | $(PATH_ROOT)/src/VBox/GuestHost/SharedClipboard/clipboard-win.cpp \
|
---|
67 | ../VBoxSharedClipboardSvc-win.cpp
|
---|
68 | endif
|
---|
69 |
|
---|
70 | tstClipboardMockHGCM_CLEAN = $(tstClipboardMockHGCM_0_OUTDIR)/tstClipboardMockHGCM.run
|
---|
71 |
|
---|
72 | if defined(VBOX_WITH_SHARED_CLIPBOARD_TRANSFERS)
|
---|
73 | tstClipboardMockHGCM_DEFS += VBOX_WITH_SHARED_CLIPBOARD_TRANSFERS
|
---|
74 | tstClipboardMockHGCM_SOURCES += \
|
---|
75 | ../VBoxSharedClipboardSvc-transfers.cpp \
|
---|
76 | $(PATH_ROOT)/src/VBox/GuestHost/SharedClipboard/clipboard-transfers.cpp
|
---|
77 | endif
|
---|
78 |
|
---|
79 | if 0 # Enable this if you want automatic runs after compilation.
|
---|
80 | $$(tstClipboardMockHGCM_0_OUTDIR)/tstClipboardMockHGCM.run: $$(tstClipboardMockHGCM_1_STAGE_TARGET)
|
---|
81 | export VBOX_LOG_DEST=nofile; $(tstClipboardMockHGCM_1_STAGE_TARGET) quiet
|
---|
82 | $(QUIET)$(APPEND) -t "$@" "done"
|
---|
83 | OTHERS += $(tstClipboardMockHGCM_0_OUTDIR)/tstClipboardMockHGCM.run
|
---|
84 | endif
|
---|
85 |
|
---|
86 | #
|
---|
87 | #
|
---|
88 | #
|
---|
89 | PROGRAMS += tstClipboardServiceHost
|
---|
90 | tstClipboardServiceHost_TEMPLATE = VBOXR3TSTEXE
|
---|
91 | tstClipboardServiceHost_DEFS = VBOX_WITH_HGCM UNIT_TEST
|
---|
92 | tstClipboardServiceHost_SOURCES = \
|
---|
93 | ../VBoxSharedClipboardSvc.cpp \
|
---|
94 | $(PATH_ROOT)/src/VBox/GuestHost/SharedClipboard/clipboard-common.cpp \
|
---|
95 | $(PATH_ROOT)/src/VBox/HostServices/common/message.cpp \
|
---|
96 | tstClipboardServiceHost.cpp
|
---|
97 | tstClipboardServiceHost_LIBS = $(LIB_RUNTIME)
|
---|
98 | tstClipboardServiceHost_CLEAN = $(tstClipboardServiceHost_0_OUTDIR)/tstClipboardServiceHost.run
|
---|
99 |
|
---|
100 | if defined(VBOX_WITH_SHARED_CLIPBOARD_TRANSFERS)
|
---|
101 | tstClipboardServiceHost_DEFS += VBOX_WITH_SHARED_CLIPBOARD_TRANSFERS
|
---|
102 | tstClipboardServiceHost_SOURCES += \
|
---|
103 | ../VBoxSharedClipboardSvc-transfers.cpp \
|
---|
104 | $(PATH_ROOT)/src/VBox/GuestHost/SharedClipboard/clipboard-transfers.cpp
|
---|
105 | endif
|
---|
106 |
|
---|
107 | #
|
---|
108 | #
|
---|
109 | #
|
---|
110 | PROGRAMS += tstClipboardServiceImpl
|
---|
111 | tstClipboardServiceImpl_TEMPLATE = VBOXR3TSTEXE
|
---|
112 | tstClipboardServiceImpl_DEFS = VBOX_WITH_HGCM UNIT_TEST
|
---|
113 | tstClipboardServiceImpl_SOURCES = \
|
---|
114 | ../VBoxSharedClipboardSvc.cpp \
|
---|
115 | $(PATH_ROOT)/src/VBox/GuestHost/SharedClipboard/clipboard-common.cpp \
|
---|
116 | $(PATH_ROOT)/src/VBox/HostServices/common/message.cpp \
|
---|
117 | tstClipboardServiceImpl.cpp
|
---|
118 | tstClipboardServiceImpl_SOURCES.win = \
|
---|
119 | $(PATH_ROOT)/src/VBox/GuestHost/SharedClipboard/clipboard-win.cpp
|
---|
120 | tstClipboardServiceImpl_LIBS = $(LIB_RUNTIME)
|
---|
121 | tstClipboardServiceImpl_CLEAN = $(tstClipboardServiceImpl_0_OUTDIR)/tstClipboardServiceImpl.run
|
---|
122 |
|
---|
123 | if defined(VBOX_WITH_SHARED_CLIPBOARD_TRANSFERS)
|
---|
124 | #
|
---|
125 | #
|
---|
126 | #
|
---|
127 | PROGRAMS += tstClipboardTransfers
|
---|
128 | tstClipboardTransfers_TEMPLATE = VBOXR3TSTEXE
|
---|
129 | tstClipboardTransfers_DEFS = VBOX_WITH_HGCM UNIT_TEST VBOX_WITH_SHARED_CLIPBOARD_TRANSFERS
|
---|
130 | tstClipboardTransfers_SOURCES = \
|
---|
131 | $(PATH_ROOT)/src/VBox/GuestHost/SharedClipboard/clipboard-common.cpp \
|
---|
132 | $(PATH_ROOT)/src/VBox/GuestHost/SharedClipboard/clipboard-transfers.cpp \
|
---|
133 | tstClipboardTransfers.cpp
|
---|
134 | endif
|
---|
135 | endif
|
---|
136 |
|
---|
137 | include $(FILE_KBUILD_SUB_FOOTER)
|
---|