VirtualBox

source: vbox/trunk/src/VBox/Runtime/tools/Makefile.kmk

Last change on this file was 106061, checked in by vboxsync, 5 days ago

Copyright year updates by scm.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 9.5 KB
Line 
1# $Id: Makefile.kmk 106061 2024-09-16 14:03:52Z vboxsync $
2## @file
3# Sub-Makefile for the IPRT tools.
4#
5
6#
7# Copyright (C) 2006-2024 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# The contents of this file may alternatively be used under the terms
26# of the Common Development and Distribution License Version 1.0
27# (CDDL), a copy of it is provided in the "COPYING.CDDL" file included
28# in the VirtualBox distribution, in which case the provisions of the
29# CDDL are applicable instead of those of the GPL.
30#
31# You may elect to license modified versions of this file under the
32# terms and conditions of either the GPL or the CDDL or both.
33#
34# SPDX-License-Identifier: GPL-3.0-only OR CDDL-1.0
35#
36
37SUB_DEPTH = ../../../..
38include $(KBUILD_PATH)/subheader.kmk
39
40
41if !defined(VBOX_ONLY_EXTPACKS) && !defined(VBOX_ONLY_DOCS)
42 # RTIsoMaker - ISO image maker - build version.
43 ifeq ($(KBUILD_TARGET),win) # Needed for repacking guest additions.
44 PROGRAMS += bldRTIsoMaker
45 bldRTIsoMaker_INSTTYPE = stage
46 else
47 BLDPROGS += bldRTIsoMaker
48 endif
49 bldRTIsoMaker_TEMPLATE = VBoxAdvBldProg
50 bldRTIsoMaker_SOURCES = \
51 RTIsoMaker.cpp \
52 ../common/misc/buildconfig.cpp
53 bldRTIsoMaker_DEFS = \
54 IPRT_BLDCFG_SCM_REV=$(if $(VBOX_SVN_REV_FALLBACK),$(VBOX_SVN_REV_FALLBACK),$(VBOX_SVN_REV)) \
55 IPRT_BLDCFG_VERSION_MAJOR=$(VBOX_VERSION_MAJOR) \
56 IPRT_BLDCFG_VERSION_MINOR=$(VBOX_VERSION_MINOR) \
57 IPRT_BLDCFG_VERSION_BUILD=$(VBOX_VERSION_BUILD)
58 ifdef VBOX_WITH_AUTOMATIC_DEFS_QUOTING
59 bldRTIsoMaker_DEFS += \
60 IPRT_BLDCFG_VERSION_STRING="$(VBOX_VERSION_STRING)" \
61 IPRT_BLDCFG_TARGET="$(KBUILD_TARGET)" \
62 IPRT_BLDCFG_TARGET_ARCH="$(KBUILD_TARGET_ARCH)" \
63 IPRT_BLDCFG_TYPE="$(KBUILD_TYPE)"
64 else
65 bldRTIsoMaker_DEFS += \
66 IPRT_BLDCFG_VERSION_STRING=\"$(VBOX_VERSION_STRING)\" \
67 IPRT_BLDCFG_TARGET=\"$(KBUILD_TARGET)\" \
68 IPRT_BLDCFG_TARGET_ARCH=\"$(KBUILD_TARGET_ARCH)\" \
69 IPRT_BLDCFG_TYPE=\"$(KBUILD_TYPE)\"
70 endif
71 bldRTIsoMaker_INCS = ../include
72endif
73
74
75if !defined(VBOX_ONLY_DOCS)
76
77 # RTManifest is a tool for creating and verifying manifest files - build version.
78 BLDPROGS += bldRTManifest
79 bldRTManifest_TEMPLATE = VBoxAdvBldProg
80 bldRTManifest_SOURCES = RTManifest.cpp
81
82
83 if !defined(VBOX_ONLY_EXTPACKS) || "$(KBUILD_TARGET)" == "win" || "$(KBUILD_TARGET)" == "darwin"
84 # RTSignTool - Signing utility - build version. Signed on windows so we can get the certificate from it.
85 BLDPROGS += bldRTSignTool
86 bldRTSignTool_TEMPLATE := VBoxAdvBldProg
87 bldRTSignTool_INCS := ../include
88 bldRTSignTool_SOURCES := RTSignTool.cpp
89 bldRTSignTool_DEFS := IPRT_IN_BUILD_TOOL
90 bldRTSignTool_LDFLAGS.darwin := \
91 -framework CoreFoundation \
92 -framework Security
93 bldRTSignTool_LIBS.win := Crypt32.lib NCrypt.lib
94 ifndef VBOX_WITH_BLD_RTSIGNTOOL_SIGNING
95 bldRTSignTool_DEFS += IPRT_SIGNTOOL_NO_SIGNING
96 else # RuntimeBldProg is missing a lot and is built w/o IPRT_WITH_OPENSSL. So, include missing and rebuilt openssl deps.
97 bldRTSignTool_SDKS += VBoxOpenSslBldProg
98 bldRTSignTool_DEFS += IPRT_WITH_OPENSSL
99 bldRTSignTool_SOURCES += \
100 ../common/crypto/pkix-signature-builtin.cpp \
101 ../common/crypto/pkix-signature-ossl.cpp \
102 ../common/crypto/store.cpp \
103 ../common/crypto/digest-builtin.cpp \
104 ../common/crypto/iprt-openssl.cpp \
105 ../common/crypto/key.cpp \
106 ../common/crypto/key-file.cpp \
107 ../common/crypto/key-openssl.cpp \
108 ../common/crypto/pkcs7-sign.cpp \
109 ../common/crypto/RTCrRandBytes-openssl.cpp
110 if1of ($(KBUILD_HOST), darwin win)
111 bldRTSignTool_SOURCES += ../r3/$(KBUILD_HOST)/RTCrStoreCreateSnapshotById-$(KBUILD_HOST).cpp
112 else
113 bldRTSignTool_SOURCES += ../generic/RTCrStoreCreateSnapshotById-generic.cpp
114 endif
115 endif
116 endif
117
118 if !defined(VBOX_ONLY_EXTPACKS)
119 # RTLdrCheckImports - import checker.
120 PROGRAMS += bldRTLdrCheckImports
121 bldRTLdrCheckImports_TEMPLATE = VBoxAdvBldProg
122 bldRTLdrCheckImports_DEFS = IPRT_IN_BUILD_TOOL
123 bldRTLdrCheckImports_SOURCES = RTLdrCheckImports.cpp
124 endif
125endif
126
127if !defined(VBOX_ONLY_BUILD)
128
129 # RTCat is a tool for displaying files.
130 PROGRAMS += RTCat
131 RTCat_TEMPLATE = VBoxR3Tool
132 RTCat_SOURCES = RTCat.cpp
133 RTCat_SOURCES += ../VBox/LoadVBoxDDU.cpp
134
135 # RTChMod - our chmod clone.
136 PROGRAMS += RTChMod
137 RTChMod_TEMPLATE = VBoxR3Tool
138 RTChMod_SOURCES = RTChMod.cpp
139
140 # RTCp - our cp clone.
141 PROGRAMS += RTCp
142 RTCp_TEMPLATE = VBoxR3Tool
143 RTCp_SOURCES = RTCp.cpp
144 RTCp_SOURCES += ../VBox/LoadVBoxDDU.cpp
145
146 # RTIsoMaker - ISO image maker - build version.
147 PROGRAMS += RTIsoMaker
148 RTIsoMaker_TEMPLATE = VBoxR3Tool
149 RTIsoMaker_SOURCES = RTIsoMaker.cpp
150 RTIsoMaker_SOURCES += ../VBox/LoadVBoxDDU.cpp
151
152 # RTLs is a tool for listing file information.
153 PROGRAMS += RTLs
154 RTLs_TEMPLATE = VBoxR3Tool
155 RTLs_SOURCES = RTLs.cpp
156 RTLs_SOURCES += ../VBox/LoadVBoxDDU.cpp
157
158 # RTRm is a tool for removing files and directories.
159 PROGRAMS += RTRm
160 RTRm_TEMPLATE = VBoxR3Tool
161 RTRm_SOURCES = RTRm.cpp
162 RTRm_SOURCES += ../VBox/LoadVBoxDDU.cpp
163
164 # RTManifest is a tool for creating and verifying manifest files.
165 PROGRAMS += RTManifest
166 RTManifest_TEMPLATE = VBoxR3Tool
167 RTManifest_SOURCES = RTManifest.cpp
168 RTManifest_SOURCES += ../VBox/LoadVBoxDDU.cpp
169
170 # RTLdrFlt is similar to c++filt, except that it's for VMMR0.r0 stacks.
171 PROGRAMS += RTLdrFlt
172 RTLdrFlt_TEMPLATE = VBoxR3Tool
173 RTLdrFlt_SOURCES = RTLdrFlt.cpp
174
175 # RTFtpServer implements a simple FTP server.
176 PROGRAMS += RTFtpServer
177 RTFtpServer_TEMPLATE = VBoxR3Tool
178 RTFtpServer_SOURCES = RTFtpServer.cpp
179
180 # RTGzip - our gzip clone (for testing the gzip/gunzip streaming code)
181 PROGRAMS += RTGzip
182 RTGzip_TEMPLATE = VBoxR3Tool
183 RTGzip_SOURCES = RTGzip.cpp
184 RTGzip_SOURCES += ../VBox/LoadVBoxDDU.cpp
185
186 ifdef VBOX_WITH_LIBCURL
187 # RTHttp - our http/https fetcher (for testing the http client API).
188 PROGRAMS += RTHttp
189 RTHttp_TEMPLATE = VBoxR3Tool
190 RTHttp_SOURCES = RTHttp.cpp
191 endif
192
193 # RTHttpServer implements a simple HTTP server.
194 PROGRAMS += RTHttpServer
195 RTHttpServer_TEMPLATE = VBoxR3Tool
196 RTHttpServer_SOURCES = RTHttpServer.cpp
197 ifdef IPRT_HTTP_WITH_WEBDAV
198 RTHttpServer_DEFS += IPRT_HTTP_WITH_WEBDAV
199 endif
200
201 # RTLdrCheckImports - import checker.
202 PROGRAMS += RTLdrCheckImports
203 RTLdrCheckImports_TEMPLATE = VBoxR3Tool
204 RTLdrCheckImports_SOURCES = RTLdrCheckImports.cpp
205 RTLdrCheckImports_SOURCES += ../VBox/LoadVBoxDDU.cpp
206
207 # RTMkDir - our mkdir clone.
208 PROGRAMS += RTMkDir
209 RTMkDir_TEMPLATE = VBoxR3Tool
210 RTMkDir_SOURCES = RTMkDir.cpp
211
212 # RTMkPasswd - our mkpasswd clone.
213 PROGRAMS += RTMkPasswd
214 RTMkPasswd_TEMPLATE = VBoxR3Tool
215 RTMkPasswd_SOURCES = RTMkPasswd.cpp
216
217 # RTRmDir - our mkdir clone.
218 PROGRAMS += RTRmDir
219 RTRmDir_TEMPLATE = VBoxR3Tool
220 RTRmDir_SOURCES = RTRmDir.cpp
221
222 # RTShutdown - similar (but not identical) to a typical unix shutdown command.
223 PROGRAMS += RTShutdown
224 RTShutdown_TEMPLATE = VBoxR3Tool
225 RTShutdown_SOURCES = RTShutdown.cpp
226
227 # RTTar - our tar clone (for testing the tar/gzip/gunzip streaming code)
228 PROGRAMS += RTTar
229 RTTar_TEMPLATE = VBoxR3Tool
230 RTTar_SOURCES = RTTar.cpp
231 RTTar_SOURCES += ../VBox/LoadVBoxDDU.cpp
232
233 # RTUnzip - our unzip clone (for testing the unzip streaming code)
234 PROGRAMS += RTUnzip
235 RTUnzip_TEMPLATE = VBoxR3Tool
236 RTUnzip_SOURCES = RTUnzip.cpp
237 RTUnzip_SOURCES += ../VBox/LoadVBoxDDU.cpp
238
239 # RTNtDbgHelp - our tar clone (for testing the tar/gzip/gunzip streaming code)
240 PROGRAMS.win += RTNtDbgHelp
241 RTNtDbgHelp_TEMPLATE = VBoxR3Tool
242 RTNtDbgHelp_SOURCES = RTNtDbgHelp.cpp
243
244 # RTDbgSymCache - Symbol cache manager.
245 PROGRAMS += RTDbgSymCache
246 RTDbgSymCache_TEMPLATE = VBoxR3Tool
247 RTDbgSymCache_SOURCES = RTDbgSymCache.cpp
248
249 # RTSignTool - Signing utility.
250 PROGRAMS += RTSignTool
251 RTSignTool_TEMPLATE := VBoxR3Tool
252 RTSignTool_INCS := ../include
253 RTSignTool_SOURCES := RTSignTool.cpp
254 RTSignTool_LIBS = $(PATH_STAGE_LIB)/SUPR3$(VBOX_SUFF_LIB)
255 RTSignTool_LIBS.win = Crypt32.lib NCrypt.lib
256
257 # RTTraceLogTool - Trace log collection and dissection tool.
258 PROGRAMS += RTTraceLogTool
259 RTTraceLogTool_TEMPLATE = VBoxR3Tool
260 RTTraceLogTool_SOURCES = RTTraceLogTool.cpp
261
262 # RTFuzzMaster - Fuzzing master tool.
263 PROGRAMS += RTFuzzMaster
264 RTFuzzMaster_TEMPLATE = VBoxR3Tool
265 RTFuzzMaster_SOURCES = RTFuzzMaster.cpp
266
267 # RTFuzzClient - Fuzzing client tool.
268 PROGRAMS += RTFuzzClient
269 RTFuzzClient_TEMPLATE = VBoxR3Tool
270 RTFuzzClient_SOURCES = RTFuzzClient.cpp
271
272 # RTEfiFatExtract - Extracting single files from a fat EFI binary.
273 PROGRAMS += RTEfiFatExtract
274 RTEfiFatExtract_TEMPLATE = VBoxR3Tool
275 RTEfiFatExtract_SOURCES = RTEfiFatExtract.cpp
276
277 # RTEfiSigDb - EFI signature database management tool.
278 PROGRAMS += RTEfiSigDb
279 RTEfiSigDb_TEMPLATE = VBoxR3Tool
280 RTEfiSigDb_SOURCES = RTEfiSigDb.cpp
281
282 if1of ($(KBUILD_TARGET), darwin linux solaris win)
283 # RTKrnlModInfo - our lsmod/kextstat clone (for testing the RTKrnlMod code).
284 PROGRAMS += RTKrnlModInfo
285 RTKrnlModInfo_TEMPLATE = VBoxR3Tool
286 RTKrnlModInfo_SOURCES = RTKrnlModInfo.cpp
287 endif
288
289 # RTDtc - Devicetree compiler tool.
290 PROGRAMS += RTDtc
291 RTDtc_TEMPLATE = VBoxR3Tool
292 RTDtc_SOURCES = RTDtc.cpp
293
294endif # !VBOX_ONLY_BUILD
295
296include $(FILE_KBUILD_SUB_FOOTER)
297
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