1 | # $Id: Makefile.kmk 99951 2023-05-24 10:37:12Z vboxsync $
|
---|
2 | ## @file
|
---|
3 | # Sub-Makefile for the Shared Clipboard Host Service.
|
---|
4 | #
|
---|
5 |
|
---|
6 | #
|
---|
7 | # Copyright (C) 2006-2023 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 | # Include sub-makefile(s).
|
---|
32 | include $(PATH_SUB_CURRENT)/testcase/Makefile.kmk
|
---|
33 |
|
---|
34 | #
|
---|
35 | # The Shared Clipboard service DLL.
|
---|
36 | #
|
---|
37 | DLLS += VBoxSharedClipboard
|
---|
38 | VBoxSharedClipboard_TEMPLATE = VBoxR3Dll
|
---|
39 | VBoxSharedClipboard_DEFS = \
|
---|
40 | VBOX_WITH_HGCM \
|
---|
41 | $(if $(VBOX_WITH_SHARED_CLIPBOARD_TRANSFERS),VBOX_WITH_SHARED_CLIPBOARD_TRANSFERS,)
|
---|
42 | VBoxSharedClipboard_INCS.win = \
|
---|
43 | $(VBOX_PATH_SDK)
|
---|
44 |
|
---|
45 | VBoxSharedClipboard_SOURCES = \
|
---|
46 | VBoxSharedClipboardSvc.cpp \
|
---|
47 | $(PATH_ROOT)/src/VBox/HostServices/common/message.cpp \
|
---|
48 | $(PATH_ROOT)/src/VBox/GuestHost/SharedClipboard/clipboard-common.cpp
|
---|
49 | VBoxSharedClipboard_SOURCES.win = \
|
---|
50 | VBoxSharedClipboardSvc-win.cpp \
|
---|
51 | $(PATH_ROOT)/src/VBox/GuestHost/SharedClipboard/clipboard-win.cpp \
|
---|
52 | VBoxSharedClipboardSvc.rc
|
---|
53 | VBoxSharedClipboard_SOURCES.darwin = \
|
---|
54 | VBoxSharedClipboardSvc-darwin.cpp \
|
---|
55 | darwin-pasteboard.cpp
|
---|
56 | ifdef VBOX_WITH_SHARED_CLIPBOARD_TRANSFERS
|
---|
57 | ifdef VBOX_WITH_SHARED_CLIPBOARD_TRANSFERS_HTTP
|
---|
58 | if1of ($(KBUILD_TARGET), linux)
|
---|
59 | VBoxSharedClipboard_DEFS += VBOX_WITH_SHARED_CLIPBOARD_TRANSFERS_HTTP
|
---|
60 | VBoxSharedClipboard_SOURCES += \
|
---|
61 | $(PATH_ROOT)/src/VBox/GuestHost/SharedClipboard/clipboard-transfers-http.cpp
|
---|
62 | endif
|
---|
63 | endif
|
---|
64 | VBoxSharedClipboard_DEFS += VBOX_WITH_SHARED_CLIPBOARD_HOST
|
---|
65 | VBoxSharedClipboard_SOURCES += \
|
---|
66 | VBoxSharedClipboardSvc-transfers.cpp \
|
---|
67 | $(PATH_ROOT)/src/VBox/GuestHost/SharedClipboard/clipboard-transfers-provider-local.cpp \
|
---|
68 | VBoxSharedClipboardSvc-utils.cpp \
|
---|
69 | $(PATH_ROOT)/src/VBox/GuestHost/SharedClipboard/ClipboardPath.cpp \
|
---|
70 | $(PATH_ROOT)/src/VBox/GuestHost/SharedClipboard/clipboard-transfers.cpp
|
---|
71 | VBoxSharedClipboard_SOURCES.win += \
|
---|
72 | $(PATH_ROOT)/src/VBox/GuestHost/SharedClipboard/ClipboardDataObjectImpl-win.cpp \
|
---|
73 | $(PATH_ROOT)/src/VBox/GuestHost/SharedClipboard/ClipboardEnumFormatEtcImpl-win.cpp \
|
---|
74 | $(PATH_ROOT)/src/VBox/GuestHost/SharedClipboard/ClipboardStreamImpl-win.cpp
|
---|
75 | endif
|
---|
76 | if1of ($(KBUILD_TARGET), linux solaris freebsd) ## @todo X11
|
---|
77 | ifndef VBOX_HEADLESS
|
---|
78 | VBoxSharedClipboard_SOURCES += \
|
---|
79 | $(PATH_ROOT)/src/VBox/GuestHost/SharedClipboard/clipboard-x11.cpp \
|
---|
80 | VBoxSharedClipboardSvc-x11.cpp
|
---|
81 | else
|
---|
82 | VBoxSharedClipboard_SOURCES += \
|
---|
83 | VBoxSharedClipboardSvc-x11-stubs.cpp
|
---|
84 | endif
|
---|
85 | endif
|
---|
86 |
|
---|
87 | VBoxSharedClipboard_LIBS = \
|
---|
88 | $(LIB_RUNTIME)
|
---|
89 | if1of ($(KBUILD_TARGET), linux solaris freebsd)
|
---|
90 | ifndef VBOX_HEADLESS
|
---|
91 | VBoxSharedClipboard_LIBPATH = \
|
---|
92 | $(VBOX_LIBPATH_X11)
|
---|
93 | VBoxSharedClipboard_LIBS += \
|
---|
94 | Xt \
|
---|
95 | X11
|
---|
96 | endif
|
---|
97 | endif
|
---|
98 |
|
---|
99 | VBoxSharedClipboard_LDFLAGS.darwin = \
|
---|
100 | -framework ApplicationServices -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/VBoxSharedClipboard.dylib
|
---|
101 |
|
---|
102 | if 0 ## Disabled for now; needs to be adapted to the new protocol first.
|
---|
103 | if defined(VBOX_WITH_TESTCASES) && !defined(VBOX_ONLY_ADDITIONS) && !defined(VBOX_ONLY_SDK)
|
---|
104 | if1of ($(KBUILD_TARGET), freebsd linux netbsd openbsd solaris)
|
---|
105 | #
|
---|
106 | # Set this in LocalConfig.kmk if you are working on the X11 clipboard service
|
---|
107 | # to automatically run the unit test at build time.
|
---|
108 | # OTHERS += $(tstClipboardX11-2_0_OUTDIR)/tstClipboardX11-2.run
|
---|
109 | PROGRAMS += tstClipboardX11-2
|
---|
110 | TESTING += $(tstClipboardX11-2_0_OUTDIR)/tstClipboardX11-2.run
|
---|
111 | tstClipboardX11-2_TEMPLATE = VBoxR3TstExe
|
---|
112 | tstClipboardX11-2_DEFS = VBOX_WITH_HGCM TESTCASE
|
---|
113 | tstClipboardX11-2_SOURCES = VBoxSharedClipboardSvc-x11.cpp
|
---|
114 | tstClipboardX11-2_LIBS = $(LIB_RUNTIME)
|
---|
115 | tstClipboardX11-2_CLEAN = $(tstClipboardX11-2_0_OUTDIR)/tstClipboardX11-2.run
|
---|
116 |
|
---|
117 | $$(tstClipboardX11-2_0_OUTDIR)/tstClipboardX11-2.run: $$(tstClipboardX11-2_1_STAGE_TARGET)
|
---|
118 | export VBOX_LOG_DEST=nofile; $(tstClipboardX11-2_1_STAGE_TARGET) quiet
|
---|
119 | $(QUIET)$(APPEND) -t "$@" "done"
|
---|
120 | endif # 1of ($(KBUILD_TARGET),freebsd linux netbsd openbsd solaris)
|
---|
121 | endif
|
---|
122 | endif
|
---|
123 |
|
---|
124 | include $(FILE_KBUILD_SUB_FOOTER)
|
---|