VirtualBox

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

Last change on this file since 95669 was 95669, checked in by vboxsync, 3 years ago

RTSignTool: Working on using certificates + private keys from the windows crypto stores. bugref:8691

  • 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 95669 2022-07-16 03:58:43Z 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_SOURCES = RTSignTool.cpp
78 bldRTSignTool_DEFS = IPRT_IN_BUILD_TOOL
79 bldRTSignTool_LIBS.win = Crypt32.lib NCrypt.lib
80 bldRTSignTool_POST_CMDS.win = $(VBOX_SIGN_IMAGE_CMDS)
81 if defined(VBOX_WITH_DARWIN_R0_DARWIN_IMAGE_VERIFICATION) && defined(VBOX_SIGNING_MODE)
82 bldRTSignTool_POST_CMDS.darwin = $(call VBOX_SIGN_MACHO_FN,$(out),org.virtualbox.org.bldtool.$(target))
83 endif
84 endif
85
86 if !defined(VBOX_ONLY_EXTPACKS)
87 # RTLdrCheckImports - import checker.
88 PROGRAMS += bldRTLdrCheckImports
89 bldRTLdrCheckImports_TEMPLATE = VBoxAdvBldProg
90 bldRTLdrCheckImports_DEFS = IPRT_IN_BUILD_TOOL
91 bldRTLdrCheckImports_SOURCES = RTLdrCheckImports.cpp
92 endif
93endif
94
95if !defined(VBOX_ONLY_BUILD)
96
97 # RTCat is a tool for displaying files.
98 PROGRAMS += RTCat
99 RTCat_TEMPLATE = VBoxR3Tool
100 RTCat_SOURCES = RTCat.cpp
101 RTCat_SOURCES += ../VBox/LoadVBoxDDU.cpp
102
103 # RTChMod - our chmod clone.
104 PROGRAMS += RTChMod
105 RTChMod_TEMPLATE = VBoxR3Tool
106 RTChMod_SOURCES = RTChMod.cpp
107
108 # RTCp - our cp clone.
109 PROGRAMS += RTCp
110 RTCp_TEMPLATE = VBoxR3Tool
111 RTCp_SOURCES = RTCp.cpp
112 RTCp_SOURCES += ../VBox/LoadVBoxDDU.cpp
113
114 # RTIsoMaker - ISO image maker - build version.
115 PROGRAMS += RTIsoMaker
116 RTIsoMaker_TEMPLATE = VBoxR3Tool
117 RTIsoMaker_SOURCES = RTIsoMaker.cpp
118 RTIsoMaker_SOURCES += ../VBox/LoadVBoxDDU.cpp
119
120 # RTLs is a tool for listing file information.
121 PROGRAMS += RTLs
122 RTLs_TEMPLATE = VBoxR3Tool
123 RTLs_SOURCES = RTLs.cpp
124 RTLs_SOURCES += ../VBox/LoadVBoxDDU.cpp
125
126 # RTRm is a tool for removing files and directories.
127 PROGRAMS += RTRm
128 RTRm_TEMPLATE = VBoxR3Tool
129 RTRm_SOURCES = RTRm.cpp
130 RTRm_SOURCES += ../VBox/LoadVBoxDDU.cpp
131
132 # RTManifest is a tool for creating and verifying manifest files.
133 PROGRAMS += RTManifest
134 RTManifest_TEMPLATE = VBoxR3Tool
135 RTManifest_SOURCES = RTManifest.cpp
136 RTManifest_SOURCES += ../VBox/LoadVBoxDDU.cpp
137
138 # RTLdrFlt is similar to c++filt, except that it's for VMMR0.r0 stacks.
139 PROGRAMS += RTLdrFlt
140 RTLdrFlt_TEMPLATE = VBoxR3Tool
141 RTLdrFlt_SOURCES = RTLdrFlt.cpp
142
143 # RTFtpServer implements a simple FTP server.
144 PROGRAMS += RTFtpServer
145 RTFtpServer_TEMPLATE = VBoxR3Tool
146 RTFtpServer_SOURCES = RTFtpServer.cpp
147
148 # RTGzip - our gzip clone (for testing the gzip/gunzip streaming code)
149 PROGRAMS += RTGzip
150 RTGzip_TEMPLATE = VBoxR3Tool
151 RTGzip_SOURCES = RTGzip.cpp
152 RTGzip_SOURCES += ../VBox/LoadVBoxDDU.cpp
153
154 ifdef VBOX_WITH_LIBCURL
155 # RTHttp - our http/https fetcher (for testing the http client API).
156 PROGRAMS += RTHttp
157 RTHttp_TEMPLATE = VBoxR3Tool
158 RTHttp_SOURCES = RTHttp.cpp
159 endif
160
161 # RTHttpServer implements a simple HTTP server.
162 PROGRAMS += RTHttpServer
163 RTHttpServer_TEMPLATE = VBoxR3Tool
164 RTHttpServer_SOURCES = RTHttpServer.cpp
165 ifdef IPRT_HTTP_WITH_WEBDAV
166 RTHttpServer_DEFS += IPRT_HTTP_WITH_WEBDAV
167 endif
168
169 # RTLdrCheckImports - import checker.
170 PROGRAMS += RTLdrCheckImports
171 RTLdrCheckImports_TEMPLATE = VBoxR3Tool
172 RTLdrCheckImports_SOURCES = RTLdrCheckImports.cpp
173 RTLdrCheckImports_SOURCES += ../VBox/LoadVBoxDDU.cpp
174
175 # RTMkDir - our mkdir clone.
176 PROGRAMS += RTMkDir
177 RTMkDir_TEMPLATE = VBoxR3Tool
178 RTMkDir_SOURCES = RTMkDir.cpp
179
180 # RTRmDir - our mkdir clone.
181 PROGRAMS += RTRmDir
182 RTRmDir_TEMPLATE = VBoxR3Tool
183 RTRmDir_SOURCES = RTRmDir.cpp
184
185 # RTShutdown - similar (but not identical) to a typical unix shutdown command.
186 PROGRAMS += RTShutdown
187 RTShutdown_TEMPLATE = VBoxR3Tool
188 RTShutdown_SOURCES = RTShutdown.cpp
189
190 # RTTar - our tar clone (for testing the tar/gzip/gunzip streaming code)
191 PROGRAMS += RTTar
192 RTTar_TEMPLATE = VBoxR3Tool
193 RTTar_SOURCES = RTTar.cpp
194 RTTar_SOURCES += ../VBox/LoadVBoxDDU.cpp
195
196 # RTUnzip - our unzip clone (for testing the unzip streaming code)
197 PROGRAMS += RTUnzip
198 RTUnzip_TEMPLATE = VBoxR3Tool
199 RTUnzip_SOURCES = RTUnzip.cpp
200 RTUnzip_SOURCES += ../VBox/LoadVBoxDDU.cpp
201
202 # RTNtDbgHelp - our tar clone (for testing the tar/gzip/gunzip streaming code)
203 PROGRAMS.win += RTNtDbgHelp
204 RTNtDbgHelp_TEMPLATE = VBoxR3Tool
205 RTNtDbgHelp_SOURCES = RTNtDbgHelp.cpp
206
207 # RTDbgSymCache - Symbol cache manager.
208 PROGRAMS += RTDbgSymCache
209 RTDbgSymCache_TEMPLATE = VBoxR3Tool
210 RTDbgSymCache_SOURCES = RTDbgSymCache.cpp
211
212 # RTSignTool - Signing utility.
213 PROGRAMS += RTSignTool
214 RTSignTool_TEMPLATE = VBoxR3Tool
215 RTSignTool_SOURCES = RTSignTool.cpp
216 RTSignTool_LIBS = $(PATH_STAGE_LIB)/SUPR3$(VBOX_SUFF_LIB)
217 RTSignTool_LIBS.win = Crypt32.lib NCrypt.lib
218
219 # RTTraceLogTool - Trace log collection and dissection tool.
220 PROGRAMS += RTTraceLogTool
221 RTTraceLogTool_TEMPLATE = VBoxR3Tool
222 RTTraceLogTool_SOURCES = RTTraceLogTool.cpp
223
224 # RTFuzzMaster - Fuzzing master tool.
225 PROGRAMS += RTFuzzMaster
226 RTFuzzMaster_TEMPLATE = VBoxR3Tool
227 RTFuzzMaster_SOURCES = RTFuzzMaster.cpp
228
229 # RTFuzzClient - Fuzzing client tool.
230 PROGRAMS += RTFuzzClient
231 RTFuzzClient_TEMPLATE = VBoxR3Tool
232 RTFuzzClient_SOURCES = RTFuzzClient.cpp
233
234 # RTEfiFatExtract - Extracting single files from a fat EFI binary.
235 PROGRAMS += RTEfiFatExtract
236 RTEfiFatExtract_TEMPLATE = VBoxR3Tool
237 RTEfiFatExtract_SOURCES = RTEfiFatExtract.cpp
238
239 # RTEfiSigDb - EFI signature database management tool.
240 PROGRAMS += RTEfiSigDb
241 RTEfiSigDb_TEMPLATE = VBoxR3Tool
242 RTEfiSigDb_SOURCES = RTEfiSigDb.cpp
243
244 if1of ($(KBUILD_TARGET), darwin linux solaris win)
245 # RTKrnlModInfo - our lsmod/kextstat clone (for testing the RTKrnlMod code).
246 PROGRAMS += RTKrnlModInfo
247 RTKrnlModInfo_TEMPLATE = VBoxR3Tool
248 RTKrnlModInfo_SOURCES = RTKrnlModInfo.cpp
249 endif
250
251endif # !VBOX_ONLY_BUILD
252
253include $(FILE_KBUILD_SUB_FOOTER)
254
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