VirtualBox

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

Last change on this file since 84589 was 84383, checked in by vboxsync, 5 years ago

Network/DevVirtioNet_1_0.cpp: Fixed bug where Network Settings on running VM led to assert in PDM infrastructure

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