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