1 | # $Id: Config.kmk 29235 2010-05-08 10:08:58Z vboxsync $
|
---|
2 | ## @file
|
---|
3 | # The global build configuration file for VBox.
|
---|
4 | #
|
---|
5 | # This file gets included by all makefiles through the
|
---|
6 | # include $(KBUILD_PATH)/header.kmk statement.
|
---|
7 | #
|
---|
8 |
|
---|
9 | #
|
---|
10 | # Copyright (C) 2006-2010 Oracle Corporation
|
---|
11 | #
|
---|
12 | # This file is part of VirtualBox Open Source Edition (OSE), as
|
---|
13 | # available from http://www.virtualbox.org. This file is free software;
|
---|
14 | # you can redistribute it and/or modify it under the terms of the GNU
|
---|
15 | # General Public License (GPL) as published by the Free Software
|
---|
16 | # Foundation, in version 2 as it comes in the "COPYING" file of the
|
---|
17 | # VirtualBox OSE distribution. VirtualBox OSE is distributed in the
|
---|
18 | # hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
|
---|
19 | #
|
---|
20 |
|
---|
21 | # Marker.
|
---|
22 | VBOX_ROOT_CONFIG_KMK_INCLUDED = 1
|
---|
23 |
|
---|
24 | #
|
---|
25 | # kBuild stuff
|
---|
26 | #
|
---|
27 |
|
---|
28 | # Experimental
|
---|
29 | .SECONDTARGETEXPANSION:
|
---|
30 |
|
---|
31 | # Enable automatic installation of what's built.
|
---|
32 | KBUILD_DO_AUTO_INSTALL := 1
|
---|
33 | PASSES := $(filter-out PACKING,$(PASSES)) PACKING # temporary hack
|
---|
34 | # Modify the order of the INSTALLS and OTHERS passes.
|
---|
35 | DEFAULT_PASSES := BLDPROGS LIBRARIES DLLS BINARIES INSTALLS OTHERS
|
---|
36 | # Modify the build types.
|
---|
37 | ## @todo checked and dbgopt
|
---|
38 | KBUILD_BLD_TYPES = release profile debug kprofile
|
---|
39 |
|
---|
40 | ## 'strict' builds
|
---|
41 | # Same as release builds, except that RT_STRICT and VBOX_STRICT are defined,
|
---|
42 | # meaning all assertions are in action. (Appending means '.strict' props take
|
---|
43 | # precedence in argument lists.)
|
---|
44 | KBUILD_BLD_TYPES += strict
|
---|
45 | BLD_TYPE_strict_EXTENDS = release
|
---|
46 | BLD_TYPE_strict_EXTENDS_BY = appending
|
---|
47 |
|
---|
48 | ## 'dbgopt' builds
|
---|
49 | # Same as debug builds, except that compiler optimizations are enabled. This
|
---|
50 | # intended for cases where all the debug facitities (logging, assertions, ++)
|
---|
51 | # is wanted but actual source level debugging as important as execution speed.
|
---|
52 | KBUILD_BLD_TYPES += dbgopt
|
---|
53 | BLD_TYPE_dbgopt_EXTENDS = debug
|
---|
54 | BLD_TYPE_dbgopt_EXTENDS_BY = appending
|
---|
55 |
|
---|
56 | # Temporary hack for kBuild ticket #83.
|
---|
57 | ## @todo kBuild: remove after closing ticket #83.
|
---|
58 | PROPS_ACCUMULATE_L_LNK += INTERMEDIATES
|
---|
59 | PROPS_PROGRAMS_ACCUMULATE_L += INTERMEDIATES
|
---|
60 | PROPS_LIBRARIES_ACCUMULATE_L += INTERMEDIATES
|
---|
61 | PROPS_DLLS_ACCUMULATE_L += INTERMEDIATES
|
---|
62 | PROPS_SYSMODS_ACCUMULATE_L += INTERMEDIATES
|
---|
63 | PROPS_MISCBINS_ACCUMULATE_L += INTERMEDIATES
|
---|
64 |
|
---|
65 | # Install paths.
|
---|
66 | PATH_INS = $(PATH_OUT)
|
---|
67 | ifeq ($(KBUILD_TARGET),darwin)
|
---|
68 | INST_DIST = dist/
|
---|
69 | INST_SDK = $(INST_DIST)sdk/
|
---|
70 |
|
---|
71 | # the bundles
|
---|
72 | INST_VIRTUALBOX = $(INST_DIST)VirtualBox.app/
|
---|
73 | INST_VBOXDRV = $(INST_DIST)VBoxDrv.kext/
|
---|
74 | INST_VBOXDRV_TIGER = $(INST_DIST)VBoxDrvTiger.kext/
|
---|
75 | INST_VBOXNETFLT = $(INST_DIST)VBoxNetFlt.kext/
|
---|
76 | INST_VBOXNETADP = $(INST_DIST)VBoxNetAdp.kext/
|
---|
77 | INST_VBOXUSB = $(INST_DIST)VBoxUSB.kext/
|
---|
78 | INST_VBOXUSB_TIGER = $(INST_DIST)VBoxUSBTiger.kext/
|
---|
79 |
|
---|
80 | # put everything in the VirtualBox app bundle.
|
---|
81 | INST_BIN = $(INST_VIRTUALBOX)Contents/MacOS/
|
---|
82 | INST_DLL = $(INST_BIN)
|
---|
83 | INST_SYS = $(INST_BIN)
|
---|
84 | INST_TESTCASE = $(INST_BIN)testcase/
|
---|
85 | INST_ADDITIONS = $(INST_BIN)additions/
|
---|
86 | INST_ADDITIONS_ISO = $(INST_BIN)
|
---|
87 |
|
---|
88 | # other paths
|
---|
89 | INST_TESTSUITE = testsuite/
|
---|
90 | INST_LIB = lib/
|
---|
91 | INST_ADDITIONS_LIB = $(INST_LIB)/additions/
|
---|
92 |
|
---|
93 | else
|
---|
94 |
|
---|
95 | INST_BIN = bin/
|
---|
96 | INST_DIST = $(INST_BIN)
|
---|
97 | INST_DLL = $(INST_BIN)
|
---|
98 | INST_SDK = $(INST_BIN)sdk/
|
---|
99 | INST_DLL = $(INST_BIN)
|
---|
100 | INST_SYS = $(INST_BIN)
|
---|
101 | INST_TESTCASE = $(INST_BIN)testcase/
|
---|
102 | INST_ADDITIONS = $(INST_BIN)additions/
|
---|
103 | INST_ADDITIONS_ISO = $(INST_ADDITIONS)
|
---|
104 |
|
---|
105 | INST_TESTSUITE = testsuite/
|
---|
106 | INST_LIB = lib/
|
---|
107 | INST_ADDITIONS_LIB = $(INST_LIB)additions/
|
---|
108 | endif
|
---|
109 |
|
---|
110 | PATH_BIN = $(patsubst %/,%,$(PATH_INS)/$(INST_BIN))
|
---|
111 | PATH_DLL = $(patsubst %/,%,$(PATH_INS)/$(INST_DLL))
|
---|
112 | PATH_SYS = $(patsubst %/,%,$(PATH_INS)/$(INST_SYS))
|
---|
113 | PATH_LIB = $(patsubst %/,%,$(PATH_INS)/$(INST_LIB))
|
---|
114 | PATH_DOC = $(PATH_OUT)/doc
|
---|
115 | VBOX_PATH_SDK = $(patsubst %/,%,$(PATH_INS)/$(INST_SDK))
|
---|
116 | VBOX_PATH_DIST = $(patsubst %/,%,$(PATH_INS)/$(INST_DIST))
|
---|
117 | VBOX_PATH_TESTSUITE = $(patsubst %/,%,$(PATH_INS)/$(INST_TESTSUITE))
|
---|
118 | VBOX_PATH_ADDITIONS = $(patsubst %/,%,$(PATH_INS)/$(INST_ADDITIONS))
|
---|
119 | VBOX_PATH_ADDITIONS_ISO = $(patsubst %/,%,$(PATH_INS)/$(INST_ADDITIONS_ISO))
|
---|
120 | VBOX_PATH_ADDITIONS_LIB = $(patsubst %/,%,$(PATH_INS)/$(INST_ADDITIONS_LIB))
|
---|
121 |
|
---|
122 |
|
---|
123 | # Delete targets on failure.
|
---|
124 | .DELETE_ON_ERROR:
|
---|
125 |
|
---|
126 | # Notify about important kBuild updates.
|
---|
127 | ifneq ($(call if-expr, $(KMK_REVISION) >= 2274 && $(KBUILD_KMK_REVISION) >= 2206,fine,old),fine)
|
---|
128 | $(error You must update kBuild! KMK_REVISION=$(KMK_REVISION) KBUILD_KMK_REVISION=$(KBUILD_KMK_REVISION) KBUILD_PATH=$(KBUILD_PATH))
|
---|
129 | endif
|
---|
130 |
|
---|
131 | #
|
---|
132 | # Define USERNAME early on.
|
---|
133 | #
|
---|
134 | ifndef USERNAME
|
---|
135 | ifdef USER
|
---|
136 | USERNAME = $(USER)
|
---|
137 | else
|
---|
138 | $(warning Warning: You must have USERNAME or USER in your environment.)
|
---|
139 | endif
|
---|
140 | endif
|
---|
141 |
|
---|
142 | #
|
---|
143 | # The VirtualBox version.
|
---|
144 | #
|
---|
145 |
|
---|
146 | # Major version.
|
---|
147 | VBOX_VERSION_MAJOR = 3
|
---|
148 | # Minor version.
|
---|
149 | VBOX_VERSION_MINOR = 2
|
---|
150 | # This is the current build number. It should be increased every time we publish a
|
---|
151 | # new build. The define is available in every source file. Only even build numbers
|
---|
152 | # will be published, odd numbers are set during development.
|
---|
153 | VBOX_VERSION_BUILD = 0
|
---|
154 | # Full version string (may include more than just x.y.z, but no spaces or other problematic chars).
|
---|
155 | VBOX_VERSION_STRING = $(VBOX_VERSION_MAJOR).$(VBOX_VERSION_MINOR).$(VBOX_VERSION_BUILD)_BETA2
|
---|
156 | # Force the additions.sh script to get an exact additions build when we're doing the release.
|
---|
157 |
|
---|
158 | ifeq ($(int-mod $(VBOX_VERSION_BUILD),2),0)
|
---|
159 | export VBOX_ADDITIONS_SH_MODE = release
|
---|
160 | export VBOX_DOCUMENTATION_SH_MODE = release
|
---|
161 | export VBOX_EFI_SH_MODE = release
|
---|
162 | endif
|
---|
163 |
|
---|
164 | # Some info on the vendor
|
---|
165 | VBOX_VENDOR = Oracle Corporation
|
---|
166 | VBOX_VENDOR_SHORT = Oracle
|
---|
167 | VBOX_PRODUCT = Oracle VM VirtualBox
|
---|
168 | # Not all could be done automatically. Here is a list of known places which
|
---|
169 | # have to be updated manually, please keep this up to date:
|
---|
170 | # src/VBox/Devices/PC/PXE/client/uinit.asm
|
---|
171 | # src/VBox/RDP/webclient/flash/com/sun/network/rdp/Version.as
|
---|
172 | # src/VBox/Frontends/VirtualBox/src/globals/VBoxGlobal.cpp
|
---|
173 | # src/VBox/Frontends/VirtualBox/src/settings/global/VBoxGLSettingsLanguage.cpp
|
---|
174 | # src/VBox/Frontends/VirtualBox/nls/*.ts
|
---|
175 | # debian/control
|
---|
176 | # src/VBox/Installer/linux/{debian,rpm}
|
---|
177 | # src/VBox/Installer/linux/virtualbox.desktop
|
---|
178 | # src/VBox/Additions/WINNT/Installer/ISO/ReadmeDrivers.txt
|
---|
179 |
|
---|
180 | # Maybe we want set this manually.
|
---|
181 | VBOX_C_YEAR = $(date-utc %Y)
|
---|
182 |
|
---|
183 | #
|
---|
184 | # The VirtualBox package type.
|
---|
185 | #
|
---|
186 | ifeq ($(KBUILD_TARGET),win)
|
---|
187 | VBOX_PACKAGE_OS = WINDOWS
|
---|
188 | else ifeq ($(KBUILD_TARGET),linux)
|
---|
189 | VBOX_PACKAGE_OS = LINUX
|
---|
190 | else ifeq ($(KBUILD_TARGET),darwin)
|
---|
191 | VBOX_PACKAGE_OS = DARWIN
|
---|
192 | else ifeq ($(KBUILD_TARGET),solaris)
|
---|
193 | VBOX_PACKAGE_OS = SOLARIS
|
---|
194 | else ifeq ($(KBUILD_TARGET),os2)
|
---|
195 | VBOX_PACKAGE_OS = OS2
|
---|
196 | else if1of ($(KBUILD_TARGET), dragonfly freebsd netbsd openbsd)
|
---|
197 | VBOX_PACKAGE_OS = BSD
|
---|
198 | else
|
---|
199 | $(error Cannot determine VBOX_PACKAGE_OS)
|
---|
200 | endif
|
---|
201 | ifeq ($(KBUILD_TARGET_ARCH),x86)
|
---|
202 | VBOX_PACKAGE_ARCH = 32BITS
|
---|
203 | else
|
---|
204 | VBOX_PACKAGE_ARCH = 64BITS
|
---|
205 | endif
|
---|
206 | # distribution, mostly for Linux/Solaris where we support different distributions
|
---|
207 | # this strip will be overridden by the Linux packaging scripts
|
---|
208 | VBOX_PACKAGE_DIST ?= GENERIC
|
---|
209 | # Full string
|
---|
210 | VBOX_PACKAGE_STRING = $(VBOX_PACKAGE_OS)_$(VBOX_PACKAGE_ARCH)_$(VBOX_PACKAGE_DIST)
|
---|
211 |
|
---|
212 |
|
---|
213 | #
|
---|
214 | # The VirtualBox Configuration Defaults.
|
---|
215 | #
|
---|
216 | # We try to document all the build configuration options here, thing which
|
---|
217 | # aren't enabled by default is left commented out just to show that they
|
---|
218 | # exist and which value they should have (usually 1, but anyway).
|
---|
219 | #
|
---|
220 |
|
---|
221 | # Virtual single makefile.
|
---|
222 | # If undefined, the tranditional recursive make method will be used.
|
---|
223 | VBOX_SINGLE_MAKEFILE = 1
|
---|
224 |
|
---|
225 | ## @name Additions
|
---|
226 | ## @{
|
---|
227 | # This indicates that additions (of some kind or another) is being _built_.
|
---|
228 | # VBOX_WITHOUT_ADDITIONS overrides it.
|
---|
229 | #if1of ($(KBUILD_TARGET), freebsd linux os2 solaris win)
|
---|
230 | if1of ($(KBUILD_TARGET), linux solaris win freebsd)
|
---|
231 | VBOX_WITH_ADDITIONS = 1
|
---|
232 | endif
|
---|
233 | # Build the optional ring-0 part of the additions for syntax checking.
|
---|
234 | # (Except when cross-building on linux since we're using /usr/src/...)
|
---|
235 | ifn1of ($(KBUILD_TARGET).$(KBUILD_HOST_ARCH).$(KBUILD_TARGET_ARCH), linux.x86.amd64 linux.amd64.x86)
|
---|
236 | VBOX_WITH_ADDITION_DRIVERS = 1
|
---|
237 | endif
|
---|
238 | # Build X11 additions. Can be disabled separately.
|
---|
239 | if1of ($(KBUILD_TARGET), dragonfly freebsd linux netbsd openbsd solaris)
|
---|
240 | VBOX_WITH_X11_ADDITIONS = 1
|
---|
241 | endif
|
---|
242 | # Enable the building of shared folders in the windows additions.
|
---|
243 | VBOX_WITH_WIN32_ADDITIONS_SHAREDFOLDERS = 1
|
---|
244 | # Take the binaries of the OS/2 Additions.
|
---|
245 | VBOX_WITH_OS2_ADDITIONS_BIN = 1
|
---|
246 | # Use additions from the build server.
|
---|
247 | #VBOX_WITH_ADDITIONS_FROM_BUILD_SERVER = 1
|
---|
248 | # Include additions in the package
|
---|
249 | VBOX_WITH_ADDITIONS_PACKING = 1
|
---|
250 | # Only build the additions (for the additions build server).
|
---|
251 | #VBOX_ONLY_ADDITIONS = 1
|
---|
252 | ifdef VBOX_ADDITIONS_ONLY # typical mistake.
|
---|
253 | $(error It is VBOX_ONLY_ADDITIONS=1 not VBOX_ADDITIONS_ONLY!)
|
---|
254 | endif
|
---|
255 | # Don't bother with additions, overrides VBOX_WITH_ADDITIONS.
|
---|
256 | # This is not used by makefiles, only Config.kmk, see below.
|
---|
257 | ifdef VBOX_ONLY_SDK
|
---|
258 | VBOX_WITHOUT_ADDITIONS = 1
|
---|
259 | endif
|
---|
260 | # Don't create the additions ISO.
|
---|
261 | # (Used by the additions build server, don't invert it.)
|
---|
262 | #VBOX_WITHOUT_ADDITIONS_ISO = 1
|
---|
263 | ## @}
|
---|
264 |
|
---|
265 | ## @name Documentation
|
---|
266 | ## @{
|
---|
267 | # The documentation
|
---|
268 | VBOX_WITH_DOCS = 1
|
---|
269 | # Use documentation from the build server.
|
---|
270 | #VBOX_WITH_DOCS_FROM_BUILD_SERVER = 1
|
---|
271 | # Include documentation in the package
|
---|
272 | VBOX_WITH_DOCS_PACKING = 1
|
---|
273 | # Include CHM when building docs (unset in LocalConfig.kmk to suppress CHM)
|
---|
274 | ifn1of ($(KBUILD_TARGET), linux)
|
---|
275 | VBOX_WITH_DOCS_CHM = 1
|
---|
276 | endif
|
---|
277 | # Don't bother with documentation, overrides VBOX_WITH_DOCS.
|
---|
278 | # This is not used by makefiles, only Config.kmk, see below.
|
---|
279 | #VBOX_WITHOUT_DOCS = 1
|
---|
280 | # Only build the documentation (for the documentation build server).
|
---|
281 | #VBOX_ONLY_DOCS = 1
|
---|
282 | ifdef VBOX_DOCS_ONLY # typical mistake.
|
---|
283 | $(error It is VBOX_ONLY_DOCS=1 not VBOX_DOCS_ONLY!)
|
---|
284 | endif
|
---|
285 | ## @}
|
---|
286 |
|
---|
287 | ## @name VMM related settings.
|
---|
288 | ## @{
|
---|
289 | # Enable the tradition raw-mode virtualization.
|
---|
290 | VBOX_WITH_RAW_MODE = 1
|
---|
291 | # Enable support for 64-bit guests.
|
---|
292 | VBOX_WITH_64_BITS_GUESTS = 1
|
---|
293 | # Enable multi-core VCPUs.
|
---|
294 | VBOX_WITH_MULTI_CORE = 1
|
---|
295 | # Activate this to force the VM to pre-allocate the guest RAM before startup
|
---|
296 | VBOX_WITH_PREALLOC_RAM_BY_DEFAULT =
|
---|
297 | # Enable the debugger.
|
---|
298 | VBOX_WITH_DEBUGGER = 1
|
---|
299 | # Enable the debugger GUI.
|
---|
300 | VBOX_WITH_DEBUGGER_GUI = 1
|
---|
301 | # Enable the PDM Lock and let I/O threads call into the PICs.
|
---|
302 | # TODO: Eliminate VBOX_WITH_PDM_LOCK.
|
---|
303 | VBOX_WITH_PDM_LOCK = 1
|
---|
304 | ## @}
|
---|
305 |
|
---|
306 |
|
---|
307 | ## @name Devices, Drivers,
|
---|
308 | ## @{
|
---|
309 | # Build the Host Guest Communication Manager component.
|
---|
310 | VBOX_WITH_HGCM = 1
|
---|
311 | ## Build the bugcheck detection code.
|
---|
312 | #VBOX_WITH_GUEST_BUGCHECK_DETECTION =
|
---|
313 | # Enable the USB feature. This incluses VBOX_WITH_VUSB!
|
---|
314 | VBOX_WITH_USB = 1
|
---|
315 | # Enable the USB 1.1 controller plus virtual USB HID devices.
|
---|
316 | VBOX_WITH_VUSB = 1
|
---|
317 | # Enable the USB 2.0 controller.
|
---|
318 | VBOX_WITH_EHCI = 1
|
---|
319 | # Enable the ISCSI feature.
|
---|
320 | VBOX_WITH_ISCSI = 1
|
---|
321 | # Enable INIP support in the ISCSI feature.
|
---|
322 | VBOX_WITH_INIP = 1
|
---|
323 | # Enable the E1000 feature.
|
---|
324 | VBOX_WITH_E1000 = 1
|
---|
325 | # Enable the Virtio feature.
|
---|
326 | VBOX_WITH_VIRTIO = 1
|
---|
327 | # Enable ALSA support for Linux.
|
---|
328 | VBOX_WITH_ALSA = 1
|
---|
329 | # Enable Pulse support for Linux.
|
---|
330 | VBOX_WITH_PULSE = 1
|
---|
331 | # Enable statically linked dbus support
|
---|
332 | if1of ($(KBUILD_TARGET), linux solaris)
|
---|
333 | VBOX_WITH_DBUS = 1
|
---|
334 | endif
|
---|
335 | # Enable building PAM modules
|
---|
336 | if1of ($(KBUILD_TARGET), linux solaris)
|
---|
337 | VBOX_WITH_PAM = 1
|
---|
338 | endif
|
---|
339 | # Disable WINMM support for Windows (not implemented).
|
---|
340 | VBOX_WITH_WINMM =
|
---|
341 | # Enabled internal networking.
|
---|
342 | VBOX_WITH_INTERNAL_NETWORKING = 1
|
---|
343 | # Enable Host Guest Shared Memory Interface
|
---|
344 | VBOX_WITH_HGSMI=1
|
---|
345 | # Enable Video 2D Acceleration
|
---|
346 | if1of ($(KBUILD_TARGET), darwin linux win)
|
---|
347 | VBOX_WITH_VIDEOHWACCEL = 1
|
---|
348 | endif
|
---|
349 | # Enable VBVA lock
|
---|
350 | VBOX_WITH_OLD_VBVA_LOCK = 1
|
---|
351 | # Enable the Intel PXE ROM (replaces Etherboot).
|
---|
352 | VBOX_WITH_INTEL_PXE = 1
|
---|
353 | # Enable EFI support
|
---|
354 | VBOX_WITH_EFI = 1
|
---|
355 | # Fetch EFI firmware image from the build server
|
---|
356 | #VBOX_WITH_EFIFW_FROM_BUILD_SERVER = 1
|
---|
357 | # Include the EFI firmware into the package
|
---|
358 | VBOX_WITH_EFIFW_PACKING = 1
|
---|
359 | # Use kStuff for MACH-O and LX binary loading.
|
---|
360 | if1of ($(KBUILD_TARGET), darwin os2)
|
---|
361 | IPRT_WITH_KSTUFF = 1
|
---|
362 | endif
|
---|
363 | # Enable Crossbow support for Solaris TAP driver.
|
---|
364 | VBOX_WITH_CROSSBOW = 1
|
---|
365 | # Enable setuid wrapper for Solaris host DVD.
|
---|
366 | #VBOX_WITH_SUID_WRAPPER = 1
|
---|
367 | # Enable the virtual SATA/AHCI controller
|
---|
368 | VBOX_WITH_AHCI = 1
|
---|
369 | # Enable the new async completion manager
|
---|
370 | VBOX_WITH_PDM_ASYNC_COMPLETION = 1
|
---|
371 | # Temporary switch for enabling / disabling the new USB code on Darwin.
|
---|
372 | VBOX_WITH_NEW_USB_CODE_ON_DARWIN=1
|
---|
373 | # Enable USB code that relies on USBA driver election callback & our own USB client driver on Solaris.
|
---|
374 | ifdef VBOX_WITH_USB
|
---|
375 | VBOX_WITH_NEW_USB_CODE_ON_SOLARIS=1
|
---|
376 | endif
|
---|
377 | ifdef VBOX_WITH_USB
|
---|
378 | VBOX_WITH_VUSB = 1
|
---|
379 | endif
|
---|
380 | # Enable the hal/sysfs USB code on Linux.
|
---|
381 | ifeq ($(KBUILD_TARGET),linux)
|
---|
382 | VBOX_USB_WITH_SYSFS=1
|
---|
383 | # Disabled for now
|
---|
384 | # VBOX_USB_WITH_DBUS=1
|
---|
385 | VBOX_USB_WITH_INOTIFY=1
|
---|
386 | endif
|
---|
387 | # Use the new VBI module on Solaris.
|
---|
388 | #VBOX_WITH_SOLARIS_VBI = 1
|
---|
389 | # Enable performance API.
|
---|
390 | VBOX_WITH_RESOURCE_USAGE_API = 1
|
---|
391 | # Enable BusLogic SCSI host adapter
|
---|
392 | VBOX_WITH_BUSLOGIC = 1
|
---|
393 | # Enable LsiLogic SCSI host adapter
|
---|
394 | VBOX_WITH_LSILOGIC = 1
|
---|
395 | # Enable HPET device
|
---|
396 | VBOX_WITH_HPET = 1
|
---|
397 | # Enable LPC device
|
---|
398 | VBOX_WITH_LPC = 1
|
---|
399 | # Enable SMC device
|
---|
400 | VBOX_WITH_SMC = 1
|
---|
401 | # Enable SCSI drivers
|
---|
402 | VBOX_WITH_SCSI = 1
|
---|
403 | # Enable changing network attachments dynamically.
|
---|
404 | VBOX_DYNAMIC_NET_ATTACH = 1
|
---|
405 | # Enable this setting to force a fallback to default DMI data on configuration errors
|
---|
406 | VBOX_BIOS_DMI_FALLBACK =
|
---|
407 | # Enable host network interface API.
|
---|
408 | if1of ($(KBUILD_TARGET), darwin freebsd linux solaris win)
|
---|
409 | VBOX_WITH_HOSTNETIF_API = 1
|
---|
410 | endif
|
---|
411 | # Enable the new storage I/O path.
|
---|
412 | if1of ($(KBUILD_TARGET), darwin freebsd linux solaris win)
|
---|
413 | VBOX_WITH_NEW_IO_CODE = 1
|
---|
414 | endif
|
---|
415 | ## @}
|
---|
416 |
|
---|
417 |
|
---|
418 | ## @name Other Component
|
---|
419 | ## @{
|
---|
420 | # Build the installer.
|
---|
421 | VBOX_WITH_INSTALLER = 1
|
---|
422 | # The kernel driver/module and related runtime libraries.
|
---|
423 | VBOX_WITH_VBOXDRV = 1
|
---|
424 | # The main api.
|
---|
425 | VBOX_WITH_MAIN = 1
|
---|
426 | # Set this to prefix all C symbols in XPCOM, to avoid dynamic linking problems
|
---|
427 | # caused by our XPCOM library polluting the symbol namespace for system libs.
|
---|
428 | if1of ($(KBUILD_TARGET), linux solaris)
|
---|
429 | VBOX_WITH_XPCOM_NAMESPACE_CLEANUP = 1
|
---|
430 | endif
|
---|
431 | # Set this to not use COM or XPCOM in places where it can be avoided.
|
---|
432 | #VBOX_WITHOUT_COM = 1
|
---|
433 | # The webservices api.
|
---|
434 | VBOX_WITH_WEBSERVICES = 1
|
---|
435 | # The Qt 4 GUI.
|
---|
436 | VBOX_WITH_QTGUI = 1
|
---|
437 | # Indicates the Qt is Cocoa based on the Mac.
|
---|
438 | ifeq ($(KBUILD_TARGET),darwin)
|
---|
439 | VBOX_WITH_COCOA_QT = 1
|
---|
440 | endif
|
---|
441 | # The SDL based GUI.
|
---|
442 | VBOX_WITH_VBOXSDL = 1
|
---|
443 | # Build VBoxSDL with secure label support.
|
---|
444 | ifeq ($(filter win.amd64,$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH)),) # too much work with freetype and all that.
|
---|
445 | VBOX_WITH_SECURELABEL = 1
|
---|
446 | endif
|
---|
447 | # The headless frontend.
|
---|
448 | VBOX_WITH_HEADLESS = 1
|
---|
449 | # Enable the VRDP server.
|
---|
450 | VBOX_WITH_VRDP = 1
|
---|
451 | # Enable support for video redirection VRDP channel.
|
---|
452 | VBOX_WITH_VRDP_VIDEO_CHANNEL = 1
|
---|
453 | # Build the VRDP authentication modules.
|
---|
454 | VBOX_WITH_VRDP_AUTHMOD = 1
|
---|
455 | # Build enhanced version of rdesktop.
|
---|
456 | VBOX_WITH_VRDP_RDESKTOP = 1
|
---|
457 | # The basic frontend (w/o Main).
|
---|
458 | VBOX_WITH_VBOXBFE = 1
|
---|
459 | ## The Direct Framebuffer GUI.
|
---|
460 | #VBOX_WITH_VBOXFB = 1
|
---|
461 | # Enables the Python<->XPCOM and Python<->COM bindings.
|
---|
462 | VBOX_WITH_PYTHON ?= 1
|
---|
463 | if1of ($(KBUILD_TARGET), darwin)
|
---|
464 | # Enable Java<->XPCOM bridge
|
---|
465 | VBOX_WITH_JXPCOM ?= 1
|
---|
466 | endif
|
---|
467 | # Use XPIDL instead of genjifaces.
|
---|
468 | VBOX_WITH_JAVA_SUPPORT_IN_XPIDL ?= 1
|
---|
469 | # Build against multiple Python versions present in the system
|
---|
470 | VBOX_WITH_MULTIVERSION_PYTHON ?= 1
|
---|
471 | # Enable the kchmviewer.
|
---|
472 | VBOX_WITH_KCHMVIEWER = 1
|
---|
473 | # Build the testsuite.
|
---|
474 | VBOX_WITH_TESTSUITE = 1
|
---|
475 | # Build the testcases.
|
---|
476 | VBOX_WITH_TESTCASES = 1
|
---|
477 | # Enables the ffmpeg module for recording test runs.
|
---|
478 | # TODO: Enable this for normal build server builds?
|
---|
479 | #if1of ($(KBUILD_TARGET), linux)
|
---|
480 | # VBOX_WITH_FFMPEG = 1
|
---|
481 | #endif
|
---|
482 | # Enable shared folders
|
---|
483 | VBOX_WITH_SHARED_FOLDERS = 1
|
---|
484 | # Enable shared clipboard
|
---|
485 | VBOX_WITH_SHARED_CLIPBOARD = 1
|
---|
486 | # Enable the host/guest information service (aka guest properties).
|
---|
487 | VBOX_WITH_GUEST_PROPS = 1
|
---|
488 | # Enable this to prevent the guest from writing guest properties.
|
---|
489 | VBOX_WITH_GUEST_PROPS_RDONLY_GUEST =
|
---|
490 | # Enable the guest control service.
|
---|
491 | if1of ($(KBUILD_TARGET), linux solaris win darwin)
|
---|
492 | VBOX_WITH_GUEST_CONTROL = 1
|
---|
493 | endif
|
---|
494 | # Enable ballooning
|
---|
495 | VBOX_WITH_MEMBALLOON = 1
|
---|
496 | # Enable crOpenGL service
|
---|
497 | if1of ($(KBUILD_TARGET), darwin freebsd linux solaris win)
|
---|
498 | VBOX_WITH_CROGL = 1
|
---|
499 | endif
|
---|
500 | # Enable the VNC server in VBoxHeadless (GPL only).
|
---|
501 | #VBOX_WITH_VNC = 1
|
---|
502 | ## @}
|
---|
503 |
|
---|
504 |
|
---|
505 | ## @name Misc
|
---|
506 | ## @{
|
---|
507 | # Enable Seamless mode
|
---|
508 | VBOX_X11_SEAMLESS_GUEST = 1
|
---|
509 | # Enables all the doxgen bits.
|
---|
510 | VBOX_WITH_ALL_DOXYGEN_TARGETS = 1
|
---|
511 | # Set this to skip installing the redistributable compiler runtime.
|
---|
512 | #VBOX_WITHOUT_COMPILER_REDIST = 1
|
---|
513 | ## @}
|
---|
514 |
|
---|
515 |
|
---|
516 | ## @name Compiler and linker config
|
---|
517 | ## @{
|
---|
518 | # For treating compiler and linker warnings as errors where possible.
|
---|
519 | if1of ($(KBUILD_TARGET).$(KBUILD_TARGET_ARCH), darwin.x86 darwin.amd64 linux.x86 linux.amd64 win.x86 win.amd64)
|
---|
520 | VBOX_WITH_WARNINGS_AS_ERRORS = 1
|
---|
521 | endif
|
---|
522 | ## @}
|
---|
523 |
|
---|
524 |
|
---|
525 | ## @name Hardening
|
---|
526 | ## @{
|
---|
527 | # Enables hardening.
|
---|
528 | # Most developers will want to disable this in their LocalConfig.kmk.
|
---|
529 | ifn1of ($(KBUILD_TARGET), win)
|
---|
530 | VBOX_WITH_HARDENING = 1
|
---|
531 | endif
|
---|
532 | # Where the application files are (going to be) installed.
|
---|
533 | #VBOX_PATH_APP_PRIVATE = /usr/lib/virtualbox
|
---|
534 | ifdef VBOX_WITH_HARDENING
|
---|
535 | if1of ($(KBUILD_TARGET), solaris)
|
---|
536 | VBOX_PATH_APP_PRIVATE = /opt/VirtualBox/$(if-expr $(KBUILD_TARGET_ARCH) == "amd64",amd64,i386)
|
---|
537 | else ifeq ($(KBUILD_TARGET),darwin)
|
---|
538 | VBOX_PATH_APP_PRIVATE = /Applications/VirtualBox.app/Contents/MacOS
|
---|
539 | else ifeq ($(KBUILD_TARGET),freebsd)
|
---|
540 | VBOX_PATH_APP_PRIVATE = /usr/local/lib/virtualbox
|
---|
541 | endif
|
---|
542 | endif
|
---|
543 | # Where the architecture specific application files are (going to be) installed.
|
---|
544 | #VBOX_PATH_APP_PRIVATE_ARCH = /usr/lib/virtualbox
|
---|
545 | ifdef VBOX_WITH_HARDENING
|
---|
546 | if1of ($(KBUILD_TARGET), darwin solaris)
|
---|
547 | VBOX_PATH_APP_PRIVATE_ARCH = $(VBOX_PATH_APP_PRIVATE)
|
---|
548 | endif
|
---|
549 | endif
|
---|
550 | # Where the shared libraries are (going to be) installed.
|
---|
551 | #VBOX_PATH_SHARED_LIBS = /usr/lib
|
---|
552 | ifdef VBOX_WITH_HARDENING
|
---|
553 | if1of ($(KBUILD_TARGET), darwin solaris)
|
---|
554 | VBOX_PATH_SHARED_LIBS = $(VBOX_PATH_APP_PRIVATE)
|
---|
555 | endif
|
---|
556 | endif
|
---|
557 | # Where the documentation is (going to be) installed.
|
---|
558 | #VBOX_PATH_APP_DOCS = /usr/share/doc/virtualbox
|
---|
559 | ifdef VBOX_WITH_HARDENING
|
---|
560 | if1of ($(KBUILD_TARGET), darwin solaris)
|
---|
561 | VBOX_PATH_APP_DOCS = $(VBOX_PATH_APP_PRIVATE)
|
---|
562 | endif
|
---|
563 | endif
|
---|
564 | # The DT_RPATH/DT_RUNPATH to embed into the binaries (ELF).
|
---|
565 | # (This one is used for all binaries, there is no need to adjust this
|
---|
566 | # depending on the location of the object.)
|
---|
567 | #VBOX_WITH_RUNPATH = /usr/lib/virtualbox
|
---|
568 | ifdef VBOX_WITH_HARDENING
|
---|
569 | if1of ($(KBUILD_TARGET), freebsd solaris)
|
---|
570 | VBOX_WITH_RUNPATH = $(VBOX_PATH_APP_PRIVATE)
|
---|
571 | endif
|
---|
572 | endif
|
---|
573 | # Enable use of the $ORIGIN DT_RPATH/DT_RUNPATH feature (ELF).
|
---|
574 | # Because of the setuid usage on all ELF platforms when hardening the build
|
---|
575 | # things gets a bit complicated since the $ORIGIN+setuid policy differs.
|
---|
576 | #VBOX_WITH_ORIGIN=1
|
---|
577 | ifdef VBOX_WITH_HARDENING
|
---|
578 | if1of ($(KBUILD_TARGET), linux)
|
---|
579 | VBOX_WITH_ORIGIN = 1
|
---|
580 | endif
|
---|
581 | else if1of ($(KBUILD_TARGET), linux solaris)
|
---|
582 | VBOX_WITH_ORIGIN = 1
|
---|
583 | endif
|
---|
584 | # Enable the system wide support service/daemon.
|
---|
585 | # Work in progress, but required for hardening on Windows.
|
---|
586 | #VBOX_WITH_SUPSVC = 1
|
---|
587 | ifdef VBOX_WITH_HARDENING
|
---|
588 | if1of ($(KBUILD_TARGET), win)
|
---|
589 | VBOX_WITH_SUPSVC = 1
|
---|
590 | endif
|
---|
591 | endif
|
---|
592 | # Use VBoxNetFlt for host interface networking.
|
---|
593 | if1of ($(KBUILD_TARGET), darwin freebsd linux solaris win)
|
---|
594 | VBOX_WITH_NETFLT = 1
|
---|
595 | VBOX_SOLARIS_NSL_RESOLVED = 1
|
---|
596 | ifeq ($(KBUILD_TARGET),solaris)
|
---|
597 | VBOX_WITH_NETFLT_CROSSBOW = 1
|
---|
598 | endif
|
---|
599 | if1of ($(KBUILD_TARGET), darwin freebsd linux solaris)
|
---|
600 | VBOX_WITH_NETADP = 1
|
---|
601 | endif
|
---|
602 | endif
|
---|
603 | if1of ($(KBUILD_TARGET), freebsd linux)
|
---|
604 | VBOX_WITH_VDE = 1
|
---|
605 | endif
|
---|
606 | ## @}
|
---|
607 |
|
---|
608 | # Strip binaries of release and profile builds before packing them into the installer
|
---|
609 | # archive. When building .deb/.rpms, don't strip the symbols as they are required for
|
---|
610 | # the debug packages containing symbols for gdb located in /usr/lib/debug.
|
---|
611 | VBOX_DO_STRIP := $(if $(filter release profile,$(KBUILD_TYPE)),1,)
|
---|
612 | # Strip R0/GC modules (current requirement for our loader)
|
---|
613 | # TODO: This shouldn't be a requirement any longer. FIXME XXX
|
---|
614 | VBOX_DO_STRIP_MODULES = 1
|
---|
615 |
|
---|
616 |
|
---|
617 | #
|
---|
618 | # Config items for enabling work in progress.
|
---|
619 | #
|
---|
620 | # It's good pratice to add stuff here even if it is currently disabled by
|
---|
621 | # default.
|
---|
622 | #
|
---|
623 | # Note! Please, do *not* add stuff to the global DEFS unless it is *really*
|
---|
624 | # necessary! The other guys will hate for it you when they have to
|
---|
625 | # recompile everything when the feature is enabled or disabled. Put
|
---|
626 | # the ifdefs in target or template definitions.
|
---|
627 | #
|
---|
628 |
|
---|
629 | ## For experimenting with disabling preemption instead of interrupts
|
---|
630 | # when working VT-x/AMD-V in VMMR0.
|
---|
631 | ## @todo os2? Reconsider perhaps windows? (see defect) This should be made the default.
|
---|
632 | if1of ($(KBUILD_TARGET), darwin freebsd linux solaris win)
|
---|
633 | VBOX_WITH_VMMR0_DISABLE_PREEMPTION = 1
|
---|
634 | endif
|
---|
635 | ## For testing deadlock detection and lock order validation.
|
---|
636 | # If issues are found, create high priority defects and temporarily comment
|
---|
637 | # the next line.
|
---|
638 | VBOX_WITH_STRICT_LOCKS = 1
|
---|
639 |
|
---|
640 |
|
---|
641 | #
|
---|
642 | # Branding
|
---|
643 | #
|
---|
644 | VBOX_BRAND_BIOS_LOGO := $(PATH_ROOT)/src/VBox/Devices/Graphics/BIOS/puel_logo.bmp
|
---|
645 | VBOX_BRAND_LICENSE_HTML := $(PATH_ROOT)/doc/License.html
|
---|
646 | VBOX_BRAND_LICENSE_RTF := $(PATH_ROOT)/doc/License.rtf
|
---|
647 | VBOX_BRAND_LICENSE_TXT := $(PATH_ROOT)/doc/License.txt
|
---|
648 | VBOX_BRAND_LICENSE_VER :=
|
---|
649 | VBOX_BRAND_GUI_ABOUT_PNG := $(PATH_ROOT)/src/VBox/Frontends/VirtualBox/images/NonOSE/about.png
|
---|
650 | VBOX_BRAND_GUI_ABOUT_16PX_PNG := $(PATH_ROOT)/src/VBox/Frontends/VirtualBox/images/NonOSE/about_16px.png
|
---|
651 | VBOX_BRAND_GUI_VBOX_16PX_PNG := $(PATH_ROOT)/src/VBox/Frontends/VirtualBox/images/NonOSE/VirtualBox_16px.png
|
---|
652 | VBOX_BRAND_GUI_VBOX_20PX_PNG := $(PATH_ROOT)/src/VBox/Frontends/VirtualBox/images/NonOSE/VirtualBox_20px.png
|
---|
653 | VBOX_BRAND_GUI_VBOX_32PX_PNG := $(PATH_ROOT)/src/VBox/Frontends/VirtualBox/images/NonOSE/VirtualBox_32px.png
|
---|
654 | VBOX_BRAND_GUI_VBOX_40PX_PNG := $(PATH_ROOT)/src/VBox/Frontends/VirtualBox/images/NonOSE/VirtualBox_40px.png
|
---|
655 | VBOX_BRAND_GUI_VBOX_48PX_PNG := $(PATH_ROOT)/src/VBox/Frontends/VirtualBox/images/NonOSE/VirtualBox_48px.png
|
---|
656 | VBOX_BRAND_GUI_VBOX_64PX_PNG := $(PATH_ROOT)/src/VBox/Frontends/VirtualBox/images/NonOSE/VirtualBox_64px.png
|
---|
657 | VBOX_BRAND_WIN_INST_DLGBMP := $(PATH_ROOT)/src/VBox/Installer/win/Binary/Dialog.bmp
|
---|
658 | VBOX_BRAND_WIN_INST_EXT :=
|
---|
659 | VBOX_BRAND_WIN_ADD_INST_DLGBMP := $(PATH_ROOT)/src/VBox/Additions/WINNT/Installer/welcome.bmp
|
---|
660 | VBOX_BRAND_DARWIN_DISKIMAGE_DS_STORE := $(PATH_ROOT)/src/VBox/Installer/darwin/DiskImage/DS_Store
|
---|
661 | VBOX_BRAND_DARWIN_DISKIMAGE_BG := $(PATH_ROOT)/src/VBox/Installer/darwin/DiskImage/vbox_folder.tiff
|
---|
662 | VBOX_BRAND_DARWIN_INSTALLER_BG := $(PATH_ROOT)/src/VBox/Installer/darwin/VirtualBox_mpkg/background.tif
|
---|
663 |
|
---|
664 | #
|
---|
665 | # Skip stuff.
|
---|
666 | #
|
---|
667 |
|
---|
668 | # VBOX_QUICK can be used by core developers to speed to the build
|
---|
669 | ifdef VBOX_QUICK
|
---|
670 | # undefine variables by assigning blank.
|
---|
671 | VBOX_WITH_TESTSUITE=
|
---|
672 | VBOX_WITH_TESTCASES=
|
---|
673 | VBOX_WITH_MAIN =
|
---|
674 | VBOX_WITH_VBOXSDL =
|
---|
675 | VBOX_WITH_VBOXBFE =
|
---|
676 | VBOX_WITH_QTGUI =
|
---|
677 | VBOX_WITH_DEBUGGER_GUI =
|
---|
678 | VBOX_WITH_DOCS =
|
---|
679 | endif # VBOX_QUICK
|
---|
680 |
|
---|
681 | ifeq ($(KBUILD_TARGET),darwin)
|
---|
682 | # Don't bother with SDL ttf for now.
|
---|
683 | VBOX_WITH_SECURELABEL=
|
---|
684 | # We'll use the native html/help viewer.
|
---|
685 | VBOX_WITH_KCHMVIEWER=
|
---|
686 | VBOX_WITH_VRDP_RDESKTOP=
|
---|
687 | # Permanent (no working SDL).
|
---|
688 | VBOX_WITH_VBOXSDL=
|
---|
689 | ifeq ($(KBUILD_TARGET_ARCH),amd64)
|
---|
690 | VBOX_WITH_VBOXBFE=
|
---|
691 | endif
|
---|
692 | endif
|
---|
693 |
|
---|
694 | ifeq ($(KBUILD_TARGET),freebsd)
|
---|
695 | VBOX_WITH_DOCS=
|
---|
696 | endif
|
---|
697 |
|
---|
698 | ifeq ($(KBUILD_TARGET),l4)
|
---|
699 | VBOX_WITH_VBOXDRV=
|
---|
700 | VBOX_WITH_ADDITION_DRIVERS=
|
---|
701 | VBOX_WITH_VRDP=
|
---|
702 | VBOX_WITH_HEADLESS=
|
---|
703 | VBOX_WITH_VBOXSDL=
|
---|
704 | VBOX_WITH_QTGUI=
|
---|
705 | VBOX_WITH_MAIN=
|
---|
706 | VBOX_WITH_DOCS=
|
---|
707 | VBOX_WITH_ISCSI=
|
---|
708 | VBOX_WITH_INIP=
|
---|
709 | VBOX_WITH_INTERNAL_NETWORKING=
|
---|
710 | VBOX_WITH_PDM_ASYNC_COMPLETION=
|
---|
711 | VBOX_WITH_KCHMVIEWER=
|
---|
712 | VBOX_WITH_HARDENING=
|
---|
713 | endif
|
---|
714 |
|
---|
715 | ifeq ($(KBUILD_TARGET),os2)
|
---|
716 | VBOX_WITH_WEBSERVICES=
|
---|
717 | VBOX_WITH_INSTALLER=
|
---|
718 | VBOX_WITH_SECURELABEL=
|
---|
719 | VBOX_WITH_VRDP_AUTHMOD=
|
---|
720 | VBOX_WITH_VRDP_RDESKTOP=
|
---|
721 | VBOX_WITH_TESTSUITE=
|
---|
722 | VBOX_WITH_QTGUI=
|
---|
723 | VBOX_WITH_USB=
|
---|
724 | VBOX_WITH_EHCI=
|
---|
725 | VBOX_WITH_DOCS=
|
---|
726 | VBOX_WITH_PDM_ASYNC_COMPLETION=
|
---|
727 | VBOX_WITH_KCHMVIEWER=
|
---|
728 | VBOX_WITH_HARDENING=
|
---|
729 | endif
|
---|
730 |
|
---|
731 | ifeq ($(KBUILD_TARGET),solaris)
|
---|
732 | VBOX_WITH_SECURELABEL=
|
---|
733 | VBOX_WITH_OGL=
|
---|
734 | endif
|
---|
735 |
|
---|
736 | ifeq ($(KBUILD_TARGET),win)
|
---|
737 | VBOX_WITH_VRDP_RDESKTOP=
|
---|
738 | VBOX_WITH_KCHMVIEWER=
|
---|
739 | endif
|
---|
740 |
|
---|
741 |
|
---|
742 | #
|
---|
743 | # Include automatic and local config file to override the above settings
|
---|
744 | # and to provide defaults for the settings below this point.
|
---|
745 | #
|
---|
746 | ifndef AUTOCFG
|
---|
747 | AUTOCFG := $(wildcard $(PATH_ROOT)/AutoConfig.kmk)
|
---|
748 | endif
|
---|
749 | ifneq ($(AUTOCFG),)
|
---|
750 | include $(AUTOCFG)
|
---|
751 | endif
|
---|
752 |
|
---|
753 | ifndef LOCALCFG
|
---|
754 | LOCALCFG := $(wildcard $(PATH_ROOT)/LocalConfig.kmk)
|
---|
755 | ifneq ($(LOCALCFG),)
|
---|
756 | include $(LOCALCFG)
|
---|
757 | endif
|
---|
758 | else
|
---|
759 | # Ignore it if it doesn't exist.
|
---|
760 | if exists "$(LOCALCFG)"
|
---|
761 | include $(LOCALCFG)
|
---|
762 | else
|
---|
763 | $(warning LOCALCFG='$(LOCALCFG)' does not exist)
|
---|
764 | override LOCALCFG :=
|
---|
765 | endif
|
---|
766 | endif
|
---|
767 |
|
---|
768 | #
|
---|
769 | # Allow to overwrite the branding information from an external file
|
---|
770 | #
|
---|
771 | ifdef VBOX_BRANDING_CFG
|
---|
772 | include $(VBOX_BRANDING_CFG)
|
---|
773 | endif
|
---|
774 |
|
---|
775 | #
|
---|
776 | # Bitch about old settings.
|
---|
777 | #
|
---|
778 | ifdef VBOX_WITHOUT_LINUX_COMPILER_H
|
---|
779 | $(warning VBOX_WITHOUT_LINUX_COMPILER_H was renamed to VBOX_WITH_LINUX_COMPILER_H, the meaning is inverted.)
|
---|
780 | endif
|
---|
781 |
|
---|
782 | #
|
---|
783 | # For the docs build box.
|
---|
784 | #
|
---|
785 | ifdef VBOX_ONLY_DOCS
|
---|
786 | VBOX_WITH_DOCS_CHM = 1
|
---|
787 | endif
|
---|
788 |
|
---|
789 | #
|
---|
790 | # Disable components that are not open sourced.
|
---|
791 | #
|
---|
792 | ifdef VBOX_OSE
|
---|
793 | VBOX_WITH_VRDP=
|
---|
794 | VBOX_WITH_USB=
|
---|
795 | VBOX_WITH_EHCI=
|
---|
796 | ifn1of ($(KBUILD_TARGET), darwin linux solaris win freebsd)
|
---|
797 | VBOX_WITH_NETFLT=
|
---|
798 | endif
|
---|
799 | VBOX_WITH_DEBUGGER=
|
---|
800 | VBOX_WITH_DEBUGGER_GUI=
|
---|
801 | VBOX_WITH_WIN32_ADDITIONS_SHAREDFOLDERS=
|
---|
802 | VBOX_WITH_ADDITIONS_PACKING=
|
---|
803 | VBOX_WITHOUT_ADDITIONS_ISO=1
|
---|
804 | VBOX_WITH_OS2_ADDITIONS_BIN=
|
---|
805 | VBOX_WITH_SECURELABEL=
|
---|
806 | VBOX_WITH_KCHMVIEWER=
|
---|
807 | VBOX_WITH_DOCS=
|
---|
808 | VBOX_WITH_DOCS_PACKING=
|
---|
809 | VBOX_WITH_TESTSUITE=
|
---|
810 | VBOX_WITH_INTEL_PXE=
|
---|
811 | VBOX_WITH_FFMPEG=
|
---|
812 | ifn1of ($(KBUILD_TARGET), linux solaris)
|
---|
813 | # Only the Linux, Solaris installers are public
|
---|
814 | VBOX_WITH_INSTALLER=
|
---|
815 | endif
|
---|
816 | if1of ($(KBUILD_TARGET), solaris)
|
---|
817 | VBOX_WITH_NEW_USB_CODE_ON_SOLARIS=
|
---|
818 | endif
|
---|
819 | VBOX_USB_WITH_SYSFS=
|
---|
820 | # branding
|
---|
821 | VBOX_BRAND_BIOS_LOGO := $(PATH_ROOT)/src/VBox/Devices/Graphics/BIOS/ose_logo.bmp
|
---|
822 | VBOX_BRAND_GUI_ABOUT_PNG := $(PATH_ROOT)/src/VBox/Frontends/VirtualBox/images/OSE/about.png
|
---|
823 | VBOX_BRAND_GUI_ABOUT_16PX_PNG := $(PATH_ROOT)/src/VBox/Frontends/VirtualBox/images/OSE/about_16px.png
|
---|
824 | VBOX_BRAND_GUI_VBOX_16PX_PNG := $(PATH_ROOT)/src/VBox/Frontends/VirtualBox/images/OSE/VirtualBox_16px.png
|
---|
825 | VBOX_BRAND_GUI_VBOX_20PX_PNG := $(PATH_ROOT)/src/VBox/Frontends/VirtualBox/images/OSE/VirtualBox_20px.png
|
---|
826 | VBOX_BRAND_GUI_VBOX_32PX_PNG := $(PATH_ROOT)/src/VBox/Frontends/VirtualBox/images/OSE/VirtualBox_32px.png
|
---|
827 | VBOX_BRAND_GUI_VBOX_40PX_PNG := $(PATH_ROOT)/src/VBox/Frontends/VirtualBox/images/OSE/VirtualBox_40px.png
|
---|
828 | VBOX_BRAND_GUI_VBOX_48PX_PNG := $(PATH_ROOT)/src/VBox/Frontends/VirtualBox/images/OSE/VirtualBox_48px.png
|
---|
829 | VBOX_BRAND_GUI_VBOX_64PX_PNG := $(PATH_ROOT)/src/VBox/Frontends/VirtualBox/images/OSE/VirtualBox_64px.png
|
---|
830 | VBOX_BRAND_GUI_CUBE_42PX_PNG := $(PATH_ROOT)/src/VBox/Frontends/VirtualBox/images/OSE/VirtualBox_cube_42px.png
|
---|
831 | endif
|
---|
832 |
|
---|
833 | #
|
---|
834 | # VBOX_WITHOUT_HARDENING is for developers (put in LocalConfig.kmk).
|
---|
835 | # Note that this is a bit rough since hardening governs more than one
|
---|
836 | # variable... Also note that we allow VBOX_WITH_HARDENING=1 on the
|
---|
837 | # command line to overrule VBOX_WITHOUT_HARDENING (the check below).
|
---|
838 | #
|
---|
839 | ifdef VBOX_WITHOUT_HARDENING
|
---|
840 | VBOX_WITH_HARDENING=
|
---|
841 | ifeq ($(VBOX_WITH_HARDENING),)
|
---|
842 | VBOX_PATH_APP_PRIVATE=
|
---|
843 | VBOX_PATH_APP_PRIVATE_ARCH=
|
---|
844 | VBOX_PATH_SHARED_LIBS=
|
---|
845 | VBOX_PATH_APP_DOCS=
|
---|
846 | VBOX_WITH_RUNPATH=
|
---|
847 | if1of ($(KBUILD_TARGET), linux solaris)
|
---|
848 | VBOX_WITH_ORIGIN=1
|
---|
849 | endif
|
---|
850 | endif
|
---|
851 | endif
|
---|
852 |
|
---|
853 | #
|
---|
854 | # Sanitize the additions build config variables.
|
---|
855 | #
|
---|
856 | ifdef VBOX_WITH_ADDITIONS_FROM_BUILD_SERVER
|
---|
857 | VBOX_WITHOUT_ADDITIONS := 1
|
---|
858 | ifdef VBOX_ONLY_ADDITIONS
|
---|
859 | $(error VBOX_ONLY_ADDITIONS + VBOX_WITH_ADDITIONS_FROM_BUILD_SERVER does not add up!)
|
---|
860 | endif
|
---|
861 | endif
|
---|
862 |
|
---|
863 | ifdef VBOX_ONLY_ADDITIONS
|
---|
864 | ifdef VBOX_WITHOUT_ADDITIONS
|
---|
865 | $(error VBOX_ONLY_ADDITIONS + VBOX_WITHOUT_ADDITIONS does not add up!)
|
---|
866 | endif
|
---|
867 | endif
|
---|
868 |
|
---|
869 | ifdef VBOX_WITHOUT_ADDITIONS
|
---|
870 | # Zap anything that could be contradicting this.
|
---|
871 | VBOX_WITH_ADDITIONS :=
|
---|
872 | endif
|
---|
873 |
|
---|
874 | #
|
---|
875 | # Sanitize the documentation build config variables.
|
---|
876 | #
|
---|
877 | ifdef VBOX_WITH_DOCS_FROM_BUILD_SERVER
|
---|
878 | VBOX_WITHOUT_DOCS := 1
|
---|
879 | ifdef VBOX_ONLY_DOCS
|
---|
880 | $(error VBOX_ONLY_DOCS + VBOX_WITH_DOCS_FROM_BUILD_SERVER does not add up!)
|
---|
881 | endif
|
---|
882 | endif
|
---|
883 |
|
---|
884 | ifdef VBOX_ONLY_DOCS
|
---|
885 | ifdef VBOX_WITHOUT_DOCS
|
---|
886 | $(error VBOX_ONLY_DOCS + VBOX_WITHOUT_DOCS does not add up!)
|
---|
887 | endif
|
---|
888 | endif
|
---|
889 |
|
---|
890 | ifdef VBOX_WITHOUT_DOCS
|
---|
891 | # Zap anything that could be contradicting this.
|
---|
892 | VBOX_WITH_DOCS :=
|
---|
893 | endif
|
---|
894 |
|
---|
895 | #
|
---|
896 | # Disable components for headless
|
---|
897 | #
|
---|
898 | ifdef VBOX_HEADLESS
|
---|
899 | VBOX_WITH_QTGUI=
|
---|
900 | VBOX_WITH_VBOXSDL=
|
---|
901 | VBOX_WITH_VBOXBFE=
|
---|
902 | VBOX_WITH_OGL=
|
---|
903 | VBOX_WITH_KCHMVIEWER=
|
---|
904 | VBOX_WITH_VRDP_RDESKTOP=
|
---|
905 | endif
|
---|
906 |
|
---|
907 | #
|
---|
908 | # Undefined VBOX_WITH_MAIN implies exclusion of a few more items.
|
---|
909 | #
|
---|
910 | ifndef VBOX_WITH_MAIN
|
---|
911 | VBOX_WITH_VRDP=
|
---|
912 | VBOX_WITH_VBOXSDL=
|
---|
913 | VBOX_WITH_QTGUI=
|
---|
914 | VBOX_WITH_DEBUGGER_GUI=
|
---|
915 | VBOX_WITH_HEADLESS=
|
---|
916 | ifdef VBOX_ONLY_DOCS
|
---|
917 | $(error Oh, does VBOX_ONLY_DOCS actually end up here. sweet.)
|
---|
918 | endif
|
---|
919 | VBOX_WITH_DOCS=
|
---|
920 | endif
|
---|
921 |
|
---|
922 | ifndef VBOX_WITH_QTGUI
|
---|
923 | VBOX_WITH_KCHMVIEWER=
|
---|
924 | endif
|
---|
925 |
|
---|
926 | #
|
---|
927 | # Mark OSE builds clearly, helps figuring out limitations more easily.
|
---|
928 | #
|
---|
929 | ifdef VBOX_OSE
|
---|
930 | VBOX_VERSION_STRING = $(VBOX_VERSION_MAJOR).$(VBOX_VERSION_MINOR).$(VBOX_VERSION_BUILD)_OSE
|
---|
931 | endif
|
---|
932 |
|
---|
933 | #
|
---|
934 | # Derived / helper config indicators. Not configurable.
|
---|
935 | #
|
---|
936 |
|
---|
937 | # Use the OpenGL module in qt when the video hardware acceleartion feature
|
---|
938 | # is enabled.
|
---|
939 | if defined(VBOX_WITH_VIDEOHWACCEL) && defined(VBOX_WITH_QTGUI)
|
---|
940 | VBOX_GUI_USE_QGL=1
|
---|
941 | else
|
---|
942 | VBOX_GUI_USE_QGL=
|
---|
943 | endif
|
---|
944 |
|
---|
945 | #
|
---|
946 | # Image and object format config.
|
---|
947 | #
|
---|
948 | if1of ($(KBUILD_TARGET), freebsd linux l4 netbsd openbsd solaris)
|
---|
949 | VBOX_LDR_FMT = elf
|
---|
950 | endif
|
---|
951 | ifeq ($(KBUILD_TARGET),darwin)
|
---|
952 | VBOX_LDR_FMT = macho
|
---|
953 | endif
|
---|
954 | ifeq ($(KBUILD_TARGET),os2)
|
---|
955 | VBOX_LDR_FMT = lx
|
---|
956 | VBOX_LDR_FMT32 = lx
|
---|
957 | VBOX_LDR_FMT64 = elf
|
---|
958 | DONT_USE_YASM = 1 # yasm doesn't implement omf yet.
|
---|
959 | endif
|
---|
960 | ifeq ($(KBUILD_TARGET),win)
|
---|
961 | VBOX_LDR_FMT = pe
|
---|
962 | endif
|
---|
963 | VBOX_LDR_FMT32 ?= $(VBOX_LDR_FMT)
|
---|
964 | VBOX_LDR_FMT64 ?= $(VBOX_LDR_FMT)
|
---|
965 |
|
---|
966 | #
|
---|
967 | # Assembler setup.
|
---|
968 | #
|
---|
969 | # This is a bit complicated since we have to support two different assmblers
|
---|
970 | # (yasm/nasm) and possibly two different formats (32-bit/64-bit).
|
---|
971 | #
|
---|
972 | ifeq ($(VBOX_LDR_FMT),elf)
|
---|
973 | ifeq ($(KBUILD_TARGET_ARCH),x86)
|
---|
974 | VBOX_ASFLAGS_FMT = -f elf32 -DASM_FORMAT_ELF
|
---|
975 | else
|
---|
976 | VBOX_ASFLAGS_FMT = -f elf64 -DASM_FORMAT_ELF
|
---|
977 | endif
|
---|
978 | VBOX_ASFLAGS_DBFINFO = -g dwarf2
|
---|
979 | endif
|
---|
980 | ifeq ($(VBOX_LDR_FMT),lx)
|
---|
981 | VBOX_ASFLAGS_FMT = -f obj -DASM_FORMAT_OMF
|
---|
982 | VBOX_ASFLAGS_DBFINFO = -g stabs
|
---|
983 | endif
|
---|
984 | ifeq ($(VBOX_LDR_FMT),macho)
|
---|
985 | ifeq ($(KBUILD_TARGET_ARCH),x86)
|
---|
986 | VBOX_ASFLAGS_FMT = -f macho32 -DASM_FORMAT_MACHO
|
---|
987 | else
|
---|
988 | VBOX_ASFLAGS_FMT = -f macho64 -DASM_FORMAT_MACHO
|
---|
989 | endif
|
---|
990 | VBOX_ASFLAGS_DBFINFO = -g dwarf2
|
---|
991 | endif
|
---|
992 | ifeq ($(VBOX_LDR_FMT),pe)
|
---|
993 | ifeq ($(KBUILD_TARGET_ARCH),x86)
|
---|
994 | VBOX_ASFLAGS_FMT = -f win32 -DASM_FORMAT_PE
|
---|
995 | else
|
---|
996 | VBOX_ASFLAGS_FMT = -f win64 -DASM_FORMAT_PE
|
---|
997 | endif
|
---|
998 | VBOX_ASFLAGS_DBFINFO = -g cv8
|
---|
999 | endif
|
---|
1000 | ifndef VBOX_ASFLAGS_FMT
|
---|
1001 | $(error VBOX_ASFLAGS_FMT is not defined. VBOX_LDR_FMT=$(VBOX_LDR_FMT))
|
---|
1002 | endif
|
---|
1003 |
|
---|
1004 | ifeq ($(VBOX_LDR_FMT32),elf)
|
---|
1005 | VBOX_ASFLAGS_FMT32 = -f elf32 -DASM_FORMAT_ELF
|
---|
1006 | VBOX_ASFLAGS_DBFINFO32 = -g dwarf2
|
---|
1007 | endif
|
---|
1008 | ifeq ($(VBOX_LDR_FMT32),lx)
|
---|
1009 | VBOX_ASFLAGS_FMT32 = -f obj -DASM_FORMAT_OMF
|
---|
1010 | VBOX_ASFLAGS_DBFINFO32 = -g stabs
|
---|
1011 | endif
|
---|
1012 | ifeq ($(VBOX_LDR_FMT32),macho)
|
---|
1013 | VBOX_ASFLAGS_FMT32 = -f macho32 -DASM_FORMAT_MACHO
|
---|
1014 | VBOX_ASFLAGS_DBFINFO32 = -g dwarf2
|
---|
1015 | endif
|
---|
1016 | ifeq ($(VBOX_LDR_FMT32),pe)
|
---|
1017 | VBOX_ASFLAGS_FMT32 = -f win32 -DASM_FORMAT_PE
|
---|
1018 | VBOX_ASFLAGS_DBFINFO32 = -g cv8
|
---|
1019 | endif
|
---|
1020 | ifndef VBOX_ASFLAGS_FMT32
|
---|
1021 | $(error VBOX_ASFLAGS_FMT32 is not defined. VBOX_LDR_FMT32=$(VBOX_LDR_FMT32))
|
---|
1022 | endif
|
---|
1023 |
|
---|
1024 | ifeq ($(VBOX_LDR_FMT64),elf)
|
---|
1025 | VBOX_ASFLAGS_FMT64 = -f elf64 -DASM_FORMAT_ELF
|
---|
1026 | VBOX_ASFLAGS_DBFINFO64 = -g dwarf2
|
---|
1027 | endif
|
---|
1028 | ifeq ($(VBOX_LDR_FMT64),macho)
|
---|
1029 | VBOX_ASFLAGS_FMT64 = -f macho64 -DASM_FORMAT_MACHO
|
---|
1030 | VBOX_ASFLAGS_DBFINFO64 = -g dwarf2
|
---|
1031 | endif
|
---|
1032 | ifeq ($(VBOX_LDR_FMT64),pe)
|
---|
1033 | VBOX_ASFLAGS_FMT64 = -f win64 -DASM_FORMAT_PE
|
---|
1034 | VBOX_ASFLAGS_DBFINFO64 = -g cv8
|
---|
1035 | endif
|
---|
1036 | ifndef VBOX_ASFLAGS_FMT64
|
---|
1037 | $(error VBOX_ASFLAGS_FMT64 is not defined. VBOX_LDR_FMT64=$(VBOX_LDR_FMT64))
|
---|
1038 | endif
|
---|
1039 |
|
---|
1040 | ifndef DONT_USE_YASM
|
---|
1041 | VBOX_ASTOOL = YASM
|
---|
1042 | VBOX_LDR_FMT_2_YASM_DBGINFO.elf = -g dwarf2
|
---|
1043 | VBOX_LDR_FMT_2_YASM_DBGINFO.lx = -g stabs
|
---|
1044 | VBOX_LDR_FMT_2_YASM_DBGINFO.macho =
|
---|
1045 | VBOX_LDR_FMT_2_YASM_DBGINFO.pe = -g cv8
|
---|
1046 | VBOX_ASFLAGS = $(VBOX_ASFLAGS_FMT) -D__YASM__ -Worphan-labels $(VBOX_LDR_FMT_2_YASM_DBGINFO.$(VBOX_LDR_FMT))
|
---|
1047 | VBOX_ASFLAGS32 = $(VBOX_ASFLAGS_FMT32) -D__YASM__ -Worphan-labels $(VBOX_LDR_FMT_2_YASM_DBGINFO.$(VBOX_LDR_FMT32))
|
---|
1048 | VBOX_ASFLAGS64 = $(VBOX_ASFLAGS_FMT64) -D__YASM__ -Worphan-labels $(VBOX_LDR_FMT_2_YASM_DBGINFO.$(VBOX_LDR_FMT64))
|
---|
1049 | else
|
---|
1050 | VBOX_ASTOOL = NASM
|
---|
1051 | VBOX_ASFLAGS = $(subst elf32,elf,$(VBOX_ASFLAGS_FMT)) -D__NASM__ -w+orphan-labels -g
|
---|
1052 | VBOX_ASFLAGS32 = $(subst elf32,elf,$(VBOX_ASFLAGS_FMT32)) -D__NASM__ -w+orphan-labels -g
|
---|
1053 | VBOX_ASFLAGS64 = $(VBOX_ASFLAGS_FMT64) -D__NASM__ -w+orphan-labels -g
|
---|
1054 | endif
|
---|
1055 |
|
---|
1056 | #
|
---|
1057 | # Windows only has mingw handy. On *nix we have to deal with cross compiling
|
---|
1058 | # 32-bit targets on 64-bit platforms, meaning we'll be using gcc32/g++32.
|
---|
1059 | # In the latter case we'll also have to disable all the all the R0 driver related stuff.
|
---|
1060 | #
|
---|
1061 | ifndef VBOX_GCC_TOOL
|
---|
1062 | ifeq ($(KBUILD_TARGET),win)
|
---|
1063 | VBOX_GCC_TOOL := MINGW32
|
---|
1064 | TOOL_MINGW32_CFLAGS := $(UNDEFINED) # override -g
|
---|
1065 | else ifeq ($(KBUILD_TARGET),os2)
|
---|
1066 | VBOX_GCC_TOOL := GXX3OMF
|
---|
1067 | else ifeq ($(KBUILD_TARGET),darwin)
|
---|
1068 | VBOX_GCC_TOOL := GXX4MACHO
|
---|
1069 | else ifeq ($(KBUILD_TARGET),solaris)
|
---|
1070 | VBOX_GCC_TOOL := GXX3PLAIN
|
---|
1071 | VBOX_GCC32_TOOL := GXX3PLAIN
|
---|
1072 | TOOL_GXX3PLAIN_LD_SYSMOD ?= /usr/ccs/bin/ld
|
---|
1073 | else
|
---|
1074 | VBOX_GCC_TOOL := GXX3
|
---|
1075 | ifeq ($(KBUILD_TARGET_ARCH).$(KBUILD_HOST_ARCH),x86.amd64) ## @todo mixing target/host here!
|
---|
1076 | VBOX_GCC_TOOL := GXX32
|
---|
1077 | VBOX_WITH_VBOXDRV=
|
---|
1078 | else ifeq ($(KBUILD_TARGET_ARCH).$(KBUILD_HOST_ARCH),amd64.x86)
|
---|
1079 | VBOX_GCC_TOOL := GXX64
|
---|
1080 | VBOX_WITH_VBOXDRV=
|
---|
1081 | endif
|
---|
1082 | endif
|
---|
1083 | endif
|
---|
1084 | ifndef VBOX_GCC32_TOOL
|
---|
1085 | ifeq ($(KBUILD_TARGET_ARCH),x86)
|
---|
1086 | VBOX_GCC32_TOOL := $(VBOX_GCC_TOOL)
|
---|
1087 | else ifeq ($(KBUILD_TARGET),win)
|
---|
1088 | VBOX_GCC32_TOOL := MINGW32
|
---|
1089 | else
|
---|
1090 | VBOX_GCC32_TOOL := GXX32
|
---|
1091 | endif
|
---|
1092 | endif
|
---|
1093 |
|
---|
1094 | #
|
---|
1095 | # Decide which Visual C++ compiler version we're using by default.
|
---|
1096 | #
|
---|
1097 | ifndef VBOX_VCC_TOOL
|
---|
1098 | ifeq ($(KBUILD_TARGET).$(KBUILD_TARGET_ARCH),win.amd64)
|
---|
1099 | VBOX_USE_VCC80 ?= 1 # Enforce VCC80 when targetting AMD64.
|
---|
1100 | endif
|
---|
1101 | ifdef VBOX_USE_VCC80
|
---|
1102 | ifeq ($(KBUILD_TARGET_ARCH),x86)
|
---|
1103 | VBOX_VCC_TOOL := VCC80X86
|
---|
1104 | else
|
---|
1105 | VBOX_VCC_TOOL := VCC80AMD64
|
---|
1106 | endif
|
---|
1107 | else
|
---|
1108 | VBOX_VCC_TOOL := VCC70
|
---|
1109 | endif
|
---|
1110 | endif
|
---|
1111 |
|
---|
1112 | #
|
---|
1113 | # The kBuild tools and SDKs are using PATH_DEVTOOLS, PATH_DEVTOOLS_BLD
|
---|
1114 | # and PATH_DEVTOOLS_TRG to find things if we give them specific locations.
|
---|
1115 | #
|
---|
1116 | PATH_DEVTOOLS ?= $(PATH_ROOT)/tools
|
---|
1117 | PATH_DEVTOOLS := $(abspath $(PATH_DEVTOOLS))
|
---|
1118 | PATH_DEVTOOLS_BLD ?= $(PATH_DEVTOOLS)/$(KBUILD_HOST).$(KBUILD_HOST_ARCH)
|
---|
1119 | PATH_DEVTOOLS_TRG ?= $(PATH_DEVTOOLS)/$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH)
|
---|
1120 |
|
---|
1121 | ## @todo Remove the default tool crap here!
|
---|
1122 | TOOL = $(VBOX_GCC_TOOL)
|
---|
1123 | ifdef VBOX_USE_VCC80
|
---|
1124 | TOOL.win.x86 = VCC80X86
|
---|
1125 | TOOL.win.amd64 = VCC80AMD64
|
---|
1126 | else
|
---|
1127 | TOOL.win = VCC70
|
---|
1128 | endif
|
---|
1129 | ASTOOL = $(VBOX_ASTOOL)
|
---|
1130 |
|
---|
1131 | #
|
---|
1132 | # L4-specific settings.
|
---|
1133 | #
|
---|
1134 | ifdef L4_DIR
|
---|
1135 | ifeq ($(KBUILD_TARGET),l4)
|
---|
1136 | L4_API ?= l4v2
|
---|
1137 | L4_ARCH ?= $(KBUILD_TARGET_ARCH)
|
---|
1138 | ifeq ($(L4_ARCH),x86)
|
---|
1139 | L4_CPU ?= 586
|
---|
1140 | L4LINUX26_INCDIR := $(L4LINUX26_DIR)/include \
|
---|
1141 | $(L4LINUX26_DIR)/include/asm-l4/i386-arch
|
---|
1142 | else ifeq ($(L4_ARCH),amd64)
|
---|
1143 | L4_CPU ?= k8
|
---|
1144 | L4LINUX26_INCDIR := $(L4LINUX26_DIR)/include
|
---|
1145 | # no red zone for L4 because of IPC bindings
|
---|
1146 | CFLAGS.l4 = -mno-red-zone
|
---|
1147 | CXXFLAGS.l4 = -mno-red-zone
|
---|
1148 | else
|
---|
1149 | $(error L4_ARCH=$(L4_ARCH))
|
---|
1150 | endif
|
---|
1151 | L4_OBJ := $(L4_DIR)/build-$(L4_ARCH)-$(L4_CPU)-$(L4_API)
|
---|
1152 | # support splitted Linux kernels (make O=<build directory>)
|
---|
1153 | kernelsrc := $(shell $(SED_EXT) -ne 's+^KERNELSRC.*= *\(.*\)+\1+p' $(L4LINUX26_DIR)/Makefile)
|
---|
1154 | ifneq ($(kernelsrc),)
|
---|
1155 | kernelpath := $(realpath $(kernelsrc))
|
---|
1156 | L4LINUX26_INCDIR += $(L4LINUX26_DIR)/include2 $(kernelpath)/include
|
---|
1157 | endif
|
---|
1158 | L4_INCDIR := \
|
---|
1159 | $(L4_OBJ)/include/uclibc++ \
|
---|
1160 | $(L4_OBJ)/include/$(L4_ARCH)/uclibc \
|
---|
1161 | $(L4_OBJ)/include/uclibc \
|
---|
1162 | $(L4LINUX26_INCDIR) \
|
---|
1163 | $(L4_OBJ)/include/$(L4_ARCH)/$(L4_API) \
|
---|
1164 | $(L4_OBJ)/include/$(L4_API) \
|
---|
1165 | $(L4_OBJ)/include/$(L4_ARCH) \
|
---|
1166 | $(L4_OBJ)/include \
|
---|
1167 | $(L4_DIR)/tool/dice/include
|
---|
1168 | L4_LIBDIR := \
|
---|
1169 | $(L4_DIR)/build-$(L4_ARCH)-$(L4_CPU)-$(L4_API)/lib/$(L4_ARCH)_$(L4_CPU)/$(L4_API)
|
---|
1170 | endif # KBUILD_TARGET == l4
|
---|
1171 | endif # L4_DIR
|
---|
1172 |
|
---|
1173 | # Produce debugging information that the Fiasco kernel debugger can read.
|
---|
1174 | ifeq ($(KBUILD_TARGET).$(KBUILD_TYPE),l4.debug)
|
---|
1175 | DEBUG_L4 = -gstabs+
|
---|
1176 | endif
|
---|
1177 |
|
---|
1178 | #
|
---|
1179 | # Setup the global defines and includes.
|
---|
1180 | #
|
---|
1181 | # Note! The __SOMETHING__ #defines are deprecated as they violate the C/C++ specs.
|
---|
1182 | #
|
---|
1183 | INCS += $(PATH_ROOT)/include $(PATH_OUT)
|
---|
1184 | DEFS += VBOX
|
---|
1185 | DEFS.debug := DEBUG DEBUG_$(subst $(subst _, ,_),_,$(USERNAME)) DEBUG_USERNAME=$(subst $(subst _, ,_),_,$(USERNAME))
|
---|
1186 | DEFS.dbgopt = $(DEFS.debug)
|
---|
1187 | DEFS.profile = VBOX_WITH_STATISTICS
|
---|
1188 | DEFS.strict = RT_STRICT VBOX_STRICT
|
---|
1189 | DEFS.x86 = RT_ARCH_X86 __X86__
|
---|
1190 | DEFS.amd64 = RT_ARCH_AMD64 __AMD64__
|
---|
1191 | DEFS.darwin = RT_OS_DARWIN __DARWIN__
|
---|
1192 | DEFS.freebsd = RT_OS_FREEBSD __FREEBSD__
|
---|
1193 | DEFS.l4 = RT_OS_L4 __L4__ __L4ENV__ L4API_l4v2 ARCH_$(KBUILD_TARGET_ARCH) __NO_CTYPE _FILE_OFFSET_BITS=64
|
---|
1194 | DEFS.linux = RT_OS_LINUX _FILE_OFFSET_BITS=64
|
---|
1195 | DEFS.netbsd = RT_OS_NETBSD
|
---|
1196 | DEFS.openbsd = RT_OS_OPENBSD
|
---|
1197 | DEFS.os2 = RT_OS_OS2 __OS2__
|
---|
1198 | DEFS.solaris = RT_OS_SOLARIS _FILE_OFFSET_BITS=64
|
---|
1199 | DEFS.win = RT_OS_WINDOWS __WIN__
|
---|
1200 | DEFS.win.x86 = __WIN32__
|
---|
1201 | DEFS.win.amd64 = __WIN64__
|
---|
1202 | # optional defines (use environment or make commandline)
|
---|
1203 | ifdef VBOX_WITH_DEBUGGER
|
---|
1204 | DEFS += VBOX_WITH_DEBUGGER
|
---|
1205 | endif
|
---|
1206 | ifdef VBOX_WITH_STATISTICS
|
---|
1207 | DEFS += VBOX_WITH_STATISTICS
|
---|
1208 | endif
|
---|
1209 | ifdef VBOX_STRICT
|
---|
1210 | DEFS += VBOX_STRICT
|
---|
1211 | endif
|
---|
1212 | ifdef LOG_ENABLED
|
---|
1213 | DEFS += LOG_ENABLED
|
---|
1214 | endif
|
---|
1215 | ifdef VBOX_OSE
|
---|
1216 | DEFS += VBOX_OSE
|
---|
1217 | endif
|
---|
1218 | ifdef VBOX_WITH_64_BITS_GUESTS
|
---|
1219 | DEFS += VBOX_WITH_64_BITS_GUESTS
|
---|
1220 | endif
|
---|
1221 | ifdef VBOX_WITH_HARDENING
|
---|
1222 | DEFS += VBOX_WITH_HARDENING
|
---|
1223 | endif
|
---|
1224 | ifdef VBOX_PATH_APP_PRIVATE
|
---|
1225 | DEFS += RTPATH_APP_PRIVATE=\"$(VBOX_PATH_APP_PRIVATE)\"
|
---|
1226 | endif
|
---|
1227 | ifdef VBOX_PATH_APP_PRIVATE_ARCH
|
---|
1228 | DEFS += RTPATH_APP_PRIVATE_ARCH=\"$(VBOX_PATH_APP_PRIVATE_ARCH)\"
|
---|
1229 | endif
|
---|
1230 | ifdef VBOX_PATH_SHARED_LIBS
|
---|
1231 | DEFS += RTPATH_SHARED_LIBS=\"$(VBOX_PATH_SHARED_LIBS)\"
|
---|
1232 | endif
|
---|
1233 | ifdef VBOX_PATH_APP_DOCS
|
---|
1234 | DEFS += RTPATH_APP_DOCS=\"$(VBOX_PATH_APP_DOCS)\"
|
---|
1235 | endif
|
---|
1236 | if defined(VBOX_WITH_STRICT_LOCKS) && ($(KBUILD_TYPE) == "debug" || $(KBUILD_TYPE) == "strict")
|
---|
1237 | DEFS += RT_LOCK_STRICT RT_LOCK_STRICT_ORDER
|
---|
1238 | endif
|
---|
1239 |
|
---|
1240 | #
|
---|
1241 | # Compiler optimization flags.
|
---|
1242 | #
|
---|
1243 | VBOX_GCC_WARN ?= -Wall $(VBOX_GCC_Wextra) $(VBOX_GCC_Wno-missing-field-initializers) -Wno-unused -Wno-trigraphs $(VBOX_GCC_fdiagnostics-show-option)
|
---|
1244 | VBOX_GCC_PEDANTIC_CXX ?= -pedantic -Wshadow $(VBOX_GCC_WARN) -Wno-long-long
|
---|
1245 | VBOX_GCC_PEDANTIC_C ?= -pedantic -Wshadow $(VBOX_GCC_WARN) -Wno-long-long -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations
|
---|
1246 | ifeq ($(KBUILD_TYPE),debug)
|
---|
1247 | VBOX_GCC_FP ?= -fno-omit-frame-pointer
|
---|
1248 | VBOX_GCC_OPT ?= -O0
|
---|
1249 | VBOX_VCC_FP ?= -Oy-
|
---|
1250 | VBOX_VCC_OPT ?=
|
---|
1251 | VBOX_GCC_R0_FP ?= -fno-omit-frame-pointer -fno-optimize-sibling-calls
|
---|
1252 | VBOX_GCC_R0_OPT ?= -O2
|
---|
1253 | VBOX_VCC_R0_FP ?= -Oy-
|
---|
1254 | VBOX_VCC_R0_OPT ?=
|
---|
1255 | VBOX_GCC_GC_FP ?= -fno-omit-frame-pointer -fno-optimize-sibling-calls
|
---|
1256 | VBOX_GCC_GC_OPT ?= -O2
|
---|
1257 | VBOX_VCC_GC_FP ?= -Oy-
|
---|
1258 | VBOX_VCC_GC_OPT ?=
|
---|
1259 | else
|
---|
1260 | # We should use -fomit-frame-pointer for GCC / -Oy for VCC.
|
---|
1261 | # -funwind-tables provides support for backtraces in gdb then.
|
---|
1262 | VBOX_GCC_FP ?= -fno-omit-frame-pointer
|
---|
1263 | VBOX_GCC_OPT ?= -O2 $(VBOX_GCC_mtune-generic)
|
---|
1264 | VBOX_VCC_FP ?= -Oy-
|
---|
1265 | ifdef VBOX_USE_VCC80
|
---|
1266 | VBOX_VCC_OPT ?= -O2 -GS-
|
---|
1267 | else
|
---|
1268 | VBOX_VCC_OPT ?= -Ogitb2
|
---|
1269 | endif
|
---|
1270 | VBOX_GCC_R0_FP ?= -fno-omit-frame-pointer
|
---|
1271 | VBOX_GCC_R0_OPT ?= -O2 $(VBOX_GCC_mtune-generic)
|
---|
1272 | VBOX_VCC_R0_FP ?= -Oy-
|
---|
1273 | ifdef VBOX_USE_VCC80
|
---|
1274 | VBOX_VCC_R0_OPT ?= -O2 -GS-
|
---|
1275 | else
|
---|
1276 | VBOX_VCC_R0_OPT ?= -Ogitb2
|
---|
1277 | endif
|
---|
1278 | VBOX_GCC_GC_FP ?= -fno-omit-frame-pointer
|
---|
1279 | VBOX_GCC_GC_OPT ?= -O2 $(VBOX_GCC_mtune-generic)
|
---|
1280 | VBOX_VCC_GC_FP ?= -Oy-
|
---|
1281 | ifdef VBOX_USE_VCC80
|
---|
1282 | VBOX_VCC_GC_OPT ?= -O2
|
---|
1283 | else
|
---|
1284 | VBOX_VCC_GC_OPT ?= -Ogitb2
|
---|
1285 | endif
|
---|
1286 | endif
|
---|
1287 | ifeq ($(KBUILD_TARGET_ARCH),x86)
|
---|
1288 | ifneq ($(KBUILD_TARGET),darwin)
|
---|
1289 | # (The '<=' operator is for prepending (kmk specific).)
|
---|
1290 | VBOX_GCC_OPT <= -march=i586
|
---|
1291 | endif
|
---|
1292 | endif
|
---|
1293 |
|
---|
1294 |
|
---|
1295 | #
|
---|
1296 | # Select the CRT type we're using with Microsoft Visual C++.
|
---|
1297 | #
|
---|
1298 | ifdef VBOX_WITH_DEBUG_VCC_CRT
|
---|
1299 | VBOX_VCC_CRT_TYPE = d
|
---|
1300 | VBOX_VCC_CRT_TYPE_N =
|
---|
1301 | else
|
---|
1302 | VBOX_VCC_CRT_TYPE =
|
---|
1303 | VBOX_VCC_CRT_TYPE_N = d
|
---|
1304 | endif
|
---|
1305 |
|
---|
1306 | #
|
---|
1307 | # ARCH_BITS_DEFS.
|
---|
1308 | #
|
---|
1309 | ifeq ($(KBUILD_TARGET_ARCH),amd64)
|
---|
1310 | ARCH_BITS_DEFS := HC_ARCH_BITS=64
|
---|
1311 | else ifeq ($(KBUILD_TARGET_ARCH),x86)
|
---|
1312 | ARCH_BITS_DEFS := HC_ARCH_BITS=32
|
---|
1313 | else
|
---|
1314 | error KBUILD_TARGET_ARCH=$(KBUILD_TARGET_ARCH)
|
---|
1315 | endif
|
---|
1316 |
|
---|
1317 | ifdef VBOX_WITH_64_BITS_GUESTS
|
---|
1318 | VBOX_GC_ARCH_BITS_DEFS := GC_ARCH_BITS=64
|
---|
1319 | else
|
---|
1320 | VBOX_GC_ARCH_BITS_DEFS := GC_ARCH_BITS=32
|
---|
1321 | endif
|
---|
1322 | ARCH_BITS_DEFS += $(VBOX_GC_ARCH_BITS_DEFS)
|
---|
1323 |
|
---|
1324 | #
|
---|
1325 | # Add the output dir(s) to the dynamic loader search path.
|
---|
1326 | #
|
---|
1327 | if1of ($(KBUILD_TARGET), freebsd linux l4 netbsd openbsd solaris)
|
---|
1328 | export LD_LIBRARY_PATH:=$(PATH_BIN):$(PATH_LIB):$(LD_LIBRARY_PATH)
|
---|
1329 | endif
|
---|
1330 | ifeq ($(KBUILD_TARGET),os2)
|
---|
1331 | #fixme! export BEGINLIBPATH:=$(PATH_BIN);$(PATH_LIB);$(BEGINLIBPATH)
|
---|
1332 | endif
|
---|
1333 | ifeq ($(KBUILD_TARGET),win)
|
---|
1334 | export PATH:=$(PATH_BIN);$(PATH_LIB);$(PATH)
|
---|
1335 | endif
|
---|
1336 |
|
---|
1337 | #
|
---|
1338 | # Common libraries and tools.
|
---|
1339 | #
|
---|
1340 | ifeq ($(KBUILD_TARGET),darwin)
|
---|
1341 | LIB_RUNTIME = $(PATH_BIN)/VBoxRT.dylib
|
---|
1342 | LIB_RUNTIME_EF = #$(PATH_LIB)/RuntimeEFCPP.a
|
---|
1343 | LIB_KPROFILE = $(PATH_BIN)/kPrf2.dylib
|
---|
1344 | LIB_VMM = $(PATH_BIN)/VBoxVMM.dylib
|
---|
1345 | LIB_VMMGC = $(PATH_BIN)/VMMGC.gc
|
---|
1346 | LIB_REM = $(PATH_LIB)/VBoxREM.dylib
|
---|
1347 | LIB_XPCOM = $(PATH_BIN)/VBoxXPCOM.dylib
|
---|
1348 | LIB_DDU = $(PATH_BIN)/VBoxDDU.dylib
|
---|
1349 | endif
|
---|
1350 | ifeq ($(KBUILD_TARGET),l4)
|
---|
1351 | LIB_RUNTIME = $(PATH_BIN)/VBoxRT.s.so
|
---|
1352 | LIB_RUNTIME_EF = #$(PATH_LIB)/RuntimeEFCPP.a
|
---|
1353 | LIB_KPROFILE = $(PATH_BIN)/kPrf2.s.so
|
---|
1354 | LIB_VMM = $(PATH_BIN)/VBoxVMM.s.so
|
---|
1355 | LIB_VMMGC = $(PATH_BIN)/VMMGC.gc
|
---|
1356 | LIB_REM = $(PATH_LIB)/VBoxREM.s.so
|
---|
1357 | LIB_XPCOM = $(PATH_BIN)/VBoxXPCOM.s.so
|
---|
1358 | LIB_DDU = $(PATH_BIN)/VBoxDDU.s.so
|
---|
1359 | endif
|
---|
1360 | if1of ($(KBUILD_TARGET), freebsd linux netbsd openbsd solaris)
|
---|
1361 | LIB_RUNTIME = $(PATH_BIN)/VBoxRT.so
|
---|
1362 | LIB_RUNTIME_EF = $(PATH_LIB)/RuntimeEFCPP.a
|
---|
1363 | LIB_KPROFILE = $(PATH_BIN)/kPrf2.so
|
---|
1364 | LIB_VMM = $(PATH_BIN)/VBoxVMM.so
|
---|
1365 | LIB_VMMGC = $(PATH_BIN)/VMMGC.gc
|
---|
1366 | LIB_REM = $(PATH_LIB)/VBoxREM.so
|
---|
1367 | LIB_XPCOM = $(PATH_BIN)/VBoxXPCOM.so
|
---|
1368 | LIB_DDU = $(PATH_BIN)/VBoxDDU.so
|
---|
1369 | endif
|
---|
1370 | ifeq ($(KBUILD_TARGET),os2)
|
---|
1371 | LIB_RUNTIME = $(PATH_BIN)/VBoxRT.dll
|
---|
1372 | LIB_RUNTIME_EF = #$(PATH_LIB)/RuntimeEFCPP.a
|
---|
1373 | LIB_KPROFILE = $(PATH_BIN)/kPrf2.dll
|
---|
1374 | LIB_VMM = $(PATH_BIN)/VBoxVMM.dll
|
---|
1375 | LIB_VMMGC = $(PATH_LIB)/VMMGCImp.lib
|
---|
1376 | LIB_REM = $(PATH_LIB)/VBoxREMImp.lib
|
---|
1377 | LIB_XPCOM = $(PATH_BIN)/VBoxXCOM.dll
|
---|
1378 | LIB_DDU = $(PATH_BIN)/VBoxDDU.dll
|
---|
1379 | VBOX_OBJ_SYS0 = $(PATH_OBJ)/RuntimeR0/os2/sys0.obj
|
---|
1380 | endif
|
---|
1381 | ifeq ($(KBUILD_TARGET),win)
|
---|
1382 | LIB_RUNTIME = $(PATH_LIB)/VBoxRT.lib
|
---|
1383 | LIB_RUNTIME_EF = #$(PATH_LIB)/RuntimeEFCPP.lib
|
---|
1384 | LIB_KPROFILE = $(PATH_LIB)/kPrf2.lib
|
---|
1385 | LIB_VMM = $(PATH_LIB)/VBoxVMM.lib
|
---|
1386 | LIB_VMMGC = $(PATH_OBJ)/VMMGC/VMMGC.lib
|
---|
1387 | LIB_REM = $(PATH_LIB)/VBoxREMImp.lib
|
---|
1388 | LIB_XPCOM = $(PATH_BIN)/VBoxXPCOM.dll
|
---|
1389 | LIB_DDU = $(PATH_LIB)/VBoxDDU.lib
|
---|
1390 | endif
|
---|
1391 | VBOX_LIB_SUPHARDENED = $(PATH_LIB)/SUPR3HardenedStatic$(VBOX_SUFF_LIB)
|
---|
1392 | VBOX_LIB_RUNTIME_STATIC = $(PATH_LIB)/RuntimeR3$(VBOX_SUFF_LIB)
|
---|
1393 |
|
---|
1394 | # Python
|
---|
1395 | ifndef VBOX_BLD_PYTHON
|
---|
1396 | if1of ($(KBUILD_HOST), win)
|
---|
1397 | VBOX_BLD_PYTHON := $(firstword $(rsort $(wildcard $(PATH_DEVTOOLS)/win.x86/python/v*/python$(HOSTSUFF_EXE))) python-not-found.exe)
|
---|
1398 | else
|
---|
1399 | VBOX_BLD_PYTHON := python$(HOSTSUFF_EXE)
|
---|
1400 | endif
|
---|
1401 | endif
|
---|
1402 |
|
---|
1403 | # Define the macro for win path conversion.
|
---|
1404 | ifndef VBOX_ONLY_SDK
|
---|
1405 | VBOX_FN_MAKE_WIN_PATH = $(subst /,\\,$(1))
|
---|
1406 | else
|
---|
1407 | # on Wine Z: is always FS root
|
---|
1408 | VBOX_FN_MAKE_WIN_PATH = $(subst /,\\,$(patsubst /%,Z:/%,$(1)))
|
---|
1409 | endif #!VBOX_ONLY_SDK
|
---|
1410 |
|
---|
1411 | # The kprofile build automagically links with kProfile.
|
---|
1412 | ifeq ($(KBUILD_TYPE),kprofile)
|
---|
1413 | LIB_RUNTIME += $(LIB_KPROFILE)
|
---|
1414 | endif
|
---|
1415 |
|
---|
1416 | # Enable C++ electric fence heap. (Warning: will easily run out of virtual memory / kernel stuff on Linux/Windows.)
|
---|
1417 | ifdef VBOX_WITH_CPP_EF
|
---|
1418 | LIB_RUNTIME <= $(LIB_RUNTIME_EF)
|
---|
1419 | endif
|
---|
1420 |
|
---|
1421 | # Overridable libraries (unix).
|
---|
1422 | LIB_PTHREAD ?= pthread
|
---|
1423 |
|
---|
1424 | # Xcursor (consider an SDK for this).
|
---|
1425 | ifeq ($(VBOX_XCURSOR_LIBS),)
|
---|
1426 | ifeq ($(KBUILD_TARGET),solaris)
|
---|
1427 | VBOX_XCURSOR_LIBS := $(lastword $(wildcard $(PATH_DEVTOOLS_TRG)/libXcursor/*/lib/libXcursor.a))
|
---|
1428 | ifneq ($(VBOX_XCURSOR_LIBS),)
|
---|
1429 | VBOX_XCURSOR_INCS := $(patsubst %/lib/libXcursor.a,%/include, $(VBOX_XCURSOR_LIBS))
|
---|
1430 | VBOX_XCURSOR_LIBS += X11 Xrender Xfixes
|
---|
1431 | endif
|
---|
1432 | endif
|
---|
1433 | ifeq ($(VBOX_XCURSOR_LIBS),)
|
---|
1434 | VBOX_XCURSOR_LIBS := Xcursor
|
---|
1435 | endif
|
---|
1436 | endif
|
---|
1437 |
|
---|
1438 |
|
---|
1439 | # Intel ASL compiler for ACPI
|
---|
1440 | VBOX_IASLCMD ?= $(firstword $(wildcard $(PATH_DEVTOOLS_BLD)/bin/iasl$(HOSTSUFF_EXE)) iasl$(HOSTSUFF_EXE))
|
---|
1441 |
|
---|
1442 | # Bruce's C compile is a C-compiler for BIOS-related 8086 code
|
---|
1443 | ifndef VBOX_BCC
|
---|
1444 | if exists "$(PATH_DEVTOOLS_BLD)/bin/bcc$(HOSTSUFF_EXE)"
|
---|
1445 | VBOX_BCC := $(PATH_DEVTOOLS_BLD)/bin/bcc$(HOSTSUFF_EXE) -B $(PATH_DEVTOOLS_BLD)/bin/
|
---|
1446 | else
|
---|
1447 | VBOX_BCC := bcc$(HOSTSUFF_EXE)
|
---|
1448 | endif
|
---|
1449 | endif
|
---|
1450 |
|
---|
1451 | # Assembler for BIOS-related 8086 code
|
---|
1452 | ifndef VBOX_AS86
|
---|
1453 | if exists "$(PATH_DEVTOOLS_BLD)/bin/as86$(HOSTSUFF_EXE)"
|
---|
1454 | VBOX_AS86 := $(PATH_DEVTOOLS_BLD)/bin/as86$(HOSTSUFF_EXE)
|
---|
1455 | else
|
---|
1456 | VBOX_AS86 := as86$(HOSTSUFF_EXE)
|
---|
1457 | endif
|
---|
1458 | endif
|
---|
1459 |
|
---|
1460 | # libxslt XSLT processor. (see PATH_TOOL_YASM for explanation why it's temporarily located in bin.)
|
---|
1461 | ifeq ($(KBUILD_HOST),win)
|
---|
1462 | # VBOX_XSLTPROC ?= $(PATH_DEVTOOLS)/win.x86/libxslt/10114/xsltproc.exe
|
---|
1463 | VBOX_XSLTPROC ?= $(PATH_DEVTOOLS)/win.x86/bin/xsltproc.exe
|
---|
1464 | else ifeq ($(KBUILD_HOST),os2)
|
---|
1465 | VBOX_XSLTPROC ?= BEGINLIBPATH="$(PATH_DEVTOOLS_BLD)/bin;$$BEGINLIBPATH" $(PATH_DEVTOOLS_BLD)/bin/xsltproc.exe
|
---|
1466 | else
|
---|
1467 | VBOX_XSLTPROC ?= xsltproc$(HOSTSUFF_EXE)
|
---|
1468 | endif
|
---|
1469 |
|
---|
1470 | # bin2c (convert binary files into C arrays)
|
---|
1471 | VBOX_BIN2C ?= $(PATH_OBJ)/bin2c/bin2c$(HOSTSUFF_EXE)
|
---|
1472 |
|
---|
1473 | # biossums (set BIOS checksums)
|
---|
1474 | VBOX_BIOSSUMS ?= $(PATH_OBJ)/biossums/biossums$(HOSTSUFF_EXE)
|
---|
1475 |
|
---|
1476 | # mkisofs
|
---|
1477 | ifeq ($(KBUILD_HOST),win)
|
---|
1478 | VBOX_MKISOFS ?= $(PATH_DEVTOOLS_BLD)/bin/mkisofs.exe
|
---|
1479 | else
|
---|
1480 | VBOX_MKISOFS ?= mkisofs
|
---|
1481 | endif
|
---|
1482 |
|
---|
1483 | # Makeself for the linux installers.
|
---|
1484 | VBOX_MAKESELF ?= $(PATH_DEVTOOLS)/common/makeself/v2.1.5/makeself.sh
|
---|
1485 |
|
---|
1486 | # Microsoft HTML Help Workshop.
|
---|
1487 | VBOX_PATH_HTML_HELP_WORKSHOP ?= $(PATH_DEVTOOLS)/win.x86/HTML_Help_Workshop/v1.3/
|
---|
1488 |
|
---|
1489 | # Path to the null soft installer.
|
---|
1490 | VBOX_PATH_NSIS ?= $(PATH_DEVTOOLS)/win.x86/nsis/v2.33-log-nsscm-r1
|
---|
1491 |
|
---|
1492 | # Path to AutoIt3.
|
---|
1493 | VBOX_PATH_AUTOIT3 ?= $(PATH_DEVTOOLS)/win.x86/autoit/v3.2.10.0
|
---|
1494 |
|
---|
1495 | # Windows install tools...
|
---|
1496 | VBOX_PATH_WIX ?= $(PATH_DEVTOOLS)/win.x86/wix/v2.0.5805.0
|
---|
1497 | VBOX_PATH_MSITRAN ?= $(PATH_DEVTOOLS)/win.x86/sdk/200504/Bin/MsiTran.Exe
|
---|
1498 | VBOX_PATH_MSIDB ?= $(PATH_DEVTOOLS)/win.x86/sdk/200504/Bin/MsiDb.Exe
|
---|
1499 | VBOX_PATH_WISUBSTG ?= $(PATH_DEVTOOLS)/win.x86/sdk/200504/Samples/SysMgmt/Msi/Scripts/WiSubStg.vbs
|
---|
1500 | VBOX_PATH_WISUMINFO ?= $(PATH_DEVTOOLS)/win.x86/sdk/200504/Samples/SysMgmt/Msi/Scripts/WiSumInf.vbs
|
---|
1501 | VBOX_PATH_DIFX ?= $(PATH_DEVTOOLS)/win.$(KBUILD_TARGET_ARCH)/DIFx/v2.1-r2
|
---|
1502 | VBOX_PATH_CABSDK ?= $(PATH_DEVTOOLS)/win.x86/cabsdk/r1
|
---|
1503 | VBOX_PATH_MAKECAB ?= $(VBOX_PATH_CABSDK)/BIN/MAKECAB.EXE
|
---|
1504 |
|
---|
1505 | # We need to export YASM for OSE, but since it was converted to .zip we need to
|
---|
1506 | # allow for the location used by the zip to be properly cleaned up first.
|
---|
1507 | if1of ($(KBUILD_HOST).$(KBUILD_HOST_ARCH), linux.x86 solaris.x86 win.x86)
|
---|
1508 | PATH_TOOL_YASM ?= $(PATH_DEVTOOLS_BLD)/bin
|
---|
1509 | endif
|
---|
1510 |
|
---|
1511 | # XPCOM setup for all but win32.
|
---|
1512 | ifneq ($(KBUILD_TARGET),win)
|
---|
1513 | VBOX_WITH_XPCOM = 1
|
---|
1514 | # if updating, also update xpidl_INST var in src/libs/xpcom18a4/Makefile.kmk
|
---|
1515 | VBOX_XPIDL ?= $(PATH_BIN)/xpidl$(HOSTSUFF_EXE)
|
---|
1516 | ifeq ($(KBUILD_TARGET),os2)
|
---|
1517 | VBOX_XPIDL_ENV = BEGINLIBPATH="$(dir $(VBOX_XPIDL));$$BEGINLIBPATH"$(SP)
|
---|
1518 | endif
|
---|
1519 | VBOX_PATH_XPCOM_IDL ?= $(VBOX_PATH_SDK)/bindings/xpcom/idl
|
---|
1520 | VBOX_XPCOM_INCS ?= \
|
---|
1521 | $(VBOX_PATH_SDK)/bindings/xpcom/include \
|
---|
1522 | $(VBOX_PATH_SDK)/bindings/xpcom/include/xpcom \
|
---|
1523 | $(VBOX_PATH_SDK)/bindings/xpcom/include/string \
|
---|
1524 | $(VBOX_PATH_SDK)/bindings/xpcom/include/xpcom \
|
---|
1525 | $(VBOX_PATH_SDK)/bindings/xpcom/include/nsprpub \
|
---|
1526 | $(VBOX_PATH_SDK)/bindings/xpcom/include/ipcd
|
---|
1527 | ifneq ($(KBUILD_TARGET),os2)
|
---|
1528 | # libIDL-config (for xpcom18a4)
|
---|
1529 | ifeq ($(origin VBOX_LIBIDL_CONFIG),undefined)
|
---|
1530 | export VBOX_LIBIDL_CONFIG := $(firstword $(shell which libIDL-config-2 libIDL-config 2> /dev/null))
|
---|
1531 | endif
|
---|
1532 | endif
|
---|
1533 | endif
|
---|
1534 |
|
---|
1535 | # The X11 LIBPATH. (The amd64 hack is for RHEL4.)
|
---|
1536 | ifeq ($(KBUILD_TARGET_ARCH),amd64)
|
---|
1537 | VBOX_LIBPATH_X11 ?= /usr/X11R6/lib64 /usr/X11R6/lib
|
---|
1538 | else
|
---|
1539 | VBOX_LIBPATH_X11 ?= /usr/X11R6/lib
|
---|
1540 | endif
|
---|
1541 |
|
---|
1542 | # 32bit X11 LIBPATH for building 32bit guest additions
|
---|
1543 | VBOX_LIBPATH32_X11 ?= /usr/X11R6/lib32 /usr/X11R6/lib
|
---|
1544 |
|
---|
1545 | #
|
---|
1546 | # Macros dealing with the darwin version we're targeting.
|
---|
1547 | # The DEF in VBOX_DEF_MACOSX_VERSION_MIN mean default. The default min
|
---|
1548 | # version is assumed to be the
|
---|
1549 | #
|
---|
1550 | ifeq ($(KBUILD_TARGET),darwin)
|
---|
1551 | ifeq ($(KBUILD_TARGET_ARCH),x86)
|
---|
1552 | ifdef VBOX_WITH_COCOA_QT
|
---|
1553 | VBOX_DEF_MACOSX_VERSION_MIN ?= 10.5
|
---|
1554 | VBOX_DARWIN_NO_COMPACT_LINKEDIT ?= $(VBOX_LD_no_compact_linkedit)
|
---|
1555 | else
|
---|
1556 | VBOX_DEF_MACOSX_VERSION_MIN ?= 10.4
|
---|
1557 | VBOX_DARWIN_NO_COMPACT_LINKEDIT ?=
|
---|
1558 | endif
|
---|
1559 | VBOX_MACOSX_GCC_INFIX ?= -4.0
|
---|
1560 | else
|
---|
1561 | VBOX_DEF_MACOSX_VERSION_MIN ?= 10.6
|
---|
1562 | VBOX_MACOSX_GCC_INFIX ?= -4.2
|
---|
1563 | VBOX_DARWIN_NO_COMPACT_LINKEDIT ?=
|
---|
1564 | endif
|
---|
1565 | TOOL_GCC4MACHO_CC = gcc$(VBOX_MACOSX_GCC_INFIX)$(HOSTSUFF_EXE)
|
---|
1566 | TOOL_GCC4MACHO_CXX = g++$(VBOX_MACOSX_GCC_INFIX)$(HOSTSUFF_EXE)
|
---|
1567 | TOOL_GCC4MACHO_AS = gcc$(VBOX_MACOSX_GCC_INFIX)$(HOSTSUFF_EXE)
|
---|
1568 | TOOL_GCC4MACHO_LD = gcc$(VBOX_MACOSX_GCC_INFIX)$(HOSTSUFF_EXE)
|
---|
1569 | TOOL_GCC4MACHO_LD_SYSMOD = gcc$(VBOX_MACOSX_GCC_INFIX)$(HOSTSUFF_EXE)
|
---|
1570 | TOOL_GXX4MACHO_CC = gcc$(VBOX_MACOSX_GCC_INFIX)$(HOSTSUFF_EXE)
|
---|
1571 | TOOL_GXX4MACHO_CXX = g++$(VBOX_MACOSX_GCC_INFIX)$(HOSTSUFF_EXE)
|
---|
1572 | TOOL_GXX4MACHO_OBJC= gcc$(VBOX_MACOSX_GCC_INFIX)$(HOSTSUFF_EXE) $(if-expr $(KBUILD_TARGET_ARCH) == "x86",-m32,-m64) -fvisibility=hidden
|
---|
1573 | TOOL_GXX4MACHO_OBJCXX = gcc$(VBOX_MACOSX_GCC_INFIX)$(HOSTSUFF_EXE) $(if-expr $(KBUILD_TARGET_ARCH) == "x86",-m32,-m64) -fvisibility=hidden -fvisibility-inlines-hidden
|
---|
1574 | TOOL_GXX4MACHO_AS = gcc$(VBOX_MACOSX_GCC_INFIX)$(HOSTSUFF_EXE)
|
---|
1575 | TOOL_GXX4MACHO_LD = g++$(VBOX_MACOSX_GCC_INFIX)$(HOSTSUFF_EXE)
|
---|
1576 | TOOL_GXX4MACHO_LD_SYSMOD = g++$(VBOX_MACOSX_GCC_INFIX)$(HOSTSUFF_EXE)
|
---|
1577 | ifeq ($(VBOX_DEF_MACOSX_VERSION_MIN),10.4)
|
---|
1578 | ifeq ($(origin VBOX_DARWIN_CLASSIC_LINKER),undefined)
|
---|
1579 | VBOX_DARWIN_CLASSIC_LINKER := $(shell ld -v 2>&1 )
|
---|
1580 | ifneq ($(filter ld64%, $(subst :, , $(VBOX_DARWIN_CLASSIC_LINKER))),)
|
---|
1581 | export VBOX_DARWIN_CLASSIC_LINKER := -Wl,-classic_linker
|
---|
1582 | else
|
---|
1583 | export VBOX_DARWIN_CLASSIC_LINKER :=
|
---|
1584 | endif
|
---|
1585 | endif
|
---|
1586 | VBOX_PATH_MACOSX_SDK ?= /Developer/SDKs/MacOSX$(VBOX_DEF_MACOSX_VERSION_MIN)u.sdk
|
---|
1587 | else
|
---|
1588 | VBOX_PATH_MACOSX_SDK ?= /Developer/SDKs/MacOSX$(VBOX_DEF_MACOSX_VERSION_MIN).sdk
|
---|
1589 | endif
|
---|
1590 | VBOX_DARWIN_DEF_SDK_DEFS := MAC_OS_X_VERSION_MIN_REQUIRED=$(subst .,,$(VBOX_DEF_MACOSX_VERSION_MIN))0 \
|
---|
1591 | MAC_OS_X_VERSION_MAX_ALLOWED=$(subst .,,$(VBOX_DEF_MACOSX_VERSION_MIN))0
|
---|
1592 | VBOX_DARWIN_DEF_SDK_CFLAGS := -mmacosx-version-min=$(VBOX_DEF_MACOSX_VERSION_MIN) -isysroot $(VBOX_PATH_MACOSX_SDK)
|
---|
1593 | VBOX_DARWIN_DEF_SDK_CXXFLAGS := -mmacosx-version-min=$(VBOX_DEF_MACOSX_VERSION_MIN) -isysroot $(VBOX_PATH_MACOSX_SDK)
|
---|
1594 | VBOX_DARWIN_DEF_SDK_OBJCFLAGS := -mmacosx-version-min=$(VBOX_DEF_MACOSX_VERSION_MIN) -isysroot $(VBOX_PATH_MACOSX_SDK)
|
---|
1595 | VBOX_DARWIN_DEF_SDK_OBJCXXFLAGS := -mmacosx-version-min=$(VBOX_DEF_MACOSX_VERSION_MIN) -isysroot $(VBOX_PATH_MACOSX_SDK)
|
---|
1596 | VBOX_DARWIN_DEF_SDK_LDFLAGS = -mmacosx-version-min=$(VBOX_DEF_MACOSX_VERSION_MIN) -Wl,-syslibroot,$(VBOX_PATH_MACOSX_SDK) \
|
---|
1597 | -Wl,-headerpad_max_install_names $(VBOX_DARWIN_CLASSIC_LINKER) $(VBOX_DARWIN_NO_COMPACT_LINKEDIT)
|
---|
1598 |
|
---|
1599 | # specific versions.
|
---|
1600 | ## @todo s/VBOX_DARWIN_DEF_SDK_10/VBOX_DARWIN_SDK_10/g
|
---|
1601 |
|
---|
1602 | if1of ($(VBOX_DEF_MACOSX_VERSION_MIN), 10.4) # classic linker detection is bust otherwise
|
---|
1603 | VBOX_PATH_MACOSX_SDK_10_4 ?= /Developer/SDKs/MacOSX10.4u.sdk
|
---|
1604 | VBOX_DARWIN_DEF_SDK_10_4_DEFS := MAC_OS_X_VERSION_MIN_REQUIRED=1040 MAC_OS_X_VERSION_MAX_ALLOWED=1040
|
---|
1605 | VBOX_DARWIN_DEF_SDK_10_4_CFLAGS := -mmacosx-version-min=10.4 -isysroot $(VBOX_PATH_MACOSX_SDK_10_4)
|
---|
1606 | VBOX_DARWIN_DEF_SDK_10_4_CXXFLAGS := -mmacosx-version-min=10.4 -isysroot $(VBOX_PATH_MACOSX_SDK_10_4)
|
---|
1607 | VBOX_DARWIN_DEF_SDK_10_4_OBJCFLAGS := -mmacosx-version-min=10.4 -isysroot $(VBOX_PATH_MACOSX_SDK_10_4)
|
---|
1608 | VBOX_DARWIN_DEF_SDK_10_4_OBJCXXFLAGS := -mmacosx-version-min=10.4 -isysroot $(VBOX_PATH_MACOSX_SDK_10_4)
|
---|
1609 | VBOX_DARWIN_DEF_SDK_10_4_LDFLAGS := -mmacosx-version-min=10.4 -Wl,-syslibroot,$(VBOX_PATH_MACOSX_SDK_10_4) \
|
---|
1610 | -Wl,-headerpad_max_install_names $(VBOX_DARWIN_CLASSIC_LINKER)
|
---|
1611 | else
|
---|
1612 | VBOX_DARWIN_DEF_SDK_10_4_CXXFLAGS = $(error Using 10.4 SDK)
|
---|
1613 | VBOX_DARWIN_DEF_SDK_10_4_LDFLAGS = $(error Using 10.4 SDK)
|
---|
1614 | endif
|
---|
1615 |
|
---|
1616 | if1of ($(VBOX_DEF_MACOSX_VERSION_MIN), 10.4 10.5)
|
---|
1617 | VBOX_PATH_MACOSX_SDK_10_5 ?= /Developer/SDKs/MacOSX10.5.sdk
|
---|
1618 | VBOX_DARWIN_DEF_SDK_10_5_DEFS := MAC_OS_X_VERSION_MIN_REQUIRED=1050 MAC_OS_X_VERSION_MAX_ALLOWED=1050
|
---|
1619 | VBOX_DARWIN_DEF_SDK_10_5_CFLAGS := -mmacosx-version-min=10.5 -isysroot $(VBOX_PATH_MACOSX_SDK_10_5)
|
---|
1620 | VBOX_DARWIN_DEF_SDK_10_5_CXXFLAGS := -mmacosx-version-min=10.5 -isysroot $(VBOX_PATH_MACOSX_SDK_10_5)
|
---|
1621 | VBOX_DARWIN_DEF_SDK_10_5_OBJCFLAGS := -mmacosx-version-min=10.5 -isysroot $(VBOX_PATH_MACOSX_SDK_10_5)
|
---|
1622 | VBOX_DARWIN_DEF_SDK_10_5_OBJCXXFLAGS := -mmacosx-version-min=10.5 -isysroot $(VBOX_PATH_MACOSX_SDK_10_5)
|
---|
1623 | VBOX_DARWIN_DEF_SDK_10_5_LDFLAGS := -mmacosx-version-min=10.5 -Wl,-syslibroot,$(VBOX_PATH_MACOSX_SDK_10_5) \
|
---|
1624 | -Wl,-headerpad_max_install_names $(VBOX_DARWIN_NO_COMPACT_LINKEDIT)
|
---|
1625 | else
|
---|
1626 | VBOX_DARWIN_DEF_SDK_10_5_CXXFLAGS = $(error Using 10.5 SDK)
|
---|
1627 | VBOX_DARWIN_DEF_SDK_10_5_LDFLAGS = $(error Using 10.5 SDK)
|
---|
1628 | endif
|
---|
1629 |
|
---|
1630 | if1of ($(VBOX_DEF_MACOSX_VERSION_MIN), 10.4 10.5 10.6)
|
---|
1631 | VBOX_PATH_MACOSX_SDK_10_6 ?= /Developer/SDKs/MacOSX10.6.sdk
|
---|
1632 | VBOX_DARWIN_DEF_SDK_10_6_DEFS := MAC_OS_X_VERSION_MIN_REQUIRED=1060 MAC_OS_X_VERSION_MAX_ALLOWED=1060
|
---|
1633 | VBOX_DARWIN_DEF_SDK_10_6_CFLAGS := -mmacosx-version-min=10.6 -isysroot $(VBOX_PATH_MACOSX_SDK_10_6)
|
---|
1634 | VBOX_DARWIN_DEF_SDK_10_6_CXXFLAGS := -mmacosx-version-min=10.6 -isysroot $(VBOX_PATH_MACOSX_SDK_10_6)
|
---|
1635 | VBOX_DARWIN_DEF_SDK_10_6_OBJCFLAGS := -mmacosx-version-min=10.6 -isysroot $(VBOX_PATH_MACOSX_SDK_10_6)
|
---|
1636 | VBOX_DARWIN_DEF_SDK_10_6_OBJCXXFLAGS := -mmacosx-version-min=10.6 -isysroot $(VBOX_PATH_MACOSX_SDK_10_6)
|
---|
1637 | VBOX_DARWIN_DEF_SDK_10_6_LDFLAGS := -mmacosx-version-min=10.6 -Wl,-syslibroot,$(VBOX_PATH_MACOSX_SDK_10_6) \
|
---|
1638 | -Wl,-headerpad_max_install_names
|
---|
1639 | else
|
---|
1640 | VBOX_DARWIN_DEF_SDK_10_6_CXXFLAGS = $(error Using 10.6 SDK)
|
---|
1641 | VBOX_DARWIN_DEF_SDK_10_6_LDFLAGS = $(error Using 10.6 SDK)
|
---|
1642 | endif
|
---|
1643 |
|
---|
1644 |
|
---|
1645 | endif # target=darwin
|
---|
1646 |
|
---|
1647 | #
|
---|
1648 | # Macro switching between @executable_path, @rpath and /Applications/VirtualBox.app
|
---|
1649 | # depending on whether the build is hardened or not (dylib install_name).
|
---|
1650 | #
|
---|
1651 | ifeq ($(KBUILD_TARGET),darwin)
|
---|
1652 | ifndef VBOX_DYLD_EXECUTABLE_PATH
|
---|
1653 | ifdef VBOX_WITH_HARDENING
|
---|
1654 | VBOX_DYLD_EXECUTABLE_PATH = $(VBOX_PATH_APP_PRIVATE_ARCH)
|
---|
1655 | else if 0
|
---|
1656 | VBOX_DYLD_EXECUTABLE_PATH = @executable_path
|
---|
1657 | else
|
---|
1658 | VBOX_DYLD_EXECUTABLE_PATH = @rpath
|
---|
1659 | VBOX_WITH_RELATIVE_RUNPATH = @loader_path/
|
---|
1660 | endif
|
---|
1661 | endif
|
---|
1662 | endif
|
---|
1663 |
|
---|
1664 | #
|
---|
1665 | # Check for incompatible rpath combinations.
|
---|
1666 | #
|
---|
1667 | if defined(VBOX_WITH_RUNPATH) && defined(VBOX_WITH_ORIGIN)
|
---|
1668 | $(error VBOX_WITH_RUNPATH and VBOX_WITH_ORIGIN are mutually exclusive)
|
---|
1669 | endif
|
---|
1670 | if defined(VBOX_WITH_RELATIVE_RUNPATH) && defined(VBOX_WITH_ORIGIN)
|
---|
1671 | $(error VBOX_WITH_RELATIVE_RUNPATH and VBOX_WITH_ORIGIN are mutually exclusive)
|
---|
1672 | endif
|
---|
1673 | if defined(VBOX_WITH_RUNPATH) && defined(VBOX_WITH_RELATIVE_RUNPATH)
|
---|
1674 | $(error VBOX_WITH_RUNPATH and VBOX_WITH_RELATIVE_RUNPATH are mutually exclusive)
|
---|
1675 | endif
|
---|
1676 | if defined(VBOX_WITH_RELATIVE_RUNPATH) && defined(VBOX_WITH_HARDENING)
|
---|
1677 | $(error VBOX_WITH_RELATIVE_RUNPATH and VBOX_WITH_HARDENING are mutually exclusive)
|
---|
1678 | endif
|
---|
1679 |
|
---|
1680 | #
|
---|
1681 | # VBOX_WITH_ORIGIN translates into VBOX_WITH_RELATIVE_RUNPATH.
|
---|
1682 | #
|
---|
1683 | # We use two helper variables for the VBOX_WITH_ORIGIN stuff:
|
---|
1684 | # VBOX_ORIGIN - Indirect expansion trick.
|
---|
1685 | # VBOX_GCC_RPATH_OPT - Different GCC/LD combinations needs different options.
|
---|
1686 | #
|
---|
1687 | VBOX_ORIGIN = $$ORIGIN
|
---|
1688 | ifeq ($(KBUILD_TARGET),solaris)
|
---|
1689 | VBOX_GCC_RPATH_OPT = -R
|
---|
1690 | else
|
---|
1691 | VBOX_GCC_RPATH_OPT = -Wl,-rpath,
|
---|
1692 | VBOX_GCC_ORIGIN_OPT = -Wl,-z,origin
|
---|
1693 | endif
|
---|
1694 | ifdef VBOX_WITH_ORIGIN
|
---|
1695 | VBOX_WITH_RELATIVE_RUNPATH = $$(VBOX_ORIGIN)
|
---|
1696 | endif
|
---|
1697 |
|
---|
1698 | #
|
---|
1699 | # The X11 headers.
|
---|
1700 | #
|
---|
1701 | VBOX_PATH_X11_ROOT = $(PATH_ROOT)/src/VBox/Additions/x11/x11include
|
---|
1702 | VBOX_PATH_X11_XFREE_4_3 = $(VBOX_PATH_X11_ROOT)/4.3
|
---|
1703 | VBOX_PATH_X11_XORG_7_0 = $(VBOX_PATH_X11_ROOT)/7.0
|
---|
1704 | VBOX_PATH_X11_XORG_7_1 = $(VBOX_PATH_X11_ROOT)/7.1
|
---|
1705 | VBOX_PATH_X11_XORG_1_3 = $(VBOX_PATH_X11_ROOT)/1.3
|
---|
1706 | VBOX_PATH_X11_XORG_1_4 = $(VBOX_PATH_X11_ROOT)/1.4
|
---|
1707 | VBOX_PATH_X11_XORG_1_5 = $(VBOX_PATH_X11_ROOT)/1.5
|
---|
1708 | VBOX_PATH_X11_XORG_1_6 = $(VBOX_PATH_X11_ROOT)/1.6
|
---|
1709 |
|
---|
1710 | #
|
---|
1711 | # Various other variables.
|
---|
1712 | #
|
---|
1713 |
|
---|
1714 | #
|
---|
1715 | # crOpenGL related paths and variables.
|
---|
1716 | #
|
---|
1717 | ifdef VBOX_WITH_CROGL
|
---|
1718 | VBOX_PATH_CROGL_GLAPI = $(PATH_ROOT)/src/VBox/GuestHost/OpenGL/glapi_parser
|
---|
1719 | VBOX_PATH_CROGL_GENFILES = $(PATH_OBJ)/VBoxOGLgen
|
---|
1720 | VBOX_PATH_CROGL_INCLUDE = $(PATH_ROOT)/src/VBox/GuestHost/OpenGL/include
|
---|
1721 | VBOX_CROGL_API_FILES = $(VBOX_PATH_CROGL_GLAPI)/apiutil.py $(VBOX_PATH_CROGL_GLAPI)/APIspec.txt
|
---|
1722 | VBOX_CROGL_PYTHON_ENV = $(REDIRECT) $(if $1,-E 'PYTHONPATH=$1',) $(if $2,-o $2,) $(if $3,-i $3) --
|
---|
1723 |
|
---|
1724 | if1of ($(KBUILD_HOST), os2 win)
|
---|
1725 | VBOX_PATH_CROGL_PYTHON_INCLUDE = $(VBOX_PATH_CROGL_GLAPI);$(PATH_ROOT)/src/VBox/GuestHost/OpenGL/packer;$(PATH_ROOT)/src/VBox/HostServices/SharedOpenGL/crserverlib
|
---|
1726 | else
|
---|
1727 | VBOX_PATH_CROGL_PYTHON_INCLUDE = $(VBOX_PATH_CROGL_GLAPI):$(PATH_ROOT)/src/VBox/GuestHost/OpenGL/packer:$(PATH_ROOT)/src/VBox/HostServices/SharedOpenGL/crserverlib
|
---|
1728 | endif
|
---|
1729 |
|
---|
1730 | ifeq ($(KBUILD_TARGET),win)
|
---|
1731 | VBOX_LIB_OGL_CRUTIL = $(PATH_OBJ)/VBoxOGLcrutil/VBoxOGLcrutil$(VBOX_SUFF_LIB)
|
---|
1732 | VBOX_LIB_OGL_HOSTCRUTIL = $(PATH_OBJ)/VBoxOGLhostcrutil/VBoxOGLhostcrutil$(VBOX_SUFF_LIB)
|
---|
1733 | else
|
---|
1734 | VBOX_LIB_OGL_CRUTIL = $(VBOX_PATH_ADDITIONS)/VBoxOGLcrutil$(VBOX_SUFF_DLL)
|
---|
1735 | VBOX_LIB_OGL_HOSTCRUTIL = $(PATH_BIN)/VBoxOGLhostcrutil$(VBOX_SUFF_DLL)
|
---|
1736 | endif
|
---|
1737 |
|
---|
1738 | if1of ($(KBUILD_TARGET), linux solaris)
|
---|
1739 | # VBOX_PATH_MESA_SOURCE = $(PATH_ROOT)/src/libs/mesa-7.2
|
---|
1740 | VBOX_PATH_MESA_SOURCE = $(VBOX_PATH_X11_ROOT)/mesa-7.2
|
---|
1741 | VBOX_MESA_INCS = \
|
---|
1742 | $(VBOX_PATH_MESA_SOURCE) \
|
---|
1743 | $(VBOX_PATH_MESA_SOURCE)/include \
|
---|
1744 | $(VBOX_PATH_MESA_SOURCE)/src/mesa/ \
|
---|
1745 | $(VBOX_PATH_MESA_SOURCE)/src/mesa/glapi \
|
---|
1746 | $(VBOX_PATH_MESA_SOURCE)/src/mesa/main \
|
---|
1747 | $(VBOX_PATH_MESA_SOURCE)/src/mesa/drivers/dri/common
|
---|
1748 | endif
|
---|
1749 |
|
---|
1750 | VBOX_DARWIN_OPENGL_INST = obj/VBoxOGL/GL/
|
---|
1751 | VBOX_DARWIN_OPENGL_HEADERS = gl.h glu.h
|
---|
1752 | SDK_DARWIN-OPENGL = Workaround SDK for the darwin OpenGL include directorly layout layout.
|
---|
1753 | SDK_DARWIN-OPENGL_INCS = $(PATH_OUT)/obj/VBoxOGL
|
---|
1754 | SDK_DARWIN-OPENGL_ORDERDEPS = $(addprefix $(PATH_OUT)/obj/VBoxOGL/GL/./,$(VBOX_DARWIN_OPENGL_HEADERS))
|
---|
1755 | ## @todo kBuild: Using INTERMEDIATES doesn't work!
|
---|
1756 | endif
|
---|
1757 |
|
---|
1758 | # The icons to use.
|
---|
1759 | ifdef VBOX_OSE
|
---|
1760 | VBOX_WINDOWS_ICON_FILE ?= $(PATH_ROOT)/src/VBox/Frontends/VirtualBox/images/OSE/VirtualBox_win.ico
|
---|
1761 | VBOX_WINDOWS_ADDITIONS_ICON_FILE ?= $(PATH_ROOT)/src/VBox/Frontends/VirtualBox/images/OSE/VirtualBox_win.ico
|
---|
1762 | VBOX_NSIS_ICON_FILE ?= $(PATH_ROOT)/src/VBox/Frontends/VirtualBox/images/OSE/VirtualBox_win.ico
|
---|
1763 | VBOX_MACOSX_ICON_FILE ?= $(PATH_ROOT)/src/VBox/Frontends/VirtualBox/images/OSE/VirtualBox.icns
|
---|
1764 | else
|
---|
1765 | ifeq ($(KBUILD_HOST),win)
|
---|
1766 | VBOX_WINDOWS_ICON_FILE ?= $(PATH_ROOT)/src/VBox/Artwork/VirtualBox-vista.ico
|
---|
1767 | VBOX_WINDOWS_ADDITIONS_ICON_FILE ?= $(PATH_ROOT)/src/VBox/Artwork/VirtualBoxGA-vista.ico
|
---|
1768 | VBOX_NSIS_ICON_FILE ?= $(PATH_ROOT)/src/VBox/Artwork/VirtualBoxGA-nsis.ico
|
---|
1769 | TOOL_VCC80X86_RC := $(PATH_DEVTOOLS)/win.x86/ddk/6000/bin/x86/rc.exe
|
---|
1770 | TOOL_VCC80AMD64_RC := $(PATH_DEVTOOLS)/win.x86/ddk/6000/bin/x86/rc.exe
|
---|
1771 | TOOL_VCC70_RC := $(PATH_DEVTOOLS)/win.x86/ddk/6000/bin/x86/rc.exe
|
---|
1772 | else
|
---|
1773 | VBOX_WINDOWS_ICON_FILE ?= $(PATH_ROOT)/src/VBox/Artwork/VirtualBox-winxp.ico
|
---|
1774 | VBOX_WINDOWS_ADDITIONS_ICON_FILE ?= $(PATH_ROOT)/src/VBox/Artwork/VirtualBoxGA-winxp.ico
|
---|
1775 | VBOX_NSIS_ICON_FILE ?= $(PATH_ROOT)/src/VBox/Artwork/VirtualBox-nsis.ico
|
---|
1776 | endif
|
---|
1777 | VBOX_MACOSX_ICON_FILE ?= $(PATH_ROOT)/src/VBox/Artwork/VirtualBox.icns
|
---|
1778 | endif
|
---|
1779 |
|
---|
1780 |
|
---|
1781 | ifndef VBOX_NOINC_GCC_CONFIG_KMK
|
---|
1782 | #
|
---|
1783 | # GCC stuff properties.
|
---|
1784 | # Most of this is resolved on first kmk invocation and cached in PATH_OUT.
|
---|
1785 | #
|
---|
1786 | # Note! That a harmless warning is printed if the file doesn't exist.
|
---|
1787 | # Note! Changes in GCC are not detected automatically (yet).
|
---|
1788 | #
|
---|
1789 | include $(KBUILD_PATH)/tools/$(VBOX_GCC_TOOL).kmk
|
---|
1790 | ifneq ($(VBOX_GCC_TOOL),$(VBOX_GCC32_TOOL))
|
---|
1791 | include $(KBUILD_PATH)/tools/$(VBOX_GCC32_TOOL).kmk
|
---|
1792 | endif
|
---|
1793 |
|
---|
1794 | # These tests never worked on Windows because of /dev/null, so, there
|
---|
1795 | # can be no harm in just dropping them until cygwin is mp safe.
|
---|
1796 | ifeq ($(KBUILD_HOST),win)
|
---|
1797 | VBOX_GCC_CHECK_CC = $(2)
|
---|
1798 | VBOX_GCC_CHECK_CXX = $(2)
|
---|
1799 | VBOX_GCC_CHECK_LD = $(2)
|
---|
1800 | VBOX_GCC32_CHECK_CXX = $(2)
|
---|
1801 | else
|
---|
1802 | VBOX_GCC_CHECK_CC = $(shell \
|
---|
1803 | if $(TOOL_$(VBOX_GCC_TOOL)_CC) $(1) -S -o /dev/null -xc /dev/null > /dev/null 2>&1; \
|
---|
1804 | then echo "$(1)"; \
|
---|
1805 | else echo "$(2)"; fi; )
|
---|
1806 |
|
---|
1807 | VBOX_GCC_CHECK_CXX = $(shell \
|
---|
1808 | if $(TOOL_$(VBOX_GCC_TOOL)_CXX) $(1) -S -o /dev/null -xc++ /dev/null > /dev/null 2>&1; \
|
---|
1809 | then echo "$(1)"; \
|
---|
1810 | else echo "$(2)"; fi; )
|
---|
1811 |
|
---|
1812 | VBOX_GCC_CHECK_LD = $(shell \
|
---|
1813 | if $(TOOL_$(VBOX_GCC_TOOL)_LD) -Wl,$(1) $(if $(eq $(KBUILD_HOST),darwin),-Wl$(COMMA)-u$(COMMA)start -Wl$(COMMA)-undefined$(COMMA)dynamic_lookup,) -nostdlib -o /dev/null -xc /dev/null > /dev/null 2>&1 ;\
|
---|
1814 | then echo "-Wl,$(1)"; \
|
---|
1815 | else echo "$(2)"; fi; )
|
---|
1816 |
|
---|
1817 | VBOX_GCC32_CHECK_CXX = $(shell \
|
---|
1818 | if $(TOOL_$(VBOX_GCC32_TOOL)_CXX) $(1) -S -o /dev/null -xc++ /dev/null > /dev/null 2>&1; \
|
---|
1819 | then echo "$(1)"; \
|
---|
1820 | else echo "$(2)"; fi; )
|
---|
1821 | endif
|
---|
1822 |
|
---|
1823 | ifeq ($(KBUILD_HOST),win)
|
---|
1824 | # This isn't important (yet) on windows, so cook the result until
|
---|
1825 | # cygwin is feeling better.
|
---|
1826 | VBOX_GCC_VERSION := $(int-add $(int-mul 10000, 3), $(int-mul 100, 3), 3)
|
---|
1827 | else
|
---|
1828 | # This is kind of bad, the returned string needs to be re-evaluated before use.
|
---|
1829 | # The reason for this hack is that the windows kmk_ash cannot deal with $((1+1)).
|
---|
1830 | # Some versions of gcc (e.g. openSUSE11) return only major.minor on `gcc -dumpversion`.
|
---|
1831 | VBOX_GCC_VERSION = $(shell \
|
---|
1832 | $(1) -dumpversion | $(SED_EXT) 's|\([0-9]\)\.\([0-9]\)\.\{0,1\}\([0-9]\{0,1\}\)|$$(int-add $$(int-mul 10000, \1), $$(int-mul 100, \2), $$(firstword \3 0))|' )
|
---|
1833 | endif
|
---|
1834 |
|
---|
1835 | # No $(QUIET) here as it's interesting to see what goes into the file.
|
---|
1836 | $(PATH_OUT)/GCCConfig.kmk: $(PATH_ROOT)/Config.kmk $(LOCALCFG) $(AUTOCFG)
|
---|
1837 | $(call MSG_GENERATE,,$@,)
|
---|
1838 | $(QUIET)$(RM) -f '$@'
|
---|
1839 | $(QUIET)$(MKDIR) -p $(@D)
|
---|
1840 |
|
---|
1841 | # HC compiler switch detection.
|
---|
1842 | $(APPEND) '$@' 'VBOX_GCC_VERSION_CC ?= $(call VBOX_GCC_VERSION,$(TOOL_$(VBOX_GCC_TOOL)_CC))'
|
---|
1843 | $(APPEND) '$@' 'VBOX_GCC_VERSION_CXX ?= $(call VBOX_GCC_VERSION,$(TOOL_$(VBOX_GCC_TOOL)_CXX))'
|
---|
1844 | $(APPEND) '$@' 'VBOX_GCC_LIBGCC ?= $(shell $(TOOL_$(VBOX_GCC_TOOL)_CC) -print-libgcc-file-name)'
|
---|
1845 | $(APPEND) '$@' 'VBOX_GCC_Wno-pointer-sign ?= $(call VBOX_GCC_CHECK_CC,-Wno-pointer-sign,)'
|
---|
1846 | $(APPEND) '$@' 'VBOX_GCC_Wno-array_bounds ?= $$(if $$(int-ge $$(VBOX_GCC_VERSION_CXX),40300),-Wno-array-bounds,)'
|
---|
1847 | # -Wextra produces additional useful warnings but includes -Wno-missing-field-initializers (too noisy)
|
---|
1848 | $(APPEND) '$@' 'VBOX_GCC_Wextra ?= $(call VBOX_GCC_CHECK_CC,-Wextra,)'
|
---|
1849 | $(APPEND) '$@' 'VBOX_GCC_Wlogical-op ?= $(call VBOX_GCC_CHECK_CC,-Wlogical-op,)'
|
---|
1850 | $(APPEND) '$@' 'VBOX_GCC_Wno-missing-field-initializers ?= $(call VBOX_GCC_CHECK_CC,-Wno-missing-field-initializers,)'
|
---|
1851 | $(APPEND) '$@' 'VBOX_GCC_Wno-pointer-to-int-cast ?= $(call VBOX_GCC_CHECK_CC,-Wno-pointer-to-int-cast,)'
|
---|
1852 | $(APPEND) '$@' 'VBOX_GCC_Wno-int-to-pointer-cast ?= $(call VBOX_GCC_CHECK_CC,-Wno-int-to-pointer-cast,)'
|
---|
1853 | $(APPEND) '$@' 'VBOX_GCC_Wno-variadic-macros ?= $(call VBOX_GCC_CHECK_CXX,-Wno-variadic-macros,)'
|
---|
1854 | $(APPEND) '$@' 'VBOX_GCC_Wno-invalid-offsetof ?= $(call VBOX_GCC_CHECK_CXX,-Wno-invalid-offsetof,)'
|
---|
1855 | $(APPEND) '$@' 'VBOX_GCC_fno-stack-protector ?= $(call VBOX_GCC_CHECK_CC,-fno-stack-protector,)'
|
---|
1856 | $(APPEND) '$@' 'VBOX_GCC_fdiagnostics-show-option ?= $(call VBOX_GCC_CHECK_CC,-fdiagnostics-show-option,)'
|
---|
1857 | # Produce code optimized for the most common IA32/AMD64/EM64T processors. Introduced with gcc version 4.2.
|
---|
1858 | $(APPEND) '$@' 'VBOX_GCC_mtune-generic ?= $(call VBOX_GCC_CHECK_CC,-mtune=generic,)'
|
---|
1859 | $(APPEND) '$@' 'VBOX_LD_as_needed ?= $(call VBOX_GCC_CHECK_LD,--as-needed,)'
|
---|
1860 | # gcc version < 3.4 has a bug in handling __attribute__((regparm(3))).
|
---|
1861 | # See http://osdir.com/ml/gcc.prs/2002-08/msg00223.html and probably http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20004
|
---|
1862 | $(APPEND) '$@' 'VBOX_GCC_BUGGY_REGPARM ?= $$(int-lt $$(VBOX_GCC_VERSION_CC),30400)'
|
---|
1863 | ifneq ($(KBUILD_TARGET),l4)
|
---|
1864 | # Set default attribute for ELF and MACH-O symbols to ``hidden'' to reduce the number
|
---|
1865 | # of relocation entries and PLT indirections in shared libraries. Don't allow for gcc version < 4.
|
---|
1866 | $(APPEND) '$@' 'ifneq ($$(VBOX_GCC_VERSION_CC),)'
|
---|
1867 | $(APPEND) '$@' ' ifneq ($$(int-ge $$(VBOX_GCC_VERSION_CC),40000),)'
|
---|
1868 | $(APPEND) '$@' ' VBOX_GCC_fvisibility-hidden ?= $(call VBOX_GCC_CHECK_CC,-fvisibility=hidden -DVBOX_HAVE_VISIBILITY_HIDDEN -DRT_USE_VISIBILITY_DEFAULT,)'
|
---|
1869 | $(APPEND) '$@' ' endif'
|
---|
1870 | $(APPEND) '$@' 'endif'
|
---|
1871 | endif
|
---|
1872 | ifneq ($(KBUILD_TARGET),l4)
|
---|
1873 | # Set default attribute for inline functions to ``hidden'' to reduce the number
|
---|
1874 | # of relocation entries and PLT indirections in shared libraries. Don't allow for gcc version < 4.
|
---|
1875 | $(APPEND) '$@' 'ifneq ($$(VBOX_GCC_VERSION_CXX),)'
|
---|
1876 | $(APPEND) '$@' ' ifneq ($$(int-ge $$(VBOX_GCC_VERSION_CXX),40000),)'
|
---|
1877 | $(APPEND) '$@' ' VBOX_GCC_fvisibility-inlines-hidden ?= $(call VBOX_GCC_CHECK_CXX,-fvisibility-inlines-hidden,)'
|
---|
1878 | $(APPEND) '$@' ' endif'
|
---|
1879 | $(APPEND) '$@' 'endif'
|
---|
1880 | endif
|
---|
1881 | # Find the compiler includes for IPRT no-crt.
|
---|
1882 | # Note that `$(dir $(gcc -print-libgcc-file-name))/include does not work for a 64-bit cross build on a 32-bit build host.
|
---|
1883 | ifeq ($(KBUILD_HOST),win)
|
---|
1884 | # With the cygwin issues and gcc on windows returning a useless path, just skip this on windows.
|
---|
1885 | $(APPEND) '$@' 'VBOX_PATH_GCC_INCS ?= '
|
---|
1886 | else
|
---|
1887 | $(APPEND) '$@' 'VBOX_PATH_GCC_INCS ?= $(shell LC_ALL=C $(TOOL_$(VBOX_GCC_TOOL)_CC) -print-search-dirs|$(SED_EXT) -ne 's+^install: \(.*[^/][^/]*\)/+\1+p')/include'
|
---|
1888 | endif
|
---|
1889 | # 32-bit (GC) compiler switch detection.
|
---|
1890 | $(APPEND) '$@' 'VBOX_GCC32_VERSION_CC ?= $(call VBOX_GCC_VERSION,$(TOOL_$(VBOX_GCC32_TOOL)_CC))'
|
---|
1891 | $(APPEND) '$@' 'VBOX_GCC32_VERSION_CXX ?= $(call VBOX_GCC_VERSION,$(TOOL_$(VBOX_GCC32_TOOL)_CXX))'
|
---|
1892 | $(APPEND) '$@' 'VBOX_GCC32_LIBGCC ?= $(shell $(TOOL_$(VBOX_GCC32_TOOL)_CC) -print-libgcc-file-name)'
|
---|
1893 | $(APPEND) '$@' 'VBOX_GCC32_Wno-variadic-macros ?= $(call VBOX_GCC32_CHECK_CXX,-Wno-variadic-macros,)'
|
---|
1894 | # darwin no_compact_linkedit starting at Xcode 3.2
|
---|
1895 | ifeq ($(KBUILD_HOST),darwin)
|
---|
1896 | $(APPEND) '$@' 'VBOX_LD_no_compact_linkedit ?= $(call VBOX_GCC_CHECK_LD,-no_compact_linkedit,)'
|
---|
1897 | endif
|
---|
1898 |
|
---|
1899 | include $(PATH_OUT)/GCCConfig.kmk
|
---|
1900 | endif # !VBOX_NOINC_GCC_CONFIG_KMK
|
---|
1901 |
|
---|
1902 | #
|
---|
1903 | # Warnings as errors.
|
---|
1904 | #
|
---|
1905 | # GCC: We disable warnings on non-X86 systems because of the variadic
|
---|
1906 | # macro usage in the logger.
|
---|
1907 | #
|
---|
1908 | ifdef VBOX_WITH_WARNINGS_AS_ERRORS
|
---|
1909 | if defined(VBOX_WITH_WARNINGS_AS_ERRORS) \
|
---|
1910 | && $(VBOX_GCC_VERSION_CXX) < 40000 \
|
---|
1911 | && "$(KBUILD_TARGET_ARCH)" != "x86" \
|
---|
1912 | && "$(KBUILD_TARGET)" != "win"
|
---|
1913 | VBOX_WITH_WARNINGS_AS_ERRORS=
|
---|
1914 | else
|
---|
1915 | VBOX_GCC_WERR ?= -Werror
|
---|
1916 | VBOX_VCC_WERR ?= -WX
|
---|
1917 | VBOX_VCC_LD_WERR ?= ## @todo later also: -WX
|
---|
1918 | endif
|
---|
1919 | endif
|
---|
1920 |
|
---|
1921 | #
|
---|
1922 | # Code Signing.
|
---|
1923 | #
|
---|
1924 | ifdef VBOX_SIGNING_MODE
|
---|
1925 | ifeq ($(KBUILD_HOST),win)
|
---|
1926 | # VBOX_PATH_SELFSIGN points to the Vista WDK bin/SelfSign directory.
|
---|
1927 | ifndef VBOX_PATH_SELFSIGN
|
---|
1928 | VBOX_PATH_SELFSIGN := $(lastword $(sort $(wildcard $(PATH_DEVTOOLS)/win.x86/selfsign/*)))
|
---|
1929 | ifeq ($(VBOX_PATH_SELFSIGN),)
|
---|
1930 | VBOX_PATH_SELFSIGN := $(PATH_DEVTOOLS)/win.x86/selfsign/r1
|
---|
1931 | endif
|
---|
1932 | endif
|
---|
1933 | VBOX_SIGNTOOL ?= $(PATH_DEVTOOLS)/bin/retry.cmd $(VBOX_PATH_SELFSIGN)/SignTool.exe
|
---|
1934 | VBOX_INF2CAT ?= $(VBOX_PATH_SELFSIGN)/Inf2Cat.exe
|
---|
1935 |
|
---|
1936 | # There are three signing modes; 'test', 'development' and 'release'.
|
---|
1937 | ifeq ($(strip $(VBOX_SIGNING_MODE)),test)
|
---|
1938 | VBOX_CERTIFICATE_SUBJECT_NAME ?= MyTestCertificate
|
---|
1939 | VBOX_CERTIFICATE_SUBJECT_NAME_ARGS ?= /n "$(VBOX_CERTIFICATE_SUBJECT_NAME)"
|
---|
1940 | else if1of ($(VBOX_SIGNING_MODE), release development)
|
---|
1941 | VBOX_CERTIFICATE_SUBJECT_NAME ?= Sun Microsystems, Inc.
|
---|
1942 | VBOX_CERTIFICATE_SUBJECT_NAME_ARGS ?= /n "$(VBOX_CERTIFICATE_SUBJECT_NAME)"
|
---|
1943 | VBOX_CROSS_CERTIFICATE_FILE ?= $(VBOX_PATH_SELFSIGN)/MSCV-VSClass3.cer
|
---|
1944 | VBOX_CROSS_CERTIFICATE_FILE_ARGS ?= /ac "$(VBOX_CROSS_CERTIFICATE_FILE)"
|
---|
1945 | VBOX_TSA_URL ?= http://timestamp.verisign.com/scripts/timestamp.dll
|
---|
1946 | VBOX_TSA_URL_ARGS ?= /t "$(VBOX_TSA_URL)"
|
---|
1947 | else
|
---|
1948 | $(error Unknown VBOX_SIGNING_MODE: $(VBOX_SIGNING_MODE))
|
---|
1949 | endif
|
---|
1950 | VBOX_CERTIFICATE_STORE ?= my
|
---|
1951 | VBOX_CERTIFICATE_STORE_ARGS ?= /s "$(VBOX_CERTIFICATE_STORE)"
|
---|
1952 |
|
---|
1953 | ## Commands for signing a driver image after link.
|
---|
1954 | VBOX_SIGN_DRIVER_CMDS ?= $(if $(eq $(tool_do),LINK_LIBRARY),,$(call VBOX_SIGN_FILE_FN,$(out)))
|
---|
1955 | ## Sign a file.
|
---|
1956 | # @param 1 The file to sign.
|
---|
1957 | VBOX_SIGN_FILE_FN ?= $(VBOX_SIGNTOOL) sign \
|
---|
1958 | $(VBOX_CROSS_CERTIFICATE_FILE_ARGS) \
|
---|
1959 | $(VBOX_CERTIFICATE_STORE_ARGS) \
|
---|
1960 | $(VBOX_CERTIFICATE_SUBJECT_NAME_ARGS) \
|
---|
1961 | $(VBOX_TSA_URL_ARGS) \
|
---|
1962 | $(1)
|
---|
1963 | ## Create a security catalog file.
|
---|
1964 | # @param 1 The directory containing the stuff to sign.
|
---|
1965 | # @param 2 The expected .cat name. (Inf2Cat lowercases it)
|
---|
1966 | # @param 3 The list of OSes, separated by ';'.
|
---|
1967 | VBOX_MAKE_CAT_HLP_FN ?= \
|
---|
1968 | $(RM) -f $(2)\
|
---|
1969 | $(NL)$(TAB)$(VBOX_INF2CAT) /driver:$(strip $(1)) /os:$(strip $(subst ;,$(COMMA),$(3))) /verbose \
|
---|
1970 | $(NL)$(TAB)$(MV) $(2) $(2) \
|
---|
1971 | $(NL)$(TAB)$(call VBOX_SIGN_FILE_FN,$(2))
|
---|
1972 | VBOX_MAKE_CAT64_FN ?= $(call VBOX_MAKE_CAT_HLP_FN,$(1),$(2),XP_X64;Server2003_X64;Vista_X64)
|
---|
1973 | VBOX_MAKE_CAT32_FN ?= $(call VBOX_MAKE_CAT_HLP_FN,$(1),$(2),2000;XP_X86;Server2003_X86;Vista_X86)
|
---|
1974 | ifeq ($(KBUILD_TARGET_ARCH),x86)
|
---|
1975 | VBOX_MAKE_CAT_FN ?= $(call VBOX_MAKE_CAT32_FN,$(1),$(2))
|
---|
1976 | else
|
---|
1977 | VBOX_MAKE_CAT_FN ?= $(call VBOX_MAKE_CAT64_FN,$(1),$(2))
|
---|
1978 | endif
|
---|
1979 |
|
---|
1980 | # Go nuts, sign everything.
|
---|
1981 | ifeq ($(strip $(VBOX_SIGNING_MODE)),release)
|
---|
1982 | ## Commands for signing an executable or a dll image after link.
|
---|
1983 | VBOX_SIGN_IMAGE_CMDS ?= $(if $(eq $(tool_do),LINK_LIBRARY),,$(call VBOX_SIGN_FILE_FN,$(out)))
|
---|
1984 | endif
|
---|
1985 | ## Enable signing of the additions.
|
---|
1986 | VBOX_SIGN_ADDITIONS ?= 1
|
---|
1987 | else
|
---|
1988 | # Not windows build platform, ignore.
|
---|
1989 | VBOX_SIGNING_MODE :=
|
---|
1990 | endif
|
---|
1991 | endif
|
---|
1992 |
|
---|
1993 | #
|
---|
1994 | # Windows .inf editing.
|
---|
1995 | #
|
---|
1996 | ifeq ($(KBUILD_TARGET_ARCH),x86)
|
---|
1997 | VBOX_EDIT_INF_FN = $(call VBOX_EDIT_INF32_FN,$(1),$(2))
|
---|
1998 | else
|
---|
1999 | VBOX_EDIT_INF_FN = $(call VBOX_EDIT_INF64_FN,$(1),$(2))
|
---|
2000 | endif
|
---|
2001 | ## Edit an inf file an x86 target.
|
---|
2002 | # @param 1 The inf file to edit.
|
---|
2003 | # @param 2 The output file.
|
---|
2004 | VBOX_EDIT_INF32_FN = $(SED) $(if $(VBOX_SIGNING_MODE),-e 's/^;cat *//', -e '/^;cat /d') \
|
---|
2005 | -e 's/^;x86 *//' \
|
---|
2006 | -e '/^;amd64 /d' \
|
---|
2007 | -e 's/^;edit-DriverVer.*/DriverVer = $(date-utc %m\/%d\/%Y),$(VBOX_VERSION_MAJOR).$(VBOX_VERSION_MINOR).$(VBOX_VERSION_BUILD)/' \
|
---|
2008 | --output $(2) \
|
---|
2009 | $(1)
|
---|
2010 | ## Edit an inf file an x86 target.
|
---|
2011 | # @param 1 The inf file to edit.
|
---|
2012 | # @param 2 The output file.
|
---|
2013 | VBOX_EDIT_INF64_FN = $(SED) \
|
---|
2014 | $(if $(VBOX_SIGNING_MODE),-e 's/^;cat *//', -e '/^;cat /d')\
|
---|
2015 | -e 's/^;amd64 *//' \
|
---|
2016 | -e '/^;x86 /d' \
|
---|
2017 | -e 's/^;edit-DriverVer.*/DriverVer = $(date-utc %m\/%d\/%Y),$(VBOX_VERSION_MAJOR).$(VBOX_VERSION_MINOR).$(VBOX_VERSION_BUILD)/' \
|
---|
2018 | --output $(2) \
|
---|
2019 | $(1)
|
---|
2020 |
|
---|
2021 | #
|
---|
2022 | # Default prefixes and suffixes.
|
---|
2023 | #
|
---|
2024 | VBOX_PREF_LIB =
|
---|
2025 | if1of ($(KBUILD_TARGET), os2 win)
|
---|
2026 | VBOX_SUFF_LIB = .lib
|
---|
2027 | else
|
---|
2028 | VBOX_SUFF_LIB = .a
|
---|
2029 | endif
|
---|
2030 | VBOX_SUFF_DLL = $(SUFF_DLL)
|
---|
2031 | ifeq ($(KBUILD_TARGET),os2) # GXX3OMF produces out .o at the moment.
|
---|
2032 | VBOX_SUFF_OBJ = .o
|
---|
2033 | else
|
---|
2034 | VBOX_SUFF_OBJ = $(SUFF_OBJ)
|
---|
2035 | endif
|
---|
2036 | VBOXW32GUEST_SUFF_LIB = .lib
|
---|
2037 | VBOXLNX32GUEST_SUFF_LIB = .a
|
---|
2038 |
|
---|
2039 | #
|
---|
2040 | # SDKs for external libraries.
|
---|
2041 | #
|
---|
2042 | SDK_VBOX_LIBXML2 = .
|
---|
2043 | SDK_VBOX_LIBXML2_INCS ?= $(PATH_ROOT)/src/libs/libxml2-2.6.30/include
|
---|
2044 | SDK_VBOX_LIBXML2_DEFS ?= _REENTRANT
|
---|
2045 | SDK_VBOX_LIBXML2_DEFS.win += WIN32 _WINDOWS _MBCS
|
---|
2046 | # note: no linking to LIB here, we do that explicitly in src/VBox/Runtime/Makefile.kmk to link
|
---|
2047 | # libxml against VBoxRT
|
---|
2048 |
|
---|
2049 | SDK_VBOX_LIBXSLT = .
|
---|
2050 | #if1of ($(KBUILD_TARGET), os2 solaris win)
|
---|
2051 | SDK_VBOX_LIBXSLT_INCS ?= $(PATH_ROOT)/src/libs/libxslt-1.1.22
|
---|
2052 | SDK_VBOX_LIBXSLT_LIBS ?= $(PATH_LIB)/VBox-libxslt$(VBOX_SUFF_LIB)
|
---|
2053 | SDK_VBOX_LIBXSLT_DEFS ?=
|
---|
2054 | SDK_VBOX_LIBXSLT_DEFS.win += WIN32 _WINDOWS _MBCS _REENTRANT
|
---|
2055 | #else if1of ($(KBUILD_TARGET), linux)
|
---|
2056 | # SDK_VBOX_LIBXSLT_INCS ?=
|
---|
2057 | # SDK_VBOX_LIBXSLT_LIBS ?=
|
---|
2058 | # SDK_VBOX_LIBXSLT_CFLAGS ?= $(shell pkg-config libxslt-1.0 --cflags)
|
---|
2059 | # SDK_VBOX_LIBXSLT_CXXFLAGS ?= $(SDK_VBOX_LIBXSLT_CFLAGS)
|
---|
2060 | # SDK_VBOX_LIBXSLT_LDFLAGS ?= $(shell pkg-config libxslt-1.0 --libs)
|
---|
2061 | #else
|
---|
2062 | # SDK_VBOX_LIBXSLT_INCS ?=
|
---|
2063 | # SDK_VBOX_LIBXSLT_LIBS ?= xslt
|
---|
2064 | #endif
|
---|
2065 |
|
---|
2066 | SDK_VBOX_LIBPNG = .
|
---|
2067 | SDK_VBOX_LIBPNG_INCS ?= $(PATH_ROOT)/src/libs/libpng-1.2.8
|
---|
2068 | SDK_VBOX_LIBPNG_LIBS ?= $(PATH_LIB)/VBox-libpng$(VBOX_SUFF_LIB)
|
---|
2069 |
|
---|
2070 | SDK_VBOX_ZLIB = .
|
---|
2071 | if1of ($(KBUILD_TARGET), os2 win)
|
---|
2072 | SDK_VBOX_ZLIB_INCS ?= $(PATH_ROOT)/src/libs/zlib-1.2.1
|
---|
2073 | SDK_VBOX_ZLIB_LIBS ?= $(PATH_LIB)/VBox-zlib$(VBOX_SUFF_LIB)
|
---|
2074 | else
|
---|
2075 | SDK_VBOX_ZLIB_INCS ?=
|
---|
2076 | SDK_VBOX_ZLIB_LIBS ?= z
|
---|
2077 | endif
|
---|
2078 |
|
---|
2079 | SDK_VBOX_OPENSSL = .
|
---|
2080 | SDK_VBOX_OPENSSL_VBOX_DEFAULT_INCS := $(PATH_OUT)/obj/crypto-headers/include
|
---|
2081 | SDK_VBOX_OPENSSL_INCS ?= $(SDK_VBOX_OPENSSL_VBOX_DEFAULT_INCS)
|
---|
2082 | SDK_VBOX_OPENSSL_ORDERDEPS ?= $(crypto-headers_1_TARGET)
|
---|
2083 | SDK_VBOX_OPENSSL_LIBS ?= $(PATH_LIB)/VBox-libcrypto$(VBOX_SUFF_LIB)
|
---|
2084 | # Build entire openssl library, not just the minimal subset.
|
---|
2085 | if1of ($(KBUILD_TARGET), linux solaris)
|
---|
2086 | VBOX_OPENSSL_ALL=1
|
---|
2087 | endif
|
---|
2088 |
|
---|
2089 | VBOX_WITH_LIBCURL = 1
|
---|
2090 | SDK_VBOX_LIBCURL = .
|
---|
2091 | SDK_VBOX_LIBCURL_INCS ?= $(PATH_ROOT)/src/libs/curl-7.19.4/include
|
---|
2092 | SDK_VBOX_LIBCURL_LIBS ?= $(PATH_LIB)/VBox-libcurl$(VBOX_SUFF_LIB)
|
---|
2093 | SDK_VBOX_LIBCURL_DEFS ?= BUILDING_LIBCURL
|
---|
2094 |
|
---|
2095 | SDK_VBOX_FFMPEG = .
|
---|
2096 | if1of ($(KBUILD_TARGET), darwin linux os2 win)
|
---|
2097 | SDK_VBOX_FFMPEG_INCS ?= \
|
---|
2098 | $(PATH_ROOT)/src/libs/ffmpeg-20060710/libavutil \
|
---|
2099 | $(PATH_ROOT)/src/libs/ffmpeg-20060710/libavcodec \
|
---|
2100 | $(PATH_ROOT)/src/libs/ffmpeg-20060710/libavformat
|
---|
2101 | ifeq ($(KBUILD_TARGET),win)
|
---|
2102 | ## @todo Michael! Where is $(PATH_LIB)/VBoxFFmpegImp$(VBOX_SUFF_LIB) supposed to come from?
|
---|
2103 | #SDK_VBOX_FFMPEG_LIBS ?= $(PATH_LIB)/VBoxFFmpeg.a
|
---|
2104 | SDK_VBOX_FFMPEG_LIBS ?= $(PATH_LIB)/VBoxFFmpegImp.lib
|
---|
2105 | else
|
---|
2106 | SDK_VBOX_FFMPEG_LIBS ?= $(PATH_BIN)/VBoxFFmpeg$(SUFF_DLL)
|
---|
2107 | endif
|
---|
2108 | else
|
---|
2109 | SDK_VBOX_FFMPEG_INCS ?= /usr/include/ffmpeg /usr/include/libpng
|
---|
2110 | SDK_VBOX_FFMPEG_LIBS ?= avutil avcodec avformat
|
---|
2111 | endif
|
---|
2112 |
|
---|
2113 | SDK_VBOX_BOOST = .
|
---|
2114 | SDK_VBOX_BOOST_DEFS ?= BOOST_DISABLE_ASSERTS
|
---|
2115 | SDK_VBOX_BOOST_INCS ?= $(PATH_ROOT)/src/libs/boost-1.37.0
|
---|
2116 |
|
---|
2117 | #
|
---|
2118 | # Special SDK for the problematic NTDLL.LIB.
|
---|
2119 | #
|
---|
2120 | SDK_VBOX_NTDLL = Requires W2K3DDK
|
---|
2121 | SDK_VBOX_NTDLL_LIBS ?= $(PATH_SDK_W2K3DDK_LIB)/ntdll.lib
|
---|
2122 | ifeq ($(KBUILD_TARGET),win)
|
---|
2123 | include $(KBUILD_PATH)/sdks/W2K3DDK.kmk
|
---|
2124 | endif
|
---|
2125 |
|
---|
2126 | #
|
---|
2127 | # The linux kernel headers(/sources).
|
---|
2128 | #
|
---|
2129 | if1of ($(KBUILD_TARGET), linux)
|
---|
2130 | ifeq ($(origin VBOX_LINUX_SRC),undefined)
|
---|
2131 | ifneq ($(wildcard /lib/modules/$(shell uname -r)/build/include/linux/autoconf.h),)
|
---|
2132 | export VBOX_LINUX_SRC := /lib/modules/$(shell uname -r)/build
|
---|
2133 | else
|
---|
2134 | export VBOX_LINUX_SRC := /usr/src/linux
|
---|
2135 | endif
|
---|
2136 | endif
|
---|
2137 | ifneq ($(VBOX_LINUX_SRC),)
|
---|
2138 | ifeq ($(origin VBOX_LINUX_INCS),undefined)
|
---|
2139 | export VBOX_LINUX_INCS := $(VBOX_LINUX_SRC)/include
|
---|
2140 | # XXX hack alert! support splitted Linux kernels (make O=<build directory>)
|
---|
2141 | # XXX put this crap elsewhere
|
---|
2142 | kernelpath := $(shell $(SED_EXT) -ne 's+^KERNELSRC.*= *\(.*\)+\1+p' $(VBOX_LINUX_SRC)/Makefile)
|
---|
2143 | ifeq ($(kernelpath),)
|
---|
2144 | # Linux >= 2.6.25
|
---|
2145 | kernelpath := $(shell $(SED_EXT) -ne 's+^MAKEARGS *:= *-C *\(\S*\).*+\1+p' $(VBOX_LINUX_SRC)/Makefile)
|
---|
2146 | endif
|
---|
2147 | ifneq ($(kernelpath),)
|
---|
2148 | # absolute path?
|
---|
2149 | ifneq ($(patsubst /%,,$(kernelpath)),)
|
---|
2150 | # no, relative path
|
---|
2151 | kernelpath := $(realpath $(VBOX_LINUX_SRC)/$(kernelpath))
|
---|
2152 | endif
|
---|
2153 | endif
|
---|
2154 | ifneq ($(kernelpath),)
|
---|
2155 | VBOX_LINUX_INCS += $(VBOX_LINUX_SRC)/include2 $(kernelpath)/include
|
---|
2156 | else
|
---|
2157 | kernelpath := $(VBOX_LINUX_SRC)
|
---|
2158 | endif
|
---|
2159 | VBOX_LINUX_INCS += $(kernelpath)/include/asm-i386/mach-default \
|
---|
2160 | $(kernelpath)/include/asm-x86/mach-default \
|
---|
2161 | $(kernelpath)/arch/x86/include \
|
---|
2162 | $(kernelpath)/arch/x86/include/asm/mach-default \
|
---|
2163 | $(kernelpath)/include
|
---|
2164 | endif
|
---|
2165 | endif
|
---|
2166 | # Since Linux 2.6.15, <linux/autoconf.h> is included like this. It cannot hurt to do the
|
---|
2167 | # same for older Linux kernels
|
---|
2168 | ifneq ($(wildcard $(VBOX_LINUX_SRC)/include/linux/autoconf.h),)
|
---|
2169 | # Linux < 2.6.33
|
---|
2170 | export VBOX_LINUX_INCLUDE := -include $(VBOX_LINUX_SRC)/include/linux/autoconf.h
|
---|
2171 | else ifneq ($(wildcard $(VBOX_LINUX_SRC)/include/generated/autoconf.h),)
|
---|
2172 | # Linux >= 2.6.33
|
---|
2173 | export VBOX_LINUX_INCLUDE := -include $(VBOX_LINUX_SRC)/include/generated/autoconf.h
|
---|
2174 | endif
|
---|
2175 | endif
|
---|
2176 |
|
---|
2177 | #
|
---|
2178 | # Determine Solaris version.
|
---|
2179 | #
|
---|
2180 | ifeq ($(KBUILD_TARGET),solaris)
|
---|
2181 | ifeq ($(origin VBOX_SOLARIS_VERSION),undefined)
|
---|
2182 | $(eval export VBOX_SOLARIS_VERSION := $(shell uname -r | $(SED_EXT) 's|\([0-9]*\)\.\([0-9]*\)|$$(int-add $$(int-mul 100, \1), \2)|' ))
|
---|
2183 | endif
|
---|
2184 | ifeq ($(VBOX_SOLARIS_VERSION),510)
|
---|
2185 | DEFS.solaris += RT_OS_SOLARIS_10
|
---|
2186 | # Solaris 10 does not include crossbow.
|
---|
2187 | VBOX_WITH_CROSSBOW =
|
---|
2188 | VBOX_SOLARIS_10 = 1
|
---|
2189 | # We cannot compile additions on Solaris 10, due kernel interface deps
|
---|
2190 | VBOX_WITHOUT_ADDITIONS := 1
|
---|
2191 | VBOX_WITH_ADDITIONS =
|
---|
2192 | else
|
---|
2193 | ## @todo r=bird: Why eval, and why export? Actually, since this isn't used anywhere, why not
|
---|
2194 | # VBOX_WITH_SOLARIS_OSS := $(if-expr $(shell uname -v | cut -f2 -d'_')) >= 115,1,)
|
---|
2195 | $(eval export VBOX_SOLARIS_SNV_VERSION := $(shell uname -v | cut -f2 -d'_'))
|
---|
2196 |
|
---|
2197 | # OSS audio support for Solaris
|
---|
2198 | VBOX_WITH_SOLARIS_OSS := $(if-expr $(VBOX_SOLARIS_SNV_VERSION) >= 115,1,)
|
---|
2199 | endif
|
---|
2200 | endif
|
---|
2201 |
|
---|
2202 | ifdef VBOX_WITH_RAW_MODE
|
---|
2203 | #
|
---|
2204 | # Template for building RC things.
|
---|
2205 | #
|
---|
2206 | TEMPLATE_VBoxRc = VBox Raw-Mode Context
|
---|
2207 | TEMPLATE_VBoxRc_ASTOOL = $(VBOX_ASTOOL)
|
---|
2208 | TEMPLATE_VBoxRc_ASFLAGS = $(VBOX_ASFLAGS32)
|
---|
2209 | TEMPLATE_VBoxRc_DEFS = IN_RC IPRT_NO_CRT RT_WITH_NOCRT_ALIASES $(ARCH_BITS_DEFS)
|
---|
2210 | TEMPLATE_VBoxRc_INCS = $(PATH_ROOT)/include/iprt/nocrt
|
---|
2211 | TEMPLATE_VBoxRc_SYSSUFF = .gc
|
---|
2212 | TEMPLATE_VBoxRc_BLD_TRG_ARCH = x86
|
---|
2213 |
|
---|
2214 | ifeq ($(VBOX_LDR_FMT32),pe)
|
---|
2215 | ifdef VBOX_USE_VCC80
|
---|
2216 | TEMPLATE_VBoxRc_TOOL = VCC80X86
|
---|
2217 | TEMPLATE_VBoxRc_CXXFLAGS = -Zi -Zl -GR- -EHs- -GF -W3 -wd4244 -GS- -wd4996 -Zc:wchar_t- -Gs8192 $(VBOX_VCC_GC_OPT) $(VBOX_VCC_GC_FP) $(VBOX_VCC_WERR)
|
---|
2218 | else
|
---|
2219 | TEMPLATE_VBoxRc_TOOL = VCC70
|
---|
2220 | TEMPLATE_VBoxRc_CXXFLAGS = -Zi -Zl -GR- -EHs- -GF -W3 -wd4244 $(VBOX_VCC_GC_OPT) $(VBOX_VCC_GC_FP) $(VBOX_VCC_WERR)
|
---|
2221 | endif
|
---|
2222 | TEMPLATE_VBoxRc_CFLAGS = $(TEMPLATE_VBoxRc_CXXFLAGS)
|
---|
2223 | TEMPLATE_VBoxRc_LDFLAGS = -Driver -Subsystem:NATIVE -Incremental:NO -Align:64 -MapInfo:Lines -MapInfo:Exports -NoD $(VBOX_VCC_LD_WERR) -Debug
|
---|
2224 | ifndef VBOX_NOINC_MISC
|
---|
2225 | include $(KBUILD_PATH)/sdks/W2K3DDKX86.kmk
|
---|
2226 | endif
|
---|
2227 | TEMPLATE_VBoxRc_LIBS = \
|
---|
2228 | $(PATH_SDK_W2K3DDKX86_LIB)/int64.lib \
|
---|
2229 | $(PATH_LIB)/RuntimeRCStub$(VBOX_SUFF_LIB)
|
---|
2230 | TEMPLATE_VBoxRc_POST_CMDS = $(VBOX_SIGN_IMAGE_CMDS)
|
---|
2231 | endif # pe
|
---|
2232 |
|
---|
2233 | ifeq ($(VBOX_LDR_FMT32),elf)
|
---|
2234 | TEMPLATE_VBoxRc_TOOL = $(VBOX_GCC32_TOOL)
|
---|
2235 | TEMPLATE_VBoxRc_CXXFLAGS = -nostdinc -g -pipe $(VBOX_GCC_WERR) $(VBOX_GCC_PEDANTIC_CXX) $(VBOX_GCC32_Wno-variadic-macros) -fno-exceptions $(VBOX_GCC_GC_OPT) $(VBOX_GCC_GC_FP) -fno-strict-aliasing $(VBOX_GCC_fno-stack-protector) $(VBOX_GCC_fvisibility-hidden) $(VBOX_GCC_fvisibility-inlines-hidden) -fno-rtti
|
---|
2236 | TEMPLATE_VBoxRc_CFLAGS = -nostdinc -g -pipe $(VBOX_GCC_WERR) $(VBOX_GCC_PEDANTIC_C) $(VBOX_GCC32_Wno-variadic-macros) -fno-exceptions $(VBOX_GCC_GC_OPT) $(VBOX_GCC_GC_FP) -fno-strict-aliasing $(VBOX_GCC_fno-stack-protector) $(VBOX_GCC_fvisibility-hidden)
|
---|
2237 | ifeq ($(KBUILD_TARGET),solaris)
|
---|
2238 | TEMPLATE_VBoxRc_LDFLAGS = -r
|
---|
2239 | else
|
---|
2240 | TEMPLATE_VBoxRc_LDFLAGS = -nostdlib -Bsymbolic
|
---|
2241 | # "temporarily", must fix the loader.
|
---|
2242 | TEMPLATE_VBoxRc_LDFLAGS += $(if $(VBOX_DO_STRIP_MODULES),-S,)
|
---|
2243 | TEMPLATE_VBoxRc_LDFLAGS.release = $(if $(VBOX_DO_STRIP_MODULES),-S,)
|
---|
2244 | endif
|
---|
2245 | ifn1of ($(KBUILD_TARGET), solaris freebsd)
|
---|
2246 | TEMPLATE_VBoxRc_LIBS = \
|
---|
2247 | $(VBOX_GCC32_LIBGCC) # instricts
|
---|
2248 | endif
|
---|
2249 | endif
|
---|
2250 |
|
---|
2251 | ifeq ($(VBOX_LDR_FMT32),macho)
|
---|
2252 | TEMPLATE_VBoxRc_TOOL = GXX4MACHO
|
---|
2253 | TEMPLATE_VBoxRc_DEFS += $(VBOX_DARWIN_DEF_SDK_DEFS)
|
---|
2254 | TEMPLATE_VBoxRc_CXXFLAGS = $(VBOX_DARWIN_DEF_SDK_CXXFLAGS) -m32 -nostdinc -g -pipe $(VBOX_GCC_WERR) $(VBOX_GCC_PEDANTIC_CXX) $(VBOX_GCC32_Wno-variadic-macros) -fno-common -msoft-float -static $(VBOX_GCC_fno-stack-protector) -fno-exceptions $(VBOX_GCC_GC_OPT) $(VBOX_GCC_GC_FP) -fno-strict-aliasing -fno-rtti
|
---|
2255 | TEMPLATE_VBoxRc_CFLAGS = $(VBOX_DARWIN_DEF_SDK_CFLAGS) -m32 -nostdinc -g -pipe $(VBOX_GCC_WERR) $(VBOX_GCC_PEDANTIC_C) $(VBOX_GCC32_Wno-variadic-macros) -fno-common -msoft-float -static $(VBOX_GCC_fno-stack-protector) -fno-exceptions $(VBOX_GCC_GC_OPT) $(VBOX_GCC_GC_FP) -fno-strict-aliasing
|
---|
2256 | TEMPLATE_VBoxRc_LDFLAGS = $(VBOX_DARWIN_DEF_SDK_LDFLAGS) -m32 -nostdlib
|
---|
2257 | #TEMPLATE_VBoxRc_LDFLAGS.release = -Wl,-S ???
|
---|
2258 | endif
|
---|
2259 |
|
---|
2260 | ifeq ($(VBOX_LDR_FMT32),lx)
|
---|
2261 | TEMPLATE_VBoxRc_TOOL = GXX3OMF
|
---|
2262 | TEMPLATE_VBoxRc_CXXFLAGS = -nostdinc -g -pipe $(VBOX_GCC_WERR) $(VBOX_GCC_PEDANTIC_CXX) $(VBOX_GCC32_Wno-variadic-macros) $(VBOX_GCC_GC_OPT) $(VBOX_GCC_GC_FP) -fno-strict-aliasing -fno-exceptions -fno-rtti
|
---|
2263 | TEMPLATE_VBoxRc_CFLAGS = -nostdinc -g -pipe $(VBOX_GCC_WERR) $(VBOX_GCC_PEDANTIC_C) $(VBOX_GCC32_Wno-variadic-macros) $(VBOX_GCC_GC_OPT) $(VBOX_GCC_GC_FP) -fno-strict-aliasing -fno-exceptions
|
---|
2264 | TEMPLATE_VBoxRc_LDFLAGS = -Zdll -nostdlib
|
---|
2265 | TEMPLATE_VBoxRc_LIBS = \
|
---|
2266 | $(VBOX_GCC32_LIBGCC) \
|
---|
2267 | $(VBOX_OBJ_SYS0) \
|
---|
2268 | end
|
---|
2269 | endif
|
---|
2270 |
|
---|
2271 |
|
---|
2272 | #
|
---|
2273 | # Template for building a RC ring-3 testcase (tstVMStructGC, tstDevStructGC).
|
---|
2274 | #
|
---|
2275 | TEMPLATE_VBoxRcExe = VBox Raw-Mode as ring-3 testcase
|
---|
2276 | TEMPLATE_VBoxRcExe_EXTENDS = VBoxRc
|
---|
2277 | TEMPLATE_VBoxRcExe_DEFS = $(filter-out IPRT_NO_CRT RT_WITH_NOCRT_ALIASES,$(TEMPLATE_VBoxRc_DEFS))
|
---|
2278 | TEMPLATE_VBoxRcExe_INCS = $(NO_SUCH_VARIABLE)
|
---|
2279 |
|
---|
2280 | ifeq ($(VBOX_LDR_FMT32),pe)
|
---|
2281 | TEMPLATE_VBoxRcExe_LDFLAGS = -Incremental:NO -MapInfo:Exports -NoD -Debug
|
---|
2282 | TEMPLATE_VBoxRcExe_SDKS = WIN32SDK
|
---|
2283 | ifdef VBOX_USE_VCC80
|
---|
2284 | TEMPLATE_VBoxRcExe_LIBS = \
|
---|
2285 | $(PATH_TOOL_VCC80X86_LIB)/libcmt.lib \
|
---|
2286 | $(PATH_TOOL_VCC80X86_LIB)/oldnames.lib
|
---|
2287 | else
|
---|
2288 | TEMPLATE_VBoxRcExe_LIBS = \
|
---|
2289 | $(PATH_TOOL_VCC70_LIB)/libcmt.lib \
|
---|
2290 | $(PATH_TOOL_VCC70_LIB)/oldnames.lib
|
---|
2291 | endif
|
---|
2292 | endif
|
---|
2293 |
|
---|
2294 | ifeq ($(VBOX_LDR_FMT32),elf)
|
---|
2295 | TEMPLATE_VBoxRcExe_CFLAGS = $(filter-out -nostdinc,$(TEMPLATE_VBoxRc_CFLAGS))
|
---|
2296 | TEMPLATE_VBoxRcExe_CXXFLAGS = $(filter-out -nostdinc,$(TEMPLATE_VBoxRc_CXXFLAGS))
|
---|
2297 | TEMPLATE_VBoxRcExe_LDFLAGS = -g
|
---|
2298 | TEMPLATE_VBoxRcExe_LDFLAGS.dbgopt = -g
|
---|
2299 | TEMPLATE_VBoxRcExe_LDFLAGS.strict = -g
|
---|
2300 | TEMPLATE_VBoxRcExe_LDFLAGS.release = -g
|
---|
2301 | if1of ($(KBUILD_TARGET).$(KBUILD_TARGET_ARCH), freebsd.amd64)
|
---|
2302 | # The FreeBSD port of gcc isn't picking up -m32 where it should. the .o order below isn't
|
---|
2303 | # quite right (target source comes first), if it stops working we'll have to write a linker tool.
|
---|
2304 | TEMPLATE_VBoxRcExe_DEFS.$(KBUILD_TARGET) = $(TEMPLATE_VBoxRc_DEFS.$(KBUILD_TARGET)) IPRT_DONT_USE_SYSTEM_STDINT_H
|
---|
2305 | TEMPLATE_VBoxRcExe_LDFLAGS.$(KBUILD_TARGET) = $(TEMPLATE_VBoxRc_LDFLAGS.$(KBUILD_TARGET)) -nostdlib -v
|
---|
2306 | TEMPLATE_VBoxRcExe_SOURCES.$(KBUILD_TARGET) = /usr/lib32/crtend.o /usr/lib32/crtn.o
|
---|
2307 | TEMPLATE_VBoxRcExe_SOURCES = /usr/lib32/crt1.o /usr/lib32/crti.o /usr/lib32/crtbegin.o
|
---|
2308 | TEMPLATE_VBoxRcExe_LIBPATH.$(KBUILD_TARGET) = /usr/lib32
|
---|
2309 | TEMPLATE_VBoxRcExe_LIBS.$(KBUILD_TARGET) = /usr/lib32/libc.so
|
---|
2310 | endif
|
---|
2311 | endif
|
---|
2312 |
|
---|
2313 | ifeq ($(VBOX_LDR_FMT32),macho)
|
---|
2314 | TEMPLATE_VBoxRcExe_CFLAGS = $(filter-out -static -nostdinc,$(TEMPLATE_VBoxRc_CFLAGS))
|
---|
2315 | TEMPLATE_VBoxRcExe_CXXFLAGS = $(filter-out -static -nostdinc,$(TEMPLATE_VBoxRc_CXXFLAGS))
|
---|
2316 | TEMPLATE_VBoxRcExe_LDFLAGS = -g -m32
|
---|
2317 | endif
|
---|
2318 |
|
---|
2319 | ifeq ($(VBOX_LDR_FMT32),lx)
|
---|
2320 | TEMPLATE_VBoxRcExe_CFLAGS = $(filter-out -nostdinc,$(TEMPLATE_VBoxRc_CFLAGS))
|
---|
2321 | TEMPLATE_VBoxRcExe_CXXFLAGS = $(filter-out -nostdinc,$(TEMPLATE_VBoxRc_CXXFLAGS))
|
---|
2322 | TEMPLATE_VBoxRcExe_LDFLAGS = -g
|
---|
2323 | TEMPLATE_VBoxRcExe_LIBS = $(NO_SUCH_VARIABLE)
|
---|
2324 | endif
|
---|
2325 | endif # VBOX_WITH_RAW_MODE
|
---|
2326 |
|
---|
2327 |
|
---|
2328 | #
|
---|
2329 | # Template for building R0 things.
|
---|
2330 | #
|
---|
2331 | TEMPLATE_VBoxR0 = VBox Ring 0
|
---|
2332 | TEMPLATE_VBoxR0_ASTOOL = $(VBOX_ASTOOL)
|
---|
2333 | TEMPLATE_VBoxR0_ASFLAGS = $(VBOX_ASFLAGS)
|
---|
2334 | TEMPLATE_VBoxR0_DEFS = IN_RING0 IN_RING0_AGNOSTIC IPRT_NO_CRT RT_WITH_NOCRT_ALIASES $(ARCH_BITS_DEFS)
|
---|
2335 | TEMPLATE_VBoxR0_INCS = $(PATH_ROOT)/include/iprt/nocrt
|
---|
2336 | TEMPLATE_VBoxR0_SYSSUFF = .r0
|
---|
2337 |
|
---|
2338 | ifeq ($(VBOX_LDR_FMT),pe)
|
---|
2339 | TEMPLATE_VBoxR0_TOOL = $(VBOX_VCC_TOOL)
|
---|
2340 | ifdef VBOX_USE_VCC80
|
---|
2341 | TEMPLATE_VBoxR0_CXXFLAGS = -Zi -Zl -GR- -EHs- -GF -W3 -wd4244 -GS- -wd4996 -Zc:wchar_t- $(VBOX_VCC_OPT) $(VBOX_VCC_FP) $(VBOX_VCC_WERR)
|
---|
2342 | else
|
---|
2343 | TEMPLATE_VBoxR0_CXXFLAGS = -Zi -Zl -GR- -EHs- -GF -W3 -wd4244 $(VBOX_VCC_OPT) $(VBOX_VCC_FP) $(VBOX_VCC_WERR)
|
---|
2344 | endif
|
---|
2345 | TEMPLATE_VBoxR0_CFLAGS = $(TEMPLATE_VBoxR0_CXXFLAGS)
|
---|
2346 | TEMPLATE_VBoxR0_LDFLAGS = -Driver -Subsystem:NATIVE -Incremental:NO -Align:64 -MapInfo:Exports -NoD $(VBOX_VCC_LD_WERR) -Debug
|
---|
2347 | TEMPLATE_VBoxR0_LIBS = \
|
---|
2348 | $(PATH_LIB)/RuntimeR0Stub$(VBOX_SUFF_LIB)
|
---|
2349 | TEMPLATE_VBoxR0_LIBS.x86 = \
|
---|
2350 | $(PATH_SDK_W2K3DDKX86_LIB)/int64.lib
|
---|
2351 | TEMPLATE_VBoxR0_POST_CMDS = $(VBOX_SIGN_DRIVER_CMDS)
|
---|
2352 | endif # pe
|
---|
2353 |
|
---|
2354 | ifeq ($(VBOX_LDR_FMT),elf)
|
---|
2355 | TEMPLATE_VBoxR0_TOOL = $(VBOX_GCC_TOOL)
|
---|
2356 | TEMPLATE_VBoxR0_CFLAGS = -nostdinc -g -pipe $(VBOX_GCC_WERR) $(VBOX_GCC_PEDANTIC_C) $(VBOX_GCC_Wno-variadic-macros) $(VBOX_GCC_R0_OPT) $(VBOX_GCC_R0_FP) -fno-strict-aliasing -fno-exceptions $(VBOX_GCC_fno-stack-protector) $(VBOX_GCC_fvisibility-hidden) -std=c99
|
---|
2357 | TEMPLATE_VBoxR0_CXXFLAGS = -nostdinc -g -pipe $(VBOX_GCC_WERR) $(VBOX_GCC_PEDANTIC_CXX) $(VBOX_GCC_Wno-variadic-macros) $(VBOX_GCC_R0_OPT) $(VBOX_GCC_R0_FP) -fno-strict-aliasing -fno-exceptions $(VBOX_GCC_fno-stack-protector) $(VBOX_GCC_fvisibility-inlines-hidden) $(VBOX_GCC_fvisibility-hidden) -fno-rtti
|
---|
2358 | TEMPLATE_VBoxR0_CFLAGS.amd64 = -m64 -mno-red-zone -mcmodel=kernel -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -fno-asynchronous-unwind-tables -ffreestanding
|
---|
2359 | TEMPLATE_VBoxR0_CXXFLAGS.amd64 = -m64 -mno-red-zone -mcmodel=kernel -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -fno-asynchronous-unwind-tables
|
---|
2360 | ifeq ($(KBUILD_TARGET),solaris)
|
---|
2361 | TEMPLATE_VBoxR0_LDFLAGS = -r
|
---|
2362 | else
|
---|
2363 | TEMPLATE_VBoxR0_LDFLAGS = -nostdlib -Bsymbolic
|
---|
2364 | # temporarily, must fix the loader.
|
---|
2365 | TEMPLATE_VBoxR0_LDFLAGS += $(if $(VBOX_DO_STRIP_MODULES),-S,)
|
---|
2366 | TEMPLATE_VBoxR0_LDFLAGS.release = $(if $(VBOX_DO_STRIP_MODULES),-S,)
|
---|
2367 | endif
|
---|
2368 | ifn1of ($(KBUILD_TARGET),solaris freebsd)
|
---|
2369 | TEMPLATE_VBoxR0_LIBS = \
|
---|
2370 | $(VBOX_GCC_LIBGCC) # instricts
|
---|
2371 | endif
|
---|
2372 | endif
|
---|
2373 |
|
---|
2374 | ifeq ($(VBOX_LDR_FMT),macho)
|
---|
2375 | TEMPLATE_VBoxR0_TOOL = GXX4MACHO
|
---|
2376 | TEMPLATE_VBoxR0_DEFS += $(VBOX_DARWIN_DEF_SDK_DEFS)
|
---|
2377 | TEMPLATE_VBoxR0_CXXFLAGS = $(VBOX_DARWIN_DEF_SDK_CXXFLAGS) -nostdinc -g -pipe $(VBOX_GCC_WERR) $(VBOX_GCC_PEDANTIC_CXX) $(VBOX_GCC_Wno-variadic-macros) \
|
---|
2378 | -fno-common -msoft-float -static -fno-rtti -fno-exceptions $(VBOX_GCC_R0_OPT) $(VBOX_GCC_R0_FP) -fno-strict-aliasing \
|
---|
2379 | -mno-sse -mno-mmx -mno-sse2 -mno-3dnow $(VBOX_GCC_fno-stack-protector)
|
---|
2380 | TEMPLATE_VBoxR0_CXXFLAGS.amd64 = -m64 -mno-red-zone -mno-sse3 -mno-sse4 -mno-sse4.1 -mno-sse4.2 -mno-sse4a -fno-unwind-tables
|
---|
2381 | TEMPLATE_VBoxR0_CXXFLAGS.x86 = -m32
|
---|
2382 | TEMPLATE_VBoxR0_CFLAGS = $(VBOX_DARWIN_DEF_SDK_CFLAGS) -nostdinc -g -pipe $(VBOX_GCC_WERR) $(VBOX_GCC_PEDANTIC_C) $(VBOX_GCC_Wno-variadic-macros) \
|
---|
2383 | -fno-common -msoft-float -static -fno-exceptions $(VBOX_GCC_R0_OPT) $(VBOX_GCC_R0_FP) -fno-strict-aliasing \
|
---|
2384 | -mno-sse -mno-mmx -mno-sse2 -mno-3dnow $(VBOX_GCC_fno-stack-protector)
|
---|
2385 | TEMPLATE_VBoxR0_CFLAGS.amd64 = -m64 -mno-red-zone -mno-sse3 -mno-sse4 -mno-sse4.1 -mno-sse4.2 -mno-sse4a -fno-unwind-tables
|
---|
2386 | TEMPLATE_VBoxR0_CFLAGS.x86 = -m32
|
---|
2387 | TEMPLATE_VBoxR0_LDFLAGS = $(VBOX_DARWIN_DEF_SDK_LDFLAGS) -nostdlib
|
---|
2388 | #TEMPLATE_VBoxR0_LDFLAGS.release = -Wl,-S ???
|
---|
2389 | TEMPLATE_VBoxR0_LDFLAGS.amd64 = -m64 -static
|
---|
2390 | TEMPLATE_VBoxR0_LDFLAGS.x86 = -m32
|
---|
2391 | endif
|
---|
2392 |
|
---|
2393 | ifeq ($(VBOX_LDR_FMT),lx)
|
---|
2394 | TEMPLATE_VBoxR0_TOOL = GXX3OMF
|
---|
2395 | TEMPLATE_VBoxR0_CFLAGS = -nostdinc -g -pipe $(VBOX_GCC_WERR) $(VBOX_GCC_PEDANTIC_C) $(VBOX_GCC_Wno-variadic-macros) $(VBOX_GCC_R0_OPT) $(VBOX_GCC_R0_FP) -fno-strict-aliasing -fno-exceptions
|
---|
2396 | TEMPLATE_VBoxR0_CXXFLAGS = -nostdinc -g -pipe $(VBOX_GCC_WERR) $(VBOX_GCC_PEDANTIC_CXX) $(VBOX_GCC_Wno-variadic-macros) $(VBOX_GCC_R0_OPT) $(VBOX_GCC_R0_FP) -fno-strict-aliasing -fno-exceptions -fno-rtti
|
---|
2397 | TEMPLATE_VBoxR0_LDFLAGS = -nostdlib -Zdll
|
---|
2398 | TEMPLATE_VBoxR0_LIBS = \
|
---|
2399 | $(VBOX_GCC_LIBGCC) \
|
---|
2400 | $(VBOX_OBJ_SYS0) \
|
---|
2401 | end
|
---|
2402 | endif
|
---|
2403 |
|
---|
2404 |
|
---|
2405 | #
|
---|
2406 | # Template for building SUPDRV R0 things.
|
---|
2407 | #
|
---|
2408 | TEMPLATE_VBOXR0DRV = VBox SUPDRV Ring 0
|
---|
2409 | TEMPLATE_VBOXR0DRV_ASTOOL = $(VBOX_ASTOOL)
|
---|
2410 | TEMPLATE_VBOXR0DRV_ASFLAGS = $(VBOX_ASFLAGS)
|
---|
2411 | TEMPLATE_VBOXR0DRV_DEFS = IN_RING0 IN_RT_R0 $(ARCH_BITS_DEFS)
|
---|
2412 |
|
---|
2413 | ifeq ($(KBUILD_TARGET),win)
|
---|
2414 | TEMPLATE_VBOXR0DRV_TOOL = $(VBOX_VCC_TOOL)
|
---|
2415 | TEMPLATE_VBOXR0DRV_RCDEFS = \
|
---|
2416 | VBOX_VERSION_MAJOR=\"$(VBOX_VERSION_MAJOR)\" \
|
---|
2417 | VBOX_VERSION_MINOR=\"$(VBOX_VERSION_MINOR)\" \
|
---|
2418 | VBOX_VERSION_BUILD=\"$(VBOX_VERSION_BUILD)\" \
|
---|
2419 | VBOX_SVN_REV=\"$(VBOX_SVN_REV)\" \
|
---|
2420 | VBOX_VERSION_MAJOR_NR=$(VBOX_VERSION_MAJOR) \
|
---|
2421 | VBOX_VERSION_MINOR_NR=$(VBOX_VERSION_MINOR) \
|
---|
2422 | VBOX_VERSION_BUILD_NR=$(VBOX_VERSION_BUILD) \
|
---|
2423 | VBOX_SVN_REV_NR=$(VBOX_SVN_REV)
|
---|
2424 | TEMPLATE_VBOXR0DRV_DEFS.x86 = _X86_
|
---|
2425 | TEMPLATE_VBOXR0DRV_DEFS.amd64 = _AMD64_
|
---|
2426 | ifdef VBOX_USE_VCC80
|
---|
2427 | TEMPLATE_VBOXR0DRV_CXXFLAGS = -Zi -Zl -GR- -EHs- -GF -Gz -W3 -GS- -wd4996 -Zc:wchar_t- $(VBOX_VCC_OPT) $(VBOX_VCC_FP)
|
---|
2428 | else
|
---|
2429 | TEMPLATE_VBOXR0DRV_CXXFLAGS = -Zi -Zl -GR- -EHs- -GF -Gz -W3 $(VBOX_VCC_OPT) $(VBOX_VCC_FP)
|
---|
2430 | endif
|
---|
2431 | TEMPLATE_VBOXR0DRV_CFLAGS = $(TEMPLATE_VBOXR0DRV_CXXFLAGS)
|
---|
2432 | TEMPLATE_VBOXR0DRV_LDFLAGS = -Driver -Subsystem:NATIVE -Incremental:NO -Align:64 -MapInfo:Exports -NoD -Debug
|
---|
2433 | TEMPLATE_VBOXR0DRV_POST_CMDS = $(VBOX_SIGN_DRIVER_CMDS)
|
---|
2434 | endif
|
---|
2435 |
|
---|
2436 | ifeq ($(KBUILD_TARGET),linux)
|
---|
2437 | TEMPLATE_VBOXR0DRV_TOOL = $(VBOX_GCC_TOOL)
|
---|
2438 | TEMPLATE_VBOXR0DRV_DEFS = __KERNEL__ MODULE IN_RING0 IN_RT_R0
|
---|
2439 | TEMPLATE_VBOXR0DRV_INCS = $(VBOX_LINUX_INCS)
|
---|
2440 | TEMPLATE_VBOXR0DRV_CFLAGS = -nostdinc -iwithprefix include $(VBOX_LINUX_INCLUDE) \
|
---|
2441 | $(VBOX_GCC_WARN) -Wstrict-prototypes $(VBOX_GCC_Wno-pointer-sign) -Wno-sign-compare \
|
---|
2442 | $(VBOX_GCC_fno-stack-protector) $(VBOX_GCC_R0_OPT) $(VBOX_GCC_R0_FP) -fno-strict-aliasing -fno-common
|
---|
2443 | TEMPLATE_VBOXR0DRV_CFLAGS.x86 = -mpreferred-stack-boundary=2 -msoft-float
|
---|
2444 | TEMPLATE_VBOXR0DRV_CFLAGS.amd64 = -m64 -mno-red-zone -mcmodel=kernel -mno-sse -mno-mmx -mno-sse2 -mno-3dnow \
|
---|
2445 | -fno-reorder-blocks -ffreestanding -fno-asynchronous-unwind-tables -funit-at-a-time \
|
---|
2446 | -Wno-sign-compare -Wdeclaration-after-statement
|
---|
2447 | TEMPLATE_VBOXR0DRV_CXXFLAGS = $(filter-out -Wstrict-prototypes -Wno-pointer-sign -ffreestanding -Wdeclaration-after-statement,$(TEMPLATE_VBOXR0DRV_CFLAGS) $(TEMPLATE_VBOXR0DRV_CFLAGS.$(KBUILD_TARGET_ARCH))) -fno-exceptions -fno-rtti
|
---|
2448 | ifndef VBOX_LINUX_VERSION_2_4
|
---|
2449 | # 2.6
|
---|
2450 | TEMPLATE_VBOXR0DRV_SYSSUFF = .ko
|
---|
2451 | TEMPLATE_VBOXR0DRV_LDFLAGS.x86 = -m elf_i386 -r
|
---|
2452 | TEMPLATE_VBOXR0DRV_LDFLAGS.amd64 = -m elf_x86_64 -r
|
---|
2453 | else
|
---|
2454 | # 2.4
|
---|
2455 | TEMPLATE_VBOXR0DRV_SYSSUFF = .o
|
---|
2456 | TEMPLATE_VBOXR0DRV_LDFLAGS = -r -s
|
---|
2457 | endif
|
---|
2458 | endif
|
---|
2459 |
|
---|
2460 | ifeq ($(KBUILD_TARGET),os2)
|
---|
2461 | TEMPLATE_VBOXR0DRV_TOOL = GXX3OMF
|
---|
2462 | TEMPLATE_VBOXR0DRV_CXXFLAGS = -g -pipe $(VBOX_GCC_PEDANTIC_CXX) $(VBOX_GCC_Wno-variadic-macros) $(VBOX_GCC_R0_OPT) $(VBOX_GCC_R0_FP) -fno-strict-aliasing -fno-exceptions -fno-rtti
|
---|
2463 | TEMPLATE_VBOXR0DRV_CFLAGS = -g -pipe $(VBOX_GCC_PEDANTIC_C) $(VBOX_GCC_Wno-variadic-macros) $(VBOX_GCC_R0_OPT) $(VBOX_GCC_R0_FP) -fno-strict-aliasing -fno-exceptions
|
---|
2464 | TEMPLATE_VBOXR0DRV_LIBS = $(VBOX_GCC_LIBGCC)
|
---|
2465 | # wlink thinks physdevice doesn't need fixups and should have a stack - stupid!
|
---|
2466 | TEMPLATE_VBOXR0DRV_LDFLAGS = -Zlinker Option -Zlinker internalrelocs, -Zlinker togglerelocs
|
---|
2467 | endif
|
---|
2468 |
|
---|
2469 | ifeq ($(KBUILD_TARGET),darwin)
|
---|
2470 | TEMPLATE_VBOXR0DRV_TOOL = GXX4MACHO
|
---|
2471 | TEMPLATE_VBOXR0DRV_DEFS += $(VBOX_DARWIN_DEF_SDK_DEFS) KERNEL KERNEL_PRIVATE DRIVER_PRIVATE APPLE NeXT RT_USE_VISIBILITY_HIDDEN
|
---|
2472 | TEMPLATE_VBOXR0DRV_INCS += $(VBOX_PATH_MACOSX_SDK)/System/Library/Frameworks/Kernel.framework/Headers
|
---|
2473 | ## @todo try use VBOX_GCC_PEDANTIC_CXX
|
---|
2474 | TEMPLATE_VBOXR0DRV_CXXFLAGS = $(VBOX_DARWIN_DEF_SDK_CXXFLAGS) \
|
---|
2475 | -g -pipe $(VBOX_GCC_WARN) -Wno-long-long -fno-common -nostdinc -fno-builtin -finline \
|
---|
2476 | -fno-keep-inline-functions -fno-exceptions -msoft-float \
|
---|
2477 | -fapple-kext -fno-rtti -fcheck-new -force_cpusubtype_ALL \
|
---|
2478 | $(VBOX_GCC_R0_OPT) $(VBOX_GCC_R0_FP) -fno-strict-aliasing -fasm-blocks
|
---|
2479 | TEMPLATE_VBOXR0DRV_CXXFLAGS.amd64 = -m64 -mkernel -mno-red-zone -gdwarf-2
|
---|
2480 | TEMPLATE_VBOXR0DRV_CXXFLAGS.x86 = -m32 -static
|
---|
2481 | TEMPLATE_VBOXR0DRV_CFLAGS = $(VBOX_DARWIN_DEF_SDK_CFLAGS) \
|
---|
2482 | -g -pipe $(VBOX_GCC_WARN) -Wno-long-long -fno-common -nostdinc -fno-builtin -finline \
|
---|
2483 | -fno-keep-inline-functions -fno-exceptions -msoft-float \
|
---|
2484 | -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations -force_cpusubtype_ALL \
|
---|
2485 | $(VBOX_GCC_R0_OPT) $(VBOX_GCC_R0_FP) -fno-strict-aliasing -fasm-blocks
|
---|
2486 | TEMPLATE_VBOXR0DRV_CFLAGS.amd64 = -m64 -mkernel -mno-red-zone -gdwarf-2
|
---|
2487 | TEMPLATE_VBOXR0DRV_CFLAGS.x86 = -m32 -static
|
---|
2488 | TEMPLATE_VBOXR0DRV_LDFLAGS = $(filter-out $(VBOX_DARWIN_NO_COMPACT_LINKEDIT),$(VBOX_DARWIN_DEF_SDK_LDFLAGS)) -static -nostdlib -r -Wl,-Y,1455 -keep_private_extern
|
---|
2489 | TEMPLATE_VBOXR0DRV_LDFLAGS.amd64 = -m64 -Xlinker -kext
|
---|
2490 | TEMPLATE_VBOXR0DRV_LDFLAGS.x86 = -m32
|
---|
2491 | TEMPLATE_VBOXR0DRV_LIBS = kmodc++ kmod cc_kext cpp_kext $(VBOX_GCC_LIBGCC)
|
---|
2492 |
|
---|
2493 | TEMPLATE_VBOXR0DRVOSX105 = Mac OS X 10.5 variant.
|
---|
2494 | TEMPLATE_VBOXR0DRVOSX105_EXTENDS = VBOXR0DRV
|
---|
2495 | TEMPLATE_VBOXR0DRVOSX105_DEFS = $(subst $(VBOX_DARWIN_DEF_SDK_DEFS),$(VBOX_DARWIN_DEF_SDK_10_5_DEFS),$(TEMPLATE_VBOXR0DRV_DEFS))
|
---|
2496 | TEMPLATE_VBOXR0DRVOSX105_INCS = $(subst $(VBOX_PATH_MACOSX_SDK),$(VBOX_PATH_MACOSX_SDK_10_5),$(TEMPLATE_VBOXR0DRV_INCS))
|
---|
2497 | TEMPLATE_VBOXR0DRVOSX105_CFLAGS = $(subst $(VBOX_DARWIN_DEF_SDK_CFLAGS),$(VBOX_DARWIN_DEF_SDK_10_5_CFLAGS),$(TEMPLATE_VBOXR0DRV_CFLAGS))
|
---|
2498 | TEMPLATE_VBOXR0DRVOSX105_CXXFLAGS = $(subst $(VBOX_DARWIN_DEF_SDK_CXXFLAGS),$(VBOX_DARWIN_DEF_SDK_10_5_CXXFLAGS),$(TEMPLATE_VBOXR0DRV_CXXFLAGS))
|
---|
2499 | TEMPLATE_VBOXR0DRVOSX105_LDFLAGS = $(subst $(VBOX_DARWIN_DEF_SDK_LDFLAGS),$(VBOX_DARWIN_DEF_SDK_10_5_LDFLAGS),$(TEMPLATE_VBOXR0DRV_LDFLAGS))
|
---|
2500 | endif
|
---|
2501 |
|
---|
2502 | ifeq ($(KBUILD_TARGET),solaris)
|
---|
2503 | ## The Solaris /usr/platform/i86pc/include and /usr/include directories.
|
---|
2504 | VBOX_SOLARIS_SYS_INCS ?= /usr/platform/i86pc/include /usr/include
|
---|
2505 |
|
---|
2506 | TEMPLATE_VBOXR0DRV_TOOL = $(VBOX_GCC_TOOL)
|
---|
2507 | TEMPLATE_VBOXR0DRV_DEFS = _MACHDEP _KERNEL _STRICT_STDC IN_RING0 IN_RT_R0
|
---|
2508 | TEMPLATE_VBOXR0DRV_INCS = $(VBOX_SOLARIS_SYS_INCS)
|
---|
2509 | TEMPLATE_VBOXR0DRV_LDFLAGS = -r -dy
|
---|
2510 | TEMPLATE_VBOXR0DRV_LDFLAGS.amd64 = -64
|
---|
2511 | # Exclude -Wall because of solaris headers' pragma ident warnings that gcc refuses to supress.
|
---|
2512 | TEMPLATE_VBOXR0DRV_CFLAGS = -Wpointer-arith -Winline $(VBOX_GCC_Wno-pointer-sign) \
|
---|
2513 | -Wmissing-prototypes -Wstrict-prototypes -Wnested-externs \
|
---|
2514 | -Wshadow -Wuninitialized -Wunused-function -Wunused-label -Wunused-value -Wunused-variable \
|
---|
2515 | -Wformat -Wimplicit-int -Wimplicit-function-declaration -Wparentheses \
|
---|
2516 | -O2 -fno-omit-frame-pointer -ffreestanding -nodefaultlibs -fno-strict-aliasing -fno-common -std=c99
|
---|
2517 | TEMPLATE_VBOXR0DRV_CFLAGS.x86 = -m32 -mno-sse -mno-mmx -mno-sse2 -mno-3dnow
|
---|
2518 | TEMPLATE_VBOXR0DRV_CFLAGS.amd64 = -m64 -mno-sse -mno-mmx -mno-sse2 -mno-3dnow $(if $(VBOX_SOLARIS_10),,-msave-args) -mno-red-zone -mcmodel=kernel \
|
---|
2519 | -fno-reorder-blocks -fno-asynchronous-unwind-tables -funit-at-a-time
|
---|
2520 | TEMPLATE_VBOXR0DRV_CXXFLAGS = -Wpointer-arith -Winline $(VBOX_GCC_Wno-pointer-sign) \
|
---|
2521 | -Wshadow -Wuninitialized -Wunused-function -Wunused-label -Wunused-value -Wunused-variable \
|
---|
2522 | -Wformat \
|
---|
2523 | -O2 -nodefaultlibs -fno-omit-frame-pointer -fno-strict-aliasing -fno-common -fno-exceptions -fno-rtti
|
---|
2524 | TEMPLATE_VBOXR0DRV_CXXFLAGS.x86 = $(TEMPLATE_VBOXR0DRV_CFLAGS.x86)
|
---|
2525 | TEMPLATE_VBOXR0DRV_CXXFLAGS.amd64 = $(TEMPLATE_VBOXR0DRV_CFLAGS.amd64)
|
---|
2526 | endif # Solaris
|
---|
2527 |
|
---|
2528 | ifeq ($(KBUILD_TARGET),freebsd)
|
---|
2529 | # x86 FreeBSD (6.2 or something):
|
---|
2530 | # cc -O2 -fno-strict-aliasing -pipe -Werror -D_KERNEL -DKLD_MODULE \
|
---|
2531 | # -nostdinc -I- -I. -I@ -I@/contrib/altq -I@/../include -I/usr/include \
|
---|
2532 | # -finline-limit=8000 -fno-common -mno-align-long-strings -mpreferred-stack-boundary=2 \
|
---|
2533 | # -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -ffreestanding -Wall -Wredundant-decls -Wnested-externs \
|
---|
2534 | # -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -fformat-extensions \
|
---|
2535 | # -std=c99 -c ../my.c
|
---|
2536 | # ld -d -warn-common -r -d -o my.kld my.o
|
---|
2537 | # :> export_syms
|
---|
2538 | # awk -f /usr/src/sys/modules/my/../../conf/kmod_syms.awk my.kld export_syms | xargs -J% objcopy % my.kld
|
---|
2539 | # ld -Bsharable -d warn-commnon -o my.ko my.kld
|
---|
2540 | #
|
---|
2541 | # AMD64 FreeBSD (7.1):
|
---|
2542 | # cc -O2 -fno-strict-aliasing -pipe -D_KERNEL -DKLD_MODULE -std=c99 -nostdinc -I. -I@ -I@/contrib/altq \
|
---|
2543 | # -finline-limit=8000 --param inline-unit-growth=100 --param large-function-growth=1000 -fno-common \
|
---|
2544 | # -fno-omit-frame-pointer -mcmodel=kernel -mno-red-zone -mfpmath=387 -mno-sse -mno-sse2 -mno-mmx \
|
---|
2545 | # -mno-3dnow -msoft-float -fno-asynchronous-unwind-tables -ffreestanding \
|
---|
2546 | # -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef -Wno-pointer-sign \
|
---|
2547 | # -fformat-extensions -c /usr/src/sys/modules/my/../../dev/my/if_my.c
|
---|
2548 | # ld -d -warn-common -r -d -o if_my.ko if_my.o
|
---|
2549 | # :> export_syms
|
---|
2550 | # awk -f /usr/src/sys/modules/my/../../conf/kmod_syms.awk if_my.ko export_syms | xargs -J% objcopy % if_my.ko
|
---|
2551 |
|
---|
2552 | # Note: @ -> /usr/src/sys and machine -> /usr/src/sys/i386/include
|
---|
2553 |
|
---|
2554 | ## The location of the FreeBSD kernel source.
|
---|
2555 | VBOX_FREEBSD_SRC ?= /usr/src/sys
|
---|
2556 | ## The FreeBSD /usr/include.
|
---|
2557 | VBOX_FREEBSD_SYS_INCS ?= /usr/include
|
---|
2558 |
|
---|
2559 | TEMPLATE_VBOXR0DRV_TOOL = $(VBOX_GCC_TOOL)
|
---|
2560 | TEMPLATE_VBOXR0DRV_LDTOOL = FREEBSDKMODLD
|
---|
2561 | TEMPLATE_VBOXR0DRV_DEFS = _KERNEL KLD_MODULE IN_RING0 IN_RT_R0
|
---|
2562 | TEMPLATE_VBOXR0DRV_INCS = \
|
---|
2563 | $(VBOX_FREEBSD_SRC) \
|
---|
2564 | $(VBOX_FREEBSD_SRC)/contrib/altq \
|
---|
2565 | $(VBOX_FREEBSD_SRC)/../include \
|
---|
2566 | $(VBOX_FREEBSD_SYS_INCS)
|
---|
2567 | # omitting: -Wcast-qual, -Wredundant-decls
|
---|
2568 | TEMPLATE_VBOXR0DRV_CFLAGS = \
|
---|
2569 | $(VBOX_GCC_WARN) -Wpointer-arith -Winline $(VBOX_GCC_Wno-pointer-sign) \
|
---|
2570 | -Wstrict-prototypes -Wmissing-prototypes -Wstrict-prototypes -Wnested-externs \
|
---|
2571 | -O2 -fformat-extensions -ffreestanding -fno-strict-aliasing -fno-common -finline-limit=8000 \
|
---|
2572 | $(VBOX_GCC_fno-stack-protector) $(VBOX_GCC_R0_OPT) $(VBOX_GCC_R0_FP) \
|
---|
2573 | -nostdinc -std=c99
|
---|
2574 | TEMPLATE_VBOXR0DRV_CFLAGS.x86 = -m32 -mno-align-long-strings -mpreferred-stack-boundary=2 -mno-mmx -mno-3dnow -mno-sse -mno-sse2
|
---|
2575 | TEMPLATE_VBOXR0DRV_CFLAGS.amd64 = -m64 --param inline-unit-growth=100 --param large-function-growth=1000 \
|
---|
2576 | -fno-omit-frame-pointer -mcmodel=kernel -mno-red-zone -mfpmath=387 -mno-sse -mno-sse2 -mno-mmx \
|
---|
2577 | -mno-3dnow -msoft-float -fno-asynchronous-unwind-tables -Wundef
|
---|
2578 | TEMPLATE_VBOXR0DRV_CXXFLAGS = -fno-exceptions -fno-rtti \
|
---|
2579 | $(VBOX_GCC_WARN) -Wpointer-arith -Winline \
|
---|
2580 | -O2 -fno-format-extensions -fno-strict-aliasing -fno-common -finline-limit=8000 \
|
---|
2581 | $(VBOX_GCC_fno-stack-protector) $(VBOX_GCC_R0_OPT) $(VBOX_GCC_R0_FP) \
|
---|
2582 | -nostdinc
|
---|
2583 | TEMPLATE_VBOXR0DRV_CXXFLAGS.x86 = $(TEMPLATE_VBOXR0DRV_CFLAGS.x86)
|
---|
2584 | TEMPLATE_VBOXR0DRV_CXXFLAGS.amd64 = $(TEMPLATE_VBOXR0DRV_CFLAGS.amd64)
|
---|
2585 | TEMPLATE_VBOXR0DRV_SYSSUFF = .ko
|
---|
2586 | TEMPLATE_VBOXR0DRV_LDFLAGS = -d --warn-common
|
---|
2587 | TEMPLATE_VBOXR0DRV_LDFLAGS.x86 = -m elf_i386_fbsd
|
---|
2588 | TEMPLATE_VBOXR0DRV_LDFLAGS.amd64 = -m elf_x86_64_fbsd
|
---|
2589 |
|
---|
2590 | TOOL_FREEBSDKMODLD = FreeBSD kernel module linker.
|
---|
2591 | # See kBuild/tools/GCC3.kmk for docs.
|
---|
2592 | TOOL_FREEBSDKMODLD_LINK_SYSMOD_OUTPUT_MAYBE = $(outbase).map
|
---|
2593 | TOOL_FREEBSDKMODLD_LINK_SYSMOD_DEPEND = $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib)))
|
---|
2594 | TOOL_FREEBSDKMODLD_LINK_SYSMOD_DEPORD =
|
---|
2595 | ifeq ($(KBUILD_TARGET_ARCH),amd64)
|
---|
2596 | TOOL_FREEBSDKMODLD_LINK_SYSMOD_OUTPUT =
|
---|
2597 | define TOOL_FREEBSDKMODLD_LINK_SYSMOD_CMDS
|
---|
2598 | # Link intermediate .kld (a relocatable object).
|
---|
2599 | ld $(flags) -r -o $(out) $(objs) \
|
---|
2600 | $(foreach p,$(libpath), -L$(p))\
|
---|
2601 | $(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(basename $(lib))), $(lib)))
|
---|
2602 | # Strip non-exported symbols private and localize the exported ones.
|
---|
2603 | awk -f $(VBOX_FREEBSD_SRC)/conf/kmod_syms.awk $(out) $(if $(othersrc), $(othersrc),/dev/null) \
|
---|
2604 | | xargs -J% objcopy % $(out)
|
---|
2605 |
|
---|
2606 | ## Strip debug info (comment out if debugging or something).
|
---|
2607 | objcopy --strip-debug $(out)
|
---|
2608 | endef
|
---|
2609 | else # x86
|
---|
2610 | TOOL_FREEBSDKMODLD_LINK_SYSMOD_OUTPUT = $(outbase).kld
|
---|
2611 | define TOOL_FREEBSDKMODLD_LINK_SYSMOD_CMDS
|
---|
2612 | # Link intermediate .kld (a relocatable object).
|
---|
2613 | ld $(flags) -r -o $(outbase).kld $(objs) \
|
---|
2614 | $(foreach p,$(libpath), -L$(p))\
|
---|
2615 | $(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(basename $(lib))), $(lib)))
|
---|
2616 | # Strip non-exported symbols private and localize the exported ones.
|
---|
2617 | awk -f $(VBOX_FREEBSD_SRC)/conf/kmod_syms.awk $(outbase).kld $(if $(othersrc), $(othersrc),/dev/null) \
|
---|
2618 | | xargs -J% objcopy % $(outbase).kld
|
---|
2619 |
|
---|
2620 | # Link the final .ko (a shared object).
|
---|
2621 | ld $(flags) -Bshareable -o $(out) $(outbase).kld
|
---|
2622 | endef
|
---|
2623 | endif # x86
|
---|
2624 |
|
---|
2625 | endif # FreeBSD
|
---|
2626 |
|
---|
2627 | ifdef VBOX_WITH_VBOXDRV
|
---|
2628 | ifndef TEMPLATE_VBOXR0DRV_TOOL
|
---|
2629 | $(warning Warning: VBox Build: Target $(KBUILD_HOST) is not officially supported!)
|
---|
2630 | endif
|
---|
2631 | endif
|
---|
2632 |
|
---|
2633 |
|
---|
2634 |
|
---|
2635 | #
|
---|
2636 | # Template for building R3 executables and static libraries which are linked into executables.
|
---|
2637 | # Note! This is the base template for a whole lot of other ones, so be careful when changing it.
|
---|
2638 | #
|
---|
2639 | TEMPLATE_VBOXR3EXE = VBox Ring 3 Exe
|
---|
2640 | TEMPLATE_VBOXR3EXE_ASTOOL = $(VBOX_ASTOOL)
|
---|
2641 | TEMPLATE_VBOXR3EXE_ASFLAGS = $(VBOX_ASFLAGS)
|
---|
2642 | TEMPLATE_VBOXR3EXE_DEFS = IN_RING3 $(ARCH_BITS_DEFS)
|
---|
2643 | TEMPLATE_VBOXR3EXE_LIBS.kprofile = $(LIB_KPROFILE)
|
---|
2644 | ifeq ($(KBUILD_TARGET),win)
|
---|
2645 | TEMPLATE_VBOXR3EXE_TOOL = $(VBOX_VCC_TOOL)
|
---|
2646 | TEMPLATE_VBOXR3EXE_RCDEFS = \
|
---|
2647 | VBOX_VERSION_MAJOR=\"$(VBOX_VERSION_MAJOR)\" \
|
---|
2648 | VBOX_VERSION_MINOR=\"$(VBOX_VERSION_MINOR)\" \
|
---|
2649 | VBOX_VERSION_BUILD=\"$(VBOX_VERSION_BUILD)\" \
|
---|
2650 | VBOX_SVN_REV=\"$(VBOX_SVN_REV)\" \
|
---|
2651 | VBOX_VERSION_MAJOR_NR=$(VBOX_VERSION_MAJOR) \
|
---|
2652 | VBOX_VERSION_MINOR_NR=$(VBOX_VERSION_MINOR) \
|
---|
2653 | VBOX_VERSION_BUILD_NR=$(VBOX_VERSION_BUILD) \
|
---|
2654 | VBOX_SVN_REV_NR=$(VBOX_SVN_REV)
|
---|
2655 | TEMPLATE_VBOXR3EXE_SDKS = WINPSDK
|
---|
2656 | ifdef VBOX_USE_VCC80
|
---|
2657 | TEMPLATE_VBOXR3EXE_CXXFLAGS = -Zi -Zl -GR- -EHsc -GF -MD$(VBOX_VCC_CRT_TYPE) -W3 -wd4065 -wd4244 -wd4996 -Zc:wchar_t- $(VBOX_VCC_OPT) $(VBOX_VCC_FP)
|
---|
2658 | TEMPLATE_VBOXR3EXE_CXXFLAGS.debug = -RTCsu
|
---|
2659 | else
|
---|
2660 | TEMPLATE_VBOXR3EXE_CXXFLAGS = -Zi -Zl -GR- -EHsc -GF -MD$(VBOX_VCC_CRT_TYPE) -W3 -wd4065 -wd4244 $(VBOX_VCC_OPT) $(VBOX_VCC_FP)
|
---|
2661 | TEMPLATE_VBOXR3EXE_CXXFLAGS.debug = -GZ
|
---|
2662 | endif
|
---|
2663 | TEMPLATE_VBOXR3EXE_CXXFLAGS.kprofile = -Gh -GH
|
---|
2664 | TEMPLATE_VBOXR3EXE_CFLAGS = $(TEMPLATE_VBOXR3EXE_CXXFLAGS)
|
---|
2665 | TEMPLATE_VBOXR3EXE_CFLAGS.debug = $(TEMPLATE_VBOXR3EXE_CXXFLAGS.debug)
|
---|
2666 | TEMPLATE_VBOXR3EXE_CFLAGS.kprofile = $(TEMPLATE_VBOXR3EXE_CXXFLAGS.kprofile)
|
---|
2667 | TEMPLATE_VBOXR3EXE_LDFLAGS = \
|
---|
2668 | /NOD /INCREMENTAL:NO /MAPINFO:EXPORTS /LARGEADDRESSAWARE /DEBUG \
|
---|
2669 | /DISALLOWLIB:libc.lib \
|
---|
2670 | /DISALLOWLIB:libcd.lib \
|
---|
2671 | /DISALLOWLIB:libcmt.lib \
|
---|
2672 | /DISALLOWLIB:libcmtd.lib \
|
---|
2673 | /DISALLOWLIB:msvcrt$(VBOX_VCC_CRT_TYPE_N).lib \
|
---|
2674 | /DISALLOWLIB:msvcprt$(VBOX_VCC_CRT_TYPE_N).lib
|
---|
2675 | TEMPLATE_VBOXR3EXE_LIBS = \
|
---|
2676 | $(PATH_TOOL_$(VBOX_VCC_TOOL)_LIB)/msvcrt$(VBOX_VCC_CRT_TYPE).lib \
|
---|
2677 | $(PATH_TOOL_$(VBOX_VCC_TOOL)_LIB)/msvcprt$(VBOX_VCC_CRT_TYPE).lib \
|
---|
2678 | $(PATH_TOOL_$(VBOX_VCC_TOOL)_LIB)/oldnames.lib
|
---|
2679 | TEMPLATE_VBOXR3EXE_POST_CMDS = $(VBOX_SIGN_IMAGE_CMDS)
|
---|
2680 |
|
---|
2681 | else # the gcc guys
|
---|
2682 | TEMPLATE_VBOXR3EXE_TOOL = $(VBOX_GCC_TOOL)
|
---|
2683 | TEMPLATE_VBOXR3EXE_CXXFLAGS = -g -pipe $(VBOX_GCC_PEDANTIC_CXX) $(VBOX_GCC_Wno-variadic-macros) $(VBOX_GCC_OPT) $(VBOX_GCC_FP) -fno-strict-aliasing $(VBOX_GCC_fvisibility-hidden) $(VBOX_GCC_fvisibility-inlines-hidden)
|
---|
2684 | TEMPLATE_VBOXR3EXE_CXXFLAGS.x86 = -m32
|
---|
2685 | TEMPLATE_VBOXR3EXE_CXXFLAGS.amd64 = -m64
|
---|
2686 | # L4 currently can't handle exception handling.
|
---|
2687 | TEMPLATE_VBOXR3EXE_CXXFLAGS.l4 = -fno-exceptions -nostdinc \
|
---|
2688 | $(addprefix -I,$(VBOX_PATH_GCC_INCS) $(L4_INCDIR) $(FILE_TOOL_GPP3_INCDIR)) \
|
---|
2689 | $(DEBUG_L4)
|
---|
2690 | TEMPLATE_VBOXR3EXE_CXXFLAGS.kprofile = -finstrument-functions
|
---|
2691 | TEMPLATE_VBOXR3EXE_CFLAGS = -g -pipe $(VBOX_GCC_PEDANTIC_C) $(VBOX_GCC_Wno-variadic-macros) $(VBOX_GCC_OPT) $(VBOX_GCC_FP) -fno-strict-aliasing $(VBOX_GCC_fvisibility-hidden)
|
---|
2692 | TEMPLATE_VBOXR3EXE_CFLAGS.x86 = $(TEMPLATE_VBOXR3EXE_CXXFLAGS.x86)
|
---|
2693 | TEMPLATE_VBOXR3EXE_CFLAGS.amd64 = $(TEMPLATE_VBOXR3EXE_CXXFLAGS.amd64)
|
---|
2694 | TEMPLATE_VBOXR3EXE_CFLAGS.debug = $(TEMPLATE_VBOXR3EXE_CXXFLAGS.debug)
|
---|
2695 | TEMPLATE_VBOXR3EXE_CFLAGS.kprofile = $(TEMPLATE_VBOXR3EXE_CXXFLAGS.kprofile)
|
---|
2696 | TEMPLATE_VBOXR3EXE_CFLAGS.l4 = -nostdinc \
|
---|
2697 | $(addprefix -I,$(VBOX_PATH_GCC_INCS) $(L4_INCDIR)) $(DEBUG_L4)
|
---|
2698 | TEMPLATE_VBOXR3EXE_DEFS.l4 = L4_THREAD_SAFE
|
---|
2699 | TEMPLATE_VBOXR3EXE_LDFLAGS.x86 = -m32
|
---|
2700 | TEMPLATE_VBOXR3EXE_LDFLAGS.amd64 = -m64
|
---|
2701 | TEMPLATE_VBOXR3EXE_LDFLAGS.l4 = \
|
---|
2702 | $(L4_LIBDIR)/../crt0.o \
|
---|
2703 | -T$(L4_LIBDIR)/../main_dyn.ld -nostdlib \
|
---|
2704 | -Wl,--export-dynamic,--dynamic-linker=libld-l4.s.so \
|
---|
2705 | -Wl,--rpath-link,$(L4_LIBDIR)
|
---|
2706 | TEMPLATE_VBOXR3EXE_LDFLAGS.linux = -Wl,-z,noexecstack $(VBOX_LD_as_needed)
|
---|
2707 | ifeq ($(KBUILD_TARGET),linux)
|
---|
2708 | TEMPLATE_VBOXR3EXE_LIBS = pthread m rt dl
|
---|
2709 | else ifeq ($(KBUILD_TARGET),l4)
|
---|
2710 | TEMPLATE_VBOXR3EXE_LIBS = \
|
---|
2711 | $(L4_LIBDIR)/libvboxserver.s.so \
|
---|
2712 | $(L4_LIBDIR)/libuc++.0.s.so \
|
---|
2713 | supc++ gcc_eh gcc \
|
---|
2714 | $(L4_LIBDIR)/libdl.s.so \
|
---|
2715 | $(L4_LIBDIR)/libuc.0.s.so
|
---|
2716 | else ifeq ($(KBUILD_TARGET),os2)
|
---|
2717 | TEMPLATE_VBOXR3EXE_TOOL = GXX3OMF
|
---|
2718 | TEMPLATE_VBOXR3EXE_LIBS = socket iconv
|
---|
2719 | else ifeq ($(KBUILD_TARGET),darwin)
|
---|
2720 | TEMPLATE_VBOXR3EXE_TOOL = GXX4MACHO
|
---|
2721 | TEMPLATE_VBOXR3EXE_LIBS =
|
---|
2722 | TEMPLATE_VBOXR3EXE_DEFS.darwin = $(VBOX_DARWIN_DEF_SDK_DEFS)
|
---|
2723 | TEMPLATE_VBOXR3EXE_CFLAGS.darwin = $(VBOX_DARWIN_DEF_SDK_CFLAGS) -fno-common
|
---|
2724 | TEMPLATE_VBOXR3EXE_CXXFLAGS.darwin = $(VBOX_DARWIN_DEF_SDK_CXXFLAGS)
|
---|
2725 | TEMPLATE_VBOXR3EXE_OBJCFLAGS.darwin = $(VBOX_DARWIN_DEF_SDK_OBJCFLAGS)
|
---|
2726 | TEMPLATE_VBOXR3EXE_LDFLAGS.darwin = $(VBOX_DARWIN_DEF_SDK_LDFLAGS)
|
---|
2727 | TEMPLATE_VBOXR3EXE_LDFLAGS.darwin.x86 = -read_only_relocs suppress
|
---|
2728 | else if1of ($(KBUILD_TARGET), freebsd netbsd openbsd)
|
---|
2729 | TEMPLATE_VBOXR3EXE_TOOL = GXX3
|
---|
2730 | TEMPLATE_VBOXR3EXE_LIBS = pthread
|
---|
2731 | TEMPLATE_VBOXR3EXE_INCS += \
|
---|
2732 | /usr/include \
|
---|
2733 | /usr/X11R6/include \
|
---|
2734 | /usr/local/include
|
---|
2735 | TEMPLATE_VBOXR3EXE_LIBPATH += \
|
---|
2736 | /usr/lib \
|
---|
2737 | /usr/X11R6/lib \
|
---|
2738 | /usr/local/lib
|
---|
2739 | else ifeq ($(KBUILD_TARGET),solaris)
|
---|
2740 | TEMPLATE_VBOXR3EXE_TOOL = GXX3PLAIN
|
---|
2741 | TEMPLATE_VBOXR3EXE_DEFS += LIBICONV_PLUG _REENTRANT # Avoid the GNU libiconv, for now at least.
|
---|
2742 | TEMPLATE_VBOXR3EXE_LIBS = rt socket
|
---|
2743 | else
|
---|
2744 | $(warning Warning: VBOX Build: Target $(KBUILD_TARGET) is not officially supported!)
|
---|
2745 | TEMPLATE_VBOXR3EXE_CXXFLAGS.profile = $(TEMPLATE_VBOXR3EXE_CXXFLAGS.release)
|
---|
2746 | TEMPLATE_VBOXR3EXE_CXXFLAGS.kprofile = $(TEMPLATE_VBOXR3EXE_CXXFLAGS.krelease)
|
---|
2747 | endif
|
---|
2748 | ifdef VBOX_WITH_RUNPATH
|
---|
2749 | TEMPLATE_VBOXR3EXE_LDFLAGS += '$(VBOX_GCC_RPATH_OPT)$(VBOX_WITH_RUNPATH)'
|
---|
2750 | else ifdef VBOX_WITH_RELATIVE_RUNPATH
|
---|
2751 | TEMPLATE_VBOXR3EXE_LDFLAGS += '$(VBOX_GCC_RPATH_OPT)$(VBOX_WITH_RELATIVE_RUNPATH)'
|
---|
2752 | endif
|
---|
2753 | ifdef VBOX_WITH_ORIGIN
|
---|
2754 | TEMPLATE_VBOXR3EXE_LDFLAGS.linux += $(VBOX_GCC_ORIGIN_OPT)
|
---|
2755 | endif
|
---|
2756 | endif
|
---|
2757 |
|
---|
2758 | #
|
---|
2759 | # Template for building R3 shared objects / DLLs.
|
---|
2760 | # This is mostly identical to the VBOXR3EXE template. (Avoid PIC if possible!)
|
---|
2761 | # -
|
---|
2762 | TEMPLATE_VBOXR3 = VBox Ring 3 SO/DLLs
|
---|
2763 | TEMPLATE_VBOXR3_EXTENDS = VBOXR3EXE
|
---|
2764 | TEMPLATE_VBOXR3_LDFLAGS.l4 = $(L4_LIBDIR)/../crt0.s.o -T$(L4_LIBDIR)/../main_rel.ld -nostdlib
|
---|
2765 | TEMPLATE_VBOXR3_DEFS.l4 = $(TEMPLATE_VBOXR3EXE_DEFS.l4) __PIC__
|
---|
2766 | TEMPLATE_VBOXR3_DEFS.darwin = $(TEMPLATE_VBOXR3EXE_DEFS.darwin) PIC
|
---|
2767 | TEMPLATE_VBOXR3_LDFLAGS.darwin = $(TEMPLATE_VBOXR3EXE_LDFLAGS.darwin) \
|
---|
2768 | -current_version $(VBOX_VERSION_MAJOR).$(VBOX_VERSION_MINOR).$(VBOX_VERSION_BUILD) \
|
---|
2769 | -compatibility_version $(VBOX_VERSION_MAJOR).$(VBOX_VERSION_MINOR).$(VBOX_VERSION_BUILD)
|
---|
2770 | ifeq ($(filter-out solaris.x86 %.amd64,$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH)),)
|
---|
2771 | ifn1of ($(KBUILD_TARGET), darwin win)
|
---|
2772 | TEMPLATE_VBOXR3_DEFS = $(TEMPLATE_VBOXR3EXE_DEFS) PIC
|
---|
2773 | TEMPLATE_VBOXR3_CFLAGS = $(TEMPLATE_VBOXR3EXE_CFLAGS) -fPIC
|
---|
2774 | TEMPLATE_VBOXR3_CXXFLAGS = $(TEMPLATE_VBOXR3EXE_CXXFLAGS) -fPIC
|
---|
2775 | TEMPLATE_VBOXR3_LDFLAGS = $(TEMPLATE_VBOXR3EXE_LDFLAGS) -fPIC
|
---|
2776 | endif
|
---|
2777 | endif
|
---|
2778 |
|
---|
2779 | #
|
---|
2780 | # Temporary: Renaming the template and warnings will be errors (soon).
|
---|
2781 | #
|
---|
2782 | TEMPLATE_VBoxR3Dll += VBox ring-3 SO/DLLs, no warnings
|
---|
2783 | TEMPLATE_VBoxR3Dll_EXTENDS += VBOXR3
|
---|
2784 | TEMPLATE_VBoxR3Dll_EXTENDS_BY += appending
|
---|
2785 | ifeq ($(KBUILD_TARGET),win)
|
---|
2786 | TEMPLATE_VBoxR3Dll_CFLAGS += $(VBOX_VCC_WERR)
|
---|
2787 | TEMPLATE_VBoxR3Dll_CXXFLAGS += $(VBOX_VCC_WERR)
|
---|
2788 | TEMPLATE_VBoxR3Dll_LDFLAGS += $(VBOX_VCC_LD_WERR)
|
---|
2789 | else
|
---|
2790 | TEMPLATE_VBoxR3Dll_CFLAGS += $(VBOX_GCC_WERR)
|
---|
2791 | TEMPLATE_VBoxR3Dll_CXXFLAGS += $(VBOX_GCC_WERR)
|
---|
2792 | endif
|
---|
2793 |
|
---|
2794 | #
|
---|
2795 | # Template for building static R3 executables and any static
|
---|
2796 | # libraries they link with.
|
---|
2797 | #
|
---|
2798 | TEMPLATE_VBOXR3STATIC = VBox Static Ring 3 EXE
|
---|
2799 | TEMPLATE_VBOXR3STATIC_EXTENDS = VBOXR3EXE
|
---|
2800 | ifeq ($(KBUILD_TARGET),win)
|
---|
2801 | TEMPLATE_VBOXR3STATIC_CFLAGS = $(filter-out -MD$(VBOX_VCC_CRT_TYPE), $(TEMPLATE_VBOXR3EXE_CFLAGS)) -MT$(VBOX_VCC_CRT_TYPE)
|
---|
2802 | TEMPLATE_VBOXR3STATIC_CXXFLAGS = $(filter-out -MD$(VBOX_VCC_CRT_TYPE), $(TEMPLATE_VBOXR3EXE_CFLAGS)) -MT$(VBOX_VCC_CRT_TYPE)
|
---|
2803 | TEMPLATE_VBOXR3STATIC_LDFLAGS = $(filter-out /DISALLOWLIB:libcmt$(VBOX_VCC_CRT_TYPE).lib /DISALLOWLIB:libcpmt$(VBOX_VCC_CRT_TYPE).lib, $(TEMPLATE_VBOXR3EXE_LDFLAGS)) \
|
---|
2804 | /DISALLOWLIB:msvcrt.lib \
|
---|
2805 | /DISALLOWLIB:msvcrtd.lib \
|
---|
2806 | /DISALLOWLIB:msvcprt.lib \
|
---|
2807 | /DISALLOWLIB:msvcprtd.lib
|
---|
2808 | TEMPLATE_VBOXR3STATIC_LIBS = \
|
---|
2809 | $(PATH_TOOL_$(TEMPLATE_VBOXR3STATIC_TOOL)_LIB)/oldnames.lib \
|
---|
2810 | $(PATH_TOOL_$(TEMPLATE_VBOXR3STATIC_TOOL)_LIB)/libcmt$(VBOX_VCC_CRT_TYPE).lib \
|
---|
2811 | $(PATH_TOOL_$(TEMPLATE_VBOXR3STATIC_TOOL)_LIB)/libcpmt$(VBOX_VCC_CRT_TYPE).lib
|
---|
2812 | else ifn1of ($(KBUILD_TARGET), darwin solaris)
|
---|
2813 | # The gcc guys sans darwin.
|
---|
2814 | TEMPLATE_VBOXR3STATIC_CFLAGS = $(TEMPLATE_VBOXR3EXE_CFLAGS) -static
|
---|
2815 | TEMPLATE_VBOXR3STATIC_CXXFLAGS = $(TEMPLATE_VBOXR3EXE_CXXFLAGS) -static
|
---|
2816 | TEMPLATE_VBOXR3STATIC_OBJCFLAGS = $(TEMPLATE_VBOXR3EXE_OBJCFLAGS) -static
|
---|
2817 | TEMPLATE_VBOXR3STATIC_LDFLAGS = $(TEMPLATE_VBOXR3EXE_LDFLAGS) -static
|
---|
2818 | endif
|
---|
2819 |
|
---|
2820 | #
|
---|
2821 | # Temporary: Renaming the template and warnings will be errors (soon).
|
---|
2822 | #
|
---|
2823 | TEMPLATE_VBoxR3Static = New name for VBOXR3STATIC
|
---|
2824 | TEMPLATE_VBoxR3Static_EXTENDS = VBOXR3STATIC
|
---|
2825 | TEMPLATE_VBoxR3Static_EXTENDS_BY = appending
|
---|
2826 | ifeq ($(KBUILD_TARGET),win)
|
---|
2827 | TEMPLATE_VBoxR3Static_CFLAGS += $(VBOX_VCC_WERR)
|
---|
2828 | TEMPLATE_VBoxR3Static_CXXFLAGS += $(VBOX_VCC_WERR)
|
---|
2829 | TEMPLATE_VBoxR3Static_LDFLAGS += $(VBOX_VCC_LD_WERR)
|
---|
2830 | else
|
---|
2831 | TEMPLATE_VBoxR3Static_CFLAGS += $(VBOX_GCC_WERR)
|
---|
2832 | TEMPLATE_VBoxR3Static_CXXFLAGS += $(VBOX_GCC_WERR)
|
---|
2833 | endif
|
---|
2834 |
|
---|
2835 | #
|
---|
2836 | # Same as VBOXR3EXE but without C++ exceptions.
|
---|
2837 | #
|
---|
2838 | # VBOXR3EXE does C++ exceptions and may assumes that extern "C" functions
|
---|
2839 | # doesn't throw them. Use this template (and VBOXR3DLLNOXCPT) with care
|
---|
2840 | # and only where the C++ overhead is really unwanted.
|
---|
2841 | #
|
---|
2842 | TEMPLATE_VBOXR3EXENOXCPT = VBox Ring 3 Exe without C++ exception
|
---|
2843 | TEMPLATE_VBOXR3EXENOXCPT_EXTENDS = VBOXR3EXE
|
---|
2844 | ifeq ($(KBUILD_TARGET),win)
|
---|
2845 | TEMPLATE_VBOXR3EXENOXCPT_CFLAGS = $(filter-out -EH%,$(TEMPLATE_VBOXR3EXE_CFLAGS) ) -EHs-
|
---|
2846 | TEMPLATE_VBOXR3EXENOXCPT_CXXFLAGS = $(filter-out -EH%,$(TEMPLATE_VBOXR3EXE_CXXFLAGS)) -EHs-
|
---|
2847 | else
|
---|
2848 | TEMPLATE_VBOXR3EXENOXCPT_CXXFLAGS = $(TEMPLATE_VBOXR3EXE_CXXFLAGS) -fno-exceptions
|
---|
2849 | endif
|
---|
2850 |
|
---|
2851 | #
|
---|
2852 | # Same as VBOXR3 but without C++ exceptions.
|
---|
2853 | #
|
---|
2854 | TEMPLATE_VBOXR3DLLNOXCPT = VBox Ring 3 SO/DLLs without C++ exception
|
---|
2855 | TEMPLATE_VBOXR3DLLNOXCPT_EXTENDS = VBOXR3
|
---|
2856 | ifeq ($(KBUILD_TARGET),win)
|
---|
2857 | TEMPLATE_VBOXR3DLLNOXCPT_CFLAGS = $(filter-out -EH%,$(TEMPLATE_VBOXR3_CFLAGS) ) -EHs-
|
---|
2858 | TEMPLATE_VBOXR3DLLNOXCPT_CXXFLAGS = $(filter-out -EH%,$(TEMPLATE_VBOXR3_CXXFLAGS)) -EHs-
|
---|
2859 | else
|
---|
2860 | TEMPLATE_VBOXR3DLLNOXCPT_CXXFLAGS = $(TEMPLATE_VBOXR3_CXXFLAGS) -fno-exceptions
|
---|
2861 | endif
|
---|
2862 |
|
---|
2863 | #
|
---|
2864 | # Template for building hardened Ring-3 executables.
|
---|
2865 | # These shall have no extra runpaths, esp. not origin ones.
|
---|
2866 | #
|
---|
2867 | TEMPLATE_VBOXR3HARDENEDEXE = Hardened VBox Ring-3 EXE
|
---|
2868 | TEMPLATE_VBOXR3HARDENEDEXE_EXTENDS = VBOXR3EXE
|
---|
2869 | TEMPLATE_VBOXR3HARDENEDEXE_LIBS = $(VBOX_LIB_SUPHARDENED) $(TEMPLATE_VBOXR3EXE_LIBS)
|
---|
2870 | TEMPLATE_VBOXR3HARDENEDEXE_LDFLAGS.darwin = $(TEMPLATE_VBOXR3EXE_LDFLAGS.darwin) -framework IOKit
|
---|
2871 | ifeq ($(KBUILD_TARGET),linux)
|
---|
2872 | # not necessary except USE_LIB_PCAP is defined in SUPR3HardenedMain.cpp
|
---|
2873 | # TEMPLATE_VBOXR3HARDENEDEXE_LIBS += cap
|
---|
2874 | endif
|
---|
2875 | ifn1of ($(KBUILD_TARGET), win os2)
|
---|
2876 | TEMPLATE_VBOXR3HARDENEDEXE_LDFLAGS = $(filter-out '$(VBOX_GCC_RPATH_OPT)%,$(TEMPLATE_VBOXR3EXE_LDFLAGS))
|
---|
2877 | TEMPLATE_VBOXR3HARDENEDEXE_LDFLAGS.linux = $(filter-out $(VBOX_GCC_ORIGIN_OPT),$(TEMPLATE_VBOXR3EXE_LDFLAGS.linux))
|
---|
2878 | endif
|
---|
2879 |
|
---|
2880 | #
|
---|
2881 | # Template for building hardened Ring-3 libraries.
|
---|
2882 | #
|
---|
2883 | TEMPLATE_VBOXR3HARDENEDLIB = Hardened VBox Ring-3 LIB
|
---|
2884 | TEMPLATE_VBOXR3HARDENEDLIB_EXTENDS = VBOXR3HARDENEDEXE
|
---|
2885 | TEMPLATE_VBOXR3HARDENEDLIB_LIBS = $(NO_SUCH_VARIABLE)
|
---|
2886 |
|
---|
2887 |
|
---|
2888 | #
|
---|
2889 | # Template for building R3 shared objects / DLLs with the 10.5 Mac OS X SDK.
|
---|
2890 | # Identical to VBOXR3EXE, except for the DYLIB, the classic_linker and SDK bits.
|
---|
2891 | #
|
---|
2892 | TEMPLATE_VBOXR3OSX105 = VBox Ring 3 SO/DLLs for OS X 10.5
|
---|
2893 | TEMPLATE_VBOXR3OSX105_EXTENDS = VBOXR3EXE
|
---|
2894 | TEMPLATE_VBOXR3OSX105_DEFS.darwin = $(VBOX_DARWIN_DEF_SDK_10_5_DEFS) PIC
|
---|
2895 | TEMPLATE_VBOXR3OSX105_CFLAGS.darwin = $(VBOX_DARWIN_DEF_SDK_10_5_CFLAGS) -fno-common
|
---|
2896 | TEMPLATE_VBOXR3OSX105_CXXFLAGS.darwin = $(VBOX_DARWIN_DEF_SDK_10_5_CXXFLAGS)
|
---|
2897 | TEMPLATE_VBOXR3OSX105_OBJCFLAGS.darwin = $(VBOX_DARWIN_DEF_SDK_10_5_OBJCFLAGS)
|
---|
2898 | TEMPLATE_VBOXR3OSX105_LDFLAGS.darwin = $(VBOX_DARWIN_DEF_SDK_10_5_LDFLAGS) \
|
---|
2899 | -read_only_relocs suppress \
|
---|
2900 | -current_version $(VBOX_VERSION_MAJOR).$(VBOX_VERSION_MINOR).$(VBOX_VERSION_BUILD) \
|
---|
2901 | -compatibility_version $(VBOX_VERSION_MAJOR).$(VBOX_VERSION_MINOR).$(VBOX_VERSION_BUILD)
|
---|
2902 |
|
---|
2903 |
|
---|
2904 | #
|
---|
2905 | # Ring-3 testcase, running automatically during the build.
|
---|
2906 | # This is the VBOXR3EXE template only with a different install dir.
|
---|
2907 | #
|
---|
2908 | TEMPLATE_VBOXR3AUTOTST = VBox Ring 3 Testcase Exe
|
---|
2909 | TEMPLATE_VBOXR3AUTOTST_EXTENDS = VBOXR3EXE
|
---|
2910 | TEMPLATE_VBOXR3AUTOTST_INST = $(INST_TESTCASE)
|
---|
2911 | TEMPLATE_VBOXR3AUTOTST_LIBS = $(TEMPLATE_VBOXR3EXE_LIBS)
|
---|
2912 | TEMPLATE_VBOXR3AUTOTST_LIBS.l4 = $(LIB_RUNTIME) $(TEMPLATE_VBOXR3EXE_LIBS.l4)
|
---|
2913 | ifeq ($(KBUILD_TARGET),win)
|
---|
2914 | ifdef VBOX_SIGNING_MODE
|
---|
2915 | TEMPLATE_VBOXR3AUTOTST_POST_CMDS =
|
---|
2916 | endif
|
---|
2917 | endif
|
---|
2918 |
|
---|
2919 | #
|
---|
2920 | # Ring-3 testcase.
|
---|
2921 | # This is the VBOXR3EXE template only with a different install dir.
|
---|
2922 | #
|
---|
2923 | TEMPLATE_VBOXR3TSTEXE = VBox Ring 3 Testcase Exe
|
---|
2924 | TEMPLATE_VBOXR3TSTEXE_EXTENDS = VBOXR3EXE
|
---|
2925 | TEMPLATE_VBOXR3TSTEXE_INST = $(INST_TESTCASE)
|
---|
2926 | TEMPLATE_VBOXR3TSTEXE_LIBS = $(LIB_RUNTIME) $(TEMPLATE_VBOXR3EXE_LIBS)
|
---|
2927 | ifdef VBOX_WITH_RUNPATH
|
---|
2928 | TEMPLATE_VBOXR3TSTEXE_LDFLAGS = '$(VBOX_GCC_RPATH_OPT)$(VBOX_WITH_RUNPATH)' $(TEMPLATE_VBOXR3EXE_LDFLAGS)
|
---|
2929 | else ifdef VBOX_WITH_RELATIVE_RUNPATH
|
---|
2930 | TEMPLATE_VBOXR3TSTEXE_LDFLAGS = '$(VBOX_GCC_RPATH_OPT)$(VBOX_WITH_RELATIVE_RUNPATH)/..' $(TEMPLATE_VBOXR3EXE_LDFLAGS)
|
---|
2931 | endif
|
---|
2932 | ifeq ($(KBUILD_TARGET),win)
|
---|
2933 | ifdef VBOX_SIGNING_MODE
|
---|
2934 | TEMPLATE_VBOXR3TSTEXE_POST_CMDS =
|
---|
2935 | endif
|
---|
2936 | endif
|
---|
2937 |
|
---|
2938 | #
|
---|
2939 | # Ring-3 testcase (no -pedantic)
|
---|
2940 | #
|
---|
2941 | TEMPLATE_VBOXR3TSTNPEXE = VBox Ring 3 Testcase Exe Non-pedantic
|
---|
2942 | TEMPLATE_VBOXR3TSTNPEXE_EXTENDS = VBOXR3TSTEXE
|
---|
2943 | ifneq ($(KBUILD_TARGET),win) # (only gcc)
|
---|
2944 | TEMPLATE_VBOXR3TSTNPEXE_TOOL = $(VBOX_GCC_TOOL)
|
---|
2945 | TEMPLATE_VBOXR3TSTNPEXE_CXXFLAGS = $(filter-out -pedantic -Wshadow,$(TEMPLATE_VBOXR3TSTEXE_CXXFLAGS)) -Wno-sign-compare
|
---|
2946 | TEMPLATE_VBOXR3TSTNPEXE_CFLAGS = $(filter-out -pedantic -Wshadow -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations,$(TEMPLATE_VBOXR3TSTEXE_CFLAGS)) -Wno-sign-compare
|
---|
2947 | endif
|
---|
2948 |
|
---|
2949 |
|
---|
2950 | #
|
---|
2951 | # Template for the CppUnit kind of testcases.
|
---|
2952 | #
|
---|
2953 | TEMPLATE_VBOXCPPUNITEXE = VBox CppUnit Testcase Exe
|
---|
2954 | TEMPLATE_VBOXCPPUNITEXE_EXTENDS = VBOXR3TSTEXE
|
---|
2955 | ## @todo make a CPPUNIT SDK and add cppunit tools packages for windows, mac, solaris and OS/2.
|
---|
2956 | #TEMPLATE_VBOXCPPUNITEXE_SDKS = CPPUNIT -
|
---|
2957 | TEMPLATE_VBOXCPPUNITEXE_LIBS = \
|
---|
2958 | $(TEMPLATE_VBOXR3TSTEXE_LIBS) \
|
---|
2959 | cppunit
|
---|
2960 |
|
---|
2961 | #
|
---|
2962 | # Template for building bad C/C++ style R3 executables (no -pedantic).
|
---|
2963 | #
|
---|
2964 | TEMPLATE_VBOXR3NPEXE = VBox Ring 3 Non-pedantic
|
---|
2965 | TEMPLATE_VBOXR3NPEXE_EXTENDS = VBOXR3EXE
|
---|
2966 | ifneq ($(KBUILD_TARGET),win) # (only gcc)
|
---|
2967 | TEMPLATE_VBOXR3NPEXE_TOOL = $(VBOX_GCC_TOOL)
|
---|
2968 | TEMPLATE_VBOXR3NPEXE_CXXFLAGS = $(filter-out -pedantic -Wshadow,$(TEMPLATE_VBOXR3EXE_CXXFLAGS)) -Wno-sign-compare
|
---|
2969 | TEMPLATE_VBOXR3NPEXE_CFLAGS = $(filter-out -pedantic -Wshadow -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations,$(TEMPLATE_VBOXR3EXE_CFLAGS)) -Wno-sign-compare
|
---|
2970 | endif
|
---|
2971 |
|
---|
2972 |
|
---|
2973 | #
|
---|
2974 | # Template for building bad C/C++ style R3 shared libraries / Dlls (no -pedantic).
|
---|
2975 | # (Same transformation as for VBOXR3NPEXE.)
|
---|
2976 | #
|
---|
2977 | TEMPLATE_VBOXR3NP= VBox Ring 3 Non-pedantic
|
---|
2978 | TEMPLATE_VBOXR3NP_EXTENDS = VBOXR3
|
---|
2979 | ifneq ($(KBUILD_TARGET),win) # (only gcc)
|
---|
2980 | TEMPLATE_VBOXR3NP_TOOL = $(VBOX_GCC_TOOL)
|
---|
2981 | TEMPLATE_VBOXR3NP_CXXFLAGS = $(filter-out -pedantic -Wshadow,$(TEMPLATE_VBOXR3_CXXFLAGS)) -Wno-sign-compare
|
---|
2982 | TEMPLATE_VBOXR3NP_CFLAGS = $(filter-out -pedantic -Wshadow -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations,$(TEMPLATE_VBOXR3_CFLAGS)) -Wno-sign-compare
|
---|
2983 | endif
|
---|
2984 |
|
---|
2985 |
|
---|
2986 | #
|
---|
2987 | # Template for building libraries, shared libraries / modules
|
---|
2988 | # which only depends on IPRT for crt.
|
---|
2989 | #
|
---|
2990 | TEMPLATE_VBOXNOCRTGCC = VBox no-crt GCC libraries and modules, yasm/nasm.
|
---|
2991 | TEMPLATE_VBOXNOCRTGCC_DEFS = IN_RING3 IPRT_NO_CRT $(ARCH_BITS_DEFS)
|
---|
2992 | TEMPLATE_VBOXNOCRTGCC_ASDEFS = ASM_CALL64_GCC
|
---|
2993 | TEMPLATE_VBOXNOCRTGCC_CFLAGS = -nostdinc -fno-strict-aliasing -fno-math-errno $(VBOX_GCC_WARN)
|
---|
2994 | TEMPLATE_VBOXNOCRTGCC_CFLAGS.x86 = -m32
|
---|
2995 | TEMPLATE_VBOXNOCRTGCC_CFLAGS.amd64 = -m64 -mcmodel=medium -fno-common
|
---|
2996 | TEMPLATE_VBOXNOCRTGCC_CFLAGS.release = -O2 -fno-strict-aliasing
|
---|
2997 | TEMPLATE_VBOXNOCRTGCC_CFLAGS.profile = $(TEMPLATE_VBOXNOCRTGCC_CFLAGS.release)
|
---|
2998 | TEMPLATE_VBOXNOCRTGCC_CFLAGS.kprofile = $(TEMPLATE_VBOXNOCRTGCC_CFLAGS.release)
|
---|
2999 | TEMPLATE_VBOXNOCRTGCC_CFLAGS.darwin = -static
|
---|
3000 | TEMPLATE_VBOXNOCRTGCC_CXXFLAGS = $(TEMPLATE_VBOXNOCRTGCC_CFLAGS)
|
---|
3001 | TEMPLATE_VBOXNOCRTGCC_CXXFLAGS.$(KBUILD_TARGET) = $(TEMPLATE_VBOXNOCRTGCC_CFLAGS.$(KBUILD_TARGET))
|
---|
3002 | TEMPLATE_VBOXNOCRTGCC_CXXFLAGS.$(KBUILD_TARGET_ARCH) = $(TEMPLATE_VBOXNOCRTGCC_CFLAGS.$(KBUILD_TARGET_ARCH))
|
---|
3003 | TEMPLATE_VBOXNOCRTGCC_INCS = $(PATH_ROOT)/include/iprt/nocrt
|
---|
3004 |
|
---|
3005 | ifeq ($(KBUILD_TARGET).$(KBUILD_TARGET_ARCH),win.amd64)
|
---|
3006 | # cross compile to 64-bit ELF (linux).
|
---|
3007 | TEMPLATE_VBOXNOCRTGCC_TOOL = XGCCAMD64LINUX
|
---|
3008 | TEMPLATE_VBOXNOCRTGCC_ASTOOL = YASM
|
---|
3009 | TEMPLATE_VBOXNOCRTGCC_ASFLAGS = -f elf64 -DASM_FORMAT_ELF -D__YASM__ -w+orphan-labels -g dwarf2
|
---|
3010 | TEMPLATE_VBOXNOCRTGCC_LIBS = $(PATH_DEVTOOLS)/win.x86/x86_64-unknown-linux-gnu/20060701-r2/lib/gcc/x86_64-unknown-linux-gnu/3.4.6/libgcc.a
|
---|
3011 | TEMPLATE_VBOXNOCRTGCC_LDFLAGS = -nostdlib
|
---|
3012 |
|
---|
3013 | else ifeq ($(KBUILD_TARGET).$(KBUILD_TARGET_ARCH),win.x86)
|
---|
3014 | # Use the default GCC (MinGW) with the Microsoft linker.
|
---|
3015 | # (Drop all '-g' options as we're unable to strip the debug info.)
|
---|
3016 | TEMPLATE_VBOXNOCRTGCC_TOOL = $(VBOX_GCC_TOOL)
|
---|
3017 | TEMPLATE_VBOXNOCRTGCC_ASTOOL = $(VBOX_ASTOOL)
|
---|
3018 | TEMPLATE_VBOXNOCRTGCC_ASFLAGS = $(VBOX_ASFLAGS)
|
---|
3019 | TEMPLATE_VBOXNOCRTGCC_LDTOOL = $(VBOX_VCC_TOOL)
|
---|
3020 | TEMPLATE_VBOXNOCRTGCC_LDFLAGS = -Incremental:NO -MapInfo:Exports -NoD
|
---|
3021 | TEMPLATE_VBOXNOCRTGCC_LIBS = $(VBOX_GCC_LIBGCC)
|
---|
3022 | TEMPLATE_VBOXNOCRTGCC_CFLAGS := $(filter-out -g,$(TEMPLATE_VBOXNOCRTGCC_CFLAGS)) -s
|
---|
3023 |
|
---|
3024 | else
|
---|
3025 | # Use the default GCC.
|
---|
3026 | # The use of --exclude-libs ALL is to avoid confusing the linux ld.so.
|
---|
3027 | TEMPLATE_VBOXNOCRTGCC_TOOL = $(VBOX_GCC_TOOL)
|
---|
3028 | TEMPLATE_VBOXNOCRTGCC_ASTOOL = $(VBOX_ASTOOL)
|
---|
3029 | TEMPLATE_VBOXNOCRTGCC_ASFLAGS = $(VBOX_ASFLAGS)
|
---|
3030 | TEMPLATE_VBOXNOCRTGCC_CFLAGS += $(VBOX_GCC_fno-stack-protector)
|
---|
3031 | TEMPLATE_VBOXNOCRTGCC_CXXFLAGS += $(VBOX_GCC_fno-stack-protector)
|
---|
3032 | ifeq ($(KBUILD_TARGET_ARCH),amd64)
|
---|
3033 | # in 64-bit mode we'll build a sys-module (VBoxREM2).
|
---|
3034 | if1of ($(KBUILD_TARGET), darwin solaris)
|
---|
3035 | TEMPLATE_VBOXNOCRTGCC_LDFLAGS.solaris= -64 -r
|
---|
3036 | else
|
---|
3037 | TEMPLATE_VBOXNOCRTGCC_LDFLAGS = -nostdlib
|
---|
3038 | endif
|
---|
3039 | else # x86:
|
---|
3040 | TEMPLATE_VBOXNOCRTGCC_LDFLAGS = -nostdlib
|
---|
3041 | ifn1of ($(KBUILD_TARGET), os2 darwin solaris)
|
---|
3042 | TEMPLATE_VBOXNOCRTGCC_LDFLAGS += -Wl,--no-undefined
|
---|
3043 | endif
|
---|
3044 | endif # x86
|
---|
3045 | TEMPLATE_VBOXNOCRTGCC_LDFLAGS.darwin = $(VBOX_DARWIN_DEF_SDK_LDFLAGS)
|
---|
3046 | TEMPLATE_VBOXNOCRTGCC_LIBS = # FIXME - has unwind mess.
|
---|
3047 | endif
|
---|
3048 |
|
---|
3049 |
|
---|
3050 | #
|
---|
3051 | # Same as VBOXNOCRTGCC only it uses GAS as the assembler instead of yasm/nasm.
|
---|
3052 | #
|
---|
3053 | TEMPLATE_VBOXNOCRTGAS = VBox no-crt GCC libraries and modules, gas.
|
---|
3054 | TEMPLATE_VBOXNOCRTGAS_EXTENDS = VBOXNOCRTGCC
|
---|
3055 | TEMPLATE_VBOXNOCRTGAS_ASTOOL = $(TEMPLATE_VBOXNOCRTGCC_TOOL)
|
---|
3056 | ifeq ($(KBUILD_TARGET).$(KBUILD_TARGET_ARCH),win.x86)
|
---|
3057 | TEMPLATE_VBOXNOCRTGAS_ASFLAGS = -s
|
---|
3058 | else
|
---|
3059 | TEMPLATE_VBOXNOCRTGAS_ASFLAGS = -g
|
---|
3060 | endif
|
---|
3061 | TEMPLATE_VBOXNOCRTGAS_ASFLAGS.x86 = -m32
|
---|
3062 | TEMPLATE_VBOXNOCRTGAS_ASFLAGS.amd64 = -m64
|
---|
3063 |
|
---|
3064 |
|
---|
3065 | #
|
---|
3066 | # Template for building executables that are part of the VBox Main component
|
---|
3067 | # (COM/XPCOM interface to VirtualBox).
|
---|
3068 | #
|
---|
3069 | TEMPLATE_VBOXMAINEXE = VBox Main Executable
|
---|
3070 | TEMPLATE_VBOXMAINEXE_ASTOOL = $(VBOX_ASTOOL)
|
---|
3071 | TEMPLATE_VBOXMAINEXE_ASFLAGS = $(VBOX_ASFLAGS)
|
---|
3072 | TEMPLATE_VBOXMAINEXE_DEFS = IN_RING3 UNICODE NDEBUG=1
|
---|
3073 | TEMPLATE_VBOXMAINEXE_DEFS.win = _UNICODE
|
---|
3074 | TEMPLATE_VBOXMAINEXE_RCDEFS = $(TEMPLATE_VBOXR3EXE_RCDEFS)
|
---|
3075 | TEMPLATE_VBOXMAINEXE_LIBS.kprofile = $(LIB_KPROFILE)
|
---|
3076 |
|
---|
3077 | ifeq ($(KBUILD_TARGET),win)
|
---|
3078 | TEMPLATE_VBOXMAINEXE_SDKS = WINPSDK W2K3DDK
|
---|
3079 | # Note: C4250 is the dominance warning, see r32789.
|
---|
3080 | # C4065 is about default only switches.
|
---|
3081 | # C4996 is about deprected function (CRT only?).
|
---|
3082 | ifdef VBOX_USE_VCC80
|
---|
3083 | TEMPLATE_VBOXMAINEXE_TOOL = $(VBOX_VCC_TOOL)
|
---|
3084 | TEMPLATE_VBOXMAINEXE_CXXFLAGS = -Zi -Zl -GR -EHsc -GF -MD$(VBOX_VCC_CRT_TYPE) -W3 -wd4065 -wd4996 -wd4250 -Zc:wchar_t- $(VBOX_VCC_OPT) $(VBOX_VCC_FP)
|
---|
3085 | TEMPLATE_VBOXMAINEXE_CXXFLAGS.debug = -RTCsu
|
---|
3086 | else
|
---|
3087 | TEMPLATE_VBOXMAINEXE_TOOL = VCC70
|
---|
3088 | TEMPLATE_VBOXMAINEXE_CXXFLAGS = -Zi -Zl -GR -EHsc -GF -MD$(VBOX_VCC_CRT_TYPE) -W3 -wd4065 -wd4250 $(VBOX_VCC_OPT) $(VBOX_VCC_FP)
|
---|
3089 | TEMPLATE_VBOXMAINEXE_CXXFLAGS.debug = -GZ
|
---|
3090 | endif
|
---|
3091 | TEMPLATE_VBOXMAINEXE_CXXFLAGS.kprofile = -Gh -GH
|
---|
3092 | TEMPLATE_VBOXMAINEXE_CFLAGS = $(TEMPLATE_VBOXMAINEXE_CXXFLAGS)
|
---|
3093 | TEMPLATE_VBOXMAINEXE_CFLAGS.debug = $(TEMPLATE_VBOXMAINEXE_CXXFLAGS.debug)
|
---|
3094 | TEMPLATE_VBOXMAINEXE_CFLAGS.kprofile = $(TEMPLATE_VBOXMAINEXE_CXXFLAGS.kprofile)
|
---|
3095 | TEMPLATE_VBOXMAINEXE_INCS += \
|
---|
3096 | $(PATH_TOOL_$(VBOX_VCC_TOOL)_ATLMFC_INC)
|
---|
3097 | TEMPLATE_VBOXMAINEXE_LDFLAGS = \
|
---|
3098 | /NOD /INCREMENTAL:NO /MAPINFO:EXPORTS /LARGEADDRESSAWARE /DEBUG\
|
---|
3099 | /DISALLOWLIB:libc.lib \
|
---|
3100 | /DISALLOWLIB:libcd.lib \
|
---|
3101 | /DISALLOWLIB:libcmt.lib \
|
---|
3102 | /DISALLOWLIB:libcmtd.lib \
|
---|
3103 | /DISALLOWLIB:msvcrt$(VBOX_VCC_CRT_TYPE_N).lib \
|
---|
3104 | /DISALLOWLIB:msvcprt$(VBOX_VCC_CRT_TYPE_N).lib
|
---|
3105 | TEMPLATE_VBOXMAINEXE_LIBS = \
|
---|
3106 | $(LIB_RUNTIME) \
|
---|
3107 | $(PATH_TOOL_$(VBOX_VCC_TOOL)_LIB)/msvcrt$(VBOX_VCC_CRT_TYPE).lib \
|
---|
3108 | $(PATH_TOOL_$(VBOX_VCC_TOOL)_LIB)/msvcprt$(VBOX_VCC_CRT_TYPE).lib \
|
---|
3109 | $(PATH_TOOL_$(VBOX_VCC_TOOL)_LIB)/oldnames.lib \
|
---|
3110 | $(PATH_TOOL_$(VBOX_VCC_TOOL)_ATLMFC_LIB)/atls$(VBOX_VCC_CRT_TYPE).lib
|
---|
3111 | TEMPLATE_VBOXMAINEXE_POST_CMDS = $(VBOX_SIGN_IMAGE_CMDS)
|
---|
3112 |
|
---|
3113 | else # the GCC guys:
|
---|
3114 |
|
---|
3115 | TEMPLATE_VBOXMAINEXE_TOOL = $(VBOX_GCC_TOOL)
|
---|
3116 | TEMPLATE_VBOXMAINEXE_CXXFLAGS = -g -pipe $(VBOX_GCC_WARN) -Wno-long-long -Wno-non-virtual-dtor -fshort-wchar -fpermissive -fexceptions -frtti $(VBOX_GCC_OPT) $(VBOX_GCC_FP) -fno-strict-aliasing $(VBOX_GCC_fvisibility-inlines-hidden) $(VBOX_GCC_fvisibility-hidden) -Wshadow
|
---|
3117 | TEMPLATE_VBOXMAINEXE_CXXFLAGS.x86 = -m32
|
---|
3118 | TEMPLATE_VBOXMAINEXE_CXXFLAGS.amd64 = -m64
|
---|
3119 | TEMPLATE_VBOXMAINEXE_CXXFLAGS.kprofile = -finstrument-functions
|
---|
3120 | TEMPLATE_VBOXMAINEXE_CFLAGS = -g -pipe $(VBOX_GCC_WARN) -Wno-long-long -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations $(VBOX_GCC_OPT) $(VBOX_GCC_FP) -fno-strict-aliasing $(VBOX_GCC_fvisibility-hidden) -Wshadow
|
---|
3121 | TEMPLATE_VBOXMAINEXE_CFLAGS.x86 = -m32
|
---|
3122 | TEMPLATE_VBOXMAINEXE_CFLAGS.amd64 = -m64
|
---|
3123 | TEMPLATE_VBOXMAINEXE_CFLAGS.kprofile = $(TEMPLATE_VBOXMAINEXE_CXXFLAGS.kprofile)
|
---|
3124 | TEMPLATE_VBOXMAINEXE_LDFLAGS.x86 = -m32
|
---|
3125 | TEMPLATE_VBOXMAINEXE_LDFLAGS.amd64 = -m64
|
---|
3126 | ifeq ($(KBUILD_TARGET),linux)
|
---|
3127 | TEMPLATE_VBOXMAINEXE_LIBS = pthread m rt $(LIB_RUNTIME) dl
|
---|
3128 | TEMPLATE_VBOXMAINEXE_LDFLAGS.linux = $(VBOX_LD_as_needed)
|
---|
3129 | else ifeq ($(KBUILD_TARGET),l4)
|
---|
3130 | TEMPLATE_VBOXMAINEXE_LIBS = $(LIB_RUNTIME)
|
---|
3131 | # no libs as yet in l4 target - must be added later
|
---|
3132 | else ifeq ($(KBUILD_TARGET),os2)
|
---|
3133 | TEMPLATE_VBOXMAINEXE_TOOL = GXX3OMF
|
---|
3134 | TEMPLATE_VBOXMAINEXE_LIBS = $(LIB_RUNTIME)
|
---|
3135 | else ifeq ($(KBUILD_TARGET),darwin)
|
---|
3136 | TEMPLATE_VBOXMAINEXE_TOOL = GXX4MACHO
|
---|
3137 | TEMPLATE_VBOXMAINEXE_DEFS += $(VBOX_DARWIN_DEF_SDK_DEFS)
|
---|
3138 | TEMPLATE_VBOXMAINEXE_CFLAGS += $(VBOX_DARWIN_DEF_SDK_CFLAGS)
|
---|
3139 | TEMPLATE_VBOXMAINEXE_CXXFLAGS += $(VBOX_DARWIN_DEF_SDK_CXXFLAGS)
|
---|
3140 | TEMPLATE_VBOXMAINEXE_OBJCFLAGS += $(VBOX_DARWIN_DEF_SDK_OBJCFLAGS)
|
---|
3141 | TEMPLATE_VBOXMAINEXE_LDFLAGS.darwin += -bind_at_load
|
---|
3142 | TEMPLATE_VBOXMAINEXE_LDFLAGS += $(VBOX_DARWIN_DEF_SDK_LDFLAGS) -framework Carbon
|
---|
3143 | TEMPLATE_VBOXMAINEXE_LIBS = $(LIB_RUNTIME)
|
---|
3144 | else if1of ($(KBUILD_TARGET), freebsd netbsd openbsd)
|
---|
3145 | TEMPLATE_VBOXMAINEXE_TOOL = GXX3
|
---|
3146 | TEMPLATE_VBOXMAINEXE_LIBS = $(LIB_RUNTIME)
|
---|
3147 | TEMPLATE_VBOXMAINEXE_INCS += \
|
---|
3148 | /usr/include \
|
---|
3149 | /usr/X11R6/include \
|
---|
3150 | /usr/local/include
|
---|
3151 | TEMPLATE_VBOXMAINEXE_LIBPATH += \
|
---|
3152 | /usr/lib \
|
---|
3153 | /usr/X11R6/lib \
|
---|
3154 | /usr/local/lib
|
---|
3155 | else ifeq ($(KBUILD_TARGET),solaris)
|
---|
3156 | TEMPLATE_VBOXMAINEXE_TOOL = GXX3PLAIN
|
---|
3157 | TEMPLATE_VBOXMAINEXE_DEFS += _REENTRANT
|
---|
3158 | TEMPLATE_VBOXMAINEXE_LIBS = $(LIB_RUNTIME) rt thread
|
---|
3159 | else
|
---|
3160 | $(warning Warning: VBOX Build: Target $(KBUILD_TARGET) is not officially supported!)
|
---|
3161 | TEMPLATE_VBOXMAINEXE_LIBS =
|
---|
3162 | endif
|
---|
3163 | ifdef VBOX_WITH_RUNPATH
|
---|
3164 | TEMPLATE_VBOXMAINEXE_LDFLAGS += '$(VBOX_GCC_RPATH_OPT)$(VBOX_WITH_RUNPATH)'
|
---|
3165 | else ifdef VBOX_WITH_RELATIVE_RUNPATH
|
---|
3166 | TEMPLATE_VBOXMAINEXE_LDFLAGS += '$(VBOX_GCC_RPATH_OPT)$(VBOX_WITH_RELATIVE_RUNPATH)'
|
---|
3167 | endif
|
---|
3168 | ifdef VBOX_WITH_ORIGIN
|
---|
3169 | TEMPLATE_VBOXMAINEXE_LDFLAGS.linux += $(VBOX_GCC_ORIGIN_OPT)
|
---|
3170 | endif
|
---|
3171 |
|
---|
3172 | endif # !win
|
---|
3173 |
|
---|
3174 | # Add COM/XPCOM stuff
|
---|
3175 | TEMPLATE_VBOXMAINEXE_LIBS += \
|
---|
3176 | $(PATH_LIB)/VBoxCOM$(VBOX_SUFF_LIB)
|
---|
3177 | ifdef VBOX_WITH_XPCOM
|
---|
3178 | ## @todo may be worth creating the VBOX_XPCOM SDK def
|
---|
3179 | TEMPLATE_VBOXMAINEXE_DEFS += VBOX_WITH_XPCOM
|
---|
3180 | ifdef VBOX_WITH_XPCOM_NAMESPACE_CLEANUP
|
---|
3181 | TEMPLATE_VBOXMAINEXE_DEFS += VBOX_WITH_XPCOM_NAMESPACE_CLEANUP
|
---|
3182 | endif
|
---|
3183 | TEMPLATE_VBOXMAINEXE_INCS += \
|
---|
3184 | $(VBOX_XPCOM_INCS)
|
---|
3185 | TEMPLATE_VBOXMAINEXE_LIBS += \
|
---|
3186 | $(LIB_XPCOM)
|
---|
3187 | TEMPLATE_VBOXMAINEXE_INTERMEDIATES += \
|
---|
3188 | $(VBOX_PATH_SDK)/bindings/xpcom/include/VirtualBox_XPCOM.h
|
---|
3189 |
|
---|
3190 | else # COM
|
---|
3191 | TEMPLATE_VBOXMAINEXE_INCS += \
|
---|
3192 | $(VBOX_PATH_SDK)/bindings/mscom/include
|
---|
3193 | TEMPLATE_VBOXMAINEXE_INTERMEDIATES += \
|
---|
3194 | $(VBOX_PATH_SDK)/bindings/mscom/include/VirtualBox.h
|
---|
3195 | endif # COM
|
---|
3196 |
|
---|
3197 | #
|
---|
3198 | # Template for building the Main DLL modules (such as in-process COM/XPCOM
|
---|
3199 | # components for Main).
|
---|
3200 | #
|
---|
3201 | # This differs from VBOXMAINEXE only in PIC handling and similar DLL stuff.
|
---|
3202 | #
|
---|
3203 | TEMPLATE_VBOXMAINDLL = VBox Main Component (shared library)
|
---|
3204 | TEMPLATE_VBOXMAINDLL_EXTENDS = VBOXMAINEXE
|
---|
3205 | ifeq ($(filter-out solaris.x86 %.amd64,$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH)),)
|
---|
3206 | ifn1of ($(KBUILD_TARGET), darwin win)
|
---|
3207 | TEMPLATE_VBOXMAINDLL_DEFS = PIC $(TEMPLATE_VBOXMAINEXE_DEFS)
|
---|
3208 | TEMPLATE_VBOXMAINDLL_CFLAGS = -fPIC $(TEMPLATE_VBOXMAINEXE_CFLAGS)
|
---|
3209 | TEMPLATE_VBOXMAINDLL_CXXFLAGS = -fPIC $(TEMPLATE_VBOXMAINEXE_CXXFLAGS)
|
---|
3210 | TEMPLATE_VBOXMAINDLL_LDFLAGS = -fPIC $(TEMPLATE_VBOXMAINEXE_LDFLAGS)
|
---|
3211 | endif
|
---|
3212 | endif
|
---|
3213 | TEMPLATE_VBOXMAINDLL_LDFLAGS.darwin = $(filter-out -bind_at_load,$(TEMPLATE_VBOXMAINEXE_LDFLAGS.darwin)) \
|
---|
3214 | -current_version $(VBOX_VERSION_MAJOR).$(VBOX_VERSION_MINOR).$(VBOX_VERSION_BUILD) \
|
---|
3215 | -compatibility_version $(VBOX_VERSION_MAJOR).$(VBOX_VERSION_MINOR).$(VBOX_VERSION_BUILD)
|
---|
3216 |
|
---|
3217 | #
|
---|
3218 | # Template identical to VBOXMAINDLL except for where the stuff is
|
---|
3219 | # installed when using XPCOM (components/).
|
---|
3220 | #
|
---|
3221 | # Note! In the hardened build this gets a bit ugly since $ORIGIN/..
|
---|
3222 | # doesn't work. So, we keep the $ORIGIN from VBOXMAINEXE and let
|
---|
3223 | # the installers do the necessary .so symlinking.
|
---|
3224 | #
|
---|
3225 | # (No difference when building against COM on Windows.)
|
---|
3226 | #
|
---|
3227 | TEMPLATE_VBOXMAINCOMP = VBox Main COM/XPCOM Component (shared library)
|
---|
3228 | TEMPLATE_VBOXMAINCOMP_EXTENDS = VBOXMAINEXE
|
---|
3229 | ifn1of ($(KBUILD_TARGET), win)
|
---|
3230 | TEMPLATE_VBOXMAINCOMP_INST = $(INST_BIN)components/
|
---|
3231 | endif
|
---|
3232 | ifneq ($(KBUILD_TARGET),win)
|
---|
3233 | ifeq ($(filter-out solaris.x86 %.amd64,$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH)),)
|
---|
3234 | TEMPLATE_VBOXMAINCOMP_DEFS = PIC $(TEMPLATE_VBOXMAINEXE_DEFS)
|
---|
3235 | TEMPLATE_VBOXMAINCOMP_CFLAGS = -fPIC $(TEMPLATE_VBOXMAINEXE_CFLAGS)
|
---|
3236 | TEMPLATE_VBOXMAINCOMP_CXXFLAGS = -fPIC $(TEMPLATE_VBOXMAINEXE_CXXFLAGS)
|
---|
3237 | if defined(VBOX_WITH_RELATIVE_RUNPATH) && !defined(VBOX_WITH_HARDENING)
|
---|
3238 | TEMPLATE_VBOXMAINCOMP_LDFLAGS = -fPIC $(filter-out '$(VBOX_GCC_RPATH_OPT)%',$(TEMPLATE_VBOXMAINEXE_LDFLAGS)) '$(VBOX_GCC_RPATH_OPT)$(VBOX_WITH_RELATIVE_RUNPATH)/..'
|
---|
3239 | else
|
---|
3240 | TEMPLATE_VBOXMAINCOMP_LDFLAGS = -fPIC $(TEMPLATE_VBOXMAINEXE_LDFLAGS)
|
---|
3241 | endif
|
---|
3242 | else ifndef VBOX_WITH_HARDENING
|
---|
3243 | ifdef VBOX_WITH_RELATIVE_RUNPATH
|
---|
3244 | TEMPLATE_VBOXMAINCOMP_LDFLAGS = $(filter-out '$(VBOX_GCC_RPATH_OPT)%',$(TEMPLATE_VBOXMAINEXE_LDFLAGS)) '$(VBOX_GCC_RPATH_OPT)$(VBOX_WITH_RELATIVE_RUNPATH)/..'
|
---|
3245 | endif
|
---|
3246 | endif
|
---|
3247 | endif
|
---|
3248 | TEMPLATE_VBOXMAINCOMP_LDFLAGS.darwin = $(filter-out -bind_at_load,$(TEMPLATE_VBOXMAINEXE_LDFLAGS.darwin)) \
|
---|
3249 | -current_version $(VBOX_VERSION_MAJOR).$(VBOX_VERSION_MINOR).$(VBOX_VERSION_BUILD) \
|
---|
3250 | -compatibility_version $(VBOX_VERSION_MAJOR).$(VBOX_VERSION_MINOR).$(VBOX_VERSION_BUILD)
|
---|
3251 |
|
---|
3252 | #
|
---|
3253 | # Template for building the Main static libraries.
|
---|
3254 | #
|
---|
3255 | # This differs from VBOXMAINDLL only that it zeroes out the _LIBS definition.
|
---|
3256 | #
|
---|
3257 | TEMPLATE_VBOXMAINLIB = VBox Main Component (static library)
|
---|
3258 | TEMPLATE_VBOXMAINLIB_EXTENDS = VBOXMAINDLL
|
---|
3259 | TEMPLATE_VBOXMAINLIB_LIBS =
|
---|
3260 |
|
---|
3261 | #
|
---|
3262 | # Template for building executables that use the VBox Main component.
|
---|
3263 | #
|
---|
3264 | TEMPLATE_VBOXMAINCLIENTEXE = VBox Main Client (executable)
|
---|
3265 | TEMPLATE_VBOXMAINCLIENTEXE_EXTENDS = VBOXMAINEXE
|
---|
3266 | ifeq ($(KBUILD_TARGET),win)
|
---|
3267 | TEMPLATE_VBOXMAINCLIENTEXE_LIBS.win = $(TEMPLATE_VBOXMAINEXE_LIBS.win) \
|
---|
3268 | $(PATH_SDK_WINPSDK_LIB)/User32.Lib \
|
---|
3269 | $(PATH_SDK_WINPSDK_LIB)/Shell32.Lib \
|
---|
3270 | $(PATH_SDK_WINPSDK_LIB)/ShLwApi.Lib \
|
---|
3271 | $(PATH_SDK_WINPSDK_LIB)/Ole32.Lib \
|
---|
3272 | $(PATH_SDK_WINPSDK_LIB)/OleAut32.Lib \
|
---|
3273 | $(PATH_SDK_WINPSDK_LIB)/Uuid.Lib
|
---|
3274 | else
|
---|
3275 | TEMPLATE_VBOXMAINCLIENTEXE_DEFS = $(TEMPLATE_VBOXMAINEXE_DEFS) \
|
---|
3276 | NDEBUG TRIMMED
|
---|
3277 | TEMPLATE_VBOXMAINCLIENTEXE_CXXFLAGS.linux = $(TEMPLATE_VBOXMAINEXE_CXXFLAGS.linux) \
|
---|
3278 | -pthread
|
---|
3279 | endif
|
---|
3280 |
|
---|
3281 | #
|
---|
3282 | # Template for building shared libraries / DLLs that use the VBox Main component.
|
---|
3283 | #
|
---|
3284 | # This differs from VBOXMAINCLIENTEXE only in PIC handling and similar DLL stuff.
|
---|
3285 | #
|
---|
3286 | TEMPLATE_VBOXMAINCLIENTDLL = VBox MAIN Client (shared library)
|
---|
3287 | TEMPLATE_VBOXMAINCLIENTDLL_EXTENDS = VBOXMAINCLIENTEXE
|
---|
3288 | ifeq ($(filter-out solaris.x86 %.amd64,$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH)),)
|
---|
3289 | ifneq ($(KBUILD_TARGET),win)
|
---|
3290 | TEMPLATE_VBOXMAINCLIENTDLL_DEFS = PIC $(TEMPLATE_VBOXMAINCLIENTEXE_DEFS)
|
---|
3291 | TEMPLATE_VBOXMAINCLIENTDLL_CFLAGS = -fPIC $(TEMPLATE_VBOXMAINCLIENTEXE_CFLAGS)
|
---|
3292 | TEMPLATE_VBOXMAINCLIENTDLL_CXXFLAGS = -fPIC $(TEMPLATE_VBOXMAINCLIENTEXE_CXXFLAGS)
|
---|
3293 | TEMPLATE_VBOXMAINCLIENTDLL_LDFLAGS = -fPIC $(TEMPLATE_VBOXMAINCLIENTEXE_LDFLAGS)
|
---|
3294 | endif
|
---|
3295 | endif
|
---|
3296 | TEMPLATE_VBOXMAINCLIENTDLL_LDFLAGS.darwin = $(filter-out -bind_at_load,$(TEMPLATE_VBOXMAINCLIENTEXE_LDFLAGS.darwin))
|
---|
3297 |
|
---|
3298 |
|
---|
3299 | #
|
---|
3300 | # Qt 4
|
---|
3301 | # Qt 4
|
---|
3302 | # Qt 4
|
---|
3303 | #
|
---|
3304 | ifdef VBOX_WITH_QTGUI
|
---|
3305 |
|
---|
3306 | # Guess VBOX_WITH_QT4_SUN
|
---|
3307 | ifndef VBOX_WITH_QT4_SUN
|
---|
3308 | ifndef VBOX_OSE
|
---|
3309 | if1of ($(KBUILD_TARGET), darwin solaris win)
|
---|
3310 | VBOX_WITH_QT4_SUN := 1
|
---|
3311 | endif
|
---|
3312 | endif
|
---|
3313 | endif
|
---|
3314 |
|
---|
3315 | #
|
---|
3316 | # Handmade configuration of qt4 - very annoying, this needs to
|
---|
3317 | # be cleaned up properly later some time (not important now).
|
---|
3318 | #
|
---|
3319 | ifeq ($(VBOX_PATH_QT4),)
|
---|
3320 | ifeq ($(KBUILD_TARGET),darwin)
|
---|
3321 | VBOX_PATH_QT4 := $(lastword $(sort $(wildcard $(PATH_DEVTOOLS_TRG)/qt/v4*)))
|
---|
3322 | ifeq ($(VBOX_PATH_QT4),)
|
---|
3323 | ifneq ($(wildcard /Library/Frameworks/QtCore.framework),)
|
---|
3324 | # Using the global installation (for OSE).
|
---|
3325 | VBOX_PATH_QT4 ?= /usr
|
---|
3326 | VBOX_PATH_QT4_FRAMEWORKS ?= /Library/Frameworks
|
---|
3327 | endif
|
---|
3328 | endif
|
---|
3329 | else if1of ($(KBUILD_TARGET), win)
|
---|
3330 | VBOX_PATH_QT4 ?= $(lastword $(sort $(wildcard $(PATH_DEVTOOLS_TRG)/qt/v4*)))
|
---|
3331 | else if1of ($(KBUILD_TARGET), solaris)
|
---|
3332 | VBOX_PATH_QT4 ?= $(lastword $(sort $(wildcard $(PATH_DEVTOOLS_TRG)/qt/v4*)))
|
---|
3333 | ifneq ($(VBOX_PATH_QT4),)
|
---|
3334 | VBOX_WITH_QT4_SUN = 1
|
---|
3335 | endif
|
---|
3336 | endif
|
---|
3337 | endif
|
---|
3338 | ifeq ($(VBOX_PATH_QT4),)
|
---|
3339 | if1of ($(USERNAME), bird)
|
---|
3340 | # gentoo (64-bit)
|
---|
3341 | VBOX_PATH_QT4 ?= /usr
|
---|
3342 | VBOX_PATH_QT4_LIB ?= /usr/lib/qt4
|
---|
3343 | endif
|
---|
3344 | endif
|
---|
3345 | VBOX_PATH_QT4 ?= /usr
|
---|
3346 | VBOX_PATH_QT4_LIB ?= $(VBOX_PATH_QT4)/lib
|
---|
3347 |
|
---|
3348 | # Hack LD_LIBRARY_PATH for stuff in tools.
|
---|
3349 | ifdef VBOX_WITH_QT4_SUN
|
---|
3350 | if1of ($(KBUILD_TARGET), linux)
|
---|
3351 | export LD_LIBRARY_PATH := $(VBOX_PATH_QT4_LIB):$(LD_LIBRARY_PATH)
|
---|
3352 | endif
|
---|
3353 | endif
|
---|
3354 |
|
---|
3355 |
|
---|
3356 | #
|
---|
3357 | # Template for building Qt GUI executables.
|
---|
3358 | #
|
---|
3359 | TEMPLATE_VBOXQT4GUIEXE = VBox Qt GUI Executable
|
---|
3360 | TEMPLATE_VBOXQT4GUIEXE_USES = qt4
|
---|
3361 | TEMPLATE_VBOXQT4GUIEXE_QTTOOL = QT4
|
---|
3362 | TEMPLATE_VBOXQT4GUIEXE_MOCTOOL = QT4
|
---|
3363 | TEMPLATE_VBOXQT4GUIEXE_UICTOOL = QT4
|
---|
3364 | TEMPLATE_VBOXQT4GUIEXE_RCCTOOL = QT4
|
---|
3365 | TEMPLATE_VBOXQT4GUIEXE_LRCTOOL = QT4
|
---|
3366 | TEMPLATE_VBOXQT4GUIEXE_SDKS = QT4
|
---|
3367 | ifdef VBOX_WITH_QT4_SUN
|
---|
3368 | TEMPLATE_VBOXQT4GUIEXE_QT_INFIX = VBox
|
---|
3369 | endif
|
---|
3370 | TEMPLATE_VBOXQT4GUIEXE_DEFS = IN_RING3 QT_NO_DEBUG QT_THREAD_SUPPORT QT_SHARED HAVE_CONFIG_H $(ARCH_BITS_DEFS)
|
---|
3371 | TEMPLATE_VBOXQT4GUIEXE_RCDEFS = $(TEMPLATE_VBOXR3EXE_RCDEFS)
|
---|
3372 |
|
---|
3373 | ifeq ($(KBUILD_TARGET),win)
|
---|
3374 | # Note! No use of VBOX_VCC_CRT_TYPE here yet as it requires a /MDd build of Qt as well.
|
---|
3375 | TEMPLATE_VBOXQT4GUIEXE_TOOL = $(VBOX_VCC_TOOL)
|
---|
3376 | TEMPLATE_VBOXQT4GUIEXE_DEFS += \
|
---|
3377 | _WIN32_WINNT=0x0500 UNICODE _UNICODE \
|
---|
3378 | QT_DLL _CRT_SECURE_NO_DEPRECATE \
|
---|
3379 | $(QMAKE_PRL_DEFINES)
|
---|
3380 | ## @todo VCC70 flags?
|
---|
3381 | ifdef VBOX_USE_VCC80
|
---|
3382 | TEMPLATE_VBOXQT4GUIEXE_CXXFLAGS = \
|
---|
3383 | -nologo -Zm200 -W3 -MD -Zi -EHsc -Zc:wchar_t-
|
---|
3384 | TEMPLATE_VBOXQT4GUIEXE_CXXFLAGS.debug = -RTCsu
|
---|
3385 | else
|
---|
3386 | TEMPLATE_VBOXQT4GUIEXE_CXXFLAGS = \
|
---|
3387 | -nologo -Zm200 -W3 -MD -Zi -GX
|
---|
3388 | TEMPLATE_VBOXQT4GUIEXE_CXXFLAGS.debug = -GZ
|
---|
3389 | endif
|
---|
3390 | TEMPLATE_VBOXQT4GUIEXE_INCS += \
|
---|
3391 | $(PATH_TOOL_$(VBOX_VCC_TOOL)_ATLMFC_INC)
|
---|
3392 | TEMPLATE_VBOXQT4GUIEXE_LDFLAGS = \
|
---|
3393 | /NOD /NOLOGO /INCREMENTAL:NO /MAPINFO:EXPORTS /DEBUG \
|
---|
3394 | /DELAYLOAD:oleaut32.dll
|
---|
3395 | TEMPLATE_VBOXQT4GUIEXE_SDKS += WINPSDK
|
---|
3396 | TEMPLATE_VBOXQT4GUIEXE_LIBS = \
|
---|
3397 | $(VBOX_LIBS_QT4) \
|
---|
3398 | $(LIB_RUNTIME) \
|
---|
3399 | $(PATH_TOOL_$(VBOX_VCC_TOOL)_LIB)/msvcprt.lib \
|
---|
3400 | $(PATH_TOOL_$(VBOX_VCC_TOOL)_LIB)/msvcrt.lib \
|
---|
3401 | $(PATH_TOOL_$(VBOX_VCC_TOOL)_LIB)/oldnames.lib \
|
---|
3402 | $(PATH_TOOL_$(VBOX_VCC_TOOL)_LIB)/delayimp.lib \
|
---|
3403 | $(PATH_TOOL_$(VBOX_VCC_TOOL)_ATLMFC_LIB)/atls.lib
|
---|
3404 | ifdef VBOX_WITH_DEBUG_VCC_CRT # VBoxCOM (static) is causing trouble of course.
|
---|
3405 | TEMPLATE_VBOXQT4GUIEXE_LIBS += \
|
---|
3406 | $(PATH_TOOL_$(VBOX_VCC_TOOL)_LIB)/msvcrt$(VBOX_VCC_CRT_TYPE).lib \
|
---|
3407 | $(PATH_TOOL_$(VBOX_VCC_TOOL)_LIB)/msvcprt$(VBOX_VCC_CRT_TYPE).lib
|
---|
3408 | endif
|
---|
3409 | TEMPLATE_VBOXQT4GUIEXE_POST_CMDS = $(VBOX_SIGN_IMAGE_CMDS)
|
---|
3410 |
|
---|
3411 | else # the gcc guys:
|
---|
3412 | TEMPLATE_VBOXQT4GUIEXE_TOOL = $(VBOX_GCC_TOOL)
|
---|
3413 | TEMPLATE_VBOXQT4GUIEXE_DEFS.linux = _REENTRANT
|
---|
3414 |
|
---|
3415 | TEMPLATE_VBOXQT4GUIEXE_DEFS.solaris = _REENTRANT
|
---|
3416 |
|
---|
3417 | TEMPLATE_VBOXQT4GUIEXE_INCS += \
|
---|
3418 | $(LIB_SDL_INC)
|
---|
3419 | TEMPLATE_VBOXQT4GUIEXE_CXXFLAGS = \
|
---|
3420 | -g -pipe $(filter-out -Wno-unused,$(VBOX_GCC_WARN)) -frtti -fno-exceptions -Wno-non-virtual-dtor \
|
---|
3421 | -Wno-long-long -fshort-wchar -fno-strict-aliasing \
|
---|
3422 | $(VBOX_GCC_fvisibility-hidden) $(VBOX_GCC_fvisibility-inlines-hidden)
|
---|
3423 | TEMPLATE_VBOXQT4GUIEXE_CXXFLAGS.x86 = -m32
|
---|
3424 | TEMPLATE_VBOXQT4GUIEXE_CXXFLAGS.amd64 = -m64
|
---|
3425 | TEMPLATE_VBOXQT4GUIEXE_CXXFLAGS.linux = -pthread
|
---|
3426 | TEMPLATE_VBOXQT4GUIEXE_LDFLAGS.x86 = -m32
|
---|
3427 | TEMPLATE_VBOXQT4GUIEXE_LDFLAGS.amd64 = -m64
|
---|
3428 | TEMPLATE_VBOXQT4GUIEXE_LIBS = \
|
---|
3429 | $(VBOX_LIBS_QT4) \
|
---|
3430 | $(LIB_SDL) \
|
---|
3431 | $(LIB_RUNTIME) \
|
---|
3432 | $(LIB_REM) \
|
---|
3433 | $(LIB_VMM)
|
---|
3434 |
|
---|
3435 | ifeq ($(KBUILD_TARGET),linux)
|
---|
3436 | TEMPLATE_VBOXQT4GUIEXE_LDFLAGS += $(VBOX_LD_as_needed)
|
---|
3437 | TEMPLATE_VBOXQT4GUIEXE_LIBS += \
|
---|
3438 | $(VBOX_XCURSOR_LIBS) \
|
---|
3439 | Xext \
|
---|
3440 | X11
|
---|
3441 | TEMPLATE_VBOXQT4GUIEXE_LIBPATH += \
|
---|
3442 | $(VBOX_LIBPATH_X11)
|
---|
3443 | else ifeq ($(KBUILD_TARGET),darwin)
|
---|
3444 | TEMPLATE_VBOXQT4GUIEXE_DEFS.darwin += $(VBOX_DARWIN_DEF_SDK_DEFS)
|
---|
3445 | TEMPLATE_VBOXQT4GUIEXE_CFLAGS.darwin += $(VBOX_DARWIN_DEF_SDK_CFLAGS)
|
---|
3446 | TEMPLATE_VBOXQT4GUIEXE_CXXFLAGS.darwin += $(VBOX_DARWIN_DEF_SDK_CXXFLAGS)
|
---|
3447 | TEMPLATE_VBOXQT4GUIEXE_OBJCFLAGS.darwin += $(VBOX_DARWIN_DEF_SDK_OBJCFLAGS)
|
---|
3448 | TEMPLATE_VBOXQT4GUIEXE_LDFLAGS.darwin += $(VBOX_DARWIN_DEF_SDK_LDFLAGS) -bind_at_load
|
---|
3449 | TEMPLATE_VBOXQT4GUIEXE_LIBS +=
|
---|
3450 | TEMPLATE_VBOXQT4GUIEXE_LIBPATH +=
|
---|
3451 | else
|
---|
3452 | TEMPLATE_VBOXQT4GUIEXE_INCS += \
|
---|
3453 | $(VBOX_XCURSOR_INCS)
|
---|
3454 | TEMPLATE_VBOXQT4GUIEXE_LIBS += \
|
---|
3455 | $(VBOX_XCURSOR_LIBS) \
|
---|
3456 | Xext \
|
---|
3457 | X11 \
|
---|
3458 | m \
|
---|
3459 | $(LIB_PTHREAD)
|
---|
3460 | TEMPLATE_VBOXQT4GUIEXE_LIBPATH += \
|
---|
3461 | $(VBOX_LIBPATH_X11)
|
---|
3462 | ifeq ($(KBUILD_TARGET),freebsd)
|
---|
3463 | TEMPLATE_VBOXQT4GUIEXE_INCS += \
|
---|
3464 | /usr/include \
|
---|
3465 | /usr/X11R6/include \
|
---|
3466 | /usr/local/include
|
---|
3467 | TEMPLATE_VBOXQT4GUIEXE_LIBPATH += \
|
---|
3468 | /usr/lib \
|
---|
3469 | /usr/X11R6/lib \
|
---|
3470 | /usr/local/lib
|
---|
3471 | endif
|
---|
3472 | ifeq ($(KBUILD_TARGET),solaris)
|
---|
3473 | TEMPLATE_VBOXQT4GUIEXE_LIBS += \
|
---|
3474 | rt socket nsl
|
---|
3475 | endif
|
---|
3476 | endif
|
---|
3477 | # Assume the Qt shared objects are in the same directory as the executable, on Solaris too.
|
---|
3478 | ifdef VBOX_WITH_RUNPATH
|
---|
3479 | TEMPLATE_VBOXQT4GUIEXE_LDFLAGS += '$(VBOX_GCC_RPATH_OPT)$(VBOX_WITH_RUNPATH)'
|
---|
3480 | else ifdef VBOX_WITH_RELATIVE_RUNPATH
|
---|
3481 | TEMPLATE_VBOXQT4GUIEXE_LDFLAGS += '$(VBOX_GCC_RPATH_OPT)$(VBOX_WITH_RELATIVE_RUNPATH)'
|
---|
3482 | endif
|
---|
3483 |
|
---|
3484 | endif
|
---|
3485 |
|
---|
3486 | # Add COM/XPCOM stuff
|
---|
3487 | TEMPLATE_VBOXQT4GUIEXE_LIBS += \
|
---|
3488 | $(PATH_LIB)/VBoxCOM$(VBOX_SUFF_LIB)
|
---|
3489 | ifdef VBOX_WITH_XPCOM
|
---|
3490 | ## @todo may be worth creating the VBOX_XPCOM SDK def, or just a SDK_VBOXXPCOM.
|
---|
3491 | TEMPLATE_VBOXQT4GUIEXE_DEFS += VBOX_WITH_XPCOM
|
---|
3492 | ifdef VBOX_WITH_XPCOM_NAMESPACE_CLEANUP
|
---|
3493 | TEMPLATE_VBOXQT4GUIEXE_DEFS += VBOX_WITH_XPCOM_NAMESPACE_CLEANUP
|
---|
3494 | endif
|
---|
3495 | TEMPLATE_VBOXQT4GUIEXE_INCS += \
|
---|
3496 | $(VBOX_XPCOM_INCS)
|
---|
3497 | TEMPLATE_VBOXQT4GUIEXE_LIBS += \
|
---|
3498 | $(LIB_XPCOM)
|
---|
3499 | TEMPLATE_VBOXQT4GUIEXE_INTERMEDIATES += \
|
---|
3500 | $(VBOX_PATH_SDK)/bindings/xpcom/include/VirtualBox_XPCOM.h
|
---|
3501 | else # COM
|
---|
3502 | TEMPLATE_VBOXQT4GUIEXE_INCS += \
|
---|
3503 | $(VBOX_PATH_SDK)/bindings/mscom/include
|
---|
3504 | TEMPLATE_VBOXQT4GUIEXE_INTERMEDIATES += \
|
---|
3505 | $(VBOX_PATH_SDK)/bindings/mscom/include/VirtualBox.h
|
---|
3506 | endif # COM
|
---|
3507 |
|
---|
3508 |
|
---|
3509 | #
|
---|
3510 | # Template for building Qt GUI components.
|
---|
3511 | #
|
---|
3512 | TEMPLATE_VBOXQT4GUI = VBox Qt GUI Components
|
---|
3513 | TEMPLATE_VBOXQT4GUI_EXTENDS = VBOXQT4GUIEXE
|
---|
3514 | TEMPLATE_VBOXQT4GUI_LIBS = $(filter-out $(QTMAIN),$(TEMPLATE_VBOXQT4GUIEXE_LIBS))
|
---|
3515 | ifeq ($(KBUILD_TARGET),darwin)
|
---|
3516 | TEMPLATE_VBOXQT4GUI_LDFLAGS.darwin += $(filter-out -bind_at_load,$(TEMPLATE_VBOXQT4GUIEXE_LDFLAGS.darwin)) \
|
---|
3517 | -current_version $(VBOX_VERSION_MAJOR).$(VBOX_VERSION_MINOR).$(VBOX_VERSION_BUILD) \
|
---|
3518 | -compatibility_version $(VBOX_VERSION_MAJOR).$(VBOX_VERSION_MINOR).$(VBOX_VERSION_BUILD)
|
---|
3519 | endif
|
---|
3520 | ifeq ($(filter-out solaris.x86 %.amd64,$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH)),)
|
---|
3521 | ifneq ($(KBUILD_TARGET),win)
|
---|
3522 | TEMPLATE_VBOXQT4GUI_DEFS = PIC $(TEMPLATE_VBOXQT4GUIEXE_DEFS)
|
---|
3523 | TEMPLATE_VBOXQT4GUI_CFLAGS = -fPIC $(TEMPLATE_VBOXQT4GUIEXE_CFLAGS)
|
---|
3524 | TEMPLATE_VBOXQT4GUI_CXXFLAGS = -fPIC $(TEMPLATE_VBOXQT4GUIEXE_CXXFLAGS)
|
---|
3525 | TEMPLATE_VBOXQT4GUI_LDFLAGS = -fPIC $(TEMPLATE_VBOXQT4GUIEXE_LDFLAGS)
|
---|
3526 | endif
|
---|
3527 | endif
|
---|
3528 |
|
---|
3529 | endif # VBOX_WITH_QTGUI
|
---|
3530 |
|
---|
3531 |
|
---|
3532 | #
|
---|
3533 | # Template for building build bldprogs.
|
---|
3534 | #
|
---|
3535 | TEMPLATE_VBOXBLDPROG = VBox Build Program
|
---|
3536 | TEMPLATE_VBOXBLDPROG_DEFS = IN_RING3
|
---|
3537 | ifeq ($(KBUILD_HOST),win)
|
---|
3538 | ifeq ($(KBUILD_HOST_ARCH),x86)
|
---|
3539 | ifdef VBOX_USE_VCC80
|
---|
3540 | TEMPLATE_VBOXBLDPROG_TOOL = VCC80X86
|
---|
3541 | else
|
---|
3542 | TEMPLATE_VBOXBLDPROG_TOOL = VCC70
|
---|
3543 | endif
|
---|
3544 | TEMPLATE_VBOXBLDPROG_SDKS = WIN32SDK
|
---|
3545 | else
|
---|
3546 | TEMPLATE_VBOXBLDPROG_TOOL = VCC80AMD64
|
---|
3547 | TEMPLATE_VBOXBLDPROG_SDKS = WIN64SDK
|
---|
3548 | endif
|
---|
3549 | ifneq ($(TEMPLATE_VBOXBLDPROG_TOOL),VCC70)
|
---|
3550 | TEMPLATE_VBOXBLDPROG_CXXFLAGS = -Zi -Zl -GR- -EHs- -GF -MT$(VBOX_VCC_CRT_TYPE) -W3 -wd4996 -Zc:wchar_t-
|
---|
3551 | TEMPLATE_VBOXBLDPROG_CXXFLAGS.debug = -RTCsu
|
---|
3552 | TEMPLATE_VBOXBLDPROG_CXXFLAGS.release = -O2 -Oy- -GS-
|
---|
3553 | else
|
---|
3554 | TEMPLATE_VBOXBLDPROG_CXXFLAGS = -Zi -Zl -GR- -EHs- -GF -MT$(VBOX_VCC_CRT_TYPE) -W3
|
---|
3555 | TEMPLATE_VBOXBLDPROG_CXXFLAGS.debug = -GZ
|
---|
3556 | TEMPLATE_VBOXBLDPROG_CXXFLAGS.release = -Ogitb2 -Oy-
|
---|
3557 | endif
|
---|
3558 | TEMPLATE_VBOXBLDPROG_CXXFLAGS.profile = $(TEMPLATE_VBOXBLDPROG_CXXFLAGS.release)
|
---|
3559 | TEMPLATE_VBOXBLDPROG_CXXFLAGS.kprofile = $(TEMPLATE_VBOXBLDPROG_CXXFLAGS.release)
|
---|
3560 | TEMPLATE_VBOXBLDPROG_CFLAGS = $(TEMPLATE_VBOXBLDPROG_CXXFLAGS)
|
---|
3561 | TEMPLATE_VBOXBLDPROG_CFLAGS.debug = $(TEMPLATE_VBOXBLDPROG_CXXFLAGS.debug)
|
---|
3562 | TEMPLATE_VBOXBLDPROG_CFLAGS.release = $(TEMPLATE_VBOXBLDPROG_CXXFLAGS.release)
|
---|
3563 | TEMPLATE_VBOXBLDPROG_CFLAGS.profile = $(TEMPLATE_VBOXBLDPROG_CXXFLAGS.profile)
|
---|
3564 | TEMPLATE_VBOXBLDPROG_CFLAGS.kprofile = $(TEMPLATE_VBOXBLDPROG_CXXFLAGS.kprofile)
|
---|
3565 | TEMPLATE_VBOXBLDPROG_LDFLAGS = \
|
---|
3566 | /NOD /INCREMENTAL:NO /MAPINFO:EXPORTS /LARGEADDRESSAWARE /DEBUG \
|
---|
3567 | /DISALLOWLIB:libc$(VBOX_VCC_CRT_TYPE_N).lib \
|
---|
3568 | /DISALLOWLIB:libcmt$(VBOX_VCC_CRT_TYPE_N).lib \
|
---|
3569 | /DISALLOWLIB:msvcrt.lib \
|
---|
3570 | /DISALLOWLIB:msvcrtd.lib \
|
---|
3571 | /DISALLOWLIB:msvcprt.lib \
|
---|
3572 | /DISALLOWLIB:msvcprtd.lib
|
---|
3573 | TEMPLATE_VBOXBLDPROG_LIBS = \
|
---|
3574 | $(PATH_TOOL_$(TEMPLATE_VBOXBLDPROG_TOOL)_LIB)/oldnames.lib \
|
---|
3575 | $(PATH_TOOL_$(TEMPLATE_VBOXBLDPROG_TOOL)_LIB)/libcmt$(VBOX_VCC_CRT_TYPE).lib \
|
---|
3576 | $(PATH_TOOL_$(TEMPLATE_VBOXBLDPROG_TOOL)_LIB)/libcpmt$(VBOX_VCC_CRT_TYPE).lib
|
---|
3577 |
|
---|
3578 | else
|
---|
3579 | # (gcc of some kind )
|
---|
3580 | TEMPLATE_VBOXBLDPROG_TOOL = GXX3
|
---|
3581 | TEMPLATE_VBOXBLDPROG_CFLAGS = -g -pipe $(VBOX_GCC_PEDANTIC_C) $(VBOX_GCC_Wno-variadic-macros)
|
---|
3582 | TEMPLATE_VBOXBLDPROG_CFLAGS.x86 = -m32
|
---|
3583 | TEMPLATE_VBOXBLDPROG_CFLAGS.amd64 = -m64
|
---|
3584 | TEMPLATE_VBOXBLDPROG_CFLAGS.release = -O2 -fno-omit-frame-pointer -fno-strict-aliasing
|
---|
3585 | TEMPLATE_VBOXBLDPROG_CFLAGS.profile = $(TEMPLATE_VBOXBLDPROG_CXXFLAGS.profile)
|
---|
3586 | TEMPLATE_VBOXBLDPROG_CFLAGS.kprofile = $(TEMPLATE_VBOXBLDPROG_CXXFLAGS.kprofile)
|
---|
3587 | TEMPLATE_VBOXBLDPROG_CXXFLAGS = -g -pipe $(VBOX_GCC_PEDANTIC_CXX)
|
---|
3588 | TEMPLATE_VBOXBLDPROG_CXXFLAGS.x86 = -m32
|
---|
3589 | TEMPLATE_VBOXBLDPROG_CXXFLAGS.amd64 = -m64
|
---|
3590 | TEMPLATE_VBOXBLDPROG_CXXFLAGS.release = -O2 -fno-omit-frame-pointer -fno-strict-aliasing
|
---|
3591 | TEMPLATE_VBOXBLDPROG_CXXFLAGS.profile = $(TEMPLATE_VBOXBLDPROG_CXXFLAGS.release)
|
---|
3592 | TEMPLATE_VBOXBLDPROG_CXXFLAGS.kprofile = $(TEMPLATE_VBOXBLDPROG_CXXFLAGS.release)
|
---|
3593 | TEMPLATE_VBOXBLDPROG_LDFLAGS.x86 = -m32
|
---|
3594 | TEMPLATE_VBOXBLDPROG_LDFLAGS.amd64 = -m64
|
---|
3595 | ifeq ($(KBUILD_HOST),linux)
|
---|
3596 | TEMPLATE_VBOXBLDPROG_LIBS = pthread m rt dl
|
---|
3597 | else ifeq ($(KBUILD_HOST),os2)
|
---|
3598 | TEMPLATE_VBOXBLDPROG_TOOL = GXX3OMF
|
---|
3599 | TEMPLATE_VBOXBLDPROG_LIBS = socket iconv
|
---|
3600 | else ifeq ($(KBUILD_HOST),darwin)
|
---|
3601 | TEMPLATE_VBOXBLDPROG_TOOL = GXX4MACHO
|
---|
3602 | ifeq ($(KBUILD_HOST_ARCH).$(KBUILD_TARGET_ARCH),amd64.x86) # MESS ALERT!
|
---|
3603 | TEMPLATE_VBOXBLDPROG_DEFS.darwin = $(VBOX_DARWIN_DEF_SDK_10_6_DEFS)
|
---|
3604 | TEMPLATE_VBOXBLDPROG_CFLAGS.darwin = $(VBOX_DARWIN_DEF_SDK_10_6_CFLAGS) -fno-common
|
---|
3605 | TEMPLATE_VBOXBLDPROG_CXXFLAGS.darwin = $(VBOX_DARWIN_DEF_SDK_10_6_CXXFLAGS)
|
---|
3606 | TEMPLATE_VBOXBLDPROG_OBJCFLAGS.darwin = $(VBOX_DARWIN_DEF_SDK_10_6_OBJCFLAGS)
|
---|
3607 | TEMPLATE_VBOXBLDPROG_LDFLAGS.darwin = $(VBOX_DARWIN_DEF_SDK_10_6_LDFLAGS)
|
---|
3608 | else ifdef VBOX_MACOS_10_5_WORKAROUND # enable this if you have problems linking xpidl and is running 10.5 or later.
|
---|
3609 | TEMPLATE_VBOXBLDPROG_DEFS.darwin = $(VBOX_DARWIN_DEF_SDK_10_5_DEFS)
|
---|
3610 | TEMPLATE_VBOXBLDPROG_CFLAGS.darwin = $(VBOX_DARWIN_DEF_SDK_10_5_CFLAGS) -fno-common
|
---|
3611 | TEMPLATE_VBOXBLDPROG_CXXFLAGS.darwin = $(VBOX_DARWIN_DEF_SDK_10_5_CXXFLAGS)
|
---|
3612 | TEMPLATE_VBOXBLDPROG_OBJCFLAGS.darwin = $(VBOX_DARWIN_DEF_SDK_10_5_OBJCFLAGS)
|
---|
3613 | TEMPLATE_VBOXBLDPROG_LDFLAGS.darwin = $(VBOX_DARWIN_DEF_SDK_10_5_LDFLAGS)
|
---|
3614 | else
|
---|
3615 | TEMPLATE_VBOXBLDPROG_DEFS.darwin = $(VBOX_DARWIN_DEF_SDK_DEFS)
|
---|
3616 | TEMPLATE_VBOXBLDPROG_CFLAGS.darwin = $(VBOX_DARWIN_DEF_SDK_CFLAGS) -fno-common
|
---|
3617 | TEMPLATE_VBOXBLDPROG_CXXFLAGS.darwin = $(VBOX_DARWIN_DEF_SDK_CXXFLAGS)
|
---|
3618 | TEMPLATE_VBOXBLDPROG_OBJCFLAGS.darwin = $(VBOX_DARWIN_DEF_SDK_OBJCFLAGS)
|
---|
3619 | TEMPLATE_VBOXBLDPROG_LDFLAGS.darwin = $(VBOX_DARWIN_DEF_SDK_LDFLAGS)
|
---|
3620 | endif
|
---|
3621 | TEMPLATE_VBOXBLDPROG_OBJCFLAGS.darwin.x86= -m32
|
---|
3622 | TEMPLATE_VBOXBLDPROG_OBJCFLAGS.darwin.amd64= -m64
|
---|
3623 | TEMPLATE_VBOXBLDPROG_LIBS =
|
---|
3624 | else if1of ($(KBUILD_HOST), freebsd netbsd openbsd)
|
---|
3625 | TEMPLATE_VBOXBLDPROG_TOOL = GXX3
|
---|
3626 | TEMPLATE_VBOXBLDPROG_LIBS =
|
---|
3627 | TEMPLATE_VBOXBLDPROG_INCS += \
|
---|
3628 | /usr/include \
|
---|
3629 | /usr/X11R6/include \
|
---|
3630 | /usr/local/include
|
---|
3631 | TEMPLATE_VBOXBLDPROG_LIBPATH += \
|
---|
3632 | /usr/lib \
|
---|
3633 | /usr/X11R6/lib \
|
---|
3634 | /usr/local/lib
|
---|
3635 | else ifeq ($(KBUILD_HOST),solaris)
|
---|
3636 | TEMPLATE_VBOXBLDPROG_TOOL = GXX3PLAIN
|
---|
3637 | TEMPLATE_VBOXBLDPROG_LIBS = rt
|
---|
3638 | else
|
---|
3639 | $(warning Warning: VBOX Build: Target $(KBUILD_HOST) is not officially supported!)
|
---|
3640 | endif
|
---|
3641 |
|
---|
3642 | endif # !win
|
---|
3643 |
|
---|
3644 |
|
---|
3645 | #
|
---|
3646 | # Windows rc workaround for crosscompiling.
|
---|
3647 | # (Some (old) Wine versions fails loading msvcrt.dll from the VCC bin directory.)
|
---|
3648 | #
|
---|
3649 | ifneq ($(KBUILD_HOST),win)
|
---|
3650 | TOOL_VCC80X86_RC := $(EXEC_X86_WIN32) $(PATH_DEVTOOLS)/win.x86/bin/rc.exe
|
---|
3651 | TOOL_VCC80AMD64_RC := $(EXEC_X86_WIN32) $(PATH_DEVTOOLS)/win.x86/bin/rc.exe
|
---|
3652 | TOOL_VCC70_RC := $(EXEC_X86_WIN32) $(PATH_DEVTOOLS)/win.x86/bin/rc.exe
|
---|
3653 | WIN32_MC = $(EXEC_X86_WIN32) $(PATH_DEVTOOLS)/win.x86/bin/mc.exe
|
---|
3654 | else
|
---|
3655 | WIN32_MC = $(EXEC_X86_WIN32) $(firstword $(wildcard \
|
---|
3656 | $(PATH_SDK_WINPSDK_BIN)/MC.Exe\
|
---|
3657 | $(PATH_SDK_WINPSDK)/Bin/MC.Exe\
|
---|
3658 | $(PATH_SDK_WIN32SDK_BIN)/MC.Exe\
|
---|
3659 | $(PATH_SDK_WIN64SDK_BIN)/MC.Exe\
|
---|
3660 | $(PATH_DEVTOOLS)/win.x86/bin/mc.exe\
|
---|
3661 | ) Sorry_Cannot_find_mc_in_the_PSDK)
|
---|
3662 | endif
|
---|
3663 |
|
---|
3664 |
|
---|
3665 | #
|
---|
3666 | # Template for building Linux host tools (only for KBUILD_TARGET=l4).
|
---|
3667 | #
|
---|
3668 | TEMPLATE_VBOXLNXHOSTR3EXE = Template for building linux host programs when targeting L4.
|
---|
3669 | TEMPLATE_VBOXLNXHOSTR3EXE_INST = $(INST_BIN)
|
---|
3670 | TEMPLATE_VBOXLNXHOSTR3EXE_BLD_TRG = linux
|
---|
3671 | TEMPLATE_VBOXLNXHOSTR3EXE_TOOL = $(VBOX_GCC_TOOL)
|
---|
3672 | TEMPLATE_VBOXLNXHOSTR3EXE_ASTOOL = YASM
|
---|
3673 | TEMPLATE_VBOXLNXHOSTR3EXE_DLLSUFF = .so
|
---|
3674 | TEMPLATE_VBOXLNXHOSTR3EXE_ASFLAGS = $(VBOX_ASFLAGS)
|
---|
3675 | TEMPLATE_VBOXLNXHOSTR3EXE_DEFS = IN_RING3 $(ARCH_BITS_DEFS)
|
---|
3676 | TEMPLATE_VBOXLNXHOSTR3EXE_CXXFLAGS = -g -pipe $(VBOX_GCC_PEDANTIC_CXX) $(VBOX_GCC_fno-stack-protector)
|
---|
3677 | TEMPLATE_VBOXLNXHOSTR3EXE_CXXFLAGS.debug = -fno-inline
|
---|
3678 | TEMPLATE_VBOXLNXHOSTR3EXE_CXXFLAGS.release = -O2 -fno-omit-frame-pointer -fno-strict-aliasing
|
---|
3679 | TEMPLATE_VBOXLNXHOSTR3EXE_CXXFLAGS.profile = $(TEMPLATE_VBOXLNXHOSTR3EXE_CXXFLAGS.release)
|
---|
3680 | TEMPLATE_VBOXLNXHOSTR3EXE_CXXFLAGS.kprofile = $(TEMPLATE_VBOXLNXHOSTR3EXE_CXXFLAGS.release)
|
---|
3681 | TEMPLATE_VBOXLNXHOSTR3EXE_CFLAGS.release = $(TEMPLATE_VBOXLNXHOSTR3EXE_CXXFLAGS.release)
|
---|
3682 | TEMPLATE_VBOXLNXHOSTR3EXE_CFLAGS.debug = $(TEMPLATE_VBOXLNXHOSTR3EXE_CXXFLAGS.debug)
|
---|
3683 | TEMPLATE_VBOXLNXHOSTR3EXE_CFLAGS.profile = $(TEMPLATE_VBOXLNXHOSTR3EXE_CXXFLAGS.profile)
|
---|
3684 | TEMPLATE_VBOXLNXHOSTR3EXE_CFLAGS.kprofile = $(TEMPLATE_VBOXLNXHOSTR3EXE_CXXFLAGS.kprofile)
|
---|
3685 | TEMPLATE_VBOXLNXHOSTR3EXE_CFLAGS = -g -pipe $(VBOX_GCC_PEDANTIC_C) $(VBOX_GCC_fno-stack-protector)
|
---|
3686 | TEMPLATE_VBOXLNXHOSTR3EXE_LIBS = pthread m rt dl
|
---|
3687 |
|
---|
3688 | TEMPLATE_VBOXLNXHOSTR3LIB = Template for linux host libraries.
|
---|
3689 | TEMPLATE_VBOXLNXHOSTR3LIB_EXTENDS = VBOXLNXHOSTR3EXE
|
---|
3690 | TEMPLATE_VBOXLNXHOSTR3LIB_INST = $(INST_LIB)
|
---|
3691 |
|
---|
3692 |
|
---|
3693 | #
|
---|
3694 | # Template for building R3 programs for the guest additions.
|
---|
3695 | # Note: Make sure you don't break VBOXGUESTR3CPPEXE when changing this.
|
---|
3696 | #
|
---|
3697 | TEMPLATE_VBOXGUESTR3EXE = VBox Guest Program
|
---|
3698 | ifeq ($(KBUILD_TARGET),win)
|
---|
3699 | TEMPLATE_VBOXGUESTR3EXE_EXTENDS = VBOXR3EXE
|
---|
3700 | TEMPLATE_VBOXGUESTR3EXE_SDKS = $(TEMPLATE_VBOXR3EXE_SDKS) VBOX_NTDLL
|
---|
3701 | TEMPLATE_VBOXGUESTR3EXE_CFLAGS = $(filter-out -MD$(VBOX_VCC_CRT_TYPE), $(TEMPLATE_VBOXR3EXE_CFLAGS)) -MT$(VBOX_VCC_CRT_TYPE)
|
---|
3702 | TEMPLATE_VBOXGUESTR3EXE_CXXFLAGS = $(filter-out -MD$(VBOX_VCC_CRT_TYPE), $(TEMPLATE_VBOXR3EXE_CFLAGS)) -MT$(VBOX_VCC_CRT_TYPE)
|
---|
3703 | TEMPLATE_VBOXGUESTR3EXE_LDFLAGS = $(filter-out /DISALLOWLIB:libcmt$(VBOX_VCC_CRT_TYPE).lib /DISALLOWLIB:libcpmt$(VBOX_VCC_CRT_TYPE).lib, $(TEMPLATE_VBOXR3EXE_LDFLAGS)) \
|
---|
3704 | /DISALLOWLIB:msvcrt$(VBOX_VCC_CRT_TYPE).lib \
|
---|
3705 | /DISALLOWLIB:msvcprt$(VBOX_VCC_CRT_TYPE).lib
|
---|
3706 | TEMPLATE_VBOXGUESTR3EXE_LIBS = \
|
---|
3707 | $(PATH_TOOL_$(TEMPLATE_VBOXGUESTR3EXE_TOOL)_LIB)/oldnames.lib \
|
---|
3708 | $(PATH_TOOL_$(TEMPLATE_VBOXGUESTR3EXE_TOOL)_LIB)/libcmt$(VBOX_VCC_CRT_TYPE).lib \
|
---|
3709 | $(PATH_TOOL_$(TEMPLATE_VBOXGUESTR3EXE_TOOL)_LIB)/libcpmt$(VBOX_VCC_CRT_TYPE).lib
|
---|
3710 | else # the gcc guys
|
---|
3711 | TEMPLATE_VBOXGUESTR3EXE_EXTENDS = VBOXR3EXE
|
---|
3712 | TEMPLATE_VBOXGUESTR3EXE_TOOL := $(subst GXX,GCC,$(TEMPLATE_VBOXR3EXE_TOOL))
|
---|
3713 | TEMPLATE_VBOXGUESTR3EXE_CXXFLAGS = $(TEMPLATE_VBOXR3EXE_CXXFLAGS) -fno-exceptions
|
---|
3714 | TEMPLATE_VBOXGUESTR3EXE_LDFLAGS = $(filter-out '$(VBOX_GCC_RPATH_OPT)%,$(TEMPLATE_VBOXR3EXE_LDFLAGS))
|
---|
3715 | TEMPLATE_VBOXGUESTR3EXE_LDFLAGS.linux = $(filter-out $(VBOX_GCC_ORIGIN_OPT),$(TEMPLATE_VBOXR3EXE_LDFLAGS.linux))
|
---|
3716 | endif
|
---|
3717 | TEMPLATE_VBOXGUESTR3EXE_INST = $(INST_ADDITIONS)
|
---|
3718 | TEMPLATE_VBOXGUESTR3EXE_DEFS := $(TEMPLATE_VBOXR3EXE_DEFS) IN_GUEST IN_GUEST_R3 IN_RT_R3
|
---|
3719 | TEMPLATE_VBOXGUESTR3EXE_DEFS.linux := $(TEMPLATE_VBOXR3EXE_DEFS.linux) LOG_USE_C99 RT_WITHOUT_EXEC_ALLOC
|
---|
3720 | ifeq ($(KBUILD_TARGET),linux) # As few libs as possible on linux.
|
---|
3721 | TEMPLATE_VBOXGUESTR3EXE_LIBS = pthread rt m
|
---|
3722 | endif
|
---|
3723 | if1of ($(KBUILD_TARGET), freebsd netbsd openbsd)
|
---|
3724 | TEMPLATE_VBOXGUESTR3EXE_LIBS = $(TEMPLATE_VBOXR3EXE_LIBS) iconv
|
---|
3725 | endif
|
---|
3726 |
|
---|
3727 |
|
---|
3728 | #
|
---|
3729 | # Template for building R3 (dynamic) libraries for the guest additions.
|
---|
3730 | #
|
---|
3731 | TEMPLATE_VBOXGUESTR3DLL = VBox Guest User Dynamic Libraries
|
---|
3732 | TEMPLATE_VBOXGUESTR3DLL_EXTENDS = VBOXGUESTR3EXE
|
---|
3733 | ## @todo add a INSTFUN that separates dlls and libs.
|
---|
3734 | ifn1of ($(KBUILD_TARGET), os2 win)
|
---|
3735 | TEMPLATE_VBOXGUESTR3DLL_DEFS = $(TEMPLATE_VBOXGUESTR3EXE_DEFS) PIC
|
---|
3736 | TEMPLATE_VBOXGUESTR3DLL_CFLAGS = $(TEMPLATE_VBOXGUESTR3EXE_CFLAGS) -fPIC
|
---|
3737 | TEMPLATE_VBOXGUESTR3DLL_CXXFLAGS = $(TEMPLATE_VBOXGUESTR3EXE_CXXFLAGS) -fPIC -fno-exceptions
|
---|
3738 | TEMPLATE_VBOXGUESTR3DLL_LDFLAGS = $(TEMPLATE_VBOXGUESTR3EXE_LDFLAGS) -fPIC
|
---|
3739 | endif
|
---|
3740 |
|
---|
3741 | #
|
---|
3742 | # Template for building R3 (static) libraries for the guest additions.
|
---|
3743 | #
|
---|
3744 | TEMPLATE_VBOXGUESTR3LIB = VBox Guest User Libraries
|
---|
3745 | TEMPLATE_VBOXGUESTR3LIB_EXTENDS = VBOXGUESTR3EXE
|
---|
3746 | TEMPLATE_VBOXGUESTR3LIB_INST = $(INST_ADDITIONS_LIB)
|
---|
3747 | if1of ($(KBUILD_TARGET), solaris) ## @todo r=bird: Fix the *R3Mini template to VBOXGUESTR3DLL and remove this hack.
|
---|
3748 | TEMPLATE_VBOXGUESTR3LIB_DEFS = $(TEMPLATE_VBOXGUESTR3EXE_DEFS) PIC
|
---|
3749 | TEMPLATE_VBOXGUESTR3LIB_CFLAGS = $(TEMPLATE_VBOXGUESTR3EXE_CFLAGS) -fPIC
|
---|
3750 | TEMPLATE_VBOXGUESTR3LIB_CXXFLAGS = $(TEMPLATE_VBOXGUESTR3EXE_CXXFLAGS) -fPIC -fno-exceptions
|
---|
3751 | endif
|
---|
3752 |
|
---|
3753 | #
|
---|
3754 | # Template for building R3 programs for the guest additions (no -pedantic)
|
---|
3755 | #
|
---|
3756 | TEMPLATE_VBOXGUESTR3NPEXE = VBox Guest Program Non-pedantic
|
---|
3757 | TEMPLATE_VBOXGUESTR3NPEXE_EXTENDS = VBOXGUESTR3EXE
|
---|
3758 | ifneq ($(KBUILD_TARGET),win) # gcc only
|
---|
3759 | TEMPLATE_VBOXGUESTR3NPEXE_CXXFLAGS = $(filter-out -pedantic -Wshadow,$(TEMPLATE_VBOXGUESTR3EXE_CXXFLAGS)) -Wno-sign-compare
|
---|
3760 | TEMPLATE_VBOXGUESTR3NPEXE_CFLAGS = $(filter-out -pedantic -Wshadow -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations,$(TEMPLATE_VBOXGUESTR3EXE_CFLAGS)) -Wno-sign-compare
|
---|
3761 | endif
|
---|
3762 |
|
---|
3763 | #
|
---|
3764 | # Template for building R3 (dynamic) libraries for the guest additions (no -pedantic)
|
---|
3765 | #
|
---|
3766 | TEMPLATE_VBOXGUESTR3NPDLL = VBox Guest User Dynamic Libraries Non-pedantic
|
---|
3767 | TEMPLATE_VBOXGUESTR3NPDLL_EXTENDS = VBOXGUESTR3NPEXE
|
---|
3768 | ## @todo add a INSTFUN that separates dlls and libs.
|
---|
3769 | ifn1of ($(KBUILD_TARGET), os2 win)
|
---|
3770 | TEMPLATE_VBOXGUESTR3NPDLL_DEFS = $(TEMPLATE_VBOXGUESTR3NPEXE_DEFS) PIC
|
---|
3771 | TEMPLATE_VBOXGUESTR3NPDLL_CFLAGS = $(TEMPLATE_VBOXGUESTR3NPEXE_CFLAGS) -fPIC
|
---|
3772 | TEMPLATE_VBOXGUESTR3NPDLL_CXXFLAGS = $(TEMPLATE_VBOXGUESTR3NPEXE_CXXFLAGS) -fPIC -fno-exceptions
|
---|
3773 | TEMPLATE_VBOXGUESTR3NPDLL_LDFLAGS = $(TEMPLATE_VBOXGUESTR3NPEXE_LDFLAGS) -fPIC
|
---|
3774 | endif
|
---|
3775 |
|
---|
3776 | #
|
---|
3777 | # Template for building R3 (static) libraries for the guest additions (no -pedantic)
|
---|
3778 | #
|
---|
3779 | TEMPLATE_VBOXGUESTR3NPLIB = VBox Guest User Libraries Non-pedantic
|
---|
3780 | TEMPLATE_VBOXGUESTR3NPLIB_EXTENDS = VBOXGUESTR3NPEXE
|
---|
3781 | TEMPLATE_VBOXGUESTR3NPLIB_INST = $(INST_ADDITIONS_LIB)
|
---|
3782 | ## @todo r=bird: Fix the *R3Mini template to VBOXGUESTR3DLL and remove this hack.
|
---|
3783 | ifeq ($(filter-out solaris.x86 %.amd64,$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH)),)
|
---|
3784 | ifn1of ($(KBUILD_TARGET), darwin win)
|
---|
3785 | TEMPLATE_VBOXGUESTR3NPLIB_DEFS = $(TEMPLATE_VBOXGUESTR3NPEXE_DEFS) PIC
|
---|
3786 | TEMPLATE_VBOXGUESTR3NPLIB_CFLAGS = $(TEMPLATE_VBOXGUESTR3NPEXE_CFLAGS) -fPIC
|
---|
3787 | TEMPLATE_VBOXGUESTR3NPLIB_CXXFLAGS = $(TEMPLATE_VBOXGUESTR3NPEXE_CXXFLAGS) -fPIC -fno-exceptions
|
---|
3788 | endif
|
---|
3789 | endif
|
---|
3790 |
|
---|
3791 |
|
---|
3792 | #
|
---|
3793 | # Template for XFree86 guest modules (relocatable module, i.e. sysmod).
|
---|
3794 | # This mostly about zapping the VBOXR3EXE linker flags and libraries.
|
---|
3795 | #
|
---|
3796 | TEMPLATE_VBOXGUESTR3XF86MOD = VBox XFree86 Guest Module
|
---|
3797 | TEMPLATE_VBOXGUESTR3XF86MOD_EXTENDS = VBOXGUESTR3EXE
|
---|
3798 | TEMPLATE_VBOXGUESTR3XF86MOD_LIBS.$(KBUILD_TYPE) = $(NO_SUCH_VARIABLE)
|
---|
3799 | TEMPLATE_VBOXGUESTR3XF86MOD_LIBS.$(KBUILD_TARGET) = $(NO_SUCH_VARIABLE)
|
---|
3800 | TEMPLATE_VBOXGUESTR3XF86MOD_LDFLAGS.$(KBUILD_TARGET) = $(NO_SUCH_VARIABLE)
|
---|
3801 | TEMPLATE_VBOXGUESTR3XF86MOD_LDFLAGS.$(KBUILD_TYPE) = $(NO_SUCH_VARIABLE)
|
---|
3802 | TEMPLATE_VBOXGUESTR3XF86MOD_LDFLAGS = -r
|
---|
3803 | if1of ($(KBUILD_TARGET), dragonfly freebsd linux netbsd openbsd) # the gnu ld guys.
|
---|
3804 | TEMPLATE_VBOXGUESTR3XF86MOD_LDFLAGS.release = -S
|
---|
3805 | TEMPLATE_VBOXGUESTR3XF86MOD_LDFLAGS.x86 = -m elf_i386
|
---|
3806 | TEMPLATE_VBOXGUESTR3XF86MOD_LDFLAGS.amd64 = -m elf_x86_64
|
---|
3807 | endif
|
---|
3808 | TEMPLATE_VBOXGUESTR3XF86MOD_CFLAGS = $(TEMPLATE_VBOXGUESTR3EXE_CFLAGS) -fno-merge-constants -std=c99
|
---|
3809 | TEMPLATE_VBOXGUESTR3XF86MOD_CXXFLAGS= $(TEMPLATE_VBOXGUESTR3EXE_CXXFLAGS) -fno-merge-constants
|
---|
3810 | TEMPLATE_VBOXGUESTR3XF86MOD_SYSSUFF = .o
|
---|
3811 | TEMPLATE_VBOXGUESTR3XF86MOD_LIBS = \
|
---|
3812 | $(VBOX_LIB_VBGL_R3_XFREE86)
|
---|
3813 | TEMPLATE_VBOXGUESTR3XF86MOD_DEFS = $(TEMPLATE_VBOXGUESTR3DLL_DEFS) LOG_TO_BACKDOOR VBOX_GUESTR3XF86MOD RTMEM_NO_WRAP_TO_EF_APIS
|
---|
3814 |
|
---|
3815 |
|
---|
3816 | #
|
---|
3817 | # Template for X.org guest modules (shared libs).
|
---|
3818 | # This mostly about zapping unnecessary LIBS from VBOXGUESTR3DLL and adding some flags.
|
---|
3819 | #
|
---|
3820 | TEMPLATE_VBOXGUESTR3XORGMOD = VBox X.org Guest Module
|
---|
3821 | TEMPLATE_VBOXGUESTR3XORGMOD_EXTENDS = VBOXGUESTR3DLL
|
---|
3822 | TEMPLATE_VBOXGUESTR3XORGMOD_LIBS.$(KBUILD_TYPE) = $(NO_SUCH_VARIABLE)
|
---|
3823 | TEMPLATE_VBOXGUESTR3XORGMOD_LIBS.$(KBUILD_TARGET) = $(NO_SUCH_VARIABLE)
|
---|
3824 | TEMPLATE_VBOXGUESTR3XORGMOD_CFLAGS = $(TEMPLATE_VBOXGUESTR3DLL_CFLAGS) -std=c99
|
---|
3825 | TEMPLATE_VBOXGUESTR3XORGMOD_DEFS = $(TEMPLATE_VBOXGUESTR3DLL_DEFS) LOG_TO_BACKDOOR VBOX_GUESTR3XORGMOD RTMEM_NO_WRAP_TO_EF_APIS
|
---|
3826 | ifeq ($(KBUILD_TARGET_ARCH),amd64)
|
---|
3827 | TEMPLATE_VBOXGUESTR3XORGMOD_DEFS += _XSERVER64
|
---|
3828 | endif
|
---|
3829 | if1of ($(KBUILD_TARGET), linux)
|
---|
3830 | TEMPLATE_VBOXGUESTR3XORGMOD_LDFLAGS = $(TEMPLATE_VBOXGUESTR3DLL_LDFLAGS)
|
---|
3831 | endif
|
---|
3832 | TEMPLATE_VBOXGUESTR3XORGMOD_LIBS = \
|
---|
3833 | $(VBOX_LIB_VBGL_R3_SHARED) \
|
---|
3834 | $(VBOX_LIB_IPRT_GUEST_R3_MINI) \
|
---|
3835 | $(VBOX_LIB_VBGL_R3_SHARED) \
|
---|
3836 | $(VBOX_LIB_IPRT_GUEST_R3_MINI)
|
---|
3837 | TEMPLATE_VBOXGUESTR3XORGMOD_LIBS.freebsd += \
|
---|
3838 | iconv
|
---|
3839 |
|
---|
3840 | #
|
---|
3841 | # Template for guest stuff that makes use of the C++ library and features.
|
---|
3842 | # (This is mostly about undoing what was done to C++ for VBOXGUESTR3EXE.)
|
---|
3843 | #
|
---|
3844 | TEMPLATE_VBOXGUESTR3CPPEXE = VBox Guest Program with C++ library dependencies
|
---|
3845 | TEMPLATE_VBOXGUESTR3CPPEXE_EXTENDS = VBOXGUESTR3EXE
|
---|
3846 | ifeq ($(KBUILD_TARGET),win)
|
---|
3847 | # later if necessary
|
---|
3848 | else
|
---|
3849 | TEMPLATE_VBOXGUESTR3CPPEXE_TOOL = $(TEMPLATE_VBOXR3EXE_TOOL)
|
---|
3850 | TEMPLATE_VBOXGUESTR3CPPEXE_CXXFLAGS = $(TEMPLATE_VBOXR3EXE_CXXFLAGS)
|
---|
3851 | endif
|
---|
3852 |
|
---|
3853 |
|
---|
3854 | #
|
---|
3855 | # Template for building R0 drivers for the guest additions.
|
---|
3856 | #
|
---|
3857 | TEMPLATE_VBOXGUESTR0 = VBox Guest Driver
|
---|
3858 | TEMPLATE_VBOXGUESTR0_EXTENDS = VBOXR0DRV
|
---|
3859 | TEMPLATE_VBOXGUESTR0_INST = $(INST_ADDITIONS)
|
---|
3860 | TEMPLATE_VBOXGUESTR0_SDKS.win.x86 = WIN32SDK W2K3DDK
|
---|
3861 | TEMPLATE_VBOXGUESTR0_SDKS.win.amd64 = W2K3DDK WINPSDKINCS
|
---|
3862 | TEMPLATE_VBOXGUESTR0_LIBS.win.x86 = \
|
---|
3863 | $(PATH_SDK_W2K3DDK_LIB)/int64.lib
|
---|
3864 | TEMPLATE_VBOXGUESTR0_DEFS = $(TEMPLATE_VBOXR0DRV_DEFS) IN_GUEST IN_GUEST_R0
|
---|
3865 | ifeq ($(KBUILD_TARGET),solaris) # No VBI for the guest additions yet.
|
---|
3866 | TEMPLATE_VBOXGUESTR0_LDFLAGS = -r -dy
|
---|
3867 | endif
|
---|
3868 |
|
---|
3869 | #
|
---|
3870 | # Template for building R0 libraries for the guest additions.
|
---|
3871 | #
|
---|
3872 | TEMPLATE_VBOXGUESTR0LIB = VBox Guest Driver Libraries
|
---|
3873 | TEMPLATE_VBOXGUESTR0LIB_EXTENDS = VBOXGUESTR0
|
---|
3874 | TEMPLATE_VBOXGUESTR0LIB_INST = $(INST_ADDITIONS_LIB)
|
---|
3875 |
|
---|
3876 | #
|
---|
3877 | # Template for building OpenGL host dlls.
|
---|
3878 | #
|
---|
3879 | TEMPLATE_VBOXCROGLR3HOSTDLL = VBox OpenGL Host DLLs
|
---|
3880 | TEMPLATE_VBOXCROGLR3HOSTDLL_EXTENDS = VBOXR3NP
|
---|
3881 | TEMPLATE_VBOXCROGLR3HOSTDLL_EXTENDS_BY = prepending
|
---|
3882 | TEMPLATE_VBOXCROGLR3HOSTDLL_DEFS = CHROMIUM_THREADSAFE VBOX_WITH_HGCM UNPACKS
|
---|
3883 | TEMPLATE_VBOXCROGLR3HOSTDLL_DEFS.win = _WIN32_WINNT=0x0500 WINDOWS=1
|
---|
3884 | TEMPLATE_VBOXCROGLR3HOSTDLL_DEFS.linux = Linux=1 _GNU_SOURCE
|
---|
3885 | TEMPLATE_VBOXCROGLR3HOSTDLL_DEFS.solaris = SunOS=1 _GNU_SOURCE #GLEXT_64_TYPES_DEFINED
|
---|
3886 | TEMPLATE_VBOXCROGLR3HOSTDLL_DEFS.darwin = DARWIN=1 GL_GLEXT_LEGACY _GNU_SOURCE
|
---|
3887 | ifdef VBOX_WITH_COCOA_QT
|
---|
3888 | TEMPLATE_VBOXCROGLR3HOSTDLL_DEFS.darwin += VBOX_WITH_COCOA_QT
|
---|
3889 | TEMPLATE_VBOXCROGLR3HOSTDLL_LDFLAGS.darwin = -framework AppKit
|
---|
3890 | else
|
---|
3891 | TEMPLATE_VBOXCROGLR3HOSTDLL_LDFLAGS.darwin = -framework Carbon
|
---|
3892 | endif
|
---|
3893 | TEMPLATE_VBOXCROGLR3HOSTDLL_DEFS.freebsd = FreeBSD=1 _GNU_SOURCE
|
---|
3894 | TEMPLATE_VBOXCROGLR3HOSTDLL_INCS = $(VBOX_PATH_CROGL_INCLUDE) $(VBOX_PATH_CROGL_GENFILES)
|
---|
3895 | TEMPLATE_VBOXCROGLR3HOSTDLL_SDKS.darwin = DARWIN-OPENGL
|
---|
3896 | TEMPLATE_VBOXCROGLR3HOSTDLL_LDFLAGS.darwin += \
|
---|
3897 | -framework OpenGL \
|
---|
3898 | -current_version $(VBOX_VERSION_MAJOR).$(VBOX_VERSION_MINOR).$(VBOX_VERSION_BUILD) \
|
---|
3899 | -compatibility_version $(VBOX_VERSION_MAJOR).$(VBOX_VERSION_MINOR).$(VBOX_VERSION_BUILD)
|
---|
3900 | TEMPLATE_VBOXCROGLR3HOSTDLL_LDFLAGS.linux = -Wl,--no-as-needed
|
---|
3901 | TEMPLATE_VBOXCROGLR3HOSTDLL_BLDDIRS = $(VBOX_PATH_CROGL_GENFILES)/
|
---|
3902 |
|
---|
3903 | #
|
---|
3904 | # Template for building OpenGL host libraries.
|
---|
3905 | #
|
---|
3906 | TEMPLATE_VBOXCROGLR3HOSTLIB = VBox OpenGL Host Libraries
|
---|
3907 | TEMPLATE_VBOXCROGLR3HOSTLIB_EXTENDS = VBOXCROGLR3HOSTDLL
|
---|
3908 | TEMPLATE_VBOXCROGLR3HOSTLIB_INST = $(INST_LIB)
|
---|
3909 |
|
---|
3910 | #
|
---|
3911 | # Template for building OpenGL guest dlls.
|
---|
3912 | #
|
---|
3913 | TEMPLATE_VBOXCROGLR3GUESTDLL = VBox OpenGL Guest DLLs
|
---|
3914 | TEMPLATE_VBOXCROGLR3GUESTDLL_EXTENDS = VBOXGUESTR3NPDLL
|
---|
3915 | TEMPLATE_VBOXCROGLR3GUESTDLL_EXTENDS_BY = prepending
|
---|
3916 | TEMPLATE_VBOXCROGLR3GUESTDLL_DEFS = CHROMIUM_THREADSAFE VBOX_WITH_HGCM
|
---|
3917 | TEMPLATE_VBOXCROGLR3GUESTDLL_DEFS.win = _WIN32_WINNT=0x0500 WINDOWS=1
|
---|
3918 | TEMPLATE_VBOXCROGLR3GUESTDLL_DEFS.linux = Linux=1 _GNU_SOURCE
|
---|
3919 | TEMPLATE_VBOXCROGLR3GUESTDLL_DEFS.solaris = SunOS=1 _GNU_SOURCE #GLEXT_64_TYPES_DEFINED
|
---|
3920 | TEMPLATE_VBOXCROGLR3GUESTDLL_DEFS.darwin = DARWIN=1 GL_GLEXT_LEGACY _GNU_SOURCE
|
---|
3921 | ifdef VBOX_WITH_COCOA_QT
|
---|
3922 | TEMPLATE_VBOXCROGLR3GUESTDLL_DEFS.darwin += VBOX_WITH_COCOA_QT
|
---|
3923 | TEMPLATE_VBOXCROGLR3GUESTDLL_LDFLAGS.darwin = -framework AppKit
|
---|
3924 | else
|
---|
3925 | TEMPLATE_VBOXCROGLR3GUESTDLL_LDFLAGS.darwin = -framework Carbon
|
---|
3926 | endif
|
---|
3927 | TEMPLATE_VBOXCROGLR3GUESTDLL_DEFS.freebsd = FreeBSD=1 _GNU_SOURCE
|
---|
3928 | TEMPLATE_VBOXCROGLR3GUESTDLL_INCS = $(VBOX_PATH_CROGL_INCLUDE) $(VBOX_PATH_CROGL_GENFILES)
|
---|
3929 | TEMPLATE_VBOXCROGLR3GUESTDLL_SDKS.darwin = DARWIN-OPENGL
|
---|
3930 | TEMPLATE_VBOXCROGLR3GUESTDLL_LDFLAGS.darwin += \
|
---|
3931 | -framework OpenGL \
|
---|
3932 | -current_version $(VBOX_VERSION_MAJOR).$(VBOX_VERSION_MINOR).$(VBOX_VERSION_BUILD) \
|
---|
3933 | -compatibility_version $(VBOX_VERSION_MAJOR).$(VBOX_VERSION_MINOR).$(VBOX_VERSION_BUILD)
|
---|
3934 | TEMPLATE_VBOXCROGLR3GUESTDLL_BLDDIRS = $(VBOX_PATH_CROGL_GENFILES)/
|
---|
3935 |
|
---|
3936 | #
|
---|
3937 | # Template for building OpenGL guest libraries.
|
---|
3938 | #
|
---|
3939 | TEMPLATE_VBOXCROGLR3GUESTLIB = VBox OpenGL Guest Libraries
|
---|
3940 | TEMPLATE_VBOXCROGLR3GUESTLIB_EXTENDS = VBOXCROGLR3GUESTDLL
|
---|
3941 | TEMPLATE_VBOXCROGLR3GUESTLIB_INST = $(INST_ADDITIONS_LIB)
|
---|
3942 |
|
---|
3943 |
|
---|
3944 | #
|
---|
3945 | # Template for building Mesa guest library, Linux-only so far.
|
---|
3946 | #
|
---|
3947 | TEMPLATE_VBOXMESAR3GUESTLIB = VBox Mesa Guest Library
|
---|
3948 | TEMPLATE_VBOXMESAR3GUESTLIB_EXTENDS = VBOXCROGLR3GUESTDLL
|
---|
3949 | TEMPLATE_VBOXMESAR3GUESTLIB_INST = $(INST_ADDITIONS_LIB)
|
---|
3950 | TEMPLATE_VBOXMESAR3GUESTLIB_DEFS.linux = Linux=1
|
---|
3951 | TEMPLATE_VBOXMESAR3GUESTLIB_DEFS.solaris = SunOS=1
|
---|
3952 | TEMPLATE_VBOXMESAR3GUESTLIB_DEFS.darwin = DARWIN=1 GL_GLEXT_LEGACY
|
---|
3953 | ifeq ($(KBUILD_TARGET),linux)
|
---|
3954 | TEMPLATE_VBOXMESAR3GUESTLIB_ASTOOL = $(TEMPLATE_VBOXCROGLR3GUESTDLL_TOOL)
|
---|
3955 | TEMPLATE_VBOXMESAR3GUESTLIB_ASFLAGS = $(NO_SUCH_VARIABLE)
|
---|
3956 | TEMPLATE_VBOXMESAR3GUESTLIB_ASFLAGS.x86 = -m32
|
---|
3957 | TEMPLATE_VBOXMESAR3GUESTLIB_ASFLAGS.amd64 = -m64
|
---|
3958 | TEMPLATE_VBOXMESAR3GUESTLIB_ASDEFS = $(NO_SUCH_VARIABLE)
|
---|
3959 | endif
|
---|
3960 |
|
---|
3961 |
|
---|
3962 | #
|
---|
3963 | # Guest additions libraries (all static).
|
---|
3964 | # The _MINI and _SHARED are both compiled as PIC and intended for linking into a .so/.dll/.dylib.
|
---|
3965 | #
|
---|
3966 | VBOX_LIB_IPRT_GUEST_R3 = $(VBOX_PATH_ADDITIONS_LIB)/RuntimeGuestR3$(VBOX_SUFF_LIB)
|
---|
3967 | VBOX_LIB_IPRT_GUEST_R3_MINI = $(VBOX_PATH_ADDITIONS_LIB)/RuntimeGuestR3Mini$(VBOX_SUFF_LIB)
|
---|
3968 | VBOX_LIB_IPRT_GUEST_R3_SHARED = $(VBOX_PATH_ADDITIONS_LIB)/RuntimeGuestR3Shared$(VBOX_SUFF_LIB)
|
---|
3969 | VBOX_LIB_IPRT_GUEST_R0 = $(VBOX_PATH_ADDITIONS_LIB)/RuntimeGuestR0$(VBOX_SUFF_LIB)
|
---|
3970 | ifeq ($(KBUILD_TARGET_ARCH),x86)
|
---|
3971 | VBOX_LIB_IPRT_GUEST_R0_NT4 = $(VBOX_PATH_ADDITIONS_LIB)/RuntimeGuestR0NT4$(VBOX_SUFF_LIB)
|
---|
3972 | else
|
---|
3973 | VBOX_LIB_IPRT_GUEST_R0_NT4 = $(VBOX_LIB_IPRT_GUEST_R0)
|
---|
3974 | endif
|
---|
3975 | VBOX_LIB_VBGL_R3 = $(VBOX_PATH_ADDITIONS_LIB)/VBoxGuestR3Lib$(VBOX_SUFF_LIB)
|
---|
3976 | VBOX_LIB_VBGL_R3_XFREE86 = $(VBOX_PATH_ADDITIONS_LIB)/VBoxGuestR3LibXFree86$(VBOX_SUFF_LIB)
|
---|
3977 | VBOX_LIB_VBGL_R3_SHARED = $(VBOX_PATH_ADDITIONS_LIB)/VBoxGuestR3LibShared$(VBOX_SUFF_LIB)
|
---|
3978 | VBOX_LIB_VBGL_R0BASE = $(VBOX_PATH_ADDITIONS_LIB)/VBoxGuestR0LibBase$(VBOX_SUFF_LIB)
|
---|
3979 | VBOX_LIB_VBGL_R0 = $(VBOX_PATH_ADDITIONS_LIB)/VBoxGuestR0Lib$(VBOX_SUFF_LIB)
|
---|
3980 |
|
---|
3981 |
|
---|
3982 |
|
---|
3983 | #
|
---|
3984 | # Two targets to coordinate version number changes properly. Note that the
|
---|
3985 | # only way to get a really consistent build is to run 'kmk' in the top-level
|
---|
3986 | # directory. If you don't run it there, you get a consistent sub-tree only.
|
---|
3987 | #
|
---|
3988 | VBOX_BAD_CHAR_SET = ,;:/\$(SP)$(TAB)$(HASH)=![]@%&''()*""<>?^{}|~
|
---|
3989 | VBOX_VERSION_STAMP = $(PATH_OUT)/version-stamp-$(translate $(VBOX_VERSION_STRING)-$(VBOX_C_YEAR)-$(VBOX_VENDOR)-$(VBOX_PRODUCT),$(VBOX_BAD_CHAR_SET),,_)
|
---|
3990 | VBOX_VERSION_HEADER = $(PATH_OUT)/version-generated.h
|
---|
3991 | VBOX_VERSION_MK = $(PATH_OUT)/version-generated.mk
|
---|
3992 |
|
---|
3993 | $(VBOX_VERSION_STAMP): | $(PATH_ROOT)/Config.kmk
|
---|
3994 | $(call MSG_GENERATE,,$@)
|
---|
3995 | $(QUIET)$(MKDIR) -p $(@D)
|
---|
3996 | $(QUIET)$(RM) -f $(wildcard $(PATH_OUT)/version-stamp-*)
|
---|
3997 | $(QUIET)$(APPEND) $@ $(VBOX_VERSION_STRING)
|
---|
3998 |
|
---|
3999 | $(VBOX_VERSION_HEADER): $(VBOX_VERSION_STAMP)
|
---|
4000 | $(call MSG_GENERATE,,$@)
|
---|
4001 | $(QUIET)$(MKDIR) -p $(@D)
|
---|
4002 | $(QUIET)$(RM) -f $@ $@.tmp
|
---|
4003 | $(QUIET)$(APPEND) $@.tmp '#ifndef ___version_generated_h___'
|
---|
4004 | $(QUIET)$(APPEND) $@.tmp '#define ___version_generated_h___'
|
---|
4005 | $(QUIET)$(APPEND) $@.tmp ''
|
---|
4006 | $(QUIET)$(APPEND) $@.tmp '#define VBOX_VERSION_MAJOR $(VBOX_VERSION_MAJOR)'
|
---|
4007 | $(QUIET)$(APPEND) $@.tmp '#define VBOX_VERSION_MINOR $(VBOX_VERSION_MINOR)'
|
---|
4008 | $(QUIET)$(APPEND) $@.tmp '#define VBOX_VERSION_BUILD $(VBOX_VERSION_BUILD)'
|
---|
4009 | $(QUIET)$(APPEND) $@.tmp '#define VBOX_VERSION_STRING "$(VBOX_VERSION_STRING)"'
|
---|
4010 | $(QUIET)$(APPEND) $@.tmp ''
|
---|
4011 | $(QUIET)$(APPEND) $@.tmp '#endif'
|
---|
4012 | $(QUIET)$(MV) -f $@.tmp $@
|
---|
4013 |
|
---|
4014 |
|
---|
4015 | VBOX_PACKAGE_HEADER = $(PATH_OUT)/package-generated.h
|
---|
4016 |
|
---|
4017 | $(VBOX_PACKAGE_HEADER):
|
---|
4018 | $(call MSG_GENERATE,,$@)
|
---|
4019 | $(QUIET)$(MKDIR) -p $(@D)
|
---|
4020 | $(QUIET)$(RM) -f $@ $@.tmp
|
---|
4021 | $(QUIET)$(APPEND) $@.tmp '#ifndef ___package_generated_h___'
|
---|
4022 | $(QUIET)$(APPEND) $@.tmp '#define ___package_generated_h___'
|
---|
4023 | $(QUIET)$(APPEND) $@.tmp ''
|
---|
4024 | $(QUIET)$(APPEND) $@.tmp '#define VBOX_PACKAGE_STRING "$(VBOX_PACKAGE_STRING)"'
|
---|
4025 | $(QUIET)$(APPEND) $@.tmp ''
|
---|
4026 | $(QUIET)$(APPEND) $@.tmp '#endif'
|
---|
4027 | $(QUIET)$(MV) -f $@.tmp $@
|
---|
4028 |
|
---|
4029 | VBOX_PRODUCT_HEADER = $(PATH_OUT)/product-generated.h
|
---|
4030 |
|
---|
4031 | $(VBOX_PRODUCT_HEADER): $(VBOX_VERSION_STAMP)
|
---|
4032 | $(call MSG_GENERATE,,$@)
|
---|
4033 | $(QUIET)$(MKDIR) -p $(@D)
|
---|
4034 | $(QUIET)$(RM) -f $@ $@.tmp
|
---|
4035 | $(QUIET)$(APPEND) $@.tmp '#ifndef ___product_generated_h___'
|
---|
4036 | $(QUIET)$(APPEND) $@.tmp '#define ___product_generated_h___'
|
---|
4037 | $(QUIET)$(APPEND) $@.tmp ''
|
---|
4038 | $(QUIET)$(APPEND) $@.tmp '#define VBOX_VENDOR "$(VBOX_VENDOR)"'
|
---|
4039 | $(QUIET)$(APPEND) $@.tmp '#define VBOX_VENDOR_SHORT "$(VBOX_VENDOR_SHORT)"'
|
---|
4040 | $(QUIET)$(APPEND) $@.tmp '#define VBOX_PRODUCT "$(VBOX_PRODUCT)"'
|
---|
4041 | $(QUIET)$(APPEND) $@.tmp '#define VBOX_C_YEAR "$(VBOX_C_YEAR)"'
|
---|
4042 | $(QUIET)$(APPEND) $@.tmp ''
|
---|
4043 | $(QUIET)$(APPEND) $@.tmp '#endif'
|
---|
4044 | $(QUIET)$(MV) -f $@.tmp $@
|
---|
4045 |
|
---|
4046 | #
|
---|
4047 | # Used for external makefiles which cannot include Config.kmk
|
---|
4048 | #
|
---|
4049 | $(VBOX_VERSION_MK): $(VBOX_VERSION_STAMP)
|
---|
4050 | $(call MSG_GENERATE,,$@)
|
---|
4051 | $(QUIET)$(RM) -f $@ $@.tmp
|
---|
4052 | $(QUIET)$(MKDIR) -p $(@D)
|
---|
4053 | $(QUIET)$(APPEND) $@.tmp 'VBOX_VERSION_MAJOR = $(VBOX_VERSION_MAJOR)'
|
---|
4054 | $(QUIET)$(APPEND) $@.tmp 'VBOX_VERSION_MINOR = $(VBOX_VERSION_MINOR)'
|
---|
4055 | $(QUIET)$(APPEND) $@.tmp 'VBOX_VERSION_BUILD = $(VBOX_VERSION_BUILD)'
|
---|
4056 | $(QUIET)$(APPEND) $@.tmp 'VBOX_VERSION_STRING = $(VBOX_VERSION_STRING)'
|
---|
4057 | $(QUIET)$(APPEND) $@.tmp 'VBOX_VENDOR = $(VBOX_VENDOR)'
|
---|
4058 | $(QUIET)$(APPEND) $@.tmp 'VBOX_VENDOR_SHORT = $(VBOX_VENDOR_SHORT)'
|
---|
4059 | $(QUIET)$(APPEND) $@.tmp 'VBOX_PRODUCT = $(VBOX_PRODUCT)'
|
---|
4060 | $(QUIET)$(APPEND) $@.tmp 'VBOX_C_YEAR = $(VBOX_C_YEAR)'
|
---|
4061 | $(QUIET)$(MV) -f $@.tmp $@
|
---|
4062 |
|
---|
4063 | if !defined(VBOX_OSE) && !defined(VBOX_NOINC_LICENSE_VER_KMK)
|
---|
4064 | if1of ($(KBUILD_TARGET), freebsd linux netbsd openbsd solaris)
|
---|
4065 | # VBOX_LICENSE_VER is used in several Makefiles
|
---|
4066 | VBOX_LICENSE_VER_KMK = $(PATH_OUT)/license-version.kmk
|
---|
4067 | $(VBOX_LICENSE_VER_KMK): $(VBOX_BRAND_LICENSE_HTML)
|
---|
4068 | $(call MSG_GENERATE,,$(VBOX_LICENSE_VER_KMK))
|
---|
4069 | $(QUIET)$(MKDIR) -p $(@D)
|
---|
4070 | ifdef VBOX_BRAND_LICENSE_VER
|
---|
4071 | $(QUIET)$(RM) -f '$@'
|
---|
4072 | $(APPEND) '$@' 'VBOX_LICENSE_VER=$(VBOX_BRAND_LICENSE_VER)'
|
---|
4073 | else
|
---|
4074 | $(QUIET)$(SED) -e "s/.*License version \([0-9.]*\) *[,&].*/VBOX_LICENSE_VER=\1/;t;d" --output $@ $(VBOX_BRAND_LICENSE_HTML)
|
---|
4075 | endif
|
---|
4076 | -include $(VBOX_LICENSE_VER_KMK)
|
---|
4077 | VBOX_LICENSE_FILES = \
|
---|
4078 | License-$(VBOX_LICENSE_VER).html \
|
---|
4079 | $(foreach f,$(VBOX_INSTALLER_ADD_LANGUAGES),License-$(VBOX_LICENSE_VER)-$(f).html)
|
---|
4080 | VBOX_LICENSE_BINS = $(addprefix $(PATH_BIN)/,$(VBOX_LICENSE_FILES))
|
---|
4081 | endif
|
---|
4082 | endif
|
---|
4083 |
|
---|
4084 |
|
---|
4085 | ifndef VBOX_NOINC_MISC
|
---|
4086 | # Force building of the version header file as the first thing anywhere in
|
---|
4087 | # the tree. This eliminates the need for manual dependencies on it.
|
---|
4088 | ## @todo there gotta be a better way of doing this.
|
---|
4089 | Makefile.kmk: | $(VBOX_VERSION_HEADER) $(VBOX_VERSION_MK) $(VBOX_PRODUCT_HEADER) $(VBOX_PACKAGE_HEADER)
|
---|
4090 | endif
|
---|
4091 |
|
---|
4092 |
|
---|
4093 | #
|
---|
4094 | # Subversion tree revision.
|
---|
4095 | #
|
---|
4096 | # The VBOX_SVN_REV contains our best guess. Use svn info on the
|
---|
4097 | # root of the treeto determin this it if .svn/entries is found,
|
---|
4098 | # otherwise fall back on the Config.kmk revision.
|
---|
4099 | #
|
---|
4100 | SVN ?= svn$(HOSTSUFF_EXE)
|
---|
4101 | VBOX_SVN_REV_KMK = $(PATH_OUT)/revision.kmk
|
---|
4102 | ifndef VBOX_SVN_REV
|
---|
4103 | VBOX_SVN_REV_FALLBACK := $(patsubst %:,, $Rev: 29235 $ )
|
---|
4104 | VBOX_SVN_DEP := $(wildcard $(PATH_ROOT)/.svn/entries)
|
---|
4105 | ifeq ($(which $(SVN)),)
|
---|
4106 | VBOX_SVN_DEP :=
|
---|
4107 | endif
|
---|
4108 |
|
---|
4109 | # Rule for generating a timestamp and updating the real thing on change.
|
---|
4110 | $(VBOX_SVN_REV_KMK).ts +| $(VBOX_SVN_REV_KMK): $(if $(VBOX_SVN_DEP), $(VBOX_SVN_DEP), $(PATH_ROOT)/Config.kmk)
|
---|
4111 | $(call MSG_GENERATE,,$(VBOX_SVN_REV_KMK))
|
---|
4112 | $(QUIET)$(RM) -f $@ $@.tmp
|
---|
4113 | $(QUIET)$(MKDIR) -p $(@D)
|
---|
4114 | ifneq ($(VBOX_SVN_DEP),)
|
---|
4115 | $(REDIRECT) -E 'LC_ALL=C' -wo $@.tmp -- $(SVN) info $(PATH_ROOT)
|
---|
4116 | ifeq ($(int-mod $(VBOX_VERSION_BUILD), 2),0)
|
---|
4117 | $(SED) -e '/^Last Changed Rev/!d' -e 's/Last Changed Rev\: */export VBOX_SVN_REV=/' --output $@ $@.tmp
|
---|
4118 | else
|
---|
4119 | $(SED) -e '/^Revision/!d' -e 's/Revision\: */export VBOX_SVN_REV=/' --output $@ $@.tmp
|
---|
4120 | endif
|
---|
4121 | $(QUIET)$(RM) -f $@.tmp
|
---|
4122 | else
|
---|
4123 | $(QUIET)$(APPEND) $@ 'export VBOX_SVN_REV=$(VBOX_SVN_REV_FALLBACK)'
|
---|
4124 | endif
|
---|
4125 | $(QUIET)$(CP) --changed -fv $@ $(VBOX_SVN_REV_KMK)
|
---|
4126 |
|
---|
4127 | ifndef VBOX_NOINC_SVN_REV_KMK
|
---|
4128 | include $(VBOX_SVN_REV_KMK)
|
---|
4129 | endif
|
---|
4130 | else
|
---|
4131 | # allow to overwrite VBOX_SVN_REV externally (mainly for building .debs/.rpms)
|
---|
4132 | $(VBOX_SVN_REV_KMK):
|
---|
4133 | $(call MSG_GENERATE,,$(VBOX_SVN_REV_KMK))
|
---|
4134 | $(QUIET)$(RM) -f $@
|
---|
4135 | $(QUIET)$(MKDIR) -p $(@D)
|
---|
4136 | $(QUIET)$(APPEND) $@ 'export VBOX_SVN_REV=$(VBOX_SVN_REV)'
|
---|
4137 | $(QUIET)echo '* $(VBOX_SVN_REV_KMK) was externally overwritten:'
|
---|
4138 | $(QUIET)$(CAT) $(VBOX_SVN_REV_KMK)
|
---|
4139 | endif
|
---|
4140 |
|
---|
4141 | # only needed for VBoxGuest for Linux/FreeBSD guests
|
---|
4142 | VBOX_SVN_REV_HEADER = $(PATH_OUT)/revision-generated.h
|
---|
4143 | $(VBOX_SVN_REV_HEADER): $(VBOX_SVN_REV_KMK)
|
---|
4144 | $(call MSG_GENERATE,,$@)
|
---|
4145 | $(QUIET)$(RM) -f $@ $@.tmp
|
---|
4146 | $(QUIET)$(MKDIR) -p $(@D)
|
---|
4147 | $(QUIET)$(APPEND) $@.tmp '#define VBOX_SVN_REV $(VBOX_SVN_REV)'
|
---|
4148 | $(QUIET)$(MV) -f $@.tmp $@
|
---|
4149 |
|
---|
4150 | #
|
---|
4151 | # Shared definitions of the XIDL file to use as a source for
|
---|
4152 | # generating various other files (VBoxSVC, webservice, docs, front-ends, ...)
|
---|
4153 | #
|
---|
4154 |
|
---|
4155 | # Real XIDL source file; from this we strip the <desc> elements to generate
|
---|
4156 | # a second XIDL file, from which the COM/XPCOM IDL files are then generated:
|
---|
4157 | VBOX_XIDL_FILE_SRC = $(PATH_ROOT)/src/VBox/Main/idl/VirtualBox.xidl
|
---|
4158 | # second XIDL file to use as source for COM/XPCOM IDL (with stripped docs):
|
---|
4159 | VBOX_XIDL_FILE = $(PATH_OUT)/obj/VirtualBox_stripped.xidl
|
---|
4160 |
|
---|
4161 |
|
---|
4162 | #
|
---|
4163 | # Legacy.
|
---|
4164 | #
|
---|
4165 | ## @todo try remove this.
|
---|
4166 | ifneq ($(LOCALCFG),)
|
---|
4167 | include $(LOCALCFG)
|
---|
4168 | endif
|
---|
4169 |
|
---|
4170 |
|
---|
4171 | #
|
---|
4172 | # Some extra goals.
|
---|
4173 | #
|
---|
4174 | .PHONY: up update st stat status
|
---|
4175 | up update::
|
---|
4176 | $(SVN) up
|
---|
4177 |
|
---|
4178 | up2 update2::
|
---|
4179 | $(SVN) up --ignore-externals
|
---|
4180 |
|
---|
4181 | st stat status:
|
---|
4182 | $(SVN) status
|
---|
4183 |
|
---|
4184 | quick:
|
---|
4185 | $(MAKE) VBOX_QUICK=1
|
---|
4186 |
|
---|