VirtualBox

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

Last change on this file since 95682 was 95682, checked in by vboxsync, 2 years ago

RTSignTool: Search the user/system stores for intermedate CAs to the signing certificate and automatically include them in the signing output. bugref:8691

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 9.6 KB
Line 
1# $Id: Makefile.kmk 95682 2022-07-17 18:45:45Z 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
27SUB_DEPTH = ../../../..
28include $(KBUILD_PATH)/subheader.kmk
29
30
31if !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
62endif
63
64
65if !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 bldRTSignTool_POST_CMDS.win = $(VBOX_SIGN_IMAGE_CMDS)
82 if defined(VBOX_WITH_DARWIN_R0_DARWIN_IMAGE_VERIFICATION) && defined(VBOX_SIGNING_MODE)
83 bldRTSignTool_POST_CMDS.darwin = $(call VBOX_SIGN_MACHO_FN,$(out),org.virtualbox.org.bldtool.$(target))
84 endif
85 ifndef VBOX_WITH_BLD_RTSIGNTOOL_SIGNING
86 bldRTSignTool_DEFS += IPRT_SIGNTOOL_NO_SIGNING
87 else # RuntimeBldProg is missing a lot and is built w/o IPRT_WITH_OPENSSL. So, include missing and rebuilt openssl deps.
88 bldRTSignTool_SDKS += VBOX_OPENSSL_BLDPROG
89 bldRTSignTool_DEFS += IPRT_WITH_OPENSSL
90 bldRTSignTool_SOURCES += \
91 ../common/string/RTStrICmpAscii.cpp \
92 ../common/checksum/alt-sha3.cpp \
93 ../common/crypto/store-inmem.cpp \
94 ../common/crypto/store-cert-add-basic.cpp \
95 ../common/crypto/rsa-core.cpp \
96 ../common/crypto/rsa-asn1-decoder.cpp \
97 ../common/crypto/rsa-init.cpp \
98 ../common/crypto/rsa-sanity.cpp \
99 ../common/crypto/RTCrStoreCertAddFromJavaKeyStore.cpp \
100 ../common/crypto/pkix-signature-core.cpp \
101 ../common/crypto/pkix-signature-builtin.cpp \
102 ../common/crypto/pkix-signature-rsa.cpp \
103 \
104 ../common/crypto/store.cpp \
105 ../common/crypto/digest-builtin.cpp \
106 ../common/crypto/iprt-openssl.cpp\
107 ../common/crypto/key.cpp \
108 ../common/crypto/key-file.cpp \
109 ../common/crypto/key-openssl.cpp \
110 ../common/crypto/pkcs7-core.cpp \
111 ../common/crypto/pkcs7-sign.cpp \
112 ../common/crypto/RTCrRandBytes-openssl.cpp
113 if1of ($(KBUILD_HOST), darwin win)
114 bldRTSignTool_SOURCES += ../r3/$(KBUILD_HOST)/RTCrStoreCreateSnapshotById-$(KBUILD_HOST).cpp
115 else
116 bldRTSignTool_SOURCES += ../genericc/RTCrStoreCreateSnapshotById-generic.cpp
117 endif
118 endif
119 endif
120
121 if !defined(VBOX_ONLY_EXTPACKS)
122 # RTLdrCheckImports - import checker.
123 PROGRAMS += bldRTLdrCheckImports
124 bldRTLdrCheckImports_TEMPLATE = VBoxAdvBldProg
125 bldRTLdrCheckImports_DEFS = IPRT_IN_BUILD_TOOL
126 bldRTLdrCheckImports_SOURCES = RTLdrCheckImports.cpp
127 endif
128endif
129
130if !defined(VBOX_ONLY_BUILD)
131
132 # RTCat is a tool for displaying files.
133 PROGRAMS += RTCat
134 RTCat_TEMPLATE = VBoxR3Tool
135 RTCat_SOURCES = RTCat.cpp
136 RTCat_SOURCES += ../VBox/LoadVBoxDDU.cpp
137
138 # RTChMod - our chmod clone.
139 PROGRAMS += RTChMod
140 RTChMod_TEMPLATE = VBoxR3Tool
141 RTChMod_SOURCES = RTChMod.cpp
142
143 # RTCp - our cp clone.
144 PROGRAMS += RTCp
145 RTCp_TEMPLATE = VBoxR3Tool
146 RTCp_SOURCES = RTCp.cpp
147 RTCp_SOURCES += ../VBox/LoadVBoxDDU.cpp
148
149 # RTIsoMaker - ISO image maker - build version.
150 PROGRAMS += RTIsoMaker
151 RTIsoMaker_TEMPLATE = VBoxR3Tool
152 RTIsoMaker_SOURCES = RTIsoMaker.cpp
153 RTIsoMaker_SOURCES += ../VBox/LoadVBoxDDU.cpp
154
155 # RTLs is a tool for listing file information.
156 PROGRAMS += RTLs
157 RTLs_TEMPLATE = VBoxR3Tool
158 RTLs_SOURCES = RTLs.cpp
159 RTLs_SOURCES += ../VBox/LoadVBoxDDU.cpp
160
161 # RTRm is a tool for removing files and directories.
162 PROGRAMS += RTRm
163 RTRm_TEMPLATE = VBoxR3Tool
164 RTRm_SOURCES = RTRm.cpp
165 RTRm_SOURCES += ../VBox/LoadVBoxDDU.cpp
166
167 # RTManifest is a tool for creating and verifying manifest files.
168 PROGRAMS += RTManifest
169 RTManifest_TEMPLATE = VBoxR3Tool
170 RTManifest_SOURCES = RTManifest.cpp
171 RTManifest_SOURCES += ../VBox/LoadVBoxDDU.cpp
172
173 # RTLdrFlt is similar to c++filt, except that it's for VMMR0.r0 stacks.
174 PROGRAMS += RTLdrFlt
175 RTLdrFlt_TEMPLATE = VBoxR3Tool
176 RTLdrFlt_SOURCES = RTLdrFlt.cpp
177
178 # RTFtpServer implements a simple FTP server.
179 PROGRAMS += RTFtpServer
180 RTFtpServer_TEMPLATE = VBoxR3Tool
181 RTFtpServer_SOURCES = RTFtpServer.cpp
182
183 # RTGzip - our gzip clone (for testing the gzip/gunzip streaming code)
184 PROGRAMS += RTGzip
185 RTGzip_TEMPLATE = VBoxR3Tool
186 RTGzip_SOURCES = RTGzip.cpp
187 RTGzip_SOURCES += ../VBox/LoadVBoxDDU.cpp
188
189 ifdef VBOX_WITH_LIBCURL
190 # RTHttp - our http/https fetcher (for testing the http client API).
191 PROGRAMS += RTHttp
192 RTHttp_TEMPLATE = VBoxR3Tool
193 RTHttp_SOURCES = RTHttp.cpp
194 endif
195
196 # RTHttpServer implements a simple HTTP server.
197 PROGRAMS += RTHttpServer
198 RTHttpServer_TEMPLATE = VBoxR3Tool
199 RTHttpServer_SOURCES = RTHttpServer.cpp
200 ifdef IPRT_HTTP_WITH_WEBDAV
201 RTHttpServer_DEFS += IPRT_HTTP_WITH_WEBDAV
202 endif
203
204 # RTLdrCheckImports - import checker.
205 PROGRAMS += RTLdrCheckImports
206 RTLdrCheckImports_TEMPLATE = VBoxR3Tool
207 RTLdrCheckImports_SOURCES = RTLdrCheckImports.cpp
208 RTLdrCheckImports_SOURCES += ../VBox/LoadVBoxDDU.cpp
209
210 # RTMkDir - our mkdir clone.
211 PROGRAMS += RTMkDir
212 RTMkDir_TEMPLATE = VBoxR3Tool
213 RTMkDir_SOURCES = RTMkDir.cpp
214
215 # RTRmDir - our mkdir clone.
216 PROGRAMS += RTRmDir
217 RTRmDir_TEMPLATE = VBoxR3Tool
218 RTRmDir_SOURCES = RTRmDir.cpp
219
220 # RTShutdown - similar (but not identical) to a typical unix shutdown command.
221 PROGRAMS += RTShutdown
222 RTShutdown_TEMPLATE = VBoxR3Tool
223 RTShutdown_SOURCES = RTShutdown.cpp
224
225 # RTTar - our tar clone (for testing the tar/gzip/gunzip streaming code)
226 PROGRAMS += RTTar
227 RTTar_TEMPLATE = VBoxR3Tool
228 RTTar_SOURCES = RTTar.cpp
229 RTTar_SOURCES += ../VBox/LoadVBoxDDU.cpp
230
231 # RTUnzip - our unzip clone (for testing the unzip streaming code)
232 PROGRAMS += RTUnzip
233 RTUnzip_TEMPLATE = VBoxR3Tool
234 RTUnzip_SOURCES = RTUnzip.cpp
235 RTUnzip_SOURCES += ../VBox/LoadVBoxDDU.cpp
236
237 # RTNtDbgHelp - our tar clone (for testing the tar/gzip/gunzip streaming code)
238 PROGRAMS.win += RTNtDbgHelp
239 RTNtDbgHelp_TEMPLATE = VBoxR3Tool
240 RTNtDbgHelp_SOURCES = RTNtDbgHelp.cpp
241
242 # RTDbgSymCache - Symbol cache manager.
243 PROGRAMS += RTDbgSymCache
244 RTDbgSymCache_TEMPLATE = VBoxR3Tool
245 RTDbgSymCache_SOURCES = RTDbgSymCache.cpp
246
247 # RTSignTool - Signing utility.
248 PROGRAMS += RTSignTool
249 RTSignTool_TEMPLATE := VBoxR3Tool
250 RTSignTool_INCS := ../include
251 RTSignTool_SOURCES := RTSignTool.cpp
252 RTSignTool_LIBS = $(PATH_STAGE_LIB)/SUPR3$(VBOX_SUFF_LIB)
253 RTSignTool_LIBS.win = Crypt32.lib NCrypt.lib
254
255 # RTTraceLogTool - Trace log collection and dissection tool.
256 PROGRAMS += RTTraceLogTool
257 RTTraceLogTool_TEMPLATE = VBoxR3Tool
258 RTTraceLogTool_SOURCES = RTTraceLogTool.cpp
259
260 # RTFuzzMaster - Fuzzing master tool.
261 PROGRAMS += RTFuzzMaster
262 RTFuzzMaster_TEMPLATE = VBoxR3Tool
263 RTFuzzMaster_SOURCES = RTFuzzMaster.cpp
264
265 # RTFuzzClient - Fuzzing client tool.
266 PROGRAMS += RTFuzzClient
267 RTFuzzClient_TEMPLATE = VBoxR3Tool
268 RTFuzzClient_SOURCES = RTFuzzClient.cpp
269
270 # RTEfiFatExtract - Extracting single files from a fat EFI binary.
271 PROGRAMS += RTEfiFatExtract
272 RTEfiFatExtract_TEMPLATE = VBoxR3Tool
273 RTEfiFatExtract_SOURCES = RTEfiFatExtract.cpp
274
275 # RTEfiSigDb - EFI signature database management tool.
276 PROGRAMS += RTEfiSigDb
277 RTEfiSigDb_TEMPLATE = VBoxR3Tool
278 RTEfiSigDb_SOURCES = RTEfiSigDb.cpp
279
280 if1of ($(KBUILD_TARGET), darwin linux solaris win)
281 # RTKrnlModInfo - our lsmod/kextstat clone (for testing the RTKrnlMod code).
282 PROGRAMS += RTKrnlModInfo
283 RTKrnlModInfo_TEMPLATE = VBoxR3Tool
284 RTKrnlModInfo_SOURCES = RTKrnlModInfo.cpp
285 endif
286
287endif # !VBOX_ONLY_BUILD
288
289include $(FILE_KBUILD_SUB_FOOTER)
290
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