1 | # $Id: Makefile.kmk 98415 2023-02-01 16:24:09Z 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 | if1of ($(KBUILD_TARGET), linux)
|
---|
58 | VBoxSharedClipboard_DEFS += VBOX_WITH_SHARED_CLIPBOARD_TRANSFERS_HTTP
|
---|
59 | VBoxSharedClipboard_SOURCES += \
|
---|
60 | $(PATH_ROOT)/src/VBox/GuestHost/SharedClipboard/clipboard-transfers-http.cpp
|
---|
61 | endif
|
---|
62 | VBoxSharedClipboard_DEFS += VBOX_WITH_SHARED_CLIPBOARD_HOST
|
---|
63 | VBoxSharedClipboard_SOURCES += \
|
---|
64 | VBoxSharedClipboardSvc-transfers.cpp \
|
---|
65 | VBoxSharedClipboardSvc-utils.cpp \
|
---|
66 | $(PATH_ROOT)/src/VBox/GuestHost/SharedClipboard/ClipboardPath.cpp \
|
---|
67 | $(PATH_ROOT)/src/VBox/GuestHost/SharedClipboard/clipboard-transfers.cpp
|
---|
68 | VBoxSharedClipboard_SOURCES.win += \
|
---|
69 | $(PATH_ROOT)/src/VBox/GuestHost/SharedClipboard/ClipboardDataObjectImpl-win.cpp \
|
---|
70 | $(PATH_ROOT)/src/VBox/GuestHost/SharedClipboard/ClipboardEnumFormatEtcImpl-win.cpp \
|
---|
71 | $(PATH_ROOT)/src/VBox/GuestHost/SharedClipboard/ClipboardStreamImpl-win.cpp
|
---|
72 | endif
|
---|
73 | if1of ($(KBUILD_TARGET), linux solaris freebsd) ## @todo X11
|
---|
74 | ifndef VBOX_HEADLESS
|
---|
75 | VBoxSharedClipboard_SOURCES += \
|
---|
76 | $(PATH_ROOT)/src/VBox/GuestHost/SharedClipboard/clipboard-x11.cpp \
|
---|
77 | VBoxSharedClipboardSvc-x11.cpp
|
---|
78 | else
|
---|
79 | VBoxSharedClipboard_SOURCES += \
|
---|
80 | VBoxSharedClipboardSvc-x11-stubs.cpp
|
---|
81 | endif
|
---|
82 | endif
|
---|
83 |
|
---|
84 | VBoxSharedClipboard_LIBS = \
|
---|
85 | $(LIB_RUNTIME)
|
---|
86 | if1of ($(KBUILD_TARGET), linux solaris freebsd)
|
---|
87 | ifndef VBOX_HEADLESS
|
---|
88 | VBoxSharedClipboard_LIBPATH = \
|
---|
89 | $(VBOX_LIBPATH_X11)
|
---|
90 | VBoxSharedClipboard_LIBS += \
|
---|
91 | Xt \
|
---|
92 | X11
|
---|
93 | endif
|
---|
94 | endif
|
---|
95 |
|
---|
96 | VBoxSharedClipboard_LDFLAGS.darwin = \
|
---|
97 | -framework ApplicationServices -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/VBoxSharedClipboard.dylib
|
---|
98 |
|
---|
99 | if 0 ## Disabled for now; needs to be adapted to the new protocol first.
|
---|
100 | if defined(VBOX_WITH_TESTCASES) && !defined(VBOX_ONLY_ADDITIONS) && !defined(VBOX_ONLY_SDK)
|
---|
101 | if1of ($(KBUILD_TARGET), freebsd linux netbsd openbsd solaris)
|
---|
102 | #
|
---|
103 | # Set this in LocalConfig.kmk if you are working on the X11 clipboard service
|
---|
104 | # to automatically run the unit test at build time.
|
---|
105 | # OTHERS += $(tstClipboardX11-2_0_OUTDIR)/tstClipboardX11-2.run
|
---|
106 | PROGRAMS += tstClipboardX11-2
|
---|
107 | TESTING += $(tstClipboardX11-2_0_OUTDIR)/tstClipboardX11-2.run
|
---|
108 | tstClipboardX11-2_TEMPLATE = VBoxR3TstExe
|
---|
109 | tstClipboardX11-2_DEFS = VBOX_WITH_HGCM TESTCASE
|
---|
110 | tstClipboardX11-2_SOURCES = VBoxSharedClipboardSvc-x11.cpp
|
---|
111 | tstClipboardX11-2_LIBS = $(LIB_RUNTIME)
|
---|
112 | tstClipboardX11-2_CLEAN = $(tstClipboardX11-2_0_OUTDIR)/tstClipboardX11-2.run
|
---|
113 |
|
---|
114 | $$(tstClipboardX11-2_0_OUTDIR)/tstClipboardX11-2.run: $$(tstClipboardX11-2_1_STAGE_TARGET)
|
---|
115 | export VBOX_LOG_DEST=nofile; $(tstClipboardX11-2_1_STAGE_TARGET) quiet
|
---|
116 | $(QUIET)$(APPEND) -t "$@" "done"
|
---|
117 | endif # 1of ($(KBUILD_TARGET),freebsd linux netbsd openbsd solaris)
|
---|
118 | endif
|
---|
119 | endif
|
---|
120 |
|
---|
121 | include $(FILE_KBUILD_SUB_FOOTER)
|
---|