1 | # $Id: Makefile.kmk 23941 2009-10-21 15:40:36Z vboxsync $
|
---|
2 | ## @file
|
---|
3 | # Sub-Makefile for the VirtualBox Guest Addition X11 Client.
|
---|
4 | #
|
---|
5 |
|
---|
6 | #
|
---|
7 | # Copyright (C) 2006-2007 Sun Microsystems, Inc.
|
---|
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 | # Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
|
---|
18 | # Clara, CA 95054 USA or visit http://www.sun.com if you need
|
---|
19 | # additional information or have any questions.
|
---|
20 | #
|
---|
21 |
|
---|
22 | SUB_DEPTH = ../../../../..
|
---|
23 | include $(KBUILD_PATH)/subheader.kmk
|
---|
24 |
|
---|
25 | #
|
---|
26 | # VBoxClient - clipboard and seamless.
|
---|
27 | #
|
---|
28 | PROGRAMS += VBoxClient
|
---|
29 |
|
---|
30 | VBoxClient_TEMPLATE = VBOXGUESTR3CPPEXE
|
---|
31 | VBoxClient_DEFS += VBOX_X11_CLIPBOARD VBOX_WITH_HGCM
|
---|
32 | ifdef VBOX_WITH_DBUS
|
---|
33 | VBoxClient_DEFS += VBOX_WITH_DBUS
|
---|
34 | endif
|
---|
35 | VBoxClient_DEFS.linux += _GNU_SOURCE
|
---|
36 | VBoxClient_SOURCES = \
|
---|
37 | main.cpp
|
---|
38 | VBoxClient_SOURCES += \
|
---|
39 | $(PATH_ROOT)/src/VBox/GuestHost/SharedClipboard/clipboard-helper.cpp \
|
---|
40 | $(PATH_ROOT)/src/VBox/GuestHost/SharedClipboard/x11-clipboard.cpp \
|
---|
41 | clipboard.cpp
|
---|
42 | VBoxClient_LIBPATH = \
|
---|
43 | $(VBOX_LIBPATH32_X11)
|
---|
44 | VBoxClient_LIBS.freebsd = \
|
---|
45 | iconv
|
---|
46 | VBoxClient_LIBS = \
|
---|
47 | $(VBOX_LIB_IPRT_GUEST_R3) \
|
---|
48 | $(VBOX_LIB_VBGL_R3) \
|
---|
49 | $(VBOX_LIB_IPRT_GUEST_R3) \
|
---|
50 | X11 \
|
---|
51 | Xt
|
---|
52 | # These are static replacements for gcc-specific parts of libstdc++
|
---|
53 | VBoxClient_LIBS += \
|
---|
54 | supc++ \
|
---|
55 | gcc_eh
|
---|
56 | ifdef VBOX_X11_SEAMLESS_GUEST
|
---|
57 | VBoxClient_DEFS += SEAMLESS_GUEST DYNAMIC_RESIZE
|
---|
58 | VBoxClient_SOURCES += \
|
---|
59 | seamless.cpp \
|
---|
60 | seamless-host.cpp \
|
---|
61 | seamless-x11.cpp \
|
---|
62 | thread.cpp \
|
---|
63 | display.cpp \
|
---|
64 | hostversion.cpp
|
---|
65 | VBoxClient_LIBS += \
|
---|
66 | Xext Xmu
|
---|
67 | endif
|
---|
68 | ifdef VBOX_WITH_GUEST_PROPS
|
---|
69 | VBoxClient_DEFS += VBOX_WITH_GUEST_PROPS
|
---|
70 | endif
|
---|
71 | #
|
---|
72 | # Link aginst libstdc++.a. (http://www.trilithium.com/johan/2005/06/static-libstdc/).
|
---|
73 | # (It would've been preferred to avoid features depending on libstdc++, of course...)
|
---|
74 | #
|
---|
75 | # Actually, this is darn annoying and will *NOT* be tolerated for any new code!
|
---|
76 | #
|
---|
77 | VBoxClient_LIBPATH += $(PATH_VBoxClient)
|
---|
78 | VBoxClient_ORDERDEPS = $(PATH_VBoxClient)/libstdc++.a
|
---|
79 | VBoxClient_CLEAN = $(PATH_VBoxClient)/libstdc++.a
|
---|
80 | $$(PATH_VBoxClient)/libstdc++.a:
|
---|
81 | $(call MSG_L1,Forcing static libstdc++)
|
---|
82 | $(QUIET)$(MKDIR) -p $(@D)
|
---|
83 | $(QUIET)$(LN_EXT) -sf `$(TOOL_$(VBOX_GCC_TOOL)_CXX) $(TEMPLATE_VBOXGUESTR3CPPEXE_CXXFLAGS.$(KBUILD_TARGET_ARCH)) -print-file-name=libstdc++.a` $@ \
|
---|
84 | || $(CP_EXT) -f `$(TOOL_$(VBOX_GCC_TOOL)_CXX) $(TEMPLATE_VBOXGUESTR3CPPEXE_CXXFLAGS.$(KBUILD_TARGET_ARCH)) -print-file-name=libstdc++.a` $@
|
---|
85 |
|
---|
86 | ifdef VBOX_X11_SEAMLESS_GUEST
|
---|
87 | if defined(VBOX_WITH_TESTCASES) && !defined(VBOX_ONLY_ADDITIONS) && !defined(VBOX_ONLY_SDK)
|
---|
88 | if1of ($(KBUILD_TARGET), freebsd linux netbsd openbsd solaris)
|
---|
89 |
|
---|
90 | # Set this in LocalConfig.kmk if you are working on the X11 clipboard service
|
---|
91 | # to automatically run the unit test at build time.
|
---|
92 | # OTHERS += $(PATH_tstSeamlessX11-auto)/tstSeamlessX11-auto.run
|
---|
93 |
|
---|
94 | PROGRAMS += tstSeamlessX11-auto
|
---|
95 | tstSeamlessX11-auto_TEMPLATE = VBOXR3TSTEXE
|
---|
96 | tstSeamlessX11-auto_SOURCES = \
|
---|
97 | testcase/tstSeamlessX11-auto.cpp \
|
---|
98 | seamless-x11.cpp
|
---|
99 | tstSeamlessX11-auto_DEFS = TESTCASE
|
---|
100 | tstSeamlessX11-auto_LIBS = \
|
---|
101 | $(LIB_RUNTIME)
|
---|
102 |
|
---|
103 | TESTING += $(PATH_tstSeamlessX11-auto)/tstSeamlessX11-auto
|
---|
104 | $$(PATH_tstSeamlessX11-auto)/tstSeamlessX11-auto.run: \
|
---|
105 | $$(INSTARGET_tstSeamlessX11-auto)
|
---|
106 | export VBOX_LOG_DEST=nofile; $(INSTARGET_tstSeamlessX11-auto) quiet
|
---|
107 | $(QUIET)$(APPEND) -t "$@" "done"
|
---|
108 |
|
---|
109 | #
|
---|
110 | # Additional testcase designed to be run manually, which initiates and starts the Linux
|
---|
111 | # guest client part of the seamless additions in the host, faking seamless events from
|
---|
112 | # the host and writing information about guest events to standard output.
|
---|
113 | #
|
---|
114 | PROGRAMS += tstSeamlessX11
|
---|
115 | tstSeamlessX11_TEMPLATE = VBOXR3TSTEXE
|
---|
116 | tstSeamlessX11_SOURCES = \
|
---|
117 | testcase/tstSeamlessX11.cpp \
|
---|
118 | seamless-host.cpp \
|
---|
119 | seamless-x11.cpp \
|
---|
120 | thread.cpp
|
---|
121 | tstSeamlessX11_LIBPATH = \
|
---|
122 | $(VBOX_LIBPATH_X11)
|
---|
123 | tstSeamlessX11_LIBS = \
|
---|
124 | $(LIB_RUNTIME) \
|
---|
125 | Xext \
|
---|
126 | Xmu \
|
---|
127 | X11
|
---|
128 | endif
|
---|
129 | endif
|
---|
130 | endif
|
---|
131 |
|
---|
132 | include $(KBUILD_PATH)/subfooter.kmk
|
---|
133 |
|
---|