VirtualBox

source: vbox/trunk/src/VBox/Frontends/VBoxManage/Makefile.kmk@ 82849

Last change on this file since 82849 was 81287, checked in by vboxsync, 5 years ago

Shared Clipboard/Transfers: Added controlvm/modifyvm options for enabling/disabling the clipboard file transfers.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 8.0 KB
Line 
1# $Id: Makefile.kmk 81287 2019-10-15 16:38:43Z vboxsync $
2## @file
3# Sub-Makefile for VBoxManage (the cli frontend).
4#
5
6#
7# Copyright (C) 2006-2019 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
18SUB_DEPTH = ../../../..
19include $(KBUILD_PATH)/subheader.kmk
20
21include $(PATH_ROOT)/doc/manual/Config.kmk
22
23
24VBOX_COMMON_VBOXMANAGE_DEFS = \
25 $(if $(VBOX_WITH_AHCI), VBOX_WITH_AHCI) \
26 $(if $(VBOX_WITH_COPYTOGUEST),VBOX_WITH_COPYTOGUEST) \
27 $(if $(VBOX_WITH_E1000),VBOX_WITH_E1000) \
28 $(if $(VBOX_WITH_GUEST_CONTROL),VBOX_WITH_GUEST_CONTROL) \
29 $(if $(VBOX_WITH_GUEST_PROPS),VBOX_WITH_GUEST_PROPS) \
30 $(if $(VBOX_WITH_HEADLESS), VBOX_WITH_HEADLESS) \
31 $(if $(VBOX_WITH_HGCM), VBOX_WITH_HGCM) \
32 $(if $(VBOX_WITH_HOSTNETIF_API), VBOX_WITH_HOSTNETIF_API) \
33 $(if $(VBOX_WITH_NETFLT), VBOX_WITH_NETFLT) \
34 $(if $(VBOX_WITH_AUDIO_OSS), VBOX_WITH_AUDIO_OSS) \
35 $(if $(VBOX_WITH_AUDIO_ALSA), VBOX_WITH_AUDIO_ALSA) \
36 $(if $(VBOX_WITH_AUDIO_PULSE),VBOX_WITH_AUDIO_PULSE) \
37 $(if $(VBOX_WITH_SCSI), VBOX_WITH_SCSI) \
38 $(if $(VBOX_WITH_VBOXSDL), VBOX_WITH_VBOXSDL) \
39 $(if $(VBOX_WITH_VIDEOHWACCEL), VBOX_WITH_VIDEOHWACCEL) \
40 $(if $(VBOX_WITH_VIRTIO),VBOX_WITH_VIRTIO) \
41 $(if $(VBOX_WITH_USB_CARDREADER),VBOX_WITH_USB_CARDREADER) \
42 $(if $(VBOX_WITH_PCI_PASSTHROUGH),VBOX_WITH_PCI_PASSTHROUGH) \
43 $(if $(VBOX_WITH_RECORDING),VBOX_WITH_RECORDING) \
44 $(if $(VBOX_WITH_AUDIO_RECORDING),VBOX_WITH_AUDIO_RECORDING) \
45 $(if $(VBOX_WITH_NAT_SERVICE),VBOX_WITH_NAT_SERVICE) \
46 $(if $(VBOX_WITH_SHARED_CLIPBOARD),VBOX_WITH_SHARED_CLIPBOARD) \
47 $(if $(VBOX_WITH_SHARED_CLIPBOARD_TRANSFERS),VBOX_WITH_SHARED_CLIPBOARD_TRANSFERS) \
48 $(if $(VBOX_WITH_VMSVGA),VBOX_WITH_VMSVGA)
49
50
51ifdef VBOX_WITH_DOCS
52 PROGRAMS += VBoxManageHelp
53endif
54VBoxManageHelp_TEMPLATE = VBoxAdvBldProg
55VBoxManageHelp_DEFS += \
56 VBOX_ONLY_DOCS \
57 $(VBOX_COMMON_VBOXMANAGE_DEFS)
58VBoxManageHelp_SOURCES = \
59 VBoxManage.cpp \
60 VBoxManageHelp.cpp \
61 $(if $(VBOX_WITH_GUEST_PROPS),VBoxManageGuestProp.cpp) \
62 $(if $(VBOX_WITH_GUEST_CONTROL),VBoxManageGuestCtrl.cpp)
63
64ifndef VBOX_ONLY_DOCS
65 PROGRAMS += VBoxManage
66 VBoxManage_TEMPLATE = VBOXMAINCLIENTEXE
67 VBoxManage_DEFS += $(VBOX_COMMON_VBOXMANAGE_DEFS)
68 VBoxManage_DEFS.win = _WIN32_WINNT=0x0500
69 VBoxManage_INCS = \
70 $(VBoxManage_0_OUTDIR) \
71 ../Common
72 VBoxManage_INTERMEDIATES = \
73 $(VBoxManage_0_OUTDIR)/VBoxManageBuiltInHelp.h
74 VBoxManage_SOURCES = \
75 VBoxManage.cpp \
76 VBoxInternalManage.cpp \
77 VBoxManageAppliance.cpp \
78 VBoxManageBandwidthControl.cpp \
79 VBoxManageControlVM.cpp \
80 VBoxManageDebugVM.cpp \
81 VBoxManageDHCPServer.cpp \
82 VBoxManageDisk.cpp \
83 $(if $(VBOX_WITH_GUEST_CONTROL),VBoxManageGuestCtrl.cpp) \
84 $(if $(VBOX_WITH_GUEST_CONTROL),VBoxManageGuestCtrlListener.cpp) \
85 $(if $(VBOX_WITH_GUEST_PROPS),VBoxManageGuestProp.cpp) \
86 VBoxManageHelp.cpp \
87 $(VBoxManage_0_OUTDIR)/VBoxManageBuiltInHelp.cpp \
88 VBoxManageHostonly.cpp \
89 VBoxManageInfo.cpp \
90 VBoxManageList.cpp \
91 VBoxManageMetrics.cpp \
92 VBoxManageMisc.cpp \
93 VBoxManageModifyVM.cpp \
94 VBoxManageSnapshot.cpp \
95 VBoxManageStorageController.cpp \
96 VBoxManageUSB.cpp \
97 $(if $(VBOX_WITH_NAT_SERVICE),VBoxManageNATNetwork.cpp,) \
98 $(if $(VBOX_WITH_NAT_SERVICE),../../NetworkServices/NetLib/VBoxNetPortForwardString.cpp,) \
99 VBoxManageCloud.cpp \
100 ../Common/PasswordInput.cpp
101 VBoxManage_SOURCES.win = \
102 VBoxManage.rc
103 VBoxManage_LIBS += $(LIB_DDU)
104
105 # VBoxNetPortForwardString.h
106 VBoxManageNATNetwork.cpp_INCS += ../../NetworkServices/NetLib/
107
108endif # VBOX_ONLY_DOCS
109
110ifneq ($(KBUILD_TARGET),win)
111 # Workaround for buggy gcc-4.3 compilers, see
112 #
113 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36474
114 #
115 # Some later revisions of version 4.3.1 are known to work so we assume
116 # that version 4.3.2 or later has this bug definitely fixed.
117 VBoxManage_CXXFLAGS.release += \
118 $(if $(VBOX_GCC_VERSION_CXX),$(if-expr $(VBOX_GCC_VERSION_CXX) < 40300 || $(VBOX_GCC_VERSION_CXX) > 40301,,--param max-fields-for-field-sensitive=0),)
119 VBoxManageHelp_CXXFLAGS.release = $(VBoxManage_CXXFLAGS.release)
120endif
121
122
123#
124# VBoxManage built-in help from XML refentry in doc/manual/en_US/.
125#
126$(call KB_FN_DO_PASS0_ON_TARGET,VBoxManage)
127
128VBoxManage_CLEAN += \
129 $(VBoxManage_0_OUTDIR)/VBoxManageBuiltInHelp.cpp \
130 $(VBoxManage_0_OUTDIR)/VBoxManageBuiltInHelp.cpp.ts \
131 $(VBoxManage_0_OUTDIR)/VBoxManageBuiltInHelp.h \
132 $(VBoxManage_0_OUTDIR)/VBoxManageBuiltInHelp.h.ts \
133 $(addprefix $(VBoxManage_0_OUTDIR)/,$(filter man_VBoxManage-%,$(VBOX_MANUAL_XML_REFENTRY_FILES)))
134
135
136
137# Preprocess the xml files, applying remarks.
138$(foreach file,$(filter man_VBoxManage-%,$(VBOX_MANUAL_XML_REFENTRY_FILES)) \
139, $(evalcall2 def_vbox_refentry_preprocess_for_manpage,$(VBoxManage_0_OUTDIR),$(file),$(VBOX_PATH_MANUAL_SRC)/en_US/$(file),replace-xrefs))
140
141
142# Generate the .cpp file.
143$(VBoxManage_0_OUTDIR)/VBoxManageBuiltInHelp.cpp.ts \
144+| $(VBoxManage_0_OUTDIR)/VBoxManageBuiltInHelp.cpp: \
145 $(VBOX_DOCBOOK_REFENTRY_TO_C_HELP) \
146 $(addprefix $(VBoxManage_0_OUTDIR)/,$(filter man_VBoxManage-%,$(VBOX_MANUAL_XML_REFENTRY_FILES))) \
147 $(VBOX_XML_CATALOG) $(VBOX_XML_CATALOG_DOCBOOK) $(MAKEFILE) | $$(dir $$@)
148 $(call MSG_TOOL,xsltproc $(notdir $(firstword $(filter %.xsl,$^))),,$(filter %.xml,$^),$(patsubst %.ts,%,$@))
149 $(QUIET)$(APPEND) -tn "$@" \
150 '/* Autogenerated by $<, do not edit! */' \
151 '' \
152 '#include "VBoxManageBuiltInHelp.h"' \
153 ''
154 $(foreach refentry,$(filter %.xml,$^) \
155 ,$(NLTAB)$(QUIET)$(call VBOX_XSLTPROC_WITH_CAT, -a+to "$@") $< $(refentry))
156 $(QUIET)$(APPEND) -n "$@" \
157 '' \
158 'PCRTMSGREFENTRY g_apHelpEntries[] = ' \
159 '{'
160 $(foreach refentry,$(filter %.xml,$^) \
161 ,$(NLTAB)$(QUIET)$(APPEND) -n "$@" \
162 ' &g_$(subst -,_,$(tolower $(patsubst man_%,%,$(notdir $(basename $(refentry)))))), ')
163 $(QUIET)$(APPEND) -n "$@" \
164 '};' \
165 'const uint32_t g_cHelpEntries = RT_ELEMENTS(g_apHelpEntries);' \
166 ''
167 $(QUIET)$(CP) --changed -- "$@" "$(patsubst %.ts,%,$@)"
168# The above APPEND stuff trigger some kind of problem on some boxes when not split up...
169# update: Fixed in SVN (strcpy -> memmove in new_job(), job.c - r2591). Just need to rebuild all platforms.
170
171
172$(VBoxManage_0_OUTDIR)/VBoxManageBuiltInHelp.h.ts \
173+| $(VBoxManage_0_OUTDIR)/VBoxManageBuiltInHelp.h: \
174 $(VBOX_DOCBOOK_REFENTRY_TO_H_HELP) \
175 $(addprefix $(VBoxManage_0_OUTDIR)/,$(filter man_VBoxManage-%,$(VBOX_MANUAL_XML_REFENTRY_FILES))) \
176 $(VBOX_XML_CATALOG) $(VBOX_XML_CATALOG_DOCBOOK) $(MAKEFILE) | $$(dir $$@)
177 $(call MSG_TOOL,xsltproc $(notdir $(firstword $(filter %.xsl,$^))),,$(filter %.xml,$^),$(patsubst %.ts,%,$@))
178 $(QUIET)$(APPEND) -tn "$@" \
179 '/* Autogenerated by $<, do not edit! */' \
180 '' \
181 '#ifndef ___VBoxManageBuiltInHelp_h___' \
182 '#define ___VBoxManageBuiltInHelp_h___' \
183 '' \
184 '#include <iprt/message.h>' \
185 '' \
186 'RT_C_DECLS_BEGIN' \
187 '' \
188 'typedef enum HELP_CMD_VBOXMANAGE' \
189 '{' \
190 ' HELP_CMD_VBOXMANAGE_INVALID = 0,'
191 $(foreach refentry,$(filter %.xml,$^) \
192 ,$(NLTAB)$(QUIET)$(call VBOX_XSLTPROC_WITH_CAT, -a+to "$@") \
193 --stringparam 'g_sMode' 'cmd' $< $(refentry))
194 $(QUIET)$(APPEND) -n "$@" \
195 ' HELP_CMD_VBOXMANAGE_END' \
196 '} HELP_CMD_VBOXMANAGE;'
197 $(foreach refentry,$(filter %.xml,$^) \
198 ,$(NLTAB)$(QUIET)$(call VBOX_XSLTPROC_WITH_CAT, -a+to "$@") \
199 --stringparam 'g_sMode' 'subcmd' $< $(refentry))
200 $(QUIET)$(APPEND) -n "$@" \
201 '' \
202 'extern PCRTMSGREFENTRY g_apHelpEntries[];' \
203 'extern const uint32_t g_cHelpEntries;' \
204 '' \
205 'RT_C_DECLS_END' \
206 '' \
207 '#endif' \
208 ''
209 $(QUIET)$(CP) --changed -- "$@" "$(patsubst %.ts,%,$@)"
210
211
212include $(FILE_KBUILD_SUB_FOOTER)
213
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette