1 | # $Id: Config.kmk 9696 2008-06-15 22:06:49Z 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-2007 Sun Microsystems, Inc.
|
---|
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 as published by the Free Software Foundation,
|
---|
16 | # in version 2 as it comes in the "COPYING" file of the VirtualBox OSE
|
---|
17 | # distribution. VirtualBox OSE is distributed in the hope that it will
|
---|
18 | # be useful, but WITHOUT ANY WARRANTY of any kind.
|
---|
19 | #
|
---|
20 |
|
---|
21 | #
|
---|
22 | # kBuild stuff
|
---|
23 | #
|
---|
24 |
|
---|
25 | # Enable automatic installation of what's built.
|
---|
26 | KBUILD_DO_AUTO_INSTALL := 1
|
---|
27 | PASSES := $(filter-out PACKING,$(PASSES)) PACKING # temporary hack
|
---|
28 | # Modify the order of the INSTALLS and OTHERS passes.
|
---|
29 | DEFAULT_PASSES := BLDPROGS LIBRARIES DLLS BINARIES INSTALLS OTHERS
|
---|
30 | # Modify the build types.
|
---|
31 | ## @todo checked and dbgopt
|
---|
32 | KBUILD_BLD_TYPES = release profile debug kprofile
|
---|
33 |
|
---|
34 | # Install paths.
|
---|
35 | PATH_INS := $(PATH_OUT)
|
---|
36 | ifeq ($(KBUILD_TARGET),darwin)
|
---|
37 | INST_DIST = dist/
|
---|
38 | INST_SDK = $(INST_DIST)sdk/
|
---|
39 | INST_SDK_SAMPLES = $(INST_SDK)samples
|
---|
40 |
|
---|
41 | # the bundles
|
---|
42 | INST_VIRTUALBOX = $(INST_DIST)VirtualBox.app/
|
---|
43 | INST_VBOXDRV = $(INST_DIST)VBoxDrv.kext/
|
---|
44 | INST_VBOXNETFLT = $(INST_DIST)VBoxNetFlt.kext/
|
---|
45 | INST_VBOXNETTAP = $(INST_DIST)VBoxNetTap.kext/
|
---|
46 | INST_VBOXUSB = $(INST_DIST)VBoxUSB.kext/
|
---|
47 |
|
---|
48 | # put everything in the VirtualBox app bundle.
|
---|
49 | INST_BIN = $(INST_VIRTUALBOX)Contents/MacOS/
|
---|
50 | INST_DLL = $(INST_BIN)
|
---|
51 | INST_SYS = $(INST_BIN)
|
---|
52 | INST_TESTCASE = $(INST_BIN)testcase/
|
---|
53 | INST_ADDITIONS = $(INST_BIN)additions/
|
---|
54 |
|
---|
55 | # other paths
|
---|
56 | INST_TESTSUITE = testsuite/
|
---|
57 | INST_LIB = lib/
|
---|
58 | INST_ADDITIONS_LIB = $(PATH_LIB)/additions/
|
---|
59 |
|
---|
60 | else
|
---|
61 |
|
---|
62 | INST_BIN = bin/
|
---|
63 | INST_DIST = $(INST_BIN)
|
---|
64 | INST_DLL = $(INST_BIN)
|
---|
65 | INST_SDK = $(INST_BIN)sdk/
|
---|
66 | INST_SDK_SAMPLES = $(INST_SDK)samples
|
---|
67 | INST_DLL = $(INST_BIN)
|
---|
68 | INST_SYS = $(INST_BIN)
|
---|
69 | INST_TESTCASE = $(INST_BIN)testcase/
|
---|
70 | INST_ADDITIONS = $(INST_BIN)additions/
|
---|
71 |
|
---|
72 | INST_TESTSUITE = testsuite/
|
---|
73 | INST_LIB = lib/
|
---|
74 | INST_ADDITIONS_LIB = $(INST_LIB)additions/
|
---|
75 | endif
|
---|
76 |
|
---|
77 | PATH_BIN = $(patsubst %/,%,$(PATH_INS)/$(INST_BIN))
|
---|
78 | PATH_DLL = $(patsubst %/,%,$(PATH_INS)/$(INST_DLL))
|
---|
79 | PATH_SYS = $(patsubst %/,%,$(PATH_INS)/$(INST_SYS))
|
---|
80 | PATH_LIB = $(patsubst %/,%,$(PATH_INS)/$(INST_LIB))
|
---|
81 | PATH_DOC = $(PATH_OUT)/doc
|
---|
82 | VBOX_PATH_SDK = $(patsubst %/,%,$(PATH_INS)/$(INST_SDK))
|
---|
83 | VBOX_PATH_DIST = $(patsubst %/,%,$(PATH_INS)/$(INST_DIST))
|
---|
84 | VBOX_PATH_TESTSUITE = $(patsubst %/,%,$(PATH_INS)/$(INST_TESTSUITE))
|
---|
85 | VBOX_PATH_ADDITIONS = $(patsubst %/,%,$(PATH_INS)/$(INST_ADDITIONS))
|
---|
86 | VBOX_PATH_ADDITIONS_LIB = $(patsubst %/,%,$(PATH_INS)/$(INST_ADDITIONS_LIB))
|
---|
87 |
|
---|
88 |
|
---|
89 | # Delete targets on failure.
|
---|
90 | .DELETE_ON_ERROR:
|
---|
91 |
|
---|
92 | # Notify about important kBuild updates.
|
---|
93 | ifneq ($(call int-ge,$(KMK_REVISION),1650),1)
|
---|
94 | $(error You must update kBuild! KMK_REVISION=$(KMK_REVISION) KBUILD_PATH=$(KBUILD_PATH))
|
---|
95 | endif
|
---|
96 |
|
---|
97 | #
|
---|
98 | # Define USERNAME early on.
|
---|
99 | #
|
---|
100 | ifndef USERNAME
|
---|
101 | ifdef USER
|
---|
102 | USERNAME = $(USER)
|
---|
103 | else
|
---|
104 | $(warning Warning: You must have USERNAME or USER in your environment.)
|
---|
105 | endif
|
---|
106 | endif
|
---|
107 |
|
---|
108 | #
|
---|
109 | # The VirtualBox version.
|
---|
110 | #
|
---|
111 |
|
---|
112 | # Major version.
|
---|
113 | VBOX_VERSION_MAJOR = 1
|
---|
114 | # Minor version.
|
---|
115 | VBOX_VERSION_MINOR = 6
|
---|
116 | # This is the current build number. It should be increased every time we publish a
|
---|
117 | # new build. The define is available in every source file. Only even build numbers
|
---|
118 | # will be published, odd numbers are set during development.
|
---|
119 | VBOX_VERSION_BUILD = 51
|
---|
120 | # Full version string (may include more than just x.y.z, but no spaces or other problematic chars).
|
---|
121 | VBOX_VERSION_STRING = $(VBOX_VERSION_MAJOR).$(VBOX_VERSION_MINOR).$(VBOX_VERSION_BUILD)
|
---|
122 | # Force the additions.sh script to get an exact additions build when we're doing the release.
|
---|
123 | ifeq ($(int-mod $(VBOX_VERSION_BUILD),2),0)
|
---|
124 | export VBOX_ADDITIONS_SH_MODE = release
|
---|
125 | endif
|
---|
126 |
|
---|
127 |
|
---|
128 | #
|
---|
129 | # The VirtualBox Configuration Defaults.
|
---|
130 | #
|
---|
131 | # We try to document all the build configuration options here, thing which
|
---|
132 | # aren't enabled by default is left commented out just to show that they
|
---|
133 | # exist and which value they should have (usually 1, but anyway).
|
---|
134 | #
|
---|
135 |
|
---|
136 | # This indicates that additions (of some kind or another) is being _built_.
|
---|
137 | # VBOX_WITHOUT_ADDITIONS overrides it.
|
---|
138 | #if1of ($(KBUILD_TARGET), freebsd linux os2 solaris win)
|
---|
139 | if1of ($(KBUILD_TARGET), linux solaris win)
|
---|
140 | VBOX_WITH_ADDITIONS = 1
|
---|
141 | endif
|
---|
142 | # Build the optional ring-0 part of the additions for syntax checking.
|
---|
143 | # (Ignored ifndef VBOX_WITH_ADDITIONS. Hack for 32/64 linux issues.)
|
---|
144 | VBOX_WITH_ADDITION_DRIVERS = 1
|
---|
145 | # Build X11 additions. Can be disabled separately.
|
---|
146 | if1of ($(KBUILD_TARGET), dragonfly freebsd linux netbsd openbsd solaris)
|
---|
147 | VBOX_WITH_X11_ADDITIONS = 1
|
---|
148 | endif
|
---|
149 | # Enable the building of shared folders in the windows additions.
|
---|
150 | VBOX_WITH_WIN32_ADDITIONS_SHAREDFOLDERS = 1
|
---|
151 | # Take the binaries of the OS/2 Additions.
|
---|
152 | VBOX_WITH_OS2_ADDITIONS_BIN = 1
|
---|
153 | # Use additions from the build server.
|
---|
154 | #VBOX_WITH_ADDITIONS_FROM_BUILD_SERVER = 1
|
---|
155 | # Don't bother with additions, overrides VBOX_WITH_ADDITIONS.
|
---|
156 | # This is not used by makefiles, only Config.kmk, see below.
|
---|
157 | #VBOX_WITHOUT_ADDITIONS = 1
|
---|
158 | # Only build the additions (for the additions build server).
|
---|
159 | #VBOX_ONLY_ADDITIONS = 1
|
---|
160 | ifdef VBOX_ADDITIONS_ONLY # typical mistake.
|
---|
161 | $(error It is VBOX_ONLY_ADDITIONS=1 not VBOX_ADDITIONS_ONLY!)
|
---|
162 | endif
|
---|
163 | # Don't create the additions ISO.
|
---|
164 | # (Used by the additions build server, don't invert it.)
|
---|
165 | #VBOX_WITHOUT_ADDITIONS_ISO = 1
|
---|
166 |
|
---|
167 | # build the installer
|
---|
168 | VBOX_WITH_INSTALLER = 1
|
---|
169 | # enable VRDP server
|
---|
170 | VBOX_WITH_VRDP = 1
|
---|
171 | # build VRDP authentication modules
|
---|
172 | VBOX_WITH_VRDP_AUTHMOD = 1
|
---|
173 | # build enhanced version of rdesktop
|
---|
174 | VBOX_WITH_VRDP_RDESKTOP = 1
|
---|
175 | if1of ($(KBUILD_TARGET).$(KBUILD_TARGET_ARCH), win.x86 l4.x86 l4.amd64)
|
---|
176 | # build the support driver & library with IDT patching.
|
---|
177 | VBOX_WITH_IDT_PATCHING = 1
|
---|
178 | endif
|
---|
179 | # Activate this to force the VM to pre-allocate the guest RAM before startup
|
---|
180 | VBOX_WITH_PREALLOC_RAM_BY_DEFAULT =
|
---|
181 | # The kernel driver/module and related runtime libraries.
|
---|
182 | VBOX_WITH_VBOXDRV = 1
|
---|
183 | # build with secure label support
|
---|
184 | ifeq ($(filter win.amd64,$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH)),) # too much work with freetype and all that.
|
---|
185 | VBOX_WITH_SECURELABEL = 1
|
---|
186 | endif
|
---|
187 |
|
---|
188 | # The main api.
|
---|
189 | VBOX_WITH_MAIN = 1
|
---|
190 | # The webservices api.
|
---|
191 | VBOX_WITH_WEBSERVICES = 1
|
---|
192 | # The SDL based GUI.
|
---|
193 | VBOX_WITH_VBOXSDL = 1
|
---|
194 | # The basic frontend (w/o Main).
|
---|
195 | VBOX_WITH_VBOXBFE = 1
|
---|
196 | # The Qt GUI.
|
---|
197 | VBOX_WITH_QTGUI = 1
|
---|
198 | # The Qt 4 GUI (experimental).
|
---|
199 | ifndef VBOX_OSE
|
---|
200 | if1of ($(KBUILD_TARGET).$(KBUILD_TARGET_ARCH), darwin.x86)
|
---|
201 | VBOX_WITH_QT4GUI = 1
|
---|
202 | endif
|
---|
203 | endif
|
---|
204 | # The headless frontend.
|
---|
205 | VBOX_WITH_HEADLESS = 1
|
---|
206 | ## the Direct Framebuffer GUI
|
---|
207 | #VBOX_WITH_VBOXFB = 1
|
---|
208 | # Enable the debugger.
|
---|
209 | ifneq ($(KBUILD_TYPE),release)
|
---|
210 | VBOX_WITH_DEBUGGER = 1
|
---|
211 | # Enable the debugger GUI.
|
---|
212 | VBOX_WITH_DEBUGGER_GUI = 1
|
---|
213 | endif
|
---|
214 | # the documentation
|
---|
215 | VBOX_WITH_DOCS = 1
|
---|
216 | # build the Host Guest Communication Manager component
|
---|
217 | VBOX_WITH_HGCM = 1
|
---|
218 | # Enable the USB feature.
|
---|
219 | VBOX_WITH_USB = 1
|
---|
220 | # Enable the USB 2.0 controller
|
---|
221 | VBOX_WITH_EHCI = 1
|
---|
222 | # Enable the ISCSI feature.
|
---|
223 | VBOX_WITH_ISCSI = 1
|
---|
224 | # Enable the E1000 feature
|
---|
225 | VBOX_WITH_E1000 = 1
|
---|
226 | # Enable ALSA support for Linux
|
---|
227 | VBOX_WITH_ALSA = 1
|
---|
228 | # Enable Pulse support for Linux
|
---|
229 | VBOX_WITH_PULSE = 1
|
---|
230 | # Disable WINMM support for Windows (not implemented)
|
---|
231 | VBOX_WITH_WINMM =
|
---|
232 | # Enable the kchmviewer
|
---|
233 | VBOX_WITH_KCHMVIEWER = 1
|
---|
234 | # Build the testsuite.
|
---|
235 | VBOX_WITH_TESTSUITE = 1
|
---|
236 | # Build the testcases.
|
---|
237 | VBOX_WITH_TESTCASES = 1
|
---|
238 | # Set this to not use COM or XPCOM in places where it can be avoided.
|
---|
239 | #VBOX_WITHOUT_COM = 1
|
---|
240 | # Set this to skip installing the redistributable compiler runtime.
|
---|
241 | #VBOX_WITHOUT_COMPILER_REDIST = 1
|
---|
242 | # Enabled internal networking.
|
---|
243 | VBOX_WITH_INTERNAL_NETWORKING = 1
|
---|
244 | # Enables the ffmpeg module for recording test runs.
|
---|
245 | # Enable this for non-Linux builds later.
|
---|
246 | ifeq ($(KBUILD_TARGET),linux)
|
---|
247 | # VBOX_WITH_FFMPEG = 1
|
---|
248 | endif
|
---|
249 | # Enable OpenGL service
|
---|
250 | VBOX_WITH_OGL = 1
|
---|
251 | # Enable shared folders
|
---|
252 | VBOX_WITH_SHARED_FOLDERS = 1
|
---|
253 | # Enable shared clipboard
|
---|
254 | VBOX_WITH_SHARED_CLIPBOARD = 1
|
---|
255 | # Enable the Intel PXE ROM (replaces Etherboot).
|
---|
256 | VBOX_WITH_INTEL_PXE = 1
|
---|
257 | # Strip binaries of release and profile builds
|
---|
258 | VBOX_DO_STRIP = $(if $(filter release profile,$(KBUILD_TYPE)),1,)
|
---|
259 | # Strip R0/GC modules (current requirement for our loader)
|
---|
260 | VBOX_DO_STRIP_MODULES = 1
|
---|
261 | # Use kStuff for MACH-O and LX binary loading.
|
---|
262 | if1of ($(KBUILD_TARGET),darwin os2)
|
---|
263 | IPRT_WITH_KSTUFF = 1
|
---|
264 | endif
|
---|
265 | # Enable Crossbow support for Solaris.
|
---|
266 | VBOX_WITH_CROSSBOW = 1
|
---|
267 | # Enable setuid wrapper for Solaris.
|
---|
268 | #VBOX_WITH_SUID_WRAPPER = 1
|
---|
269 | # Enable the PDM Lock and let I/O threads call into the PICs.
|
---|
270 | VBOX_WITH_PDM_LOCK = 1
|
---|
271 | # Enable Seamless mode
|
---|
272 | VBOX_X11_SEAMLESS_GUEST = 1
|
---|
273 | # Enable the virtual SATA/AHCI controller
|
---|
274 | VBOX_WITH_AHCI = 1
|
---|
275 | # Enable the new async completion manager
|
---|
276 | VBOX_WITH_PDM_ASYNC_COMPLETION = 1
|
---|
277 | # Enable use of the $ORIGIN rpath feature. This is the default on
|
---|
278 | # Solaris, but not else where for various reasons (ld.so, dist builds).
|
---|
279 | ifeq ($(KBUILD_TARGET),solaris)
|
---|
280 | VBOX_WITH_ORIGIN = 1
|
---|
281 | endif
|
---|
282 | # Temporary switch for enabling / disabling the new USB code on Darwin.
|
---|
283 | VBOX_WITH_NEW_USB_CODE_ON_DARWIN=1
|
---|
284 | # Use the new VBI module on Solaris.
|
---|
285 | VBOX_WITH_SOLARIS_VBI = 1
|
---|
286 | # Enable 64 bits guest pointers.
|
---|
287 | if1of ($(KBUILD_TARGET).$(KBUILD_TARGET_ARCH), linux.amd64 solaris.amd64 win.amd64)
|
---|
288 | VBOX_WITH_64_BITS_GUESTS = 1
|
---|
289 | else
|
---|
290 | # VBOX_WITH_64_BITS_GUESTS = 1
|
---|
291 | endif
|
---|
292 |
|
---|
293 |
|
---|
294 | #
|
---|
295 | # Skip stuff.
|
---|
296 | #
|
---|
297 |
|
---|
298 | # VBOX_QUICK can be used by core developers to speed to the build
|
---|
299 | ifdef VBOX_QUICK
|
---|
300 | # undefine variables by assigning blank.
|
---|
301 | VBOX_WITH_TESTSUITE=
|
---|
302 | VBOX_WITH_TESTCASES=
|
---|
303 | VBOX_WITH_MAIN =
|
---|
304 | VBOX_WITH_VBOXSDL =
|
---|
305 | VBOX_WITH_VBOXBFE =
|
---|
306 | VBOX_WITH_QTGUI =
|
---|
307 | VBOX_WITH_DEBUGGER_GUI =
|
---|
308 | VBOX_WITH_DOCS =
|
---|
309 | endif # VBOX_QUICK
|
---|
310 |
|
---|
311 | # l4 have to skip a few things.
|
---|
312 | ifeq ($(KBUILD_TARGET),l4)
|
---|
313 | VBOX_WITH_VBOXDRV=
|
---|
314 | VBOX_WITH_ADDITION_DRIVERS=
|
---|
315 | VBOX_WITH_VRDP=
|
---|
316 | VBOX_WITH_HEADLESS=
|
---|
317 | VBOX_WITH_VBOXSDL=
|
---|
318 | VBOX_WITH_QTGUI=
|
---|
319 | VBOX_WITH_MAIN=
|
---|
320 | VBOX_WITH_DOCS=
|
---|
321 | VBOX_WITH_ISCSI=
|
---|
322 | VBOX_WITH_INTERNAL_NETWORKING=
|
---|
323 | VBOX_WITH_PDM_ASYNC_COMPLETION=
|
---|
324 | endif
|
---|
325 |
|
---|
326 | # Darwin have to skip a few things at present.
|
---|
327 | ifeq ($(KBUILD_TARGET),darwin)
|
---|
328 | # Internal networking requires testing and possibly proper ring-3/ring0 separation.
|
---|
329 | VBOX_WITH_INTERNAL_NETWORKING=
|
---|
330 | # Don't bother with SDL ttf for now.
|
---|
331 | VBOX_WITH_SECURELABEL=
|
---|
332 | # Later:
|
---|
333 | VBOX_WITH_VRDP_AUTHMOD=
|
---|
334 | VBOX_WITH_VRDP_RDESKTOP=
|
---|
335 | VBOX_WITH_PDM_ASYNC_COMPLETION=
|
---|
336 | endif
|
---|
337 |
|
---|
338 | # Most stuff doesn't build yet on the new targets.
|
---|
339 | ifeq ($(KBUILD_TARGET),os2)
|
---|
340 | VBOX_WITH_INSTALLER=
|
---|
341 | VBOX_WITH_SECURELABEL=
|
---|
342 | VBOX_WITH_VRDP_AUTHMOD=
|
---|
343 | VBOX_WITH_VRDP_RDESKTOP=
|
---|
344 | VBOX_WITH_TESTSUITE=
|
---|
345 | VBOX_WITH_USB=
|
---|
346 | VBOX_WITH_EHCI=
|
---|
347 | VBOX_WITH_DOCS=
|
---|
348 | VBOX_WITH_PDM_ASYNC_COMPLETION=
|
---|
349 | endif
|
---|
350 |
|
---|
351 | ifeq ($(KBUILD_TARGET),solaris)
|
---|
352 | VBOX_WITH_SECURELABEL=
|
---|
353 | VBOX_WITH_VRDP_AUTHMOD=
|
---|
354 | VBOX_WITH_VRDP_RDESKTOP=
|
---|
355 | VBOX_WITH_OGL=
|
---|
356 | endif
|
---|
357 |
|
---|
358 | ifeq ($(KBUILD_TARGET),freebsd)
|
---|
359 | VBOX_WITH_INSTALLER=
|
---|
360 | VBOX_WITH_SECURELABEL=
|
---|
361 | VBOX_WITH_VRDP_AUTHMOD=
|
---|
362 | VBOX_WITH_VRDP_RDESKTOP=
|
---|
363 | VBOX_WITH_TESTSUITE=
|
---|
364 | VBOX_WITH_USB=
|
---|
365 | VBOX_WITH_EHCI=
|
---|
366 | VBOX_WITH_DOCS=
|
---|
367 | endif
|
---|
368 |
|
---|
369 |
|
---|
370 | #
|
---|
371 | # Include automatic and local config file to override the above settings
|
---|
372 | # and to provide defaults for the settings below this point.
|
---|
373 | #
|
---|
374 | AUTOCFG := $(wildcard $(PATH_ROOT)/AutoConfig.kmk)
|
---|
375 | ifeq ($(AUTOCFG),)
|
---|
376 | # deprecated name. to be removed.
|
---|
377 | AUTOCFG := $(wildcard $(PATH_ROOT)/Config.kmkconf)
|
---|
378 | ifneq ($(AUTOCFG),)
|
---|
379 | $(warning Config.kmkconf has been renamed. Please re-run configure.)
|
---|
380 | endif
|
---|
381 | endif
|
---|
382 | ifneq ($(AUTOCFG),)
|
---|
383 | include $(AUTOCFG)
|
---|
384 | endif
|
---|
385 |
|
---|
386 | LOCALCFG := $(wildcard $(PATH_ROOT)/LocalConfig.kmk)
|
---|
387 | ifeq ($(LOCALCFG),)
|
---|
388 | # deprecated name. to be removed.
|
---|
389 | LOCALCFG := $(wildcard $(PATH_ROOT)/Config.kmklocal)
|
---|
390 | ifneq ($(LOCALCFG),)
|
---|
391 | $(warning Please rename your Config.kmklocal to LocalConfig.kmk.)
|
---|
392 | endif
|
---|
393 | endif
|
---|
394 | ifneq ($(LOCALCFG),)
|
---|
395 | include $(LOCALCFG)
|
---|
396 | endif
|
---|
397 |
|
---|
398 |
|
---|
399 | #
|
---|
400 | # Disable components that are not open sourced.
|
---|
401 | #
|
---|
402 | ifdef VBOX_OSE
|
---|
403 | VBOX_WITH_WEBSERVICES=
|
---|
404 | VBOX_WITH_VRDP=
|
---|
405 | VBOX_WITH_USB=
|
---|
406 | VBOX_WITH_EHCI=
|
---|
407 | VBOX_WITH_ISCSI=
|
---|
408 | VBOX_WITH_E1000=
|
---|
409 | VBOX_WITH_DEBUGGER_GUI=
|
---|
410 | VBOX_WITH_WIN32_ADDITIONS_SHAREDFOLDERS=
|
---|
411 | VBOX_WITHOUT_ADDITIONS_ISO=1
|
---|
412 | VBOX_WITH_OS2_ADDITIONS_BIN=
|
---|
413 | VBOX_WITH_SECURELABEL=
|
---|
414 | VBOX_WITH_KCHMVIEWER=
|
---|
415 | VBOX_WITH_DOCS=
|
---|
416 | VBOX_WITH_TESTSUITE=
|
---|
417 | VBOX_WITH_INTEL_PXE=
|
---|
418 | ifeq ($(KBUILD_TARGET),darwin)
|
---|
419 | # Qt/Mac v3.3.x requires patching to work for us.
|
---|
420 | VBOX_WITH_QTGUI=
|
---|
421 | endif
|
---|
422 | ifn1of ($(KBUILD_TARGET),linux solaris)
|
---|
423 | # Only the Linux, Solaris installers are public
|
---|
424 | VBOX_WITH_INSTALLER=
|
---|
425 | endif
|
---|
426 | VBOX_WITH_AHCI=
|
---|
427 | VBOX_WITH_PDM_ASYNC_COMPLETION=
|
---|
428 | endif
|
---|
429 |
|
---|
430 | #
|
---|
431 | # Sanitize the additions build config variables.
|
---|
432 | #
|
---|
433 | ifdef VBOX_WITH_ADDITIONS_FROM_BUILD_SERVER
|
---|
434 | VBOX_WITHOUT_ADDITIONS := 1
|
---|
435 | ifdef VBOX_ONLY_ADDITIONS
|
---|
436 | $(error VBOX_ONLY_ADDITIONS + VBOX_WITH_ADDITIONS_FROM_BUILD_SERVER does not add up!)
|
---|
437 | endif
|
---|
438 | endif
|
---|
439 |
|
---|
440 | ifdef VBOX_ONLY_ADDITIONS
|
---|
441 | ifdef VBOX_WITHOUT_ADDITIONS
|
---|
442 | $(error VBOX_ONLY_ADDITIONS + VBOX_WITHOUT_ADDITIONS does not add up!)
|
---|
443 | endif
|
---|
444 | endif
|
---|
445 |
|
---|
446 | ifdef VBOX_WITHOUT_ADDITIONS
|
---|
447 | # Zap anything that could be contradicting this.
|
---|
448 | VBOX_WITH_ADDITIONS :=
|
---|
449 | endif
|
---|
450 |
|
---|
451 | #
|
---|
452 | # Disable components for headless
|
---|
453 | #
|
---|
454 | ifdef VBOX_HEADLESS
|
---|
455 | VBOX_WITH_QTGUI=
|
---|
456 | VBOX_WITH_VBOXSDL=
|
---|
457 | VBOX_WITH_VBOXBFE=
|
---|
458 | VBOX_WITH_OGL=
|
---|
459 | VBOX_WITH_KCHMVIEWER=
|
---|
460 | endif
|
---|
461 |
|
---|
462 | #
|
---|
463 | # Undefined VBOX_WITH_MAIN implies exclusion of a few more items.
|
---|
464 | #
|
---|
465 | ifndef VBOX_WITH_MAIN
|
---|
466 | VBOX_WITH_VRDP=
|
---|
467 | VBOX_WITH_VBOXSDL=
|
---|
468 | VBOX_WITH_QTGUI=
|
---|
469 | VBOX_WITH_DEBUGGER_GUI=
|
---|
470 | VBOX_WITH_HEADLESS=
|
---|
471 | endif
|
---|
472 |
|
---|
473 | #
|
---|
474 | # Mark OSE builds clearly, helps figuring out limitations more easily.
|
---|
475 | #
|
---|
476 | ifdef VBOX_OSE
|
---|
477 | VBOX_VERSION_STRING = $(VBOX_VERSION_MAJOR).$(VBOX_VERSION_MINOR).$(VBOX_VERSION_BUILD)_OSE
|
---|
478 | endif
|
---|
479 |
|
---|
480 |
|
---|
481 | #
|
---|
482 | # Image and object format config.
|
---|
483 | #
|
---|
484 | if1of ($(KBUILD_TARGET), linux l4 freebsd netbsd openbsd solaris)
|
---|
485 | VBOX_LDR_FMT = elf
|
---|
486 | endif
|
---|
487 | ifeq ($(KBUILD_TARGET),darwin)
|
---|
488 | VBOX_LDR_FMT = macho
|
---|
489 | endif
|
---|
490 | ifeq ($(KBUILD_TARGET),os2)
|
---|
491 | VBOX_LDR_FMT = lx
|
---|
492 | VBOX_LDR_FMT32 = lx
|
---|
493 | VBOX_LDR_FMT64 = elf
|
---|
494 | DONT_USE_YASM = 1 # yasm doesn't implement omf yet.
|
---|
495 | endif
|
---|
496 | ifeq ($(KBUILD_TARGET),win)
|
---|
497 | VBOX_LDR_FMT = pe
|
---|
498 | endif
|
---|
499 | VBOX_LDR_FMT32 ?= $(VBOX_LDR_FMT)
|
---|
500 | VBOX_LDR_FMT64 ?= $(VBOX_LDR_FMT)
|
---|
501 |
|
---|
502 | #
|
---|
503 | # Assembler setup.
|
---|
504 | #
|
---|
505 | # This is a bit complicated since we have to support two different assmblers
|
---|
506 | # (yasm/nasm) and possibly two different formats (32-bit/64-bit).
|
---|
507 | #
|
---|
508 | ifeq ($(VBOX_LDR_FMT),elf)
|
---|
509 | ifeq ($(KBUILD_TARGET_ARCH),x86)
|
---|
510 | VBOX_ASFLAGS_FMT = -f elf32 -DASM_FORMAT_ELF
|
---|
511 | else
|
---|
512 | VBOX_ASFLAGS_FMT = -f elf64 -DASM_FORMAT_ELF
|
---|
513 | endif
|
---|
514 | VBOX_ASFLAGS_DBFINFO = -g dwarf2
|
---|
515 | endif
|
---|
516 | ifeq ($(VBOX_LDR_FMT),lx)
|
---|
517 | VBOX_ASFLAGS_FMT = -f obj -DASM_FORMAT_OMF
|
---|
518 | VBOX_ASFLAGS_DBFINFO = -g stabs
|
---|
519 | endif
|
---|
520 | ifeq ($(VBOX_LDR_FMT),macho)
|
---|
521 | VBOX_ASFLAGS_FMT = -f macho -DASM_FORMAT_MACHO
|
---|
522 | VBOX_ASFLAGS_DBFINFO = -g dwarf2
|
---|
523 | endif
|
---|
524 | ifeq ($(VBOX_LDR_FMT),pe)
|
---|
525 | ifeq ($(KBUILD_TARGET_ARCH),x86)
|
---|
526 | VBOX_ASFLAGS_FMT = -f win32 -DASM_FORMAT_PE
|
---|
527 | else
|
---|
528 | VBOX_ASFLAGS_FMT = -f win64 -DASM_FORMAT_PE
|
---|
529 | endif
|
---|
530 | VBOX_ASFLAGS_DBFINFO = -g cv8
|
---|
531 | endif
|
---|
532 | ifndef VBOX_ASFLAGS_FMT
|
---|
533 | $(error VBOX_ASFLAGS_FMT is not defined. VBOX_LDR_FMT=$(VBOX_LDR_FMT))
|
---|
534 | endif
|
---|
535 |
|
---|
536 | ifeq ($(VBOX_LDR_FMT32),elf)
|
---|
537 | VBOX_ASFLAGS_FMT32 = -f elf32 -DASM_FORMAT_ELF
|
---|
538 | VBOX_ASFLAGS_DBFINFO32 = -g dwarf2
|
---|
539 | endif
|
---|
540 | ifeq ($(VBOX_LDR_FMT32),lx)
|
---|
541 | VBOX_ASFLAGS_FMT32 = -f obj -DASM_FORMAT_OMF
|
---|
542 | VBOX_ASFLAGS_DBFINFO32 = -g stabs
|
---|
543 | endif
|
---|
544 | ifeq ($(VBOX_LDR_FMT32),macho)
|
---|
545 | VBOX_ASFLAGS_FMT32 = -f macho -DASM_FORMAT_MACHO
|
---|
546 | VBOX_ASFLAGS_DBFINFO32 = -g dwarf2
|
---|
547 | endif
|
---|
548 | ifeq ($(VBOX_LDR_FMT32),pe)
|
---|
549 | VBOX_ASFLAGS_FMT32 = -f win32 -DASM_FORMAT_PE
|
---|
550 | VBOX_ASFLAGS_DBFINFO32 = -g cv8
|
---|
551 | endif
|
---|
552 | ifndef VBOX_ASFLAGS_FMT32
|
---|
553 | $(error VBOX_ASFLAGS_FMT32 is not defined. VBOX_LDR_FMT32=$(VBOX_LDR_FMT32))
|
---|
554 | endif
|
---|
555 |
|
---|
556 | ifeq ($(VBOX_LDR_FMT64),elf)
|
---|
557 | VBOX_ASFLAGS_FMT64 = -f elf64 -DASM_FORMAT_ELF
|
---|
558 | VBOX_ASFLAGS_DBFINFO64 = -g dwarf2
|
---|
559 | endif
|
---|
560 | ifeq ($(VBOX_LDR_FMT64),macho)
|
---|
561 | VBOX_ASFLAGS_FMT64 = -f macho64 -DASM_FORMAT_MACHO
|
---|
562 | VBOX_ASFLAGS_DBFINFO64 = -g dwarf2
|
---|
563 | endif
|
---|
564 | ifeq ($(VBOX_LDR_FMT64),pe)
|
---|
565 | VBOX_ASFLAGS_FMT64 = -f win64 -DASM_FORMAT_PE
|
---|
566 | VBOX_ASFLAGS_DBFINFO64 = -g cv8
|
---|
567 | endif
|
---|
568 | ifndef VBOX_ASFLAGS_FMT64
|
---|
569 | $(error VBOX_ASFLAGS_FMT64 is not defined. VBOX_LDR_FMT64=$(VBOX_LDR_FMT64))
|
---|
570 | endif
|
---|
571 |
|
---|
572 | ifndef DONT_USE_YASM
|
---|
573 | VBOX_ASTOOL = YASM
|
---|
574 | VBOX_LDR_FMT_2_YASM_DBGINFO.elf = -g dwarf2
|
---|
575 | VBOX_LDR_FMT_2_YASM_DBGINFO.lx = -g stabs
|
---|
576 | VBOX_LDR_FMT_2_YASM_DBGINFO.macho =
|
---|
577 | VBOX_LDR_FMT_2_YASM_DBGINFO.pe = -g cv8
|
---|
578 | VBOX_ASFLAGS = $(VBOX_ASFLAGS_FMT) -D__YASM__ -Worphan-labels $(VBOX_LDR_FMT_2_YASM_DBGINFO.$(VBOX_LDR_FMT))
|
---|
579 | VBOX_ASFLAGS32 = $(VBOX_ASFLAGS_FMT32) -D__YASM__ -Worphan-labels $(VBOX_LDR_FMT_2_YASM_DBGINFO.$(VBOX_LDR_FMT32))
|
---|
580 | VBOX_ASFLAGS64 = $(VBOX_ASFLAGS_FMT64) -D__YASM__ -Worphan-labels $(VBOX_LDR_FMT_2_YASM_DBGINFO.$(VBOX_LDR_FMT64))
|
---|
581 | else
|
---|
582 | VBOX_ASTOOL = NASM
|
---|
583 | VBOX_ASFLAGS = $(subst elf32,elf,$(VBOX_ASFLAGS_FMT)) -D__NASM__ -w+orphan-labels -g
|
---|
584 | VBOX_ASFLAGS32 = $(subst elf32,elf,$(VBOX_ASFLAGS_FMT32)) -D__NASM__ -w+orphan-labels -g
|
---|
585 | VBOX_ASFLAGS64 = $(VBOX_ASFLAGS_FMT64) -D__NASM__ -w+orphan-labels -g
|
---|
586 | endif
|
---|
587 |
|
---|
588 | #
|
---|
589 | # Windows only has mingw handy. On *nix we have to deal with cross compiling
|
---|
590 | # 32-bit targets on 64-bit platforms, meaning we'll be using gcc32/g++32.
|
---|
591 | # In the latter case we'll also have to disable all the all the R0 driver related stuff.
|
---|
592 | #
|
---|
593 | ifndef VBOX_GCC_TOOL
|
---|
594 | ifeq ($(KBUILD_TARGET),win)
|
---|
595 | VBOX_GCC_TOOL := MINGW32
|
---|
596 | TOOL_MINGW32_CFLAGS := $(UNDEFINED) # override -g
|
---|
597 | else ifeq ($(KBUILD_TARGET),os2)
|
---|
598 | VBOX_GCC_TOOL := GXX3OMF
|
---|
599 | else ifeq ($(KBUILD_TARGET),darwin)
|
---|
600 | VBOX_GCC_TOOL := GXX4MACHO
|
---|
601 | else ifeq ($(KBUILD_TARGET),solaris)
|
---|
602 | VBOX_GCC_TOOL := GXX3PLAIN
|
---|
603 | VBOX_GCC32_TOOL := GXX3PLAIN
|
---|
604 | else
|
---|
605 | VBOX_GCC_TOOL := GXX3
|
---|
606 | ifeq ($(KBUILD_TARGET_ARCH).$(KBUILD_HOST_ARCH),x86.amd64) ## @todo mixing target/host here!
|
---|
607 | VBOX_GCC_TOOL := GXX32
|
---|
608 | VBOX_WITH_VBOXDRV=
|
---|
609 | else ifeq ($(KBUILD_TARGET_ARCH).$(KBUILD_HOST_ARCH),amd64.x86)
|
---|
610 | VBOX_GCC_TOOL := GXX64
|
---|
611 | VBOX_WITH_VBOXDRV=
|
---|
612 | endif
|
---|
613 | endif
|
---|
614 | endif
|
---|
615 | ifndef VBOX_GCC32_TOOL
|
---|
616 | ifeq ($(KBUILD_TARGET_ARCH),x86)
|
---|
617 | VBOX_GCC32_TOOL := $(VBOX_GCC_TOOL)
|
---|
618 | else ifeq ($(KBUILD_TARGET),win)
|
---|
619 | VBOX_GCC32_TOOL := MINGW32
|
---|
620 | else
|
---|
621 | VBOX_GCC32_TOOL := GXX32
|
---|
622 | endif
|
---|
623 | endif
|
---|
624 |
|
---|
625 | #
|
---|
626 | # Decide which Visual C++ compiler version we're using by default.
|
---|
627 | #
|
---|
628 | ifndef VBOX_VCC_TOOL
|
---|
629 | ifeq ($(KBUILD_TARGET).$(KBUILD_TARGET_ARCH),win.amd64)
|
---|
630 | VBOX_USE_VCC80 ?= 1 # Enforce VCC80 when targetting AMD64.
|
---|
631 | endif
|
---|
632 | ifdef VBOX_USE_VCC80
|
---|
633 | ifeq ($(KBUILD_TARGET_ARCH),x86)
|
---|
634 | VBOX_VCC_TOOL := VCC80X86
|
---|
635 | else
|
---|
636 | VBOX_VCC_TOOL := VCC80AMD64
|
---|
637 | endif
|
---|
638 | else
|
---|
639 | VBOX_VCC_TOOL := VCC70
|
---|
640 | endif
|
---|
641 | endif
|
---|
642 |
|
---|
643 | #
|
---|
644 | # The kBuild tools and SDKs are using PATH_DEVTOOLS, PATH_DEVTOOLS_BLD
|
---|
645 | # and PATH_DEVTOOLS_TRG to find things if we give them specific locations.
|
---|
646 | #
|
---|
647 | PATH_DEVTOOLS ?= $(PATH_ROOT)/tools
|
---|
648 | PATH_DEVTOOLS := $(abspath $(PATH_DEVTOOLS))
|
---|
649 | PATH_DEVTOOLS_BLD ?= $(PATH_DEVTOOLS)/$(KBUILD_HOST).$(KBUILD_HOST_ARCH)
|
---|
650 | PATH_DEVTOOLS_TRG ?= $(PATH_DEVTOOLS)/$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH)
|
---|
651 |
|
---|
652 | ## @todo Remove the default tool crap here!
|
---|
653 | TOOL = $(VBOX_GCC_TOOL)
|
---|
654 | ifdef VBOX_USE_VCC80
|
---|
655 | TOOL.win.x86 = VCC80X86
|
---|
656 | TOOL.win.amd64 = VCC80AMD64
|
---|
657 | else
|
---|
658 | TOOL.win = VCC70
|
---|
659 | endif
|
---|
660 | ASTOOL = $(VBOX_ASTOOL)
|
---|
661 |
|
---|
662 | #
|
---|
663 | # L4-specific settings.
|
---|
664 | #
|
---|
665 | ifdef L4_DIR
|
---|
666 | ifeq ($(KBUILD_TARGET),l4)
|
---|
667 | L4_API ?= l4v2
|
---|
668 | L4_ARCH ?= $(KBUILD_TARGET_ARCH)
|
---|
669 | ifeq ($(L4_ARCH),x86)
|
---|
670 | L4_CPU ?= 586
|
---|
671 | L4LINUX26_INCDIR := $(L4LINUX26_DIR)/include \
|
---|
672 | $(L4LINUX26_DIR)/include/asm-l4/i386-arch
|
---|
673 | else ifeq ($(L4_ARCH),amd64)
|
---|
674 | L4_CPU ?= k8
|
---|
675 | L4LINUX26_INCDIR := $(L4LINUX26_DIR)/include
|
---|
676 | # no red zone for L4 because of IPC bindings
|
---|
677 | CFLAGS.l4 = -mno-red-zone
|
---|
678 | CXXFLAGS.l4 = -mno-red-zone
|
---|
679 | else
|
---|
680 | $(error L4_ARCH=$(L4_ARCH))
|
---|
681 | endif
|
---|
682 | L4_OBJ := $(L4_DIR)/build-$(L4_ARCH)-$(L4_CPU)-$(L4_API)
|
---|
683 | # support splitted Linux kernels (make O=<build directory>)
|
---|
684 | kernelsrc := $(shell $(SED_EXT) -ne 's+^KERNELSRC.*= *\(.*\)+\1+p' $(L4LINUX26_DIR)/Makefile)
|
---|
685 | ifneq ($(kernelsrc),)
|
---|
686 | kernelpath := $(realpath $(kernelsrc))
|
---|
687 | L4LINUX26_INCDIR += $(L4LINUX26_DIR)/include2 $(kernelpath)/include
|
---|
688 | endif
|
---|
689 | L4_INCDIR := \
|
---|
690 | $(L4_OBJ)/include/uclibc++ \
|
---|
691 | $(L4_OBJ)/include/$(L4_ARCH)/uclibc \
|
---|
692 | $(L4_OBJ)/include/uclibc \
|
---|
693 | $(L4LINUX26_INCDIR) \
|
---|
694 | $(L4_OBJ)/include/$(L4_ARCH)/$(L4_API) \
|
---|
695 | $(L4_OBJ)/include/$(L4_API) \
|
---|
696 | $(L4_OBJ)/include/$(L4_ARCH) \
|
---|
697 | $(L4_OBJ)/include \
|
---|
698 | $(L4_DIR)/tool/dice/include
|
---|
699 | L4_LIBDIR := \
|
---|
700 | $(L4_DIR)/build-$(L4_ARCH)-$(L4_CPU)-$(L4_API)/lib/$(L4_ARCH)_$(L4_CPU)/$(L4_API)
|
---|
701 | endif # KBUILD_TARGET == l4
|
---|
702 | endif # L4_DIR
|
---|
703 |
|
---|
704 | # Produce debugging information that the Fiasco kernel debugger can read.
|
---|
705 | ifeq ($(KBUILD_TARGET).$(KBUILD_TYPE),l4.debug)
|
---|
706 | DEBUG_L4 = -gstabs+
|
---|
707 | endif
|
---|
708 |
|
---|
709 | #
|
---|
710 | # Setup the global defines and includes.
|
---|
711 | #
|
---|
712 | # Note! The __SOMETHING__ #defines are deprecated as they violate the C/C++ specs.
|
---|
713 | #
|
---|
714 | INCS += $(PATH_ROOT)/include $(PATH_OUT)
|
---|
715 | DEFS += VBOX
|
---|
716 | DEFS.debug := DEBUG DEBUG_$(subst $(subst _, ,_),_,$(USERNAME)) DEBUG_USERNAME=$(subst $(subst _, ,_),_,$(USERNAME))
|
---|
717 | DEFS.profile = VBOX_WITH_STATISTICS
|
---|
718 | DEFS.x86 = RT_ARCH_X86 __X86__
|
---|
719 | DEFS.amd64 = RT_ARCH_AMD64 __AMD64__
|
---|
720 | DEFS.darwin = RT_OS_DARWIN __DARWIN__
|
---|
721 | DEFS.darwin.x86 = VBOX_WITH_HYBIRD_32BIT_KERNEL
|
---|
722 | DEFS.freebsd = RT_OS_FREEBSD __FREEBSD__
|
---|
723 | DEFS.l4 = RT_OS_L4 __L4__ __L4ENV__ L4API_l4v2 ARCH_$(KBUILD_TARGET_ARCH) __NO_CTYPE _FILE_OFFSET_BITS=64
|
---|
724 | DEFS.linux = RT_OS_LINUX _FILE_OFFSET_BITS=64
|
---|
725 | DEFS.netbsd = RT_OS_NETBSD
|
---|
726 | DEFS.openbsd = RT_OS_OPENBSD
|
---|
727 | DEFS.os2 = RT_OS_OS2 __OS2__
|
---|
728 | DEFS.solaris = RT_OS_SOLARIS _FILE_OFFSET_BITS=64
|
---|
729 | DEFS.win = RT_OS_WINDOWS __WIN__
|
---|
730 | DEFS.win.x86 = __WIN32__
|
---|
731 | DEFS.win.amd64 = __WIN64__
|
---|
732 | # optional defines (use environment or make commandline)
|
---|
733 | ifdef VBOX_WITH_DEBUGGER
|
---|
734 | DEFS += VBOX_WITH_DEBUGGER
|
---|
735 | endif
|
---|
736 | ifdef VBOX_WITH_DEBUGGER_GUI
|
---|
737 | DEFS += VBOX_WITH_DEBUGGER_GUI
|
---|
738 | endif
|
---|
739 | ifdef VBOX_WITH_STATISTICS
|
---|
740 | DEFS += VBOX_WITH_STATISTICS
|
---|
741 | endif
|
---|
742 | ifdef VBOX_STRICT
|
---|
743 | DEFS += VBOX_STRICT
|
---|
744 | endif
|
---|
745 | ifdef LOG_ENABLED
|
---|
746 | DEFS += LOG_ENABLED
|
---|
747 | endif
|
---|
748 | ifdef VBOX_OSE
|
---|
749 | DEFS += VBOX_OSE
|
---|
750 | endif
|
---|
751 | ifdef VBOX_WITH_NEW_PHYS_CODE
|
---|
752 | DEFS += VBOX_WITH_NEW_PHYS_CODE
|
---|
753 | endif
|
---|
754 | ifdef VBOX_WITH_64_BITS_GUESTS
|
---|
755 | DEFS += VBOX_WITH_64_BITS_GUESTS
|
---|
756 | endif
|
---|
757 |
|
---|
758 | #
|
---|
759 | # Compiler optimization flags.
|
---|
760 | #
|
---|
761 | ifeq ($(KBUILD_TYPE),debug)
|
---|
762 | VBOX_GCC_FP ?= -fno-omit-frame-pointer
|
---|
763 | VBOX_GCC_OPT ?= -O0
|
---|
764 | VBOX_VCC_FP ?= -Oy-
|
---|
765 | VBOX_VCC_OPT ?=
|
---|
766 | VBOX_GCC_GC_FP ?= -fno-omit-frame-pointer
|
---|
767 | VBOX_GCC_GC_OPT ?= -O0
|
---|
768 | VBOX_VCC_GC_FP ?= -Oy-
|
---|
769 | VBOX_VCC_GC_OPT ?=
|
---|
770 | else
|
---|
771 | # We should use -fomit-frame-pointer for GCC / -Oy for VCC.
|
---|
772 | # -funwind-tables provides support for backtraces in gdb then.
|
---|
773 | VBOX_GCC_FP ?= -fno-omit-frame-pointer
|
---|
774 | VBOX_GCC_OPT ?= -O2 $(VBOX_GCC_mtune-generic)
|
---|
775 | VBOX_VCC_FP ?= -Oy-
|
---|
776 | ifdef VBOX_USE_VCC80
|
---|
777 | VBOX_VCC_OPT ?= -O2 -GS-
|
---|
778 | else
|
---|
779 | VBOX_VCC_OPT ?= -Ogitb2
|
---|
780 | endif
|
---|
781 | VBOX_GCC_GC_FP ?= -fno-omit-frame-pointer
|
---|
782 | VBOX_GCC_GC_OPT ?= -O2 $(VBOX_GCC_mtune-generic)
|
---|
783 | VBOX_VCC_GC_FP ?= -Oy-
|
---|
784 | ifdef VBOX_USE_VCC80
|
---|
785 | VBOX_VCC_GC_OPT ?= -O2
|
---|
786 | else
|
---|
787 | VBOX_VCC_GC_OPT ?= -Ogitb2
|
---|
788 | endif
|
---|
789 | endif
|
---|
790 |
|
---|
791 | #
|
---|
792 | # ARCH_BITS_DEFS.
|
---|
793 | #
|
---|
794 | ifeq ($(KBUILD_TARGET_ARCH),amd64)
|
---|
795 | ARCH_BITS_DEFS := HC_ARCH_BITS=64
|
---|
796 | else ifeq ($(KBUILD_TARGET_ARCH),x86)
|
---|
797 | ARCH_BITS_DEFS := HC_ARCH_BITS=32
|
---|
798 | else
|
---|
799 | error KBUILD_TARGET_ARCH=$(KBUILD_TARGET_ARCH)
|
---|
800 | endif
|
---|
801 |
|
---|
802 | ifdef VBOX_WITH_64_BITS_GUESTS
|
---|
803 | VBOX_GC_ARCH_BITS_DEFS := GC_ARCH_BITS=64
|
---|
804 | else
|
---|
805 | VBOX_GC_ARCH_BITS_DEFS := GC_ARCH_BITS=32
|
---|
806 | endif
|
---|
807 | ARCH_BITS_DEFS += $(VBOX_GC_ARCH_BITS_DEFS)
|
---|
808 |
|
---|
809 | #
|
---|
810 | # Add the output dir(s) to the dynamic loader search path.
|
---|
811 | #
|
---|
812 | if1of ($(KBUILD_TARGET), linux l4 freebsd netbsd openbsd solaris)
|
---|
813 | export LD_LIBRARY_PATH:=$(PATH_BIN):$(PATH_LIB):$(LD_LIBRARY_PATH)
|
---|
814 | endif
|
---|
815 | ifeq ($(KBUILD_TARGET),os2)
|
---|
816 | #fixme! export BEGINLIBPATH:=$(PATH_BIN);$(PATH_LIB);$(BEGINLIBPATH)
|
---|
817 | endif
|
---|
818 | ifeq ($(KBUILD_TARGET),win)
|
---|
819 | export PATH:=$(PATH_BIN);$(PATH_LIB);$(PATH)
|
---|
820 | endif
|
---|
821 |
|
---|
822 | #
|
---|
823 | # Common libraries and tools.
|
---|
824 | #
|
---|
825 | ifeq ($(KBUILD_TARGET),darwin)
|
---|
826 | LIB_RUNTIME = $(PATH_BIN)/VBoxRT.dylib
|
---|
827 | LIB_RUNTIME_EF = #$(PATH_LIB)/RuntimeEFCPP.a
|
---|
828 | LIB_KPROFILE = $(PATH_BIN)/kPrf2.dylib
|
---|
829 | LIB_VMM = $(PATH_BIN)/VBoxVMM.dylib
|
---|
830 | LIB_VMMGC = $(PATH_BIN)/VMMGC.gc
|
---|
831 | LIB_REM = $(PATH_LIB)/VBoxREMImp.dylib
|
---|
832 | LIB_XPCOM = $(PATH_BIN)/VBoxXPCOM.dylib
|
---|
833 | LIB_DDU = $(PATH_BIN)/VBoxDDU.dylib
|
---|
834 | LIB_SETTINGS = $(PATH_BIN)/VBoxSettings.dylib
|
---|
835 | endif
|
---|
836 | ifeq ($(KBUILD_TARGET),l4)
|
---|
837 | LIB_RUNTIME = $(PATH_BIN)/VBoxRT.s.so
|
---|
838 | LIB_RUNTIME_EF = #$(PATH_LIB)/RuntimeEFCPP.a
|
---|
839 | LIB_KPROFILE = $(PATH_BIN)/kPrf2.s.so
|
---|
840 | LIB_VMM = $(PATH_BIN)/VBoxVMM.s.so
|
---|
841 | LIB_VMMGC = $(PATH_BIN)/VMMGC.gc
|
---|
842 | LIB_REM = $(PATH_BIN)/VBoxREMImp.s.so
|
---|
843 | LIB_XPCOM = $(PATH_BIN)/VBoxXPCOM.s.so
|
---|
844 | LIB_DDU = $(PATH_BIN)/VBoxDDU.s.so
|
---|
845 | LIB_SETTINGS = $(PATH_BIN)/VBoxSettings.s.so
|
---|
846 | endif
|
---|
847 | if1of ($(KBUILD_TARGET), linux freebsd netbsd openbsd solaris)
|
---|
848 | LIB_RUNTIME = $(PATH_BIN)/VBoxRT.so
|
---|
849 | LIB_RUNTIME_EF = $(PATH_LIB)/RuntimeEFCPP.a
|
---|
850 | LIB_KPROFILE = $(PATH_BIN)/kPrf2.so
|
---|
851 | LIB_VMM = $(PATH_BIN)/VBoxVMM.so
|
---|
852 | LIB_VMMGC = $(PATH_BIN)/VMMGC.gc
|
---|
853 | LIB_REM = $(PATH_BIN)/VBoxREMImp.so
|
---|
854 | LIB_XPCOM = $(PATH_BIN)/VBoxXPCOM.so
|
---|
855 | LIB_DDU = $(PATH_BIN)/VBoxDDU.so
|
---|
856 | LIB_SETTINGS = $(PATH_BIN)/VBoxSettings.so
|
---|
857 | endif
|
---|
858 | ifeq ($(KBUILD_TARGET),os2)
|
---|
859 | LIB_RUNTIME = $(PATH_BIN)/VBoxRT.dll
|
---|
860 | LIB_RUNTIME_EF = #$(PATH_LIB)/RuntimeEFCPP.a
|
---|
861 | LIB_KPROFILE = $(PATH_BIN)/kPrf2.dll
|
---|
862 | LIB_VMM = $(PATH_BIN)/VBoxVMM.dll
|
---|
863 | LIB_VMMGC = $(PATH_LIB)/VMMGCImp.lib
|
---|
864 | LIB_REM = $(PATH_LIB)/VBoxREMImp.lib
|
---|
865 | LIB_XPCOM = $(PATH_BIN)/VBoxXCOM.dll
|
---|
866 | LIB_DDU = $(PATH_BIN)/VBoxDDU.dll
|
---|
867 | LIB_SETTINGS = $(PATH_BIN)/VBoxSett.dll
|
---|
868 | OBJ_SYS0 = $(PATH_OBJ)/src/VBox/Runtime/RuntimeR0/os2/sys0.obj
|
---|
869 | endif
|
---|
870 | ifeq ($(KBUILD_TARGET),win)
|
---|
871 | LIB_RUNTIME = $(PATH_LIB)/VBoxRT.lib
|
---|
872 | LIB_RUNTIME_EF = #$(PATH_LIB)/RuntimeEFCPP.lib
|
---|
873 | LIB_KPROFILE = $(PATH_LIB)/kPrf2.lib
|
---|
874 | LIB_VMM = $(PATH_LIB)/VBoxVMM.lib
|
---|
875 | LIB_VMMGC = $(PATH_OUT)/obj/src/VBox/VMM/VMMGC/VMMGC.lib
|
---|
876 | LIB_REM = $(PATH_LIB)/VBoxREMImp.lib
|
---|
877 | LIB_XPCOM = $(PATH_BIN)/VBoxXPCOM.dll
|
---|
878 | LIB_DDU = $(PATH_LIB)/VBoxDDU.lib
|
---|
879 | LIB_SETTINGS = $(PATH_LIB)/VBoxSettings.lib
|
---|
880 | endif
|
---|
881 |
|
---|
882 | # The kprofile build automagically links with kProfile.
|
---|
883 | ifeq ($(KBUILD_TYPE),kprofile)
|
---|
884 | LIB_RUNTIME += $(LIB_KPROFILE)
|
---|
885 | endif
|
---|
886 |
|
---|
887 | ## Enable C++ electric fence heap. (Warning: will easily run out of virtual memory / kernel stuff on Linux/Windows.)
|
---|
888 | #LIB_RUNTIME += $(LIB_RUNTIME_EF) $(LIB_RUNTIME)
|
---|
889 |
|
---|
890 | # Overridable libraries (unix).
|
---|
891 | LIB_PTHREAD ?= pthread
|
---|
892 |
|
---|
893 | # Xcursor (consider an SDK for this).
|
---|
894 | # (LIB_XCURSOR is legacy, remove in a month or two.)
|
---|
895 | ifndef VBOX_XCURSOR_LIBS
|
---|
896 | VBOX_XCURSOR_LIBS := $(LIB_XCURSOR)
|
---|
897 | endif
|
---|
898 | ifeq ($(VBOX_XCURSOR_LIBS),)
|
---|
899 | ifeq ($(KBUILD_TARGET),solaris)
|
---|
900 | VBOX_XCURSOR_LIBS := $(lastword $(wildcard $(PATH_DEVTOOLS_TRG)/libXcursor/*/lib/libXcursor.a))
|
---|
901 | ifneq ($(VBOX_XCURSOR_LIBS),)
|
---|
902 | VBOX_XCURSOR_INCS := $(patsubst %/lib/libXcursor.a,%/include, $(VBOX_XCURSOR_LIBS))
|
---|
903 | VBOX_XCURSOR_LIBS += X11 Xrender Xfixes
|
---|
904 | endif
|
---|
905 | endif
|
---|
906 | ifeq ($(VBOX_XCURSOR_LIBS),)
|
---|
907 | VBOX_XCURSOR_LIBS := Xcursor
|
---|
908 | endif
|
---|
909 | endif
|
---|
910 |
|
---|
911 |
|
---|
912 | # Intel ASL compiler for ACPI
|
---|
913 | VBOX_IASLCMD ?= $(firstword $(wildcard $(PATH_DEVTOOLS_BLD)/bin/iasl$(HOSTSUFF_EXE)) iasl$(HOSTSUFF_EXE))
|
---|
914 |
|
---|
915 | # Bruce's C compile is a C-compiler for BIOS-related 8086 code
|
---|
916 | VBOX_BCC ?= $(PATH_DEVTOOLS_BLD)/bin/bcc$(HOSTSUFF_EXE) -B $(PATH_DEVTOOLS_BLD)/bin/
|
---|
917 |
|
---|
918 | # Assembler for BIOS-related 8086 code
|
---|
919 | VBOX_AS86 ?= $(PATH_DEVTOOLS_BLD)/bin/as86$(HOSTSUFF_EXE)
|
---|
920 |
|
---|
921 | # libxslt XSLT processor. (see PATH_TOOL_YASM for explanation why it's temporarily located in bin.)
|
---|
922 | ifeq ($(KBUILD_HOST),win)
|
---|
923 | # VBOX_XSLTPROC ?= $(PATH_DEVTOOLS)/win.x86/libxslt/10114/xsltproc.exe
|
---|
924 | VBOX_XSLTPROC ?= $(PATH_DEVTOOLS)/win.x86/bin/xsltproc.exe
|
---|
925 | else ifeq ($(KBUILD_HOST),os2)
|
---|
926 | VBOX_XSLTPROC ?= BEGINLIBPATH="$(PATH_DEVTOOLS_BLD)/bin;$$BEGINLIBPATH" $(PATH_DEVTOOLS_BLD)/bin/xsltproc.exe
|
---|
927 | else
|
---|
928 | VBOX_XSLTPROC ?= xsltproc$(HOSTSUFF_EXE)
|
---|
929 | endif
|
---|
930 |
|
---|
931 | # bin2c (convert binary files into C arrays)
|
---|
932 | VBOX_BIN2C ?= $(PATH_OBJ)/src/bldprogs/bin2c/bin2c$(HOSTSUFF_EXE)
|
---|
933 |
|
---|
934 | # mkisofs
|
---|
935 | ifeq ($(KBUILD_HOST),win)
|
---|
936 | VBOX_MKISOFS ?= $(PATH_DEVTOOLS_BLD)/bin/mkisofs.exe
|
---|
937 | else
|
---|
938 | VBOX_MKISOFS ?= mkisofs
|
---|
939 | endif
|
---|
940 |
|
---|
941 | # Makeself for the linux installers.
|
---|
942 | VBOX_MAKESELF ?= $(PATH_DEVTOOLS)/common/makeself/v2.1.4_1/makeself.sh
|
---|
943 |
|
---|
944 | # Microsoft HTML Help Workshop.
|
---|
945 | VBOX_PATH_HTML_HELP_WORKSHOP ?= $(PATH_DEVTOOLS)/win.x86/HTML_Help_Workshop/v1.3/
|
---|
946 |
|
---|
947 | # Path to the null soft installer.
|
---|
948 | VBOX_PATH_NSIS ?= $(PATH_DEVTOOLS)/win.x86/nsis/v2.33-log-nsscm
|
---|
949 |
|
---|
950 | # Path to AutoIt3.
|
---|
951 | VBOX_PATH_AUTOIT3 ?= $(PATH_DEVTOOLS)/win.x86/autoit/v3.2.10.0
|
---|
952 |
|
---|
953 | # Windows install tools...
|
---|
954 | VBOX_PATH_WIX ?= $(PATH_DEVTOOLS)/win.x86/wix/v2.0.4611.0
|
---|
955 | VBOX_PATH_DIFX ?= $(PATH_DEVTOOLS)/win.$(KBUILD_TARGET_ARCH)/DIFx/v2.1
|
---|
956 |
|
---|
957 | # We need to export YASM for OSE, but since it was converted to .zip we need to
|
---|
958 | # allow for the location used by the zip to be properly cleaned up first.
|
---|
959 | if1of ($(KBUILD_HOST).$(KBUILD_HOST_ARCH), win.x86 linux.x86 solaris.x86)
|
---|
960 | PATH_TOOL_YASM ?= $(PATH_DEVTOOLS_BLD)/bin
|
---|
961 | endif
|
---|
962 |
|
---|
963 | # XPCOM setup for all but win32.
|
---|
964 | ifneq ($(KBUILD_TARGET),win)
|
---|
965 | VBOX_WITH_XPCOM = 1
|
---|
966 | VBOX_XPIDL ?= $(VBOX_PATH_SDK)/bin/xpidl$(HOSTSUFF_EXE)
|
---|
967 | VBOX_PATH_XPCOM_IDL ?= $(VBOX_PATH_SDK)/idl
|
---|
968 | VBOX_XPCOM_INCS ?= \
|
---|
969 | $(VBOX_PATH_SDK)/include \
|
---|
970 | $(VBOX_PATH_SDK)/include/xpcom \
|
---|
971 | $(VBOX_PATH_SDK)/include/xpcom/nsprpub \
|
---|
972 | $(VBOX_PATH_SDK)/include/xpcom/string \
|
---|
973 | $(VBOX_PATH_SDK)/include/xpcom/xpcom \
|
---|
974 | $(VBOX_PATH_SDK)/include/xpcom/ipcd
|
---|
975 | ifneq ($(KBUILD_TARGET),os2)
|
---|
976 | # libIDL-config (for xpcom18a4)
|
---|
977 | ifeq ($(origin VBOX_LIBIDL_CONFIG),undefined)
|
---|
978 | export VBOX_LIBIDL_CONFIG := $(firstword $(shell which libIDL-config-2 libIDL-config 2> /dev/null))
|
---|
979 | endif
|
---|
980 | endif
|
---|
981 | endif
|
---|
982 |
|
---|
983 | ifeq ($(KBUILD_TARGET),os2)
|
---|
984 | # search DLLs in the EXE directory first
|
---|
985 | VBOX_XPIDL := BEGINLIBPATH="$(dir $(VBOX_XPIDL));$$BEGINLIBPATH" $(VBOX_XPIDL)
|
---|
986 | endif
|
---|
987 | #$(error $(VBOX_XPIDL))
|
---|
988 |
|
---|
989 | # The X11 LIBPATH. (The amd64 hack is for RHEL4.)
|
---|
990 | ifeq ($(KBUILD_TARGET_ARCH),amd64)
|
---|
991 | VBOX_LIBPATH_X11 ?= /usr/X11R6/lib64 /usr/X11R6/lib
|
---|
992 | else
|
---|
993 | VBOX_LIBPATH_X11 ?= /usr/X11R6/lib
|
---|
994 | endif
|
---|
995 |
|
---|
996 | # 32bit X11 LIBPATH for building 32bit guest additions
|
---|
997 | VBOX_LIBPATH32_X11 ?= /usr/X11R6/lib32 /usr/X11R6/lib
|
---|
998 |
|
---|
999 | #
|
---|
1000 | # Macros dealing with the darwin version we're targeting.
|
---|
1001 | #
|
---|
1002 | ifeq ($(KBUILD_TARGET),darwin)
|
---|
1003 | VBOX_DEF_MACOSX_VERSION_MIN ?= 10.4
|
---|
1004 | ifeq ($(VBOX_DEF_MACOSX_VERSION_MIN),10.4)
|
---|
1005 | ifeq ($(origin VBOX_DARWIN_CLASSIC_LINKER),undefined)
|
---|
1006 | VBOX_DARWIN_CLASSIC_LINKER := $(shell ld -v 2>&1 )
|
---|
1007 | ifneq ($(filter ld64%, $(subst :, , $(VBOX_DARWIN_CLASSIC_LINKER))),)
|
---|
1008 | export VBOX_DARWIN_CLASSIC_LINKER := -Wl,-classic_linker
|
---|
1009 | else
|
---|
1010 | export VBOX_DARWIN_CLASSIC_LINKER :=
|
---|
1011 | endif
|
---|
1012 | endif
|
---|
1013 | VBOX_PATH_MACOSX_SDK ?= /Developer/SDKs/MacOSX$(VBOX_DEF_MACOSX_VERSION_MIN)u.sdk
|
---|
1014 | else
|
---|
1015 | VBOX_PATH_MACOSX_SDK ?= /Developer/SDKs/MacOSX$(VBOX_DEF_MACOSX_VERSION_MIN).sdk
|
---|
1016 | endif
|
---|
1017 | VBOX_DARWIN_DEF_SDK_DEFS := MAC_OS_X_VERSION_MIN_REQUIRED=$(subst .,,$(VBOX_DEF_MACOSX_VERSION_MIN))0 \
|
---|
1018 | MAC_OS_X_VERSION_MAX_ALLOWED=$(subst .,,$(VBOX_DEF_MACOSX_VERSION_MIN))0
|
---|
1019 | VBOX_DARWIN_DEF_SDK_CFLAGS := -mmacosx-version-min=$(VBOX_DEF_MACOSX_VERSION_MIN) -isysroot $(VBOX_PATH_MACOSX_SDK)
|
---|
1020 | VBOX_DARWIN_DEF_SDK_CXXFLAGS := -mmacosx-version-min=$(VBOX_DEF_MACOSX_VERSION_MIN) -isysroot $(VBOX_PATH_MACOSX_SDK)
|
---|
1021 | VBOX_DARWIN_DEF_SDK_OBJCFLAGS := -mmacosx-version-min=$(VBOX_DEF_MACOSX_VERSION_MIN) -isysroot $(VBOX_PATH_MACOSX_SDK)
|
---|
1022 | VBOX_DARWIN_DEF_SDK_LDFLAGS := -mmacosx-version-min=$(VBOX_DEF_MACOSX_VERSION_MIN) -Wl,-syslibroot,$(VBOX_PATH_MACOSX_SDK) $(VBOX_DARWIN_CLASSIC_LINKER)
|
---|
1023 | endif # target=darwin
|
---|
1024 |
|
---|
1025 | #
|
---|
1026 | # The X11 headers.
|
---|
1027 | #
|
---|
1028 | VBOX_PATH_X11_ROOT = $(PATH_ROOT)/src/VBox/Additions/x11/x11include
|
---|
1029 | VBOX_PATH_X11_XFREE_4_2 = $(VBOX_PATH_X11_ROOT)/4.2
|
---|
1030 | VBOX_PATH_X11_XFREE_4_3 = $(VBOX_PATH_X11_ROOT)/4.3
|
---|
1031 | VBOX_PATH_X11_XORG_7_0 = $(VBOX_PATH_X11_ROOT)/7.0
|
---|
1032 | VBOX_PATH_X11_XORG_7_1 = $(VBOX_PATH_X11_ROOT)/7.1
|
---|
1033 | VBOX_PATH_X11_XORG_1_3 = $(VBOX_PATH_X11_ROOT)/1.3
|
---|
1034 | VBOX_PATH_X11_XORG_1_4 = $(VBOX_PATH_X11_ROOT)/1.4
|
---|
1035 | VBOX_PATH_X11_XORG_1_5 = $(VBOX_PATH_X11_ROOT)/1.5
|
---|
1036 |
|
---|
1037 | #
|
---|
1038 | # Various other variables.
|
---|
1039 | #
|
---|
1040 |
|
---|
1041 | # Two helper variables for the VBOX_WITH_ORIGIN stuff:
|
---|
1042 | # VBOX_ORIGIN - Indirect expansion trick.
|
---|
1043 | # VBOX_GCC_RPATH_OPT - Different GCC/LD combinations needs different options.
|
---|
1044 | VBOX_ORIGIN = $$ORIGIN
|
---|
1045 | ifeq ($(KBUILD_TARGET),solaris)
|
---|
1046 | VBOX_GCC_RPATH_OPT = -R
|
---|
1047 | else
|
---|
1048 | VBOX_GCC_RPATH_OPT = -Wl,-rpath,
|
---|
1049 | endif
|
---|
1050 |
|
---|
1051 | # The icons to use.
|
---|
1052 | ifdef VBOX_OSE
|
---|
1053 | VBOX_WINDOWS_ICON_FILE ?= $(PATH_ROOT)/src/VBox/Frontends/VirtualBox/images/OSE/VirtualBox_win.ico
|
---|
1054 | VBOX_MACOSX_ICON_FILE ?= $(PATH_ROOT)/src/VBox/Frontends/VirtualBox/images/OSE/VirtualBox.icns
|
---|
1055 | else
|
---|
1056 | ifeq ($(KBUILD_HOST),win)
|
---|
1057 | VBOX_WINDOWS_ICON_FILE ?= $(PATH_ROOT)/src/VBox/Artwork/VirtualBox-vista.ico
|
---|
1058 | TOOL_VCC80X86_RC := $(PATH_DEVTOOLS)/win.x86/ddk/6000/bin/x86/rc.exe
|
---|
1059 | TOOL_VCC80AMD64_RC := $(PATH_DEVTOOLS)/win.x86/ddk/6000/bin/x86/rc.exe
|
---|
1060 | TOOL_VCC70_RC := $(PATH_DEVTOOLS)/win.x86/ddk/6000/bin/x86/rc.exe
|
---|
1061 | else
|
---|
1062 | VBOX_WINDOWS_ICON_FILE ?= $(PATH_ROOT)/src/VBox/Artwork/VirtualBox-winxp.ico
|
---|
1063 | endif
|
---|
1064 | VBOX_MACOSX_ICON_FILE ?= $(PATH_ROOT)/src/VBox/Artwork/VirtualBox.icns
|
---|
1065 | endif
|
---|
1066 |
|
---|
1067 |
|
---|
1068 | #
|
---|
1069 | # GCC stuff properties.
|
---|
1070 | # Most of this is resolved on first kmk invocation and cached in PATH_OUT.
|
---|
1071 | #
|
---|
1072 | # Note! That a harmless warning is printed if the file doesn't exist.
|
---|
1073 | # Note! Changes in GCC are not detected automatically (yet).
|
---|
1074 | #
|
---|
1075 | include $(KBUILD_PATH)/tools/$(VBOX_GCC_TOOL).kmk
|
---|
1076 | ifneq ($(VBOX_GCC_TOOL),$(VBOX_GCC32_TOOL))
|
---|
1077 | include $(KBUILD_PATH)/tools/$(VBOX_GCC32_TOOL).kmk
|
---|
1078 | endif
|
---|
1079 |
|
---|
1080 | # These tests never worked on Windows because of /dev/null, so, there
|
---|
1081 | # can be no harm in just dropping them until cygwin is mp safe.
|
---|
1082 | ifeq ($(KBUILD_HOST),win)
|
---|
1083 | VBOX_GCC_CHECK_CC = $(2)
|
---|
1084 | VBOX_GCC_CHECK_CXX = $(2)
|
---|
1085 | VBOX_GCC_CHECK_LD = $(2)
|
---|
1086 | VBOX_GCC32_CHECK_CXX = $(2)
|
---|
1087 | else
|
---|
1088 | VBOX_GCC_CHECK_CC = $(shell \
|
---|
1089 | if $(TOOL_$(VBOX_GCC_TOOL)_CC) $(1) -S -o /dev/null -xc /dev/null > /dev/null 2>&1; \
|
---|
1090 | then echo "$(1)"; \
|
---|
1091 | else echo "$(2)"; fi; )
|
---|
1092 |
|
---|
1093 | VBOX_GCC_CHECK_CXX = $(shell \
|
---|
1094 | if $(TOOL_$(VBOX_GCC_TOOL)_CXX) $(1) -S -o /dev/null -xc++ /dev/null > /dev/null 2>&1; \
|
---|
1095 | then echo "$(1)"; \
|
---|
1096 | else echo "$(2)"; fi; )
|
---|
1097 |
|
---|
1098 | VBOX_GCC_CHECK_LD = $(shell \
|
---|
1099 | if $(TOOL_$(VBOX_GCC_TOOL)_LD) -Wl,$(1) -nostdlib -o /dev/null -xc /dev/null > /dev/null 2>&1 ;\
|
---|
1100 | then echo "-Wl,$(1)"; \
|
---|
1101 | else echo "$(2)"; fi; )
|
---|
1102 |
|
---|
1103 | VBOX_GCC32_CHECK_CXX = $(shell \
|
---|
1104 | if $(TOOL_$(VBOX_GCC32_TOOL)_CXX) $(1) -S -o /dev/null -xc++ /dev/null > /dev/null 2>&1; \
|
---|
1105 | then echo "$(1)"; \
|
---|
1106 | else echo "$(2)"; fi; )
|
---|
1107 | endif
|
---|
1108 |
|
---|
1109 | ifeq ($(KBUILD_HOST),win)
|
---|
1110 | # This isn't important (yet) on windows, so cook the result until
|
---|
1111 | # cygwin is feeling better.
|
---|
1112 | VBOX_GCC_VERSION := $(int-add $(int-mul 10000, 3), $(int-mul 100, 3), 3)
|
---|
1113 | else
|
---|
1114 | # This is kind of bad, the returned string needs to be re-evaluated before use.
|
---|
1115 | # The reason for this hack is that the windows kmk_ash cannot deal with $((1+1)).
|
---|
1116 | VBOX_GCC_VERSION = $(shell \
|
---|
1117 | $(1) -dumpversion | $(SED_EXT) 's|\([0-9]\)\.\([0-9]\)\.\([0-9]\)|$$(int-add $$(int-mul 10000, \1), $$(int-mul 100, \2), \3)|' )
|
---|
1118 | endif
|
---|
1119 |
|
---|
1120 | # No $(QUIET) here as it's interesting to see what goes into the file.
|
---|
1121 | $(PATH_OUT)/GCCConfig.kmk: $(PATH_ROOT)/Config.kmk $(LOCALCFG) $(AUTOCFG)
|
---|
1122 | $(call MSG_GENERATE,,$@,)
|
---|
1123 | $(QUIET)$(RM) -f '$@'
|
---|
1124 | $(QUIET)$(MKDIR) -p $(@D)
|
---|
1125 |
|
---|
1126 | # HC compiler switch detection.
|
---|
1127 | $(APPEND) '$@' 'VBOX_GCC_VERSION_CC ?= $(call VBOX_GCC_VERSION,$(TOOL_$(VBOX_GCC_TOOL)_CC))'
|
---|
1128 | $(APPEND) '$@' 'VBOX_GCC_VERSION_CXX ?= $(call VBOX_GCC_VERSION,$(TOOL_$(VBOX_GCC_TOOL)_CXX))'
|
---|
1129 | $(APPEND) '$@' 'VBOX_GCC_LIBGCC ?= $(shell $(TOOL_$(VBOX_GCC_TOOL)_CC) -print-libgcc-file-name)'
|
---|
1130 | $(APPEND) '$@' 'VBOX_GCC_Wno-pointer-sign ?= $(call VBOX_GCC_CHECK_CC,-Wno-pointer-sign,)'
|
---|
1131 | $(APPEND) '$@' 'VBOX_GCC_Wno-variadic-macros ?= $(call VBOX_GCC_CHECK_CXX,-Wno-variadic-macros,)'
|
---|
1132 | $(APPEND) '$@' 'VBOX_GCC_Wno-invalid-offsetof ?= $(call VBOX_GCC_CHECK_CXX,-Wno-invalid-offsetof,)'
|
---|
1133 | $(APPEND) '$@' 'VBOX_GCC_Wno-extra ?= $(call VBOX_GCC_CHECK_CXX,-Wno-extra)'
|
---|
1134 | $(APPEND) '$@' 'VBOX_GCC_fno-stack-protector ?= $(call VBOX_GCC_CHECK_CC,-fno-stack-protector,)'
|
---|
1135 | # Produce code optimized for the most common IA32/AMD64/EM64T processors. Introduced with gcc version 4.2.
|
---|
1136 | $(APPEND) '$@' 'VBOX_GCC_mtune-generic ?= $(call VBOX_GCC_CHECK_CC,-mtune=generic,)'
|
---|
1137 | $(APPEND) '$@' 'VBOX_LD_as_needed ?= $(call VBOX_GCC_CHECK_LD,--as-needed,)'
|
---|
1138 | ifneq ($(KBUILD_TARGET),l4)
|
---|
1139 | # Set default attribute for ELF and MACH-O symbols to ``hidden'' to reduce the number
|
---|
1140 | # of relocation entries and PLT indirections in shared libraries. Don't allow for gcc version < 4.
|
---|
1141 | $(APPEND) '$@' 'ifneq ($$(VBOX_GCC_VERSION_CC),)'
|
---|
1142 | $(APPEND) '$@' ' ifneq ($$(int-ge $$(VBOX_GCC_VERSION_CC),40000),)'
|
---|
1143 | $(APPEND) '$@' ' VBOX_GCC_fvisibility-hidden ?= $(call VBOX_GCC_CHECK_CC,-fvisibility=hidden -DVBOX_HAVE_VISIBILITY_HIDDEN,)'
|
---|
1144 | $(APPEND) '$@' ' endif'
|
---|
1145 | $(APPEND) '$@' 'endif'
|
---|
1146 | endif
|
---|
1147 | ifneq ($(KBUILD_TARGET),l4)
|
---|
1148 | # Set default attribute for inline functions to ``hidden'' to reduce the number
|
---|
1149 | # of relocation entries and PLT indirections in shared libraries. Don't allow for gcc version < 4.
|
---|
1150 | $(APPEND) '$@' 'ifneq ($$(VBOX_GCC_VERSION_CXX),)'
|
---|
1151 | $(APPEND) '$@' ' ifneq ($$(int-ge $$(VBOX_GCC_VERSION_CXX),40000),)'
|
---|
1152 | $(APPEND) '$@' ' VBOX_GCC_fvisibility-inlines-hidden ?= $(call VBOX_GCC_CHECK_CXX,-fvisibility-inlines-hidden,)'
|
---|
1153 | $(APPEND) '$@' ' endif'
|
---|
1154 | $(APPEND) '$@' 'endif'
|
---|
1155 | endif
|
---|
1156 | # Find the compiler includes for IPRT no-crt.
|
---|
1157 | # Note that `$(dir $(gcc -print-libgcc-file-name))/include does not work for a 64-bit cross build on a 32-bit build host.
|
---|
1158 | ifeq ($(KBUILD_HOST),win)
|
---|
1159 | # With the cygwin issues and gcc on windows returning a useless path, just skip this on windows.
|
---|
1160 | $(APPEND) '$@' 'VBOX_PATH_GCC_INCS ?= '
|
---|
1161 | else
|
---|
1162 | $(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'
|
---|
1163 | endif
|
---|
1164 | # 32-bit (GC) compiler switch detection.
|
---|
1165 | $(APPEND) '$@' 'VBOX_GCC32_VERSION_CC ?= $(call VBOX_GCC_VERSION,$(TOOL_$(VBOX_GCC32_TOOL)_CC))'
|
---|
1166 | $(APPEND) '$@' 'VBOX_GCC32_VERSION_CXX ?= $(call VBOX_GCC_VERSION,$(TOOL_$(VBOX_GCC32_TOOL)_CXX))'
|
---|
1167 | $(APPEND) '$@' 'VBOX_GCC32_LIBGCC ?= $(shell $(TOOL_$(VBOX_GCC32_TOOL)_CC) -print-libgcc-file-name)'
|
---|
1168 | $(APPEND) '$@' 'VBOX_GCC32_Wno-variadic-macros ?= $(call VBOX_GCC32_CHECK_CXX,-Wno-variadic-macros,)'
|
---|
1169 |
|
---|
1170 | include $(PATH_OUT)/GCCConfig.kmk
|
---|
1171 |
|
---|
1172 |
|
---|
1173 | #
|
---|
1174 | # Code Signing.
|
---|
1175 | #
|
---|
1176 | ifdef VBOX_SIGNING_MODE
|
---|
1177 | ifeq ($(KBUILD_HOST),win)
|
---|
1178 | # VBOX_PATH_SELFSIGN points to the Vista WDK bin/SelfSign directory.
|
---|
1179 | ifndef VBOX_PATH_SELFSIGN
|
---|
1180 | VBOX_PATH_SELFSIGN := $(lastword $(sort $(wildcard $(PATH_DEVTOOLS)/win.x86/selfsign/*)))
|
---|
1181 | ifeq ($(VBOX_PATH_SELFSIGN),)
|
---|
1182 | VBOX_PATH_SELFSIGN := $(PATH_DEVTOOLS)/win.x86/selfsign/r1
|
---|
1183 | endif
|
---|
1184 | endif
|
---|
1185 | VBOX_SIGNTOOL ?= $(VBOX_PATH_SELFSIGN)/SignTool.exe
|
---|
1186 | VBOX_INF2CAT ?= $(VBOX_PATH_SELFSIGN)/Inf2Cat.exe
|
---|
1187 |
|
---|
1188 | # There are three signing modes; 'test', 'development' and 'release'.
|
---|
1189 | ifeq ($(strip $(VBOX_SIGNING_MODE)),test)
|
---|
1190 | VBOX_CERTIFICATE_SUBJECT_NAME ?= MyTestCertificate
|
---|
1191 | VBOX_CERTIFICATE_SUBJECT_NAME_ARGS ?= /n "$(VBOX_CERTIFICATE_SUBJECT_NAME)"
|
---|
1192 | else if1of ($(VBOX_SIGNING_MODE),release development)
|
---|
1193 | VBOX_CERTIFICATE_SUBJECT_NAME ?= Sun Microsystems, Inc.
|
---|
1194 | VBOX_CERTIFICATE_SUBJECT_NAME_ARGS ?= /n "$(VBOX_CERTIFICATE_SUBJECT_NAME)"
|
---|
1195 | VBOX_CROSS_CERTIFICATE_FILE ?= $(VBOX_PATH_SELFSIGN)/MSCV-VSClass3.cer
|
---|
1196 | VBOX_CROSS_CERTIFICATE_FILE_ARGS ?= /ac "$(VBOX_CROSS_CERTIFICATE_FILE)"
|
---|
1197 | VBOX_TSA_URL ?= http://timestamp.verisign.com/scripts/timestamp.dll
|
---|
1198 | VBOX_TSA_URL_ARGS ?= /t "$(VBOX_TSA_URL)"
|
---|
1199 | else
|
---|
1200 | $(error Unknown VBOX_SIGNING_MODE: $(VBOX_SIGNING_MODE))
|
---|
1201 | endif
|
---|
1202 | VBOX_CERTIFICATE_STORE ?= my
|
---|
1203 | VBOX_CERTIFICATE_STORE_ARGS ?= /s "$(VBOX_CERTIFICATE_STORE)"
|
---|
1204 |
|
---|
1205 | ## Commands for signing a driver image after link.
|
---|
1206 | VBOX_SIGN_DRIVER_CMDS ?= $(if $(eq $(tool_do),LINK_LIBRARY),,$(call VBOX_SIGN_FILE_FN,$(out)))
|
---|
1207 | ## Sign a file.
|
---|
1208 | # @param 1 The file to sign.
|
---|
1209 | VBOX_SIGN_FILE_FN ?= $(VBOX_SIGNTOOL) sign \
|
---|
1210 | $(VBOX_CROSS_CERTIFICATE_FILE_ARGS) \
|
---|
1211 | $(VBOX_CERTIFICATE_STORE_ARGS) \
|
---|
1212 | $(VBOX_CERTIFICATE_SUBJECT_NAME_ARGS) \
|
---|
1213 | $(VBOX_TSA_URL_ARGS) \
|
---|
1214 | $(1)
|
---|
1215 | ## Create a security catalog file.
|
---|
1216 | # @param 1 The directory containing the stuff to sign.
|
---|
1217 | # @param 2 The expected .cat name. (Inf2Cat lowercases it)
|
---|
1218 | # @param 3 The list of OSes, separated by ';'.
|
---|
1219 | VBOX_MAKE_CAT_HLP_FN ?= \
|
---|
1220 | $(RM) -f $(2)\
|
---|
1221 | $(NL)$(TAB)$(VBOX_INF2CAT) /driver:$(strip $(1)) /os:$(strip $(subst ;,$(COMMA),$(3))) /verbose \
|
---|
1222 | $(NL)$(TAB)$(MV) $(2) $(2) \
|
---|
1223 | $(NL)$(TAB)$(call VBOX_SIGN_FILE_FN,$(2))
|
---|
1224 | VBOX_MAKE_CAT64_FN ?= $(call VBOX_MAKE_CAT_HLP_FN,$(1),$(2),XP_X64;Server2003_X64;Vista_X64)
|
---|
1225 | VBOX_MAKE_CAT32_FN ?= $(call VBOX_MAKE_CAT_HLP_FN,$(1),$(2),2000;XP_X86;Server2003_X86;Vista_X86)
|
---|
1226 | ifeq ($(KBUILD_TARGET_ARCH),x86)
|
---|
1227 | VBOX_MAKE_CAT_FN ?= $(call VBOX_MAKE_CAT32_FN,$(1),$(2))
|
---|
1228 | else
|
---|
1229 | VBOX_MAKE_CAT_FN ?= $(call VBOX_MAKE_CAT64_FN,$(1),$(2))
|
---|
1230 | endif
|
---|
1231 |
|
---|
1232 | # Go nuts, sign everything.
|
---|
1233 | ifeq ($(strip $(VBOX_SIGNING_MODE)),release)
|
---|
1234 | ## Commands for signing an executable or a dll image after link.
|
---|
1235 | VBOX_SIGN_IMAGE_CMDS ?= $(if $(eq $(tool_do),LINK_LIBRARY),,$(call VBOX_SIGN_FILE_FN,$(out)))
|
---|
1236 | ## Enable signing of the additions.
|
---|
1237 | VBOX_SIGN_ADDITIONS ?= 1
|
---|
1238 | endif
|
---|
1239 | else
|
---|
1240 | # Not windows build platform, ignore.
|
---|
1241 | VBOX_SIGNING_MODE :=
|
---|
1242 | endif
|
---|
1243 | endif
|
---|
1244 |
|
---|
1245 | #
|
---|
1246 | # Windows .inf editing.
|
---|
1247 | #
|
---|
1248 | ifeq ($(KBUILD_TARGET_ARCH),x86)
|
---|
1249 | VBOX_EDIT_INF_FN = $(call VBOX_EDIT_INF32_FN,$(1),$(2))
|
---|
1250 | else
|
---|
1251 | VBOX_EDIT_INF_FN = $(call VBOX_EDIT_INF64_FN,$(1),$(2))
|
---|
1252 | endif
|
---|
1253 | ## Edit an inf file an x86 target.
|
---|
1254 | # @param 1 The inf file to edit.
|
---|
1255 | # @param 2 The output file.
|
---|
1256 | VBOX_EDIT_INF32_FN = $(SED) $(if $(VBOX_SIGNING_MODE),-e 's/^;cat *//', -e '/^;cat /d') -e 's/^;x86 *//' -e '/^;amd64 /d' --output $(2) $(1)
|
---|
1257 | ## Edit an inf file an x86 target.
|
---|
1258 | # @param 1 The inf file to edit.
|
---|
1259 | # @param 2 The output file.
|
---|
1260 | VBOX_EDIT_INF64_FN = $(SED) $(if $(VBOX_SIGNING_MODE),-e 's/^;cat *//', -e '/^;cat /d') -e 's/^;amd64 *//' -e '/^;x86 /d' --output $(2) $(1)
|
---|
1261 |
|
---|
1262 | #
|
---|
1263 | # Default prefixes and suffixes.
|
---|
1264 | #
|
---|
1265 | VBOX_PREF_LIB =
|
---|
1266 | if1of ($(KBUILD_TARGET),win os2)
|
---|
1267 | VBOX_SUFF_LIB = .lib
|
---|
1268 | else
|
---|
1269 | VBOX_SUFF_LIB = .a
|
---|
1270 | endif
|
---|
1271 | VBOX_SUFF_DLL = $(SUFF_DLL)
|
---|
1272 | ifeq ($(KBUILD_TARGET),os2) # GXX3OMF produces out .o at the moment.
|
---|
1273 | VBOX_SUFF_OBJ = .o
|
---|
1274 | else
|
---|
1275 | VBOX_SUFF_OBJ = $(SUFF_OBJ)
|
---|
1276 | endif
|
---|
1277 | VBOXW32GUEST_SUFF_LIB = .lib
|
---|
1278 | VBOXLNX32GUEST_SUFF_LIB = .a
|
---|
1279 |
|
---|
1280 | #
|
---|
1281 | # SDKs for external libraries.
|
---|
1282 | #
|
---|
1283 | SDK_VBOX_LIBXML2 = .
|
---|
1284 | #if1of ($(KBUILD_TARGET),win os2 solaris)
|
---|
1285 | SDK_VBOX_LIBXML2_INCS ?= $(PATH_ROOT)/src/libs/libxml2-2.6.30/include
|
---|
1286 | SDK_VBOX_LIBXML2_LIBS ?= $(PATH_LIB)/VBox-libxml2$(VBOX_SUFF_LIB)
|
---|
1287 | SDK_VBOX_LIBXML2_DEFS ?= LIBXML_STATIC
|
---|
1288 | SDK_VBOX_LIBXML2_DEFS.win += WIN32 _WINDOWS _MBCS
|
---|
1289 | #else if1of ($(KBUILD_TARGET),linux)
|
---|
1290 | # SDK_VBOX_LIBXML2_INCS ?=
|
---|
1291 | # SDK_VBOX_LIBXML2_LIBS ?=
|
---|
1292 | # SDK_VBOX_LIBXML2_CFLAGS ?= $(shell pkg-config libxml-2.0 --cflags)
|
---|
1293 | # SDK_VBOX_LIBXML2_CXXFLAGS ?= $(SDK_VBOX_LIBXML2_CFLAGS)
|
---|
1294 | # SDK_VBOX_LIBXML2_LDFLAGS ?= $(shell pkg-config libxml-2.0 --libs)
|
---|
1295 | #else
|
---|
1296 | # SDK_VBOX_LIBXML2_INCS ?=
|
---|
1297 | # SDK_VBOX_LIBXML2_LIBS ?= xml2
|
---|
1298 | #endif
|
---|
1299 |
|
---|
1300 | SDK_VBOX_LIBXSLT = .
|
---|
1301 | #if1of ($(KBUILD_TARGET),win os2 solaris)
|
---|
1302 | SDK_VBOX_LIBXSLT_INCS ?= $(PATH_ROOT)/src/libs/libxslt-1.1.22
|
---|
1303 | SDK_VBOX_LIBXSLT_LIBS ?= $(PATH_LIB)/VBox-libxslt$(VBOX_SUFF_LIB)
|
---|
1304 | SDK_VBOX_LIBXSLT_DEFS ?=
|
---|
1305 | SDK_VBOX_LIBXSLT_DEFS.win += WIN32 _WINDOWS _MBCS _REENTRANT
|
---|
1306 | #else if1of ($(KBUILD_TARGET),linux)
|
---|
1307 | # SDK_VBOX_LIBXSLT_INCS ?=
|
---|
1308 | # SDK_VBOX_LIBXSLT_LIBS ?=
|
---|
1309 | # SDK_VBOX_LIBXSLT_CFLAGS ?= $(shell pkg-config libxslt-1.0 --cflags)
|
---|
1310 | # SDK_VBOX_LIBXSLT_CXXFLAGS ?= $(SDK_VBOX_LIBXSLT_CFLAGS)
|
---|
1311 | # SDK_VBOX_LIBXSLT_LDFLAGS ?= $(shell pkg-config libxslt-1.0 --libs)
|
---|
1312 | #else
|
---|
1313 | # SDK_VBOX_LIBXSLT_INCS ?=
|
---|
1314 | # SDK_VBOX_LIBXSLT_LIBS ?= xslt
|
---|
1315 | #endif
|
---|
1316 |
|
---|
1317 | SDK_VBOX_LIBPNG = .
|
---|
1318 | SDK_VBOX_LIBPNG_INCS ?= $(PATH_ROOT)/src/libs/libpng-1.2.8
|
---|
1319 | SDK_VBOX_LIBPNG_LIBS ?= $(PATH_LIB)/VBox-libpng$(VBOX_SUFF_LIB)
|
---|
1320 |
|
---|
1321 | SDK_VBOX_ZLIB = .
|
---|
1322 | if1of ($(KBUILD_TARGET), win os2)
|
---|
1323 | SDK_VBOX_ZLIB_INCS ?= $(PATH_ROOT)/src/libs/zlib-1.2.1
|
---|
1324 | SDK_VBOX_ZLIB_LIBS ?= $(PATH_LIB)/VBox-zlib$(VBOX_SUFF_LIB)
|
---|
1325 | else
|
---|
1326 | SDK_VBOX_ZLIB_INCS ?=
|
---|
1327 | SDK_VBOX_ZLIB_LIBS ?= z
|
---|
1328 | endif
|
---|
1329 |
|
---|
1330 | SDK_VBOX_OPENSSL = .
|
---|
1331 | if1of ($(KBUILD_TARGET), darwin linux solaris win)
|
---|
1332 | SDK_VBOX_OPENSSL_INCS?= $(PATH_OBJ)/src/libs/openssl-0.9.8h/include
|
---|
1333 | else
|
---|
1334 | SDK_VBOX_OPENSSL_INCS?= $(PATH_ROOT)/src/libs/openssl-0.9.7e/include
|
---|
1335 | endif
|
---|
1336 | SDK_VBOX_OPENSSL_LIBS?= $(PATH_LIB)/VBox-libcrypto$(VBOX_SUFF_LIB)
|
---|
1337 |
|
---|
1338 | SDK_VBOX_FFMPEG = .
|
---|
1339 | if1of ($(KBUILD_TARGET), win os2 darwin)
|
---|
1340 | SDK_VBOX_FFMPEG_INCS ?= \
|
---|
1341 | $(PATH_ROOT)/src/libs/ffmpeg-20060710/libavutil \
|
---|
1342 | $(PATH_ROOT)/src/libs/ffmpeg-20060710/libavcodec \
|
---|
1343 | $(PATH_ROOT)/src/libs/ffmpeg-20060710/libavformat
|
---|
1344 | ifeq ($(KBUILD_TARGET),win)
|
---|
1345 | ## @todo Michael! Where is $(PATH_LIB)/VBoxFFmpegImp$(VBOX_SUFF_LIB) supposed to come from?
|
---|
1346 | #SDK_VBOX_FFMPEG_LIBS ?= $(PATH_LIB)/VBoxFFmpeg.a
|
---|
1347 | SDK_VBOX_FFMPEG_LIBS ?= $(PATH_LIB)/VBoxFFmpegImp.lib
|
---|
1348 | else
|
---|
1349 | SDK_VBOX_FFMPEG_LIBS ?= $(PATH_BIN)/VBoxFFmpeg$(SUFF_DLL)
|
---|
1350 | endif
|
---|
1351 | else
|
---|
1352 | SDK_VBOX_FFMPEG_INCS ?= /usr/include/ffmpeg /usr/include/libpng
|
---|
1353 | SDK_VBOX_FFMPEG_LIBS ?= avutil avcodec avformat
|
---|
1354 | endif
|
---|
1355 |
|
---|
1356 | #
|
---|
1357 | # Special SDK for the problematic NTDLL.LIB.
|
---|
1358 | #
|
---|
1359 | SDK_VBOX_NTDLL = Requires W2K3DDK
|
---|
1360 | SDK_VBOX_NTDLL_LIBS ?= $(PATH_SDK_W2K3DDK_LIB)/ntdll.lib
|
---|
1361 |
|
---|
1362 |
|
---|
1363 | #
|
---|
1364 | # Qt build tools and libraries.
|
---|
1365 | # For *NIX we require it to be present on the system.
|
---|
1366 | #
|
---|
1367 | ## @todo convert this into SDK and integrate the Qt stuff into kBuild.
|
---|
1368 | ifeq ($(KBUILD_TARGET),win)
|
---|
1369 | VBOX_PATH_QT ?= $(lastword $(sort $(wildcard $(PATH_DEVTOOLS_TRG)/qt/v3.*)))
|
---|
1370 | VBOX_DLL_QT ?= $(firstword $(wildcard $(VBOX_PATH_QT)/bin/VBoxQt3*.dll) \
|
---|
1371 | $(wildcard $(VBOX_PATH_QT)/bin/qtmt3*.dll) \
|
---|
1372 | $(wildcard $(VBOX_PATH_QT)/bin/qt-mt3*.dll) \
|
---|
1373 | $(wildcard $(VBOX_PATH_QT)/lib/qt-mt3*.dll))
|
---|
1374 | ifneq ($(wildcard $(VBOX_PATH_QT)/bin/accessible/VBoxQtWidgets100.dll),)
|
---|
1375 | VBOX_QT_BINARIES += \
|
---|
1376 | $(VBOX_PATH_QT)/bin/accessible/VBoxQtWidgets100.dll=>accessible/VBoxQtWidgets100.dll
|
---|
1377 | endif
|
---|
1378 | LIB_QT ?= $(firstword $(wildcard $(VBOX_PATH_QT)/lib/VBoxQt3*.lib) \
|
---|
1379 | $(wildcard $(VBOX_PATH_QT)/lib/qt-mt3*.lib) \
|
---|
1380 | $(wildcard $(VBOX_PATH_QT)/lib/dynamic/qt-mt3*.lib))
|
---|
1381 | LIB_QT_PRL ?= $(firstword $(wildcard $(VBOX_PATH_QT)/lib/VBoxQt.prl) \
|
---|
1382 | $(wildcard $(VBOX_PATH_QT)/lib/qt-mt.prl) \
|
---|
1383 | $(wildcard $(VBOX_PATH_QT)/lib/dynamic/qt-mt.prl))
|
---|
1384 | LIB_QTMAIN ?= $(firstword $(wildcard $(VBOX_PATH_QT)/lib/qtmain.lib) \
|
---|
1385 | $(wildcard $(VBOX_PATH_QT)/lib/dynamic/qtmain.lib))
|
---|
1386 | QTDIR ?= $(lastword $(sort $(wildcard $(PATH_DEVTOOLS_BLD)/qt/v3.*)))
|
---|
1387 | else ifeq ($(KBUILD_TARGET),os2)
|
---|
1388 | QTDIR ?= $(PATH_DEVTOOLS_TRG)/qt/v3.3.1
|
---|
1389 | VBOX_PATH_QT ?= $(QTDIR)
|
---|
1390 | VBOX_DLL_QT ?= $(lastword $(sort $(wildcard $(VBOX_PATH_QT)/bin/*qt*.dll)))
|
---|
1391 | LIB_QT ?= $(lastword $(sort $(wildcard $(VBOX_PATH_QT)/lib/*qt*.lib)))
|
---|
1392 | LIB_QT_PRL ?= $(lastword $(sort $(wildcard $(VBOX_PATH_QT)/lib/*qt*.prl)))
|
---|
1393 | QTDIR := $(VBOX_PATH_QT)
|
---|
1394 | else ifeq ($(KBUILD_TARGET),darwin)
|
---|
1395 | ifndef VBOX_PATH_QT
|
---|
1396 | VBOX_PATH_QT := $(lastword $(sort $(wildcard $(PATH_DEVTOOLS_TRG)/qt/v3.*)))
|
---|
1397 | VBOX_PATH_QT ?= $(PATH_DEVTOOLS_TRG)/qt/v3.3.8-r1
|
---|
1398 | endif
|
---|
1399 | VBOX_MUST_INSTALL_LIB_QT ?= 1
|
---|
1400 | LIB_QT ?= $(VBOX_PATH_QT)/lib/libqt-mt.3.dylib
|
---|
1401 | LIB_QTMAIN ?= $(NO_SUCH_VARIABLE)
|
---|
1402 | ifndef QTDIR
|
---|
1403 | QTDIR := $(sort $(wildcard $(PATH_DEVTOOLS_BLD)/v*))
|
---|
1404 | QTDIR := $(call lastword,$(QTDIR))
|
---|
1405 | endif
|
---|
1406 | else
|
---|
1407 | ifndef QTDIR
|
---|
1408 | ifndef VBOX_PATH_QT
|
---|
1409 | # If QTDIR and VBOX_WITH_QTGUI aren't defined, we'll first
|
---|
1410 | # look in the tools tree and then on the system. If in the
|
---|
1411 | # tools, we'll have to install it.
|
---|
1412 | # Results are exported to avoid having to do this for every make file.
|
---|
1413 | VBOX_PATH_QT := $(lastword $(sort $(wildcard $(PATH_DEVTOOLS_TRG)/qt/v3.*)))
|
---|
1414 | ifneq ($(VBOX_PATH_QT),)
|
---|
1415 | export VBOX_PATH_QT
|
---|
1416 | export VBOX_MUST_INSTALL_LIB_QT := 1
|
---|
1417 | export LIB_QT := $(VBOX_PATH_QT)/lib/libqt-mt.so.3
|
---|
1418 | export LD_LIBRARY_PATH := $(VBOX_PATH_QT)/lib:$(LD_LIBRARY_PATH)
|
---|
1419 | else
|
---|
1420 | QTDIR := $(wildcard /usr/share/qt3)
|
---|
1421 | ifeq ($(QTDIR),)
|
---|
1422 | QTDIR := $(patsubst %/bin/moc,%,$(firstword $(wildcard /usr/bin/moc /usr/local/bin/moc /usr/X11R6/bin/moc)))
|
---|
1423 | endif
|
---|
1424 | ifneq ($(QTDIR),)
|
---|
1425 | export QTDIR
|
---|
1426 | endif
|
---|
1427 | endif
|
---|
1428 | else
|
---|
1429 | QTDIR := $(VBOX_PATH_QT)
|
---|
1430 | export QTDIR
|
---|
1431 | endif
|
---|
1432 | endif
|
---|
1433 | endif
|
---|
1434 | ifndef VBOX_PATH_QT
|
---|
1435 | VBOX_PATH_QT ?= $(QTDIR)
|
---|
1436 | LIB_QT ?= qt-mt
|
---|
1437 | endif
|
---|
1438 | ifeq ($(KBUILD_HOST),$(KBUILD_TARGET))
|
---|
1439 | VBOX_PATH_QT_HOST ?= $(VBOX_PATH_QT)
|
---|
1440 | else
|
---|
1441 | VBOX_PATH_QT_HOST ?= $(QTDIR)
|
---|
1442 | endif
|
---|
1443 | VBOX_UIC ?= $(VBOX_PATH_QT_HOST)/bin/uic$(HOSTSUFF_EXE)
|
---|
1444 | VBOX_MOC ?= $(VBOX_PATH_QT_HOST)/bin/moc$(HOSTSUFF_EXE)
|
---|
1445 | VBOX_LUPDATE ?= $(VBOX_PATH_QT_HOST)/bin/lupdate$(HOSTSUFF_EXE)
|
---|
1446 | VBOX_LRELEASE ?= $(VBOX_PATH_QT_HOST)/bin/lrelease$(HOSTSUFF_EXE)
|
---|
1447 |
|
---|
1448 | ifeq ($(KBUILD_TARGET),os2)
|
---|
1449 | # search DLLs in the EXE directory first (unless VBOX_DLL_QT is set)
|
---|
1450 | VBOX_DLL_QT_PATH := $(dir $(VBOX_DLL_QT))
|
---|
1451 | VBOX_DLL_QT_PATH := $(if $(VBOX_DLL_QT_PATH),$(VBOX_DLL_QT_PATH);,)
|
---|
1452 | VBOX_UIC := BEGINLIBPATH="$(VBOX_DLL_QT_PATH)$(dir $(VBOX_UIC));$$BEGINLIBPATH" $(VBOX_UIC)
|
---|
1453 | VBOX_MOC := BEGINLIBPATH="$(VBOX_DLL_QT_PATH)$(dir $(VBOX_MOC));$$BEGINLIBPATH" $(VBOX_MOC)
|
---|
1454 | VBOX_LUPDATE := BEGINLIBPATH="$(VBOX_DLL_QT_PATH)$(dir $(VBOX_LUPDATE));$$BEGINLIBPATH" $(VBOX_LUPDATE)
|
---|
1455 | VBOX_LRELEASE := BEGINLIBPATH="$(VBOX_DLL_QT_PATH)$(dir $(VBOX_LRELEASE));$$BEGINLIBPATH" $(VBOX_LRELEASE)
|
---|
1456 | endif
|
---|
1457 |
|
---|
1458 | #
|
---|
1459 | # The linux kernel headers(/sources).
|
---|
1460 | #
|
---|
1461 | if1of ($(KBUILD_TARGET), linux)
|
---|
1462 | ifeq ($(origin VBOX_LINUX_SRC),undefined)
|
---|
1463 | ifneq ($(wildcard /lib/modules/$(shell uname -r)/build/include/linux/autoconf.h),)
|
---|
1464 | export VBOX_LINUX_SRC := /lib/modules/$(shell uname -r)/build
|
---|
1465 | else
|
---|
1466 | export VBOX_LINUX_SRC := /usr/src/linux
|
---|
1467 | endif
|
---|
1468 | endif
|
---|
1469 | ifneq ($(VBOX_LINUX_SRC),)
|
---|
1470 | ifeq ($(origin VBOX_LINUX_INCS),undefined)
|
---|
1471 | export VBOX_LINUX_INCS := $(VBOX_LINUX_SRC)/include
|
---|
1472 | # support splitted Linux kernels (make O=<build directory>)
|
---|
1473 | kernelsrc := $(shell $(SED_EXT) -ne 's+^KERNELSRC.*= *\(.*\)+\1+p' $(VBOX_LINUX_SRC)/Makefile)
|
---|
1474 | ifneq ($(kernelsrc),)
|
---|
1475 | kernelpath := $(realpath $(VBOX_LINUX_SRC)/$(kernelsrc))
|
---|
1476 | VBOX_LINUX_INCS += $(VBOX_LINUX_SRC)/include2 $(kernelpath)/include
|
---|
1477 | else
|
---|
1478 | kernelpath := $(VBOX_LINUX_SRC)
|
---|
1479 | endif
|
---|
1480 | ifeq ($(KBUILD_TARGET_ARCH),x86)
|
---|
1481 | VBOX_LINUX_INCS += $(kernelpath)/include/asm-i386/mach-default \
|
---|
1482 | $(kernelpath)/include/asm-x86/mach-default
|
---|
1483 | endif
|
---|
1484 | endif
|
---|
1485 | endif
|
---|
1486 | endif
|
---|
1487 |
|
---|
1488 | #
|
---|
1489 | # Determine Solaris version.
|
---|
1490 | #
|
---|
1491 | ifeq ($(KBUILD_TARGET),solaris)
|
---|
1492 | ifeq ($(origin VBOX_SOLARIS_VERSION),undefined)
|
---|
1493 | $(eval export VBOX_SOLARIS_VERSION := $(shell uname -r | $(SED_EXT) 's|\([0-9]*\)\.\([0-9]*\)|$$(int-add $$(int-mul 100, \1), \2)|' ))
|
---|
1494 | endif
|
---|
1495 | ifeq ($(VBOX_SOLARIS_VERSION),510)
|
---|
1496 | DEFS.solaris += RT_OS_SOLARIS_10
|
---|
1497 | # Solaris 10 does not include crossbow.
|
---|
1498 | VBOX_WITH_CROSSBOW =
|
---|
1499 | VBOX_SOLARIS_10 = 1
|
---|
1500 | endif
|
---|
1501 | endif
|
---|
1502 |
|
---|
1503 |
|
---|
1504 | #
|
---|
1505 | # Template for building GC things.
|
---|
1506 | #
|
---|
1507 | TEMPLATE_VBOXGC = VBox GC
|
---|
1508 | TEMPLATE_VBOXGC_ASTOOL = $(VBOX_ASTOOL)
|
---|
1509 | TEMPLATE_VBOXGC_ASFLAGS = $(VBOX_ASFLAGS32)
|
---|
1510 | TEMPLATE_VBOXGC_DEFS = IN_GC $(ARCH_BITS_DEFS)
|
---|
1511 | TEMPLATE_VBOXGC_SYSSUFF = .gc
|
---|
1512 | TEMPLATE_VBOXGC_BLD_TRG_ARCH = x86
|
---|
1513 |
|
---|
1514 | ifeq ($(VBOX_LDR_FMT32),pe)
|
---|
1515 | ifdef VBOX_USE_VCC80
|
---|
1516 | TEMPLATE_VBOXGC_TOOL = VCC80X86
|
---|
1517 | TEMPLATE_VBOXGC_CXXFLAGS = -Zi -Zl -GR- -GS- -EHs-c- -GF- -W3 -wd4244 -wd4996 -Zc:wchar_t- -Gs8192 $(VBOX_VCC_GC_OPT) $(VBOX_VCC_GC_FP)
|
---|
1518 | else
|
---|
1519 | TEMPLATE_VBOXGC_TOOL = VCC70
|
---|
1520 | TEMPLATE_VBOXGC_CXXFLAGS = -Zi -Zl -GR- -GX- -GF- -W3 -wd4244 $(VBOX_VCC_GC_OPT) $(VBOX_VCC_GC_FP)
|
---|
1521 | endif
|
---|
1522 | TEMPLATE_VBOXGC_CFLAGS = $(TEMPLATE_VBOXGC_CXXFLAGS)
|
---|
1523 | TEMPLATE_VBOXGC_LDFLAGS = -Driver -Subsystem:NATIVE -Incremental:NO -Align:32 -MapInfo:Lines -MapInfo:Exports -NoD
|
---|
1524 | ifdef VBOX_USE_VCC80
|
---|
1525 | include $(KBUILD_PATH)/sdks/W2K3DDKX86.kmk
|
---|
1526 | TEMPLATE_VBOXGC_LIBS = \
|
---|
1527 | $(PATH_SDK_W2K3DDKX86_LIB)/int64.lib
|
---|
1528 | else
|
---|
1529 | TEMPLATE_VBOXGC_LIBS = \
|
---|
1530 | $(PATH_TOOL_VCC70_LIB)/libcmt.lib # for 64-bit int
|
---|
1531 | endif
|
---|
1532 | endif
|
---|
1533 |
|
---|
1534 | ifeq ($(VBOX_LDR_FMT32),elf)
|
---|
1535 | TEMPLATE_VBOXGC_TOOL = $(VBOX_GCC32_TOOL)
|
---|
1536 | TEMPLATE_VBOXGC_CXXFLAGS = -g -Wall -pedantic -Wno-long-long -Wno-trigraphs $(VBOX_GCC32_Wno-variadic-macros) -pipe -fno-exceptions -fno-rtti $(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)
|
---|
1537 | TEMPLATE_VBOXGC_CFLAGS = -g -Wall -pedantic -Wno-long-long -Wno-trigraphs $(VBOX_GCC32_Wno-variadic-macros) -pipe -Wmissing-prototypes -Wstrict-prototypes $(VBOX_GCC_GC_OPT) $(VBOX_GCC_GC_FP) -fno-strict-aliasing $(VBOX_GCC_fno-stack-protector) $(VBOX_GCC_fvisibility-hidden)
|
---|
1538 | ifeq ($(KBUILD_TARGET),solaris)
|
---|
1539 | TEMPLATE_VBOXGC_LDFLAGS = -r
|
---|
1540 | else
|
---|
1541 | TEMPLATE_VBOXGC_LDFLAGS = -nostdlib -Bsymbolic
|
---|
1542 | # temporarily, must fix the loader.
|
---|
1543 | TEMPLATE_VBOXGC_LDFLAGS += $(if $(VBOX_DO_STRIP_MODULES),-S,)
|
---|
1544 | TEMPLATE_VBOXGC_LDFLAGS.release = $(if $(VBOX_DO_STRIP_MODULES),-S,)
|
---|
1545 | endif
|
---|
1546 | ifn1of ($(KBUILD_TARGET), solaris freebsd)
|
---|
1547 | TEMPLATE_VBOXGC_LIBS = \
|
---|
1548 | $(VBOX_GCC32_LIBGCC) # instricts
|
---|
1549 | endif
|
---|
1550 | endif
|
---|
1551 |
|
---|
1552 | ifeq ($(VBOX_LDR_FMT32),macho)
|
---|
1553 | TEMPLATE_VBOXGC_TOOL = GXX4MACHO
|
---|
1554 | TEMPLATE_VBOXGC_DEFS += $(VBOX_DARWIN_DEF_SDK_DEFS)
|
---|
1555 | TEMPLATE_VBOXGC_CXXFLAGS = $(VBOX_DARWIN_DEF_SDK_CXXFLAGS) -g -Wall -pedantic -Wno-long-long -Wno-trigraphs $(VBOX_GCC32_Wno-variadic-macros) -pipe -fno-common -msoft-float -static -fno-exceptions -fno-rtti $(VBOX_GCC_GC_OPT) $(VBOX_GCC_GC_FP) -fno-strict-aliasing
|
---|
1556 | TEMPLATE_VBOXGC_CFLAGS = $(VBOX_DARWIN_DEF_SDK_CFLAGS) -g -Wall -pedantic -Wno-long-long -Wno-trigraphs $(VBOX_GCC32_Wno-variadic-macros) -pipe -fno-common -msoft-float -static -Wno-trigraphs -Wmissing-prototypes -Wstrict-prototypes $(VBOX_GCC_GC_OPT) $(VBOX_GCC_GC_FP) -fno-strict-aliasing
|
---|
1557 | TEMPLATE_VBOXGC_LDFLAGS = $(VBOX_DARWIN_DEF_SDK_LDFLAGS) -nostdlib
|
---|
1558 | #TEMPLATE_VBOXGC_LDFLAGS.release = -Wl,-S ???
|
---|
1559 | endif
|
---|
1560 |
|
---|
1561 | ifeq ($(VBOX_LDR_FMT32),lx)
|
---|
1562 | TEMPLATE_VBOXGC_TOOL = GXX3OMF
|
---|
1563 | TEMPLATE_VBOXGC_CXXFLAGS = -g -Wall -pedantic -Wno-long-long -Wno-trigraphs $(VBOX_GCC32_Wno-variadic-macros) -pipe -fno-exceptions -fno-rtti $(VBOX_GCC_GC_OPT) $(VBOX_GCC_GC_FP) -fno-strict-aliasing
|
---|
1564 | TEMPLATE_VBOXGC_CFLAGS = -g -Wall -pedantic -Wno-long-long -Wno-trigraphs $(VBOX_GCC32_Wno-variadic-macros) -pipe -Wmissing-prototypes -Wstrict-prototypes $(VBOX_GCC_GC_OPT) $(VBOX_GCC_GC_FP) -fno-strict-aliasing
|
---|
1565 | TEMPLATE_VBOXGC_LDFLAGS = -Zdll -nostdlib
|
---|
1566 | TEMPLATE_VBOXGC_LIBS = \
|
---|
1567 | $(VBOX_GCC32_LIBGCC) \
|
---|
1568 | $(OBJ_SYS0) \
|
---|
1569 | end
|
---|
1570 | endif
|
---|
1571 |
|
---|
1572 |
|
---|
1573 | #
|
---|
1574 | # Template for building a GC ring-3 testcase (tstVMStructGC, tstDevStructGC).
|
---|
1575 | #
|
---|
1576 | TEMPLATE_VBOXGCEXE = VBox GC as ring-3 testcase
|
---|
1577 | TEMPLATE_VBOXGCEXE_EXTENDS = VBOXGC
|
---|
1578 |
|
---|
1579 | ifeq ($(VBOX_LDR_FMT32),pe)
|
---|
1580 | TEMPLATE_VBOXGCEXE_LDFLAGS = -Incremental:NO -MapInfo:Exports -NoD -Debug
|
---|
1581 | TEMPLATE_VBOXGCEXE_SDKS = WIN32SDK
|
---|
1582 | ifdef VBOX_USE_VCC80
|
---|
1583 | TEMPLATE_VBOXGCEXE_LIBS = \
|
---|
1584 | $(PATH_TOOL_VCC80X86_LIB)/libcmt.lib \
|
---|
1585 | $(PATH_TOOL_VCC80X86_LIB)/oldnames.lib
|
---|
1586 | else
|
---|
1587 | TEMPLATE_VBOXGCEXE_LIBS = \
|
---|
1588 | $(PATH_TOOL_VCC70_LIB)/libcmt.lib \
|
---|
1589 | $(PATH_TOOL_VCC70_LIB)/oldnames.lib
|
---|
1590 | endif
|
---|
1591 | endif
|
---|
1592 |
|
---|
1593 | ifeq ($(VBOX_LDR_FMT32),elf)
|
---|
1594 | TEMPLATE_VBOXGCEXE_LDFLAGS = -g
|
---|
1595 | TEMPLATE_VBOXGCEXE_LDFLAGS.release = -g
|
---|
1596 | endif
|
---|
1597 |
|
---|
1598 | ifeq ($(VBOX_LDR_FMT32),macho)
|
---|
1599 | TEMPLATE_VBOXGCEXE_CFLAGS = $(filter-out -static,$(TEMPLATE_VBOXGC_CFLAGS))
|
---|
1600 | TEMPLATE_VBOXGCEXE_CXXFLAGS = $(filter-out -static,$(TEMPLATE_VBOXGC_CXXFLAGS))
|
---|
1601 | TEMPLATE_VBOXGCEXE_LDFLAGS = -g
|
---|
1602 | endif
|
---|
1603 |
|
---|
1604 | ifeq ($(VBOX_LDR_FMT32),lx)
|
---|
1605 | TEMPLATE_VBOXGCEXE_LDFLAGS = -g
|
---|
1606 | TEMPLATE_VBOXGCEXE_LIBS = $(NO_SUCH_VARIABLE)
|
---|
1607 | endif
|
---|
1608 |
|
---|
1609 |
|
---|
1610 | #
|
---|
1611 | # Template for building R0 things.
|
---|
1612 | #
|
---|
1613 | TEMPLATE_VBOXR0 = VBox Ring 0
|
---|
1614 | TEMPLATE_VBOXR0_ASTOOL = $(VBOX_ASTOOL)
|
---|
1615 | TEMPLATE_VBOXR0_ASFLAGS = $(VBOX_ASFLAGS)
|
---|
1616 | TEMPLATE_VBOXR0_DEFS = IN_RING0 $(ARCH_BITS_DEFS)
|
---|
1617 |
|
---|
1618 | ifeq ($(VBOX_LDR_FMT),pe)
|
---|
1619 | TEMPLATE_VBOXR0_TOOL = $(VBOX_VCC_TOOL)
|
---|
1620 | ifdef VBOX_USE_VCC80
|
---|
1621 | TEMPLATE_VBOXR0_CXXFLAGS = -Zi -Zl -GR- -GS- -EHs-c- -GF- -W3 -wd4244 -wd4996 -Zc:wchar_t- $(VBOX_VCC_OPT) $(VBOX_VCC_FP)
|
---|
1622 | else
|
---|
1623 | TEMPLATE_VBOXR0_CXXFLAGS = -Zi -Zl -GR- -GX- -GF- -W3 -wd4244 $(VBOX_VCC_OPT) $(VBOX_VCC_FP)
|
---|
1624 | endif
|
---|
1625 | TEMPLATE_VBOXR0_CFLAGS = $(TEMPLATE_VBOXR0_CXXFLAGS)
|
---|
1626 | TEMPLATE_VBOXR0_LDFLAGS = -Driver -Subsystem:NATIVE -Incremental:NO -Align:32 -MapInfo:Exports -NoD
|
---|
1627 | ifdef VBOX_USE_VCC80
|
---|
1628 | TEMPLATE_VBOXR0_LIBS.x86 = \
|
---|
1629 | $(PATH_SDK_W2K3DDKX86_LIB)/int64.lib
|
---|
1630 | else
|
---|
1631 | TEMPLATE_VBOXR0_LIBS.x86 = \
|
---|
1632 | $(PATH_TOOL_VCC70_LIB)/libcmt.lib # for 64-bit int
|
---|
1633 | endif
|
---|
1634 | endif # pe
|
---|
1635 |
|
---|
1636 | ifeq ($(VBOX_LDR_FMT),elf)
|
---|
1637 | TEMPLATE_VBOXR0_TOOL = $(VBOX_GCC_TOOL)
|
---|
1638 | TEMPLATE_VBOXR0_CFLAGS = -g -Wall -pedantic -Wno-long-long -Wno-trigraphs $(VBOX_GCC_Wno-variadic-macros) -pipe -Wmissing-prototypes -Wstrict-prototypes $(VBOX_GCC_OPT) $(VBOX_GCC_FP) -fno-strict-aliasing $(VBOX_GCC_fno-stack-protector) $(VBOX_GCC_fvisibility-hidden)
|
---|
1639 | TEMPLATE_VBOXR0_CXXFLAGS = -g -Wall -pedantic -Wno-long-long -Wno-trigraphs $(VBOX_GCC_Wno-variadic-macros) -pipe -fno-rtti -fno-exceptions $(VBOX_GCC_OPT) $(VBOX_GCC_FP) -fno-strict-aliasing $(VBOX_GCC_fno-stack-protector) $(VBOX_GCC_fvisibility-inlines-hidden) $(VBOX_GCC_fvisibility-hidden)
|
---|
1640 | TEMPLATE_VBOXR0_CFLAGS.amd64 = -m64 -mno-red-zone -mcmodel=kernel -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -fno-asynchronous-unwind-tables -ffreestanding
|
---|
1641 | TEMPLATE_VBOXR0_CXXFLAGS.amd64 = -m64 -mno-red-zone -mcmodel=kernel -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -fno-asynchronous-unwind-tables
|
---|
1642 | ifeq ($(KBUILD_TARGET),solaris)
|
---|
1643 | TEMPLATE_VBOXR0_LDFLAGS = -r
|
---|
1644 | else
|
---|
1645 | TEMPLATE_VBOXR0_LDFLAGS = -nostdlib -Bsymbolic
|
---|
1646 | # temporarily, must fix the loader.
|
---|
1647 | TEMPLATE_VBOXR0_LDFLAGS += $(if $(VBOX_DO_STRIP_MODULES),-S,)
|
---|
1648 | TEMPLATE_VBOXR0_LDFLAGS.release = $(if $(VBOX_DO_STRIP_MODULES),-S,)
|
---|
1649 | endif
|
---|
1650 | ifn1of ($(KBUILD_TARGET),solaris freebsd)
|
---|
1651 | TEMPLATE_VBOXR0_LIBS = \
|
---|
1652 | $(VBOX_GCC_LIBGCC) # instricts
|
---|
1653 | endif
|
---|
1654 | endif
|
---|
1655 |
|
---|
1656 | ifeq ($(VBOX_LDR_FMT),macho)
|
---|
1657 | TEMPLATE_VBOXR0_TOOL = GXX4MACHO
|
---|
1658 | TEMPLATE_VBOXR0_DEFS += $(VBOX_DARWIN_DEF_SDK_DEFS)
|
---|
1659 | TEMPLATE_VBOXR0_CXXFLAGS = $(VBOX_DARWIN_DEF_SDK_CXXFLAGS) -g -Wall -pedantic -Wno-long-long -Wno-trigraphs $(VBOX_GCC_Wno-variadic-macros) -pipe -fno-common -msoft-float -static -fno-rtti -fno-exceptions $(VBOX_GCC_OPT) $(VBOX_GCC_FP) -fno-strict-aliasing
|
---|
1660 | TEMPLATE_VBOXR0_CFLAGS = $(VBOX_DARWIN_DEF_SDK_CFLAGS) -g -Wall -pedantic -Wno-long-long -Wno-trigraphs $(VBOX_GCC_Wno-variadic-macros) -pipe -fno-common -msoft-float -static -Wmissing-prototypes -Wstrict-prototypes $(VBOX_GCC_OPT) $(VBOX_GCC_FP) -fno-strict-aliasing
|
---|
1661 | TEMPLATE_VBOXR0_LDFLAGS = $(VBOX_DARWIN_DEF_SDK_LDFLAGS) -nostdlib
|
---|
1662 | #TEMPLATE_VBOXR0_LDFLAGS.release = -Wl,-S ???
|
---|
1663 | endif
|
---|
1664 |
|
---|
1665 | ifeq ($(VBOX_LDR_FMT),lx)
|
---|
1666 | TEMPLATE_VBOXR0_TOOL = GXX3OMF
|
---|
1667 | TEMPLATE_VBOXR0_CFLAGS = -g -Wall -pedantic -Wno-long-long -Wno-trigraphs $(VBOX_GCC_Wno-variadic-macros) -pipe -Wmissing-prototypes -Wstrict-prototypes $(VBOX_GCC_OPT) $(VBOX_GCC_FP) -fno-strict-aliasing
|
---|
1668 | TEMPLATE_VBOXR0_CXXFLAGS = -g -Wall -pedantic -Wno-long-long -Wno-trigraphs $(VBOX_GCC_Wno-variadic-macros) -pipe -fno-rtti -fno-exceptions $(VBOX_GCC_OPT) $(VBOX_GCC_FP) -fno-strict-aliasing
|
---|
1669 | TEMPLATE_VBOXR0_LDFLAGS = -Zdll -nostdlib
|
---|
1670 | TEMPLATE_VBOXR0_LIBS = \
|
---|
1671 | $(VBOX_GCC_LIBGCC) \
|
---|
1672 | $(OBJ_SYS0) \
|
---|
1673 | end
|
---|
1674 | endif
|
---|
1675 |
|
---|
1676 |
|
---|
1677 | #
|
---|
1678 | # Template for building SUPDRV R0 things.
|
---|
1679 | #
|
---|
1680 | TEMPLATE_VBOXR0DRV = VBox SUPDRV Ring 0
|
---|
1681 | TEMPLATE_VBOXR0DRV_ASTOOL = $(VBOX_ASTOOL)
|
---|
1682 | TEMPLATE_VBOXR0DRV_ASFLAGS = $(VBOX_ASFLAGS)
|
---|
1683 | TEMPLATE_VBOXR0DRV_DEFS = IN_RING0 IN_RT_R0 $(ARCH_BITS_DEFS)
|
---|
1684 |
|
---|
1685 | ifeq ($(KBUILD_TARGET),win)
|
---|
1686 | TEMPLATE_VBOXR0DRV_TOOL = $(VBOX_VCC_TOOL)
|
---|
1687 | TEMPLATE_VBOXR0DRV_RCDEFS = \
|
---|
1688 | VBOX_VERSION_MAJOR=\"$(VBOX_VERSION_MAJOR)\" \
|
---|
1689 | VBOX_VERSION_MINOR=\"$(VBOX_VERSION_MINOR)\" \
|
---|
1690 | VBOX_VERSION_BUILD=\"$(VBOX_VERSION_BUILD)\" \
|
---|
1691 | VBOX_SVN_REV=\"$(VBOX_SVN_REV)\" \
|
---|
1692 | VBOX_VERSION_MAJOR_NR=$(VBOX_VERSION_MAJOR) \
|
---|
1693 | VBOX_VERSION_MINOR_NR=$(VBOX_VERSION_MINOR) \
|
---|
1694 | VBOX_VERSION_BUILD_NR=$(VBOX_VERSION_BUILD) \
|
---|
1695 | VBOX_SVN_REV_NR=$(VBOX_SVN_REV)
|
---|
1696 | TEMPLATE_VBOXR0DRV_DEFS.x86 = _X86_
|
---|
1697 | TEMPLATE_VBOXR0DRV_DEFS.amd64 = _AMD64_
|
---|
1698 | ifdef VBOX_USE_VCC80
|
---|
1699 | TEMPLATE_VBOXR0DRV_CXXFLAGS = -Zi -Zl -GR- -GS- -EHs-c- -GF- -Gz -W3 -wd4996 -Zc:wchar_t- $(VBOX_VCC_OPT) $(VBOX_VCC_FP)
|
---|
1700 | else
|
---|
1701 | TEMPLATE_VBOXR0DRV_CXXFLAGS = -Zi -Zl -GR- -GX- -GF- -Gz -W3 $(VBOX_VCC_OPT) $(VBOX_VCC_FP)
|
---|
1702 | endif
|
---|
1703 | TEMPLATE_VBOXR0DRV_CFLAGS = $(TEMPLATE_VBOXR0DRV_CXXFLAGS)
|
---|
1704 | TEMPLATE_VBOXR0DRV_LDFLAGS = -Driver -Subsystem:NATIVE -Incremental:NO -Align:32 -MapInfo:Exports -NoD -Debug
|
---|
1705 | TEMPLATE_VBOXR0DRV_POST_CMDS = $(VBOX_SIGN_DRIVER_CMDS)
|
---|
1706 | endif
|
---|
1707 |
|
---|
1708 | ifeq ($(KBUILD_TARGET),linux)
|
---|
1709 | TEMPLATE_VBOXR0DRV_TOOL = $(VBOX_GCC_TOOL)
|
---|
1710 | TEMPLATE_VBOXR0DRV_DEFS = __KERNEL__ MODULE IN_RING0 IN_RT_R0
|
---|
1711 | TEMPLATE_VBOXR0DRV_INCS = $(VBOX_LINUX_INCS)
|
---|
1712 | TEMPLATE_VBOXR0DRV_CFLAGS = -nostdinc -iwithprefix include \
|
---|
1713 | -Wall -Wstrict-prototypes -Wno-trigraphs $(VBOX_GCC_Wno-pointer-sign) \
|
---|
1714 | $(VBOX_GCC_fno-stack-protector) $(VBOX_GCC_OPT) $(VBOX_GCC_FP) -fno-strict-aliasing -fno-common
|
---|
1715 | TEMPLATE_VBOXR0DRV_CFLAGS.x86 = -mpreferred-stack-boundary=2 -msoft-float
|
---|
1716 | TEMPLATE_VBOXR0DRV_CFLAGS.amd64 = -m64 -mno-red-zone -mcmodel=kernel -mno-sse -mno-mmx -mno-sse2 -mno-3dnow \
|
---|
1717 | -fno-reorder-blocks -ffreestanding -fno-asynchronous-unwind-tables -funit-at-a-time \
|
---|
1718 | -Wno-sign-compare -Wdeclaration-after-statement
|
---|
1719 | 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
|
---|
1720 | ifndef VBOX_LINUX_VERSION_2_4
|
---|
1721 | # 2.6
|
---|
1722 | TEMPLATE_VBOXR0DRV_SYSSUFF = .ko
|
---|
1723 | TEMPLATE_VBOXR0DRV_LDFLAGS.x86 = -m elf_i386 -r
|
---|
1724 | TEMPLATE_VBOXR0DRV_LDFLAGS.amd64 = -m elf_x86_64 -r
|
---|
1725 | else
|
---|
1726 | # 2.4
|
---|
1727 | TEMPLATE_VBOXR0DRV_SYSSUFF = .o
|
---|
1728 | TEMPLATE_VBOXR0DRV_LDFLAGS = -r -s
|
---|
1729 | endif
|
---|
1730 | endif
|
---|
1731 |
|
---|
1732 | ifeq ($(KBUILD_TARGET),os2)
|
---|
1733 | TEMPLATE_VBOXR0DRV_TOOL = GXX3OMF
|
---|
1734 | TEMPLATE_VBOXR0DRV_CXXFLAGS = -g -Wall -pedantic -Wno-long-long -Wno-trigraphs $(VBOX_GCC_Wno-variadic-macros) -pipe $(VBOX_GCC_OPT) $(VBOX_GCC_FP) -fno-strict-aliasing -fno-rtti -fno-exceptions
|
---|
1735 | TEMPLATE_VBOXR0DRV_CFLAGS = -g -Wall -pedantic -Wno-long-long -Wno-trigraphs $(VBOX_GCC_Wno-variadic-macros) -pipe -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations $(VBOX_GCC_OPT) $(VBOX_GCC_FP) -fno-strict-aliasing
|
---|
1736 | TEMPLATE_VBOXR0DRV_LIBS = $(VBOX_GCC_LIBGCC)
|
---|
1737 | # wlink thinks physdevice doesn't need fixups and should have a stack - stupid!
|
---|
1738 | TEMPLATE_VBOXR0DRV_LDFLAGS = -Zlinker Option -Zlinker internalrelocs, -Zlinker togglerelocs
|
---|
1739 | endif
|
---|
1740 |
|
---|
1741 | ifeq ($(KBUILD_TARGET),darwin)
|
---|
1742 | TEMPLATE_VBOXR0DRV_TOOL = GXX4MACHO
|
---|
1743 | TEMPLATE_VBOXR0DRV_DEFS += $(VBOX_DARWIN_DEF_SDK_DEFS) KERNEL KERNEL_PRIVATE DRIVER_PRIVATE APPLE NeXT
|
---|
1744 | # I didn't really know why we have to state explicitly the position of the
|
---|
1745 | # sdk headers. Maybe it has something to do with the fact that the kernel.framework
|
---|
1746 | # isn't a real framework according to http://developer.apple.com/qa/qa2001/qa1096.html.
|
---|
1747 | TEMPLATE_VBOXR0DRV_INCS += $(VBOX_PATH_MACOSX_SDK)/System/Library/Frameworks/Kernel.framework/Headers
|
---|
1748 | TEMPLATE_VBOXR0DRV_CXXFLAGS = $(VBOX_DARWIN_DEF_SDK_CXXFLAGS) \
|
---|
1749 | -g -Wall -Wno-long-long -Wno-trigraphs -pipe -fno-common -nostdinc -fno-builtin -finline \
|
---|
1750 | -fno-keep-inline-functions -force_cpusubtype_ALL -fno-exceptions -msoft-float -static \
|
---|
1751 | -fapple-kext -fno-rtti -fcheck-new
|
---|
1752 | TEMPLATE_VBOXR0DRV_CXXFLAGS.release = $(VBOX_GCC_OPT) $(VBOX_GCC_FP) -fno-strict-aliasing -fasm-blocks
|
---|
1753 | TEMPLATE_VBOXR0DRV_CXXFLAGS.profile = $(TEMPLATE_VBOXR0DRV_CXXFLAGS.release)
|
---|
1754 | TEMPLATE_VBOXR0DRV_CXXFLAGS.kprofile = $(TEMPLATE_VBOXR0DRV_CXXFLAGS.release)
|
---|
1755 | TEMPLATE_VBOXR0DRV_CFLAGS = $(VBOX_DARWIN_DEF_SDK_CFLAGS) \
|
---|
1756 | -g -Wall -Wno-long-long -Wno-trigraphs -pipe -fno-common -nostdinc -fno-builtin -finline \
|
---|
1757 | -fno-keep-inline-functions -force_cpusubtype_ALL -fno-exceptions -msoft-float -static \
|
---|
1758 | -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations
|
---|
1759 | TEMPLATE_VBOXR0DRV_CFLAGS.release = $(TEMPLATE_VBOXR0DRV_CXXFLAGS.release)
|
---|
1760 | TEMPLATE_VBOXR0DRV_CFLAGS.profile = $(TEMPLATE_VBOXR0DRV_CXXFLAGS.profile)
|
---|
1761 | TEMPLATE_VBOXR0DRV_CFLAGS.kprofile = $(TEMPLATE_VBOXR0DRV_CXXFLAGS.kprofile)
|
---|
1762 | TEMPLATE_VBOXR0DRV_LDFLAGS = $(VBOX_DARWIN_DEF_SDK_LDFLAGS) -static -nostdlib -r -Wl,-Y,1455
|
---|
1763 | TEMPLATE_VBOXR0DRV_LIBS = kmodc++ kmod cc_kext cpp_kext $(VBOX_GCC_LIBGCC)
|
---|
1764 | endif
|
---|
1765 |
|
---|
1766 | ifeq ($(KBUILD_TARGET),solaris)
|
---|
1767 | ## The Solaris /usr/platform/i86pc/include and /usr/include directories.
|
---|
1768 | VBOX_SOLARIS_SYS_INCS ?= /usr/platform/i86pc/include /usr/include
|
---|
1769 |
|
---|
1770 | TEMPLATE_VBOXR0DRV_TOOL = $(VBOX_GCC_TOOL)
|
---|
1771 | TEMPLATE_VBOXR0DRV_DEFS = _KERNEL _STRICT_STDC IN_RING0 IN_RT_R0
|
---|
1772 | TEMPLATE_VBOXR0DRV_INCS = $(VBOX_SOLARIS_SYS_INCS)
|
---|
1773 | TEMPLATE_VBOXR0DRV_LDFLAGS = -r -dy
|
---|
1774 | ifdef VBOX_WITH_SOLARIS_VBI
|
---|
1775 | TEMPLATE_VBOXR0DRV_LDFLAGS += -N misc/vbi
|
---|
1776 | endif
|
---|
1777 | TEMPLATE_VBOXR0DRV_LDFLAGS.amd64 = -64
|
---|
1778 | # Exclude -Wall because of solaris headers' pragma ident warnings that gcc refuses to supress.
|
---|
1779 | TEMPLATE_VBOXR0DRV_CFLAGS = -Wno-trigraphs -Wpointer-arith -Winline $(VBOX_GCC_Wno-pointer-sign) \
|
---|
1780 | -Wmissing-prototypes -Wstrict-prototypes -Wnested-externs \
|
---|
1781 | -O2 -ffreestanding -nodefaultlibs -fno-strict-aliasing -fno-common -std=c99
|
---|
1782 | TEMPLATE_VBOXR0DRV_CFLAGS.x86 = -m32 -mno-sse -mno-mmx -mno-sse2 -mno-3dnow
|
---|
1783 | TEMPLATE_VBOXR0DRV_CFLAGS.amd64 = -m64 -mno-sse -mno-mmx -mno-sse2 -mno-3dnow $(if $(VBOX_SOLARIS_10),,-msave-args) -mno-red-zone -mcmodel=kernel \
|
---|
1784 | -fno-reorder-blocks -fno-asynchronous-unwind-tables -funit-at-a-time
|
---|
1785 | TEMPLATE_VBOXR0DRV_CXXFLAGS = -Wno-trigraphs -Wpointer-arith -Winline $(VBOX_GCC_Wno-pointer-sign) \
|
---|
1786 | -O2 -nodefaultlibs -fno-strict-aliasing -fno-common
|
---|
1787 | TEMPLATE_VBOXR0DRV_CXXFLAGS.x86 = $(TEMPLATE_VBOXR0DRV_CFLAGS.x86)
|
---|
1788 | TEMPLATE_VBOXR0DRV_CXXFLAGS.amd64 = $(TEMPLATE_VBOXR0DRV_CFLAGS.amd64)
|
---|
1789 | endif # Solaris
|
---|
1790 |
|
---|
1791 | ifeq ($(KBUILD_TARGET),freebsd)
|
---|
1792 | # x86 FreeBSD:
|
---|
1793 | # cc -O2 -fno-strict-aliasing -pipe -Werror -D_KERNEL -DKLD_MODULE \
|
---|
1794 | # -nostdinc -I- -I. -I@ -I@/contrib/altq -I@/../include -I/usr/include \
|
---|
1795 | # -finline-limit=8000 -fno-common -mno-align-long-strings -mpreferred-stack-boundary=2 \
|
---|
1796 | # -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -ffreestanding -Wall -Wredundant-decls -Wnested-externs \
|
---|
1797 | # -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -fformat-extensions \
|
---|
1798 | # -std=c99 -c ../my.c
|
---|
1799 | # ld -d -warn-common -r -d -o my.kld my.o
|
---|
1800 | # :> export_syms
|
---|
1801 | # awk -f /usr/src/sys/modules/my/../../conf/kmod_syms.awk my.kld export_syms | xargs -J% objcopy % my.kld
|
---|
1802 | # ld -Bsharable -d warn-commnon -o my.ko my.kld
|
---|
1803 | #
|
---|
1804 | # Note: @ -> /usr/src/sys and machine -> /usr/src/sys/i386/include
|
---|
1805 |
|
---|
1806 | ## The location of the FreeBSD kernel source.
|
---|
1807 | VBOX_FREEBSD_SRC ?= /usr/src/sys
|
---|
1808 | ## The FreeBSD /usr/include.
|
---|
1809 | VBOX_FREEBSD_SYS_INCS ?= /usr/include
|
---|
1810 |
|
---|
1811 | TEMPLATE_VBOXR0DRV_TOOL = $(VBOX_GCC_TOOL)
|
---|
1812 | TEMPLATE_VBOXR0DRV_LDTOOL = FREEBSDKMODLD
|
---|
1813 | TEMPLATE_VBOXR0DRV_DEFS = _KERNEL KLD_MODULE IN_RING0 IN_RT_R0
|
---|
1814 | TEMPLATE_VBOXR0DRV_INCS = \
|
---|
1815 | $(VBOX_FREEBSD_SRC) \
|
---|
1816 | $(VBOX_FREEBSD_SRC)/contrib/altq \
|
---|
1817 | $(VBOX_FREEBSD_SRC)/../include \
|
---|
1818 | $(VBOX_FREEBSD_SYS_INCS)
|
---|
1819 | # omitting: -Wcast-qual, -Wredundant-decls
|
---|
1820 | TEMPLATE_VBOXR0DRV_CFLAGS = \
|
---|
1821 | -Wall -Wno-trigraphs -Wpointer-arith -Winline $(VBOX_GCC_Wno-pointer-sign) \
|
---|
1822 | -Wstrict-prototypes -Wmissing-prototypes -Wstrict-prototypes -Wnested-externs \
|
---|
1823 | -O2 -fformat-extensions -ffreestanding -fno-strict-aliasing -fno-common -finline-limit=8000 \
|
---|
1824 | $(VBOX_GCC_fno-stack-protector) $(VBOX_GCC_OPT) $(VBOX_GCC_FP) \
|
---|
1825 | -nostdinc -std=c99
|
---|
1826 | TEMPLATE_VBOXR0DRV_CFLAGS.x86 = -m32 -mno-align-long-strings -mpreferred-stack-boundary=2 -mno-mmx -mno-3dnow -mno-sse -mno-sse2
|
---|
1827 | TEMPLATE_VBOXR0DRV_CFLAGS.amd64 = -m64 "Port me to amd64 FreeBSD"
|
---|
1828 | TEMPLATE_VBOXR0DRV_CXXFLAGS = -fno-exceptions -fno-rtti \
|
---|
1829 | -Wall -Wno-trigraphs -Wpointer-arith -Winline $(VBOX_GCC_Wno-pointer-sign) \
|
---|
1830 | -O2 -fno-format-extensions -fno-strict-aliasing -fno-common -finline-limit=8000 \
|
---|
1831 | $(VBOX_GCC_fno-stack-protector) $(VBOX_GCC_OPT) $(VBOX_GCC_FP) \
|
---|
1832 | -nostdinc
|
---|
1833 | TEMPLATE_VBOXR0DRV_SYSSUFF = .ko
|
---|
1834 | TEMPLATE_VBOXR0DRV_LDFLAGS = -d --warn-common
|
---|
1835 | TEMPLATE_VBOXR0DRV_LDFLAGS.x86 = -m elf_i386_fbsd
|
---|
1836 | TEMPLATE_VBOXR0DRV_LDFLAGS.amd64 = -m elf_x86_64 "Port me to amd64 FreeBSD"
|
---|
1837 |
|
---|
1838 | TOOL_FREEBSDKMODLD = FreeBSD kernel module linker.
|
---|
1839 | # See kBuild/tools/GCC3.kmk for docs.
|
---|
1840 | TOOL_FREEBSDKMODLD_LINK_SYSMOD_OUTPUT = $(outbase).kld
|
---|
1841 | TOOL_FREEBSDKMODLD_LINK_SYSMOD_OUTPUT_MAYBE = $(outbase).map
|
---|
1842 | TOOL_FREEBSDKMODLD_LINK_SYSMOD_DEPEND = $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib)))
|
---|
1843 | TOOL_FREEBSDKMODLD_LINK_SYSMOD_DEPORD =
|
---|
1844 | define TOOL_FREEBSDKMODLD_LINK_SYSMOD_CMDS
|
---|
1845 | @# Link intermediate .kld (a relocatable object).
|
---|
1846 | ld $(flags) -r -o $(outbase).kld $(objs) \
|
---|
1847 | $(foreach p,$(libpath), -L$(p))\
|
---|
1848 | $(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(basename $(lib))), $(lib)))
|
---|
1849 | @# Strip non-exported symbols private and localize the exported ones.
|
---|
1850 | awk -f $(VBOX_FREEBSD_SRC)/conf/kmod_syms.awk $(outbase).kld $(if $(othersrc), $(othersrc),/dev/null) \
|
---|
1851 | | xargs -J% objcopy % $(outbase).kld
|
---|
1852 | @# Link the final .ko (a shared object).
|
---|
1853 | ld $(flags) -Bshareable -o $(out) $(outbase).kld
|
---|
1854 | endef
|
---|
1855 |
|
---|
1856 | endif # FreeBSD
|
---|
1857 |
|
---|
1858 | ifdef VBOX_WITH_VBOXDRV
|
---|
1859 | ifndef TEMPLATE_VBOXR0DRV_TOOL
|
---|
1860 | $(warning Warning: VBox Build: Target $(KBUILD_HOST) is not officially supported!)
|
---|
1861 | endif
|
---|
1862 | endif
|
---|
1863 |
|
---|
1864 |
|
---|
1865 |
|
---|
1866 | #
|
---|
1867 | # Template for building R3 executables and static libraries which are linked into executables.
|
---|
1868 | # Note! This is the base template for a whole lot of other ones, so be careful when changing it.
|
---|
1869 | #
|
---|
1870 | TEMPLATE_VBOXR3EXE = VBox Ring 3 Exe
|
---|
1871 | TEMPLATE_VBOXR3EXE_ASTOOL = $(VBOX_ASTOOL)
|
---|
1872 | TEMPLATE_VBOXR3EXE_ASFLAGS = $(VBOX_ASFLAGS)
|
---|
1873 | TEMPLATE_VBOXR3EXE_DEFS = IN_RING3 $(ARCH_BITS_DEFS)
|
---|
1874 | TEMPLATE_VBOXR3EXE_LIBS.kprofile = $(LIB_KPROFILE)
|
---|
1875 | ifeq ($(KBUILD_TARGET),win)
|
---|
1876 | TEMPLATE_VBOXR3EXE_TOOL = $(VBOX_VCC_TOOL)
|
---|
1877 | TEMPLATE_VBOXR3EXE_RCDEFS = \
|
---|
1878 | VBOX_VERSION_MAJOR=\"$(VBOX_VERSION_MAJOR)\" \
|
---|
1879 | VBOX_VERSION_MINOR=\"$(VBOX_VERSION_MINOR)\" \
|
---|
1880 | VBOX_VERSION_BUILD=\"$(VBOX_VERSION_BUILD)\" \
|
---|
1881 | VBOX_SVN_REV=\"$(VBOX_SVN_REV)\" \
|
---|
1882 | VBOX_VERSION_MAJOR_NR=$(VBOX_VERSION_MAJOR) \
|
---|
1883 | VBOX_VERSION_MINOR_NR=$(VBOX_VERSION_MINOR) \
|
---|
1884 | VBOX_VERSION_BUILD_NR=$(VBOX_VERSION_BUILD) \
|
---|
1885 | VBOX_SVN_REV_NR=$(VBOX_SVN_REV)
|
---|
1886 | TEMPLATE_VBOXR3EXE_SDKS = WINPSDK
|
---|
1887 | ifdef VBOX_USE_VCC80
|
---|
1888 | TEMPLATE_VBOXR3EXE_CXXFLAGS = -Zi -Zl -GR- -EHs-c- -GF- -MD -W3 -wd4065 -wd4244 -wd4996 -Zc:wchar_t- $(VBOX_VCC_OPT) $(VBOX_VCC_FP)
|
---|
1889 | TEMPLATE_VBOXR3EXE_CXXFLAGS.debug = -RTCsu
|
---|
1890 | else
|
---|
1891 | TEMPLATE_VBOXR3EXE_CXXFLAGS = -Zi -Zl -GR- -GX- -GF- -MD -W3 -wd4065 -wd4244 $(VBOX_VCC_OPT) $(VBOX_VCC_FP)
|
---|
1892 | TEMPLATE_VBOXR3EXE_CXXFLAGS.debug = -GZ
|
---|
1893 | endif
|
---|
1894 | TEMPLATE_VBOXR3EXE_CXXFLAGS.kprofile = -Gh -GH
|
---|
1895 | TEMPLATE_VBOXR3EXE_CFLAGS = $(TEMPLATE_VBOXR3EXE_CXXFLAGS)
|
---|
1896 | TEMPLATE_VBOXR3EXE_CFLAGS.debug = $(TEMPLATE_VBOXR3EXE_CXXFLAGS.debug)
|
---|
1897 | TEMPLATE_VBOXR3EXE_CFLAGS.kprofile = $(TEMPLATE_VBOXR3EXE_CXXFLAGS.kprofile)
|
---|
1898 | TEMPLATE_VBOXR3EXE_LDFLAGS = \
|
---|
1899 | /NOD /INCREMENTAL:NO /MAPINFO:EXPORTS /LARGEADDRESSAWARE /DEBUG \
|
---|
1900 | /DISALLOWLIB:libc.lib \
|
---|
1901 | /DISALLOWLIB:libcd.lib \
|
---|
1902 | /DISALLOWLIB:libcmt.lib \
|
---|
1903 | /DISALLOWLIB:libcmtd.lib \
|
---|
1904 | /DISALLOWLIB:msvcrtd.lib
|
---|
1905 | TEMPLATE_VBOXR3EXE_LIBS = \
|
---|
1906 | $(PATH_TOOL_$(VBOX_VCC_TOOL)_LIB)/msvcrt.lib \
|
---|
1907 | $(PATH_TOOL_$(VBOX_VCC_TOOL)_LIB)/msvcprt.lib \
|
---|
1908 | $(PATH_TOOL_$(VBOX_VCC_TOOL)_LIB)/oldnames.lib
|
---|
1909 | TEMPLATE_VBOXR3EXE_POST_CMDS = $(VBOX_SIGN_IMAGE_CMDS)
|
---|
1910 |
|
---|
1911 | else # the gcc guys
|
---|
1912 | TEMPLATE_VBOXR3EXE_TOOL = $(VBOX_GCC_TOOL)
|
---|
1913 | TEMPLATE_VBOXR3EXE_CXXFLAGS = -g -Wall -pedantic -Wno-long-long -Wno-trigraphs $(VBOX_GCC_Wno-variadic-macros) -pipe $(VBOX_GCC_OPT) $(VBOX_GCC_FP) -fno-strict-aliasing $(VBOX_GCC_fvisibility-inlines-hidden) $(VBOX_GCC_fvisibility-hidden)
|
---|
1914 | TEMPLATE_VBOXR3EXE_CXXFLAGS.x86 = -m32
|
---|
1915 | TEMPLATE_VBOXR3EXE_CXXFLAGS.amd64 = -m64
|
---|
1916 | # L4 currently can't handle exception handling.
|
---|
1917 | TEMPLATE_VBOXR3EXE_CXXFLAGS.l4 = -fno-exceptions -nostdinc \
|
---|
1918 | $(addprefix -I,$(VBOX_PATH_GCC_INCS) $(L4_INCDIR) $(FILE_TOOL_GPP3_INCDIR)) \
|
---|
1919 | $(DEBUG_L4)
|
---|
1920 | TEMPLATE_VBOXR3EXE_CXXFLAGS.kprofile = -finstrument-functions
|
---|
1921 | TEMPLATE_VBOXR3EXE_CFLAGS = -g -Wall -pedantic -Wno-long-long -Wno-trigraphs $(VBOX_GCC_Wno-variadic-macros) -pipe -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations $(VBOX_GCC_OPT) $(VBOX_GCC_FP) -fno-strict-aliasing $(VBOX_GCC_fvisibility-hidden)
|
---|
1922 | TEMPLATE_VBOXR3EXE_CFLAGS.x86 = $(TEMPLATE_VBOXR3EXE_CXXFLAGS.x86)
|
---|
1923 | TEMPLATE_VBOXR3EXE_CFLAGS.amd64 = $(TEMPLATE_VBOXR3EXE_CXXFLAGS.amd64)
|
---|
1924 | TEMPLATE_VBOXR3EXE_CFLAGS.debug = $(TEMPLATE_VBOXR3EXE_CXXFLAGS.debug)
|
---|
1925 | TEMPLATE_VBOXR3EXE_CFLAGS.kprofile = $(TEMPLATE_VBOXR3EXE_CXXFLAGS.kprofile)
|
---|
1926 | TEMPLATE_VBOXR3EXE_CFLAGS.l4 = -nostdinc \
|
---|
1927 | $(addprefix -I,$(VBOX_PATH_GCC_INCS) $(L4_INCDIR)) $(DEBUG_L4)
|
---|
1928 | TEMPLATE_VBOXR3EXE_DEFS.l4 = L4_THREAD_SAFE
|
---|
1929 | TEMPLATE_VBOXR3EXE_LDFLAGS.x86 = -m32
|
---|
1930 | TEMPLATE_VBOXR3EXE_LDFLAGS.amd64 = -m64
|
---|
1931 | TEMPLATE_VBOXR3EXE_LDFLAGS.l4 = \
|
---|
1932 | $(L4_LIBDIR)/../crt0.o \
|
---|
1933 | -T$(L4_LIBDIR)/../main_dyn.ld -nostdlib \
|
---|
1934 | -Wl,--export-dynamic,--dynamic-linker=libld-l4.s.so \
|
---|
1935 | -Wl,--rpath-link,$(L4_LIBDIR)
|
---|
1936 | TEMPLATE_VBOXR3EXE_LDFLAGS.linux = -Wl,-z,noexecstack $(VBOX_LD_as_needed)
|
---|
1937 | ifeq ($(KBUILD_TARGET),linux)
|
---|
1938 | TEMPLATE_VBOXR3EXE_LIBS = pthread m rt dl
|
---|
1939 | else ifeq ($(KBUILD_TARGET),l4)
|
---|
1940 | TEMPLATE_VBOXR3EXE_LIBS = \
|
---|
1941 | $(L4_LIBDIR)/libvboxserver.s.so \
|
---|
1942 | $(L4_LIBDIR)/libuc++.0.s.so \
|
---|
1943 | supc++ gcc_eh gcc \
|
---|
1944 | $(L4_LIBDIR)/libdl.s.so \
|
---|
1945 | $(L4_LIBDIR)/libuc.0.s.so
|
---|
1946 | else ifeq ($(KBUILD_TARGET),os2)
|
---|
1947 | TEMPLATE_VBOXR3EXE_TOOL = GXX3OMF
|
---|
1948 | TEMPLATE_VBOXR3EXE_LIBS = socket iconv
|
---|
1949 | else ifeq ($(KBUILD_TARGET),darwin)
|
---|
1950 | TEMPLATE_VBOXR3EXE_TOOL = GXX4MACHO
|
---|
1951 | TEMPLATE_VBOXR3EXE_LIBS =
|
---|
1952 | TEMPLATE_VBOXR3EXE_DEFS.darwin = $(VBOX_DARWIN_DEF_SDK_DEFS)
|
---|
1953 | TEMPLATE_VBOXR3EXE_CFLAGS.darwin = $(VBOX_DARWIN_DEF_SDK_CFLAGS) -fno-common
|
---|
1954 | TEMPLATE_VBOXR3EXE_CXXFLAGS.darwin = $(VBOX_DARWIN_DEF_SDK_CXXFLAGS)
|
---|
1955 | TEMPLATE_VBOXR3EXE_OBJCFLAGS.darwin = $(VBOX_DARWIN_DEF_SDK_OBJCFLAGS)
|
---|
1956 | TEMPLATE_VBOXR3EXE_LDFLAGS.darwin = $(VBOX_DARWIN_DEF_SDK_LDFLAGS) -read_only_relocs suppress
|
---|
1957 | else if1of ($(KBUILD_TARGET),freebsd netbsd openbsd)
|
---|
1958 | TEMPLATE_VBOXR3EXE_TOOL = GXX3
|
---|
1959 | TEMPLATE_VBOXR3EXE_LIBS = pthread
|
---|
1960 | TEMPLATE_VBOXR3EXE_INCS += \
|
---|
1961 | /usr/include \
|
---|
1962 | /usr/X11R6/include \
|
---|
1963 | /usr/local/include
|
---|
1964 | else ifeq ($(KBUILD_TARGET),solaris)
|
---|
1965 | TEMPLATE_VBOXR3EXE_TOOL = GXX3PLAIN
|
---|
1966 | TEMPLATE_VBOXR3EXE_DEFS += LIBICONV_PLUG _REENTRANT # Avoid the GNU libiconv, for now at least.
|
---|
1967 | TEMPLATE_VBOXR3EXE_LIBS = rt socket
|
---|
1968 | else
|
---|
1969 | $(warning Warning: VBOX Build: Target $(KBUILD_TARGET) is not officially supported!)
|
---|
1970 | TEMPLATE_VBOXR3EXE_CXXFLAGS.profile = $(TEMPLATE_VBOXR3EXE_CXXFLAGS.release)
|
---|
1971 | TEMPLATE_VBOXR3EXE_CXXFLAGS.kprofile = $(TEMPLATE_VBOXR3EXE_CXXFLAGS.krelease)
|
---|
1972 | endif
|
---|
1973 | ifdef VBOX_WITH_ORIGIN
|
---|
1974 | TEMPLATE_VBOXR3EXE_LDFLAGS += '$(VBOX_GCC_RPATH_OPT)$$(VBOX_ORIGIN)'
|
---|
1975 | endif
|
---|
1976 | endif
|
---|
1977 |
|
---|
1978 | #
|
---|
1979 | # Template for building R3 shared objects / DLLs.
|
---|
1980 | # This is mostly identical to the VBOXR3EXE template. (Avoid PIC if possible!)
|
---|
1981 | #
|
---|
1982 | TEMPLATE_VBOXR3 = VBox Ring 3 SO/DLLs
|
---|
1983 | TEMPLATE_VBOXR3_EXTENDS = VBOXR3EXE
|
---|
1984 | TEMPLATE_VBOXR3_LDFLAGS.l4 = $(L4_LIBDIR)/../crt0.s.o -T$(L4_LIBDIR)/../main_rel.ld -nostdlib
|
---|
1985 | TEMPLATE_VBOXR3_DEFS.l4 = $(TEMPLATE_VBOXR3EXE_DEFS.l4) __PIC__
|
---|
1986 | TEMPLATE_VBOXR3_DEFS.darwin = $(TEMPLATE_VBOXR3EXE_DEFS.darwin) PIC
|
---|
1987 | ifeq ($(filter-out solaris.x86 %.amd64,$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH)),)
|
---|
1988 | ifneq ($(KBUILD_TARGET),win)
|
---|
1989 | TEMPLATE_VBOXR3_DEFS = $(TEMPLATE_VBOXR3EXE_DEFS) PIC
|
---|
1990 | TEMPLATE_VBOXR3_CFLAGS = $(TEMPLATE_VBOXR3EXE_CFLAGS) -fPIC
|
---|
1991 | TEMPLATE_VBOXR3_CXXFLAGS = $(TEMPLATE_VBOXR3EXE_CXXFLAGS) -fPIC
|
---|
1992 | TEMPLATE_VBOXR3_LDFLAGS = $(TEMPLATE_VBOXR3EXE_LDFLAGS) -fPIC
|
---|
1993 | endif
|
---|
1994 | endif
|
---|
1995 |
|
---|
1996 | #
|
---|
1997 | # Ring-3 testcase.
|
---|
1998 | # This is the VBOXR3EXE template only with a different install dir.
|
---|
1999 | #
|
---|
2000 | TEMPLATE_VBOXR3TSTEXE = VBox Ring 3 Testcase Exe
|
---|
2001 | TEMPLATE_VBOXR3TSTEXE_EXTENDS = VBOXR3EXE
|
---|
2002 | TEMPLATE_VBOXR3TSTEXE_INST = $(INST_TESTCASE)
|
---|
2003 | TEMPLATE_VBOXR3TSTEXE_LIBS = $(LIB_RUNTIME) $(TEMPLATE_VBOXR3EXE_LIBS)
|
---|
2004 | ifdef VBOX_WITH_ORIGIN
|
---|
2005 | TEMPLATE_VBOXR3TSTEXE_LDFLAGS= '$(VBOX_GCC_RPATH_OPT)$$(VBOX_ORIGIN)/..' $(TEMPLATE_VBOXR3EXE_LDFLAGS)
|
---|
2006 | endif
|
---|
2007 | ifeq ($(KBUILD_TARGET),win)
|
---|
2008 | ifdef VBOX_SIGNING_MODE
|
---|
2009 | TEMPLATE_VBOXR3TSTEXE_POST_CMDS =
|
---|
2010 | endif
|
---|
2011 | endif
|
---|
2012 |
|
---|
2013 | #
|
---|
2014 | # Template for the CppUnit kind of testcases.
|
---|
2015 | #
|
---|
2016 | TEMPLATE_VBOXCPPUNITEXE = VBox CppUnit Testcase Exe
|
---|
2017 | TEMPLATE_VBOXCPPUNITEXE_EXTENDS = VBOXR3TSTEXE
|
---|
2018 | ## @todo make a CPPUNIT SDK and add cppunit tools packages for windows, mac, solaris and OS/2.
|
---|
2019 | #TEMPLATE_VBOXCPPUNITEXE_SDKS = CPPUNIT -
|
---|
2020 | TEMPLATE_VBOXCPPUNITEXE_LIBS = \
|
---|
2021 | $(TEMPLATE_VBOXR3TSTEXE_LIBS) \
|
---|
2022 | cppunit
|
---|
2023 |
|
---|
2024 | #
|
---|
2025 | # Template for building bad C/C++ style R3 executables (no -pedantic).
|
---|
2026 | #
|
---|
2027 | TEMPLATE_VBOXR3NPEXE = VBox Ring 3 Non-pedantic
|
---|
2028 | TEMPLATE_VBOXR3NPEXE_EXTENDS = VBOXR3EXE
|
---|
2029 | ifneq ($(KBUILD_TARGET),win) # (only gcc)
|
---|
2030 | TEMPLATE_VBOXR3NPEXE_TOOL = $(VBOX_GCC_TOOL)
|
---|
2031 | TEMPLATE_VBOXR3NPEXE_CXXFLAGS = $(filter-out -pedantic,$(TEMPLATE_VBOXR3EXE_CXXFLAGS))
|
---|
2032 | TEMPLATE_VBOXR3NPEXE_CFLAGS = $(filter-out -pedantic -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations,$(TEMPLATE_VBOXR3EXE_CFLAGS))
|
---|
2033 | endif
|
---|
2034 |
|
---|
2035 |
|
---|
2036 | #
|
---|
2037 | # Template for building bad C/C++ style R3 shared libraries / Dlls (no -pedantic).
|
---|
2038 | # This is mostly identical to the VBOXR3NPEXE template.
|
---|
2039 | #
|
---|
2040 | TEMPLATE_VBOXR3NP= VBox Ring 3 Non-pedantic
|
---|
2041 | TEMPLATE_VBOXR3NP_EXTENDS = VBOXR3NPEXE
|
---|
2042 | TEMPLATE_VBOXR3NP_LDFLAGS.l4 = \
|
---|
2043 | $(L4_LIBDIR)/../crt0.s.o \
|
---|
2044 | -T$(L4_LIBDIR)/../main_rel.ld \
|
---|
2045 | -nostdlib
|
---|
2046 | TEMPLATE_VBOXR3NP_DEFS.l4 = $(TEMPLATE_VBOXR3NPEXE_DEFS.l4) __PIC__
|
---|
2047 | ifeq ($(filter-out solaris.x86 %.amd64,$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH)),)
|
---|
2048 | ifneq ($(KBUILD_TARGET),win)
|
---|
2049 | TEMPLATE_VBOXR3NP_DEFS = $(TEMPLATE_VBOXR3NPEXE_DEFS) PIC
|
---|
2050 | TEMPLATE_VBOXR3NP_CFLAGS = $(TEMPLATE_VBOXR3NPEXE_CFLAGS) -fPIC
|
---|
2051 | TEMPLATE_VBOXR3NP_CXXFLAGS = $(TEMPLATE_VBOXR3NPEXE_CXXFLAGS) -fPIC
|
---|
2052 | TEMPLATE_VBOXR3NP_LDFLAGS = $(TEMPLATE_VBOXR3NPEXE_LDFLAGS) -fPIC
|
---|
2053 | endif
|
---|
2054 | endif
|
---|
2055 |
|
---|
2056 |
|
---|
2057 | #
|
---|
2058 | # Template for building libraries, shared libraries / modules
|
---|
2059 | # which only depends on IPRT for crt.
|
---|
2060 | #
|
---|
2061 | TEMPLATE_VBOXNOCRTGCC = VBox no-crt GCC libraries and modules, yasm/nasm.
|
---|
2062 | TEMPLATE_VBOXNOCRTGCC_DEFS = IN_RING3 IPRT_NO_CRT $(ARCH_BITS_DEFS)
|
---|
2063 | TEMPLATE_VBOXNOCRTGCC_ASDEFS = ASM_CALL64_GCC
|
---|
2064 | TEMPLATE_VBOXNOCRTGCC_CFLAGS = -nostdinc -fno-strict-aliasing -fno-math-errno -Wall
|
---|
2065 | TEMPLATE_VBOXNOCRTGCC_CFLAGS.x86 = -m32
|
---|
2066 | TEMPLATE_VBOXNOCRTGCC_CFLAGS.amd64 = -m64 -mcmodel=medium -fno-common
|
---|
2067 | TEMPLATE_VBOXNOCRTGCC_CFLAGS.release = -O2 -fno-strict-aliasing
|
---|
2068 | TEMPLATE_VBOXNOCRTGCC_CFLAGS.profile = $(TEMPLATE_VBOXNOCRTGCC_CFLAGS.release)
|
---|
2069 | TEMPLATE_VBOXNOCRTGCC_CFLAGS.kprofile = $(TEMPLATE_VBOXNOCRTGCC_CFLAGS.release)
|
---|
2070 | ifdef VBOX_TARGET_MAC_OS_X_VERSION_10_5 ## @todo this probably works for 10.4 too, check.
|
---|
2071 | TEMPLATE_VBOXNOCRTGCC_CFLAGS.darwin = -static
|
---|
2072 | else
|
---|
2073 | TEMPLATE_VBOXNOCRTGCC_CFLAGS.darwin = -mdynamic-no-pic
|
---|
2074 | endif
|
---|
2075 | TEMPLATE_VBOXNOCRTGCC_CXXFLAGS = $(TEMPLATE_VBOXNOCRTGCC_CFLAGS)
|
---|
2076 | TEMPLATE_VBOXNOCRTGCC_CXXFLAGS.$(KBUILD_TARGET) = $(TEMPLATE_VBOXNOCRTGCC_CFLAGS.$(KBUILD_TARGET))
|
---|
2077 | TEMPLATE_VBOXNOCRTGCC_CXXFLAGS.$(KBUILD_TARGET_ARCH) = $(TEMPLATE_VBOXNOCRTGCC_CFLAGS.$(KBUILD_TARGET_ARCH))
|
---|
2078 | TEMPLATE_VBOXNOCRTGCC_INCS = $(PATH_ROOT)/include/iprt/nocrt
|
---|
2079 |
|
---|
2080 | ifeq ($(KBUILD_TARGET).$(KBUILD_TARGET_ARCH),win.amd64)
|
---|
2081 | # cross compile to 64-bit ELF (linux).
|
---|
2082 | TEMPLATE_VBOXNOCRTGCC_TOOL = XGCCAMD64LINUX
|
---|
2083 | TEMPLATE_VBOXNOCRTGCC_ASTOOL = YASM
|
---|
2084 | TEMPLATE_VBOXNOCRTGCC_ASFLAGS = -f elf64 -DASM_FORMAT_ELF -D__YASM__ -w+orphan-labels -g dwarf2
|
---|
2085 | 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
|
---|
2086 | TEMPLATE_VBOXNOCRTGCC_LDFLAGS = -nostdlib
|
---|
2087 |
|
---|
2088 | else ifeq ($(KBUILD_TARGET).$(KBUILD_TARGET_ARCH),win.x86)
|
---|
2089 | # Use the default GCC (MinGW) with the Microsoft linker.
|
---|
2090 | # (Drop all '-g' options as we're unable to strip the debug info.)
|
---|
2091 | TEMPLATE_VBOXNOCRTGCC_TOOL = $(VBOX_GCC_TOOL)
|
---|
2092 | TEMPLATE_VBOXNOCRTGCC_ASTOOL = $(VBOX_ASTOOL)
|
---|
2093 | TEMPLATE_VBOXNOCRTGCC_ASFLAGS = $(VBOX_ASFLAGS)
|
---|
2094 | TEMPLATE_VBOXNOCRTGCC_LDTOOL = $(VBOX_VCC_TOOL)
|
---|
2095 | TEMPLATE_VBOXNOCRTGCC_LDFLAGS = -Incremental:NO -MapInfo:Exports -NoD
|
---|
2096 | TEMPLATE_VBOXNOCRTGCC_LIBS = $(VBOX_GCC_LIBGCC)
|
---|
2097 | TEMPLATE_VBOXNOCRTGCC_CFLAGS := $(filter-out -g,$(TEMPLATE_VBOXNOCRTGCC_CFLAGS)) -s
|
---|
2098 |
|
---|
2099 | else
|
---|
2100 | # Use the default GCC.
|
---|
2101 | # The use of --exclude-libs ALL is to avoid confusing the linux ld.so.
|
---|
2102 | TEMPLATE_VBOXNOCRTGCC_TOOL = $(VBOX_GCC_TOOL)
|
---|
2103 | TEMPLATE_VBOXNOCRTGCC_ASTOOL = $(VBOX_ASTOOL)
|
---|
2104 | TEMPLATE_VBOXNOCRTGCC_ASFLAGS = $(VBOX_ASFLAGS)
|
---|
2105 | TEMPLATE_VBOXNOCRTGCC_CFLAGS += $(VBOX_GCC_fno-stack-protector)
|
---|
2106 | TEMPLATE_VBOXNOCRTGCC_CXXFLAGS += $(VBOX_GCC_fno-stack-protector)
|
---|
2107 | ifeq ($(KBUILD_TARGET_ARCH),amd64)
|
---|
2108 | # in 64-bit mode we'll build a sys-module (VBoxREM2).
|
---|
2109 | if1of ($(KBUILD_TARGET),darwin solaris)
|
---|
2110 | TEMPLATE_VBOXNOCRTGCC_LDFLAGS.solaris= -64 -r
|
---|
2111 | else
|
---|
2112 | TEMPLATE_VBOXNOCRTGCC_LDFLAGS = -nostdlib
|
---|
2113 | endif
|
---|
2114 | else # x86:
|
---|
2115 | TEMPLATE_VBOXNOCRTGCC_LDFLAGS = -nostdlib
|
---|
2116 | ifn1of ($(KBUILD_TARGET), os2 darwin solaris)
|
---|
2117 | TEMPLATE_VBOXNOCRTGCC_LDFLAGS += -Wl,--no-undefined
|
---|
2118 | endif
|
---|
2119 | endif # x86
|
---|
2120 | TEMPLATE_VBOXNOCRTGCC_LDFLAGS.darwin = $(VBOX_DARWIN_DEF_SDK_LDFLAGS)
|
---|
2121 | TEMPLATE_VBOXNOCRTGCC_LIBS = # FIXME - has unwind mess.
|
---|
2122 | endif
|
---|
2123 |
|
---|
2124 |
|
---|
2125 | #
|
---|
2126 | # Same as VBOXNOCRTGCC only it uses GAS as the assembler instead of yasm/nasm.
|
---|
2127 | #
|
---|
2128 | TEMPLATE_VBOXNOCRTGAS = VBox no-crt GCC libraries and modules, gas.
|
---|
2129 | TEMPLATE_VBOXNOCRTGAS_EXTENDS = VBOXNOCRTGCC
|
---|
2130 | TEMPLATE_VBOXNOCRTGAS_ASTOOL = $(TEMPLATE_VBOXNOCRTGCC_TOOL)
|
---|
2131 | ifeq ($(KBUILD_TARGET).$(KBUILD_TARGET_ARCH),win.x86)
|
---|
2132 | TEMPLATE_VBOXNOCRTGAS_ASFLAGS = -s
|
---|
2133 | else
|
---|
2134 | TEMPLATE_VBOXNOCRTGAS_ASFLAGS = -g
|
---|
2135 | endif
|
---|
2136 | TEMPLATE_VBOXNOCRTGAS_ASFLAGS.x86 = -m32
|
---|
2137 | TEMPLATE_VBOXNOCRTGAS_ASFLAGS.amd64 = -m64
|
---|
2138 |
|
---|
2139 |
|
---|
2140 | #
|
---|
2141 | # Template for building executables that are part of the VBox Main component
|
---|
2142 | # (COM/XPCOM interface to VirtualBox).
|
---|
2143 | #
|
---|
2144 | TEMPLATE_VBOXMAINEXE = VBox Main Executable
|
---|
2145 | TEMPLATE_VBOXMAINEXE_ASTOOL = $(VBOX_ASTOOL)
|
---|
2146 | TEMPLATE_VBOXMAINEXE_ASFLAGS = $(VBOX_ASFLAGS)
|
---|
2147 | TEMPLATE_VBOXMAINEXE_DEFS = IN_RING3 UNICODE NDEBUG=1
|
---|
2148 | TEMPLATE_VBOXMAINEXE_DEFS.win = _UNICODE
|
---|
2149 | TEMPLATE_VBOXMAINEXE_RCDEFS = $(TEMPLATE_VBOXR3EXE_RCDEFS)
|
---|
2150 | TEMPLATE_VBOXMAINEXE_LIBS.kprofile = $(LIB_KPROFILE)
|
---|
2151 | TEMPLATE_VBOXMAINEXE_INCS = \
|
---|
2152 | $(VBOX_PATH_SDK)/include
|
---|
2153 |
|
---|
2154 | ifeq ($(KBUILD_TARGET),win)
|
---|
2155 | TEMPLATE_VBOXMAINEXE_SDKS = WINPSDK W2K3DDK
|
---|
2156 | ifdef VBOX_USE_VCC80
|
---|
2157 | TEMPLATE_VBOXMAINEXE_TOOL = $(VBOX_VCC_TOOL)
|
---|
2158 | TEMPLATE_VBOXMAINEXE_CXXFLAGS = -Zi -Zl -GR -GF- -MD -EHsc -W3 -wd4065 -wd4996 -Zc:wchar_t- $(VBOX_VCC_OPT) $(VBOX_VCC_FP)
|
---|
2159 | TEMPLATE_VBOXMAINEXE_CXXFLAGS.debug = -RTCsu
|
---|
2160 | else
|
---|
2161 | TEMPLATE_VBOXMAINEXE_TOOL = VCC70
|
---|
2162 | TEMPLATE_VBOXMAINEXE_CXXFLAGS = -Zi -Zl -GR -GX- -GF- -MD -EHsc -W3 -wd4065 $(VBOX_VCC_OPT) $(VBOX_VCC_FP)
|
---|
2163 | TEMPLATE_VBOXMAINEXE_CXXFLAGS.debug = -GZ
|
---|
2164 | endif
|
---|
2165 | TEMPLATE_VBOXMAINEXE_CXXFLAGS.kprofile = -Gh -GH
|
---|
2166 | TEMPLATE_VBOXMAINEXE_CFLAGS = $(TEMPLATE_VBOXMAINEXE_CXXFLAGS)
|
---|
2167 | TEMPLATE_VBOXMAINEXE_CFLAGS.debug = $(TEMPLATE_VBOXMAINEXE_CXXFLAGS.debug)
|
---|
2168 | TEMPLATE_VBOXMAINEXE_CFLAGS.kprofile = $(TEMPLATE_VBOXMAINEXE_CXXFLAGS.kprofile)
|
---|
2169 | TEMPLATE_VBOXMAINEXE_INCS += \
|
---|
2170 | $(PATH_TOOL_$(VBOX_VCC_TOOL)_ATLMFC_INC)
|
---|
2171 | TEMPLATE_VBOXMAINEXE_LDFLAGS = \
|
---|
2172 | /NOD /INCREMENTAL:NO /MAPINFO:EXPORTS /LARGEADDRESSAWARE /DEBUG\
|
---|
2173 | /DISALLOWLIB:libc.lib \
|
---|
2174 | /DISALLOWLIB:libcd.lib \
|
---|
2175 | /DISALLOWLIB:msvcrt.lib \
|
---|
2176 | /DISALLOWLIB:msvcrtd.lib \
|
---|
2177 | /DISALLOWLIB:libcmtd.lib \
|
---|
2178 | /DISALLOWLIB:libcmt.lib
|
---|
2179 | TEMPLATE_VBOXMAINEXE_LIBS = \
|
---|
2180 | $(LIB_RUNTIME) \
|
---|
2181 | $(PATH_TOOL_$(VBOX_VCC_TOOL)_LIB)/msvcrt.lib \
|
---|
2182 | $(PATH_TOOL_$(VBOX_VCC_TOOL)_LIB)/msvcprt.lib \
|
---|
2183 | $(PATH_TOOL_$(VBOX_VCC_TOOL)_LIB)/oldnames.lib \
|
---|
2184 | $(PATH_TOOL_$(VBOX_VCC_TOOL)_ATLMFC_LIB)/atls.lib
|
---|
2185 | TEMPLATE_VBOXMAINEXE_POST_CMDS = $(VBOX_SIGN_IMAGE_CMDS)
|
---|
2186 |
|
---|
2187 | else # the GCC guys:
|
---|
2188 |
|
---|
2189 | TEMPLATE_VBOXMAINEXE_TOOL = $(VBOX_GCC_TOOL)
|
---|
2190 | TEMPLATE_VBOXMAINEXE_CXXFLAGS = -g -Wall -Wno-long-long -Wno-trigraphs -pipe -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)
|
---|
2191 | TEMPLATE_VBOXMAINEXE_CXXFLAGS.x86 = -m32
|
---|
2192 | TEMPLATE_VBOXMAINEXE_CXXFLAGS.amd64 = -m64
|
---|
2193 | TEMPLATE_VBOXMAINEXE_CXXFLAGS.kprofile = -finstrument-functions
|
---|
2194 | TEMPLATE_VBOXMAINEXE_CFLAGS = -g -Wall -Wno-long-long -Wno-trigraphs -pipe -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations $(VBOX_GCC_OPT) $(VBOX_GCC_FP) -fno-strict-aliasing $(VBOX_GCC_fvisibility-hidden)
|
---|
2195 | TEMPLATE_VBOXMAINEXE_CFLAGS.x86 = -m32
|
---|
2196 | TEMPLATE_VBOXMAINEXE_CFLAGS.amd64 = -m64
|
---|
2197 | TEMPLATE_VBOXMAINEXE_CFLAGS.kprofile = $(TEMPLATE_VBOXMAINEXE_CXXFLAGS.kprofile)
|
---|
2198 | TEMPLATE_VBOXMAINEXE_LDFLAGS.x86 = -m32
|
---|
2199 | TEMPLATE_VBOXMAINEXE_LDFLAGS.amd64 = -m64
|
---|
2200 | ifeq ($(KBUILD_TARGET),linux)
|
---|
2201 | TEMPLATE_VBOXMAINEXE_LIBS = pthread m rt $(LIB_RUNTIME)
|
---|
2202 | TEMPLATE_VBOXMAINEXE_LDFLAGS.linux = $(VBOX_LD_as_needed)
|
---|
2203 | else ifeq ($(KBUILD_TARGET),l4)
|
---|
2204 | TEMPLATE_VBOXMAINEXE_LIBS = $(LIB_RUNTIME)
|
---|
2205 | # no libs as yet in l4 target - must be added later
|
---|
2206 | else ifeq ($(KBUILD_TARGET),os2)
|
---|
2207 | TEMPLATE_VBOXMAINEXE_TOOL = GXX3OMF
|
---|
2208 | TEMPLATE_VBOXMAINEXE_LIBS = $(LIB_RUNTIME)
|
---|
2209 | else ifeq ($(KBUILD_TARGET),darwin)
|
---|
2210 | TEMPLATE_VBOXMAINEXE_TOOL = GXX4MACHO
|
---|
2211 | TEMPLATE_VBOXMAINEXE_DEFS += $(VBOX_DARWIN_DEF_SDK_DEFS)
|
---|
2212 | TEMPLATE_VBOXMAINEXE_CFLAGS += $(VBOX_DARWIN_DEF_SDK_CFLAGS)
|
---|
2213 | TEMPLATE_VBOXMAINEXE_CXXFLAGS += $(VBOX_DARWIN_DEF_SDK_CXXFLAGS)
|
---|
2214 | TEMPLATE_VBOXMAINEXE_OBJCFLAGS += $(VBOX_DARWIN_DEF_SDK_OBJCFLAGS)
|
---|
2215 | TEMPLATE_VBOXMAINEXE_LDFLAGS += $(VBOX_DARWIN_DEF_SDK_LDFLAGS) -bind_at_load -framework Carbon
|
---|
2216 | TEMPLATE_VBOXMAINEXE_LIBS = $(LIB_RUNTIME)
|
---|
2217 | else if1of ($(KBUILD_TARGET), freebsd netbsd openbsd)
|
---|
2218 | TEMPLATE_VBOXMAINEXE_TOOL = GXX3
|
---|
2219 | TEMPLATE_VBOXMAINEXE_LIBS = $(LIB_RUNTIME)
|
---|
2220 | else ifeq ($(KBUILD_TARGET),solaris)
|
---|
2221 | TEMPLATE_VBOXMAINEXE_TOOL = GXX3PLAIN
|
---|
2222 | TEMPLATE_VBOXMAINEXE_DEFS += _REENTRANT
|
---|
2223 | TEMPLATE_VBOXMAINEXE_LIBS = $(LIB_RUNTIME) rt
|
---|
2224 | else
|
---|
2225 | $(warning Warning: VBOX Build: Target $(KBUILD_TARGET) is not officially supported!)
|
---|
2226 | TEMPLATE_VBOXMAINEXE_LIBS =
|
---|
2227 | endif
|
---|
2228 | ifdef VBOX_WITH_ORIGIN
|
---|
2229 | TEMPLATE_VBOXMAINEXE_LDFLAGS += '$(VBOX_GCC_RPATH_OPT)$$(VBOX_ORIGIN)'
|
---|
2230 | endif
|
---|
2231 |
|
---|
2232 | endif # !win
|
---|
2233 |
|
---|
2234 | # Add COM/XPCOM stuff
|
---|
2235 | TEMPLATE_VBOXMAINEXE_LIBS += \
|
---|
2236 | $(PATH_LIB)/VBoxCOM$(VBOX_SUFF_LIB)
|
---|
2237 | ifdef VBOX_WITH_XPCOM
|
---|
2238 | ## @todo may be worth creating the VBOX_XPCOM SDK def
|
---|
2239 | TEMPLATE_VBOXMAINEXE_DEFS += VBOX_WITH_XPCOM
|
---|
2240 | TEMPLATE_VBOXMAINEXE_INCS += \
|
---|
2241 | $(VBOX_XPCOM_INCS)
|
---|
2242 | TEMPLATE_VBOXMAINEXE_LIBS += \
|
---|
2243 | $(LIB_XPCOM)
|
---|
2244 | endif
|
---|
2245 |
|
---|
2246 | #
|
---|
2247 | # Template for building the Main DLL modules (such as in-process COM/XPCOM
|
---|
2248 | # components for Main).
|
---|
2249 | #
|
---|
2250 | # This differs from VBOXMAINEXE only in PIC handling and similar DLL stuff.
|
---|
2251 | #
|
---|
2252 |
|
---|
2253 | TEMPLATE_VBOXMAINDLL = VBox Main Component (shared library)
|
---|
2254 | TEMPLATE_VBOXMAINDLL_EXTENDS = VBOXMAINEXE
|
---|
2255 | ifeq ($(filter-out solaris.x86 %.amd64,$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH)),)
|
---|
2256 | ifneq ($(KBUILD_TARGET),win)
|
---|
2257 | TEMPLATE_VBOXMAINDLL_DEFS = PIC $(TEMPLATE_VBOXMAINEXE_DEFS)
|
---|
2258 | TEMPLATE_VBOXMAINDLL_CFLAGS = -fPIC $(TEMPLATE_VBOXMAINEXE_CFLAGS)
|
---|
2259 | TEMPLATE_VBOXMAINDLL_CXXFLAGS = -fPIC $(TEMPLATE_VBOXMAINEXE_CXXFLAGS)
|
---|
2260 | TEMPLATE_VBOXMAINDLL_LDFLAGS = -fPIC $(TEMPLATE_VBOXMAINEXE_LDFLAGS)
|
---|
2261 | endif
|
---|
2262 | endif
|
---|
2263 | ifeq ($(KBUILD_TARGET),darwin)
|
---|
2264 | TEMPLATE_VBOXMAINDLL_LDFLAGS = $(filter-out -bind_at_load,$(TEMPLATE_VBOXMAINEXE_LDFLAGS))
|
---|
2265 | endif
|
---|
2266 |
|
---|
2267 | #
|
---|
2268 | # Template for building the Main static libraries.
|
---|
2269 | #
|
---|
2270 | # This differs from VBOXMAINDLL only that it zeroes out the _LIBS definition.
|
---|
2271 | #
|
---|
2272 | TEMPLATE_VBOXMAINLIB = VBox Main Component (static library)
|
---|
2273 | TEMPLATE_VBOXMAINLIB_EXTENDS = VBOXMAINDLL
|
---|
2274 | TEMPLATE_VBOXMAINLIB_LIBS =
|
---|
2275 |
|
---|
2276 | #
|
---|
2277 | # Template for building executables that use the VBox Main component.
|
---|
2278 | #
|
---|
2279 | TEMPLATE_VBOXMAINCLIENTEXE = VBox Main Client (executable)
|
---|
2280 | TEMPLATE_VBOXMAINCLIENTEXE_EXTENDS = VBOXMAINEXE
|
---|
2281 | ifeq ($(KBUILD_TARGET),win)
|
---|
2282 | TEMPLATE_VBOXMAINCLIENTEXE_LIBS.win = $(TEMPLATE_VBOXMAINEXE_LIBS.win) \
|
---|
2283 | $(PATH_SDK_WINPSDK_LIB)/User32.Lib \
|
---|
2284 | $(PATH_SDK_WINPSDK_LIB)/Shell32.Lib \
|
---|
2285 | $(PATH_SDK_WINPSDK_LIB)/ShLwApi.Lib \
|
---|
2286 | $(PATH_SDK_WINPSDK_LIB)/Ole32.Lib \
|
---|
2287 | $(PATH_SDK_WINPSDK_LIB)/OleAut32.Lib \
|
---|
2288 | $(PATH_SDK_WINPSDK_LIB)/Uuid.Lib
|
---|
2289 | else
|
---|
2290 | TEMPLATE_VBOXMAINCLIENTEXE_DEFS = $(TEMPLATE_VBOXMAINEXE_DEFS) \
|
---|
2291 | NDEBUG TRIMMED
|
---|
2292 | TEMPLATE_VBOXMAINCLIENTEXE_CXXFLAGS.linux = $(TEMPLATE_VBOXMAINEXE_CXXFLAGS.linux) \
|
---|
2293 | -pthread
|
---|
2294 | ifeq ($(KBUILD_TARGET),darwin)
|
---|
2295 | TEMPLATE_VBOXMAINCLIENTEXE_LDFLAGS = $(TEMPLATE_VBOXMAINEXE_LDFLAGS) -bind_at_load -framework Carbon
|
---|
2296 | endif
|
---|
2297 | endif
|
---|
2298 |
|
---|
2299 | #
|
---|
2300 | # Template for building shared libraries / DLLs that use the VBox Main component.
|
---|
2301 | #
|
---|
2302 | # This differs from VBOXMAINCLIENTEXE only in PIC handling and similar DLL stuff.
|
---|
2303 | #
|
---|
2304 | TEMPLATE_VBOXMAINCLIENTDLL = VBox MAIN Client (shared library)
|
---|
2305 | TEMPLATE_VBOXMAINCLIENTDLL_EXTENDS = VBOXMAINCLIENTEXE
|
---|
2306 | ifeq ($(filter-out solaris.x86 %.amd64,$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH)),)
|
---|
2307 | ifneq ($(KBUILD_TARGET),win)
|
---|
2308 | TEMPLATE_VBOXMAINCLIENTDLL_DEFS = PIC $(TEMPLATE_VBOXMAINCLIENTEXE_DEFS)
|
---|
2309 | TEMPLATE_VBOXMAINCLIENTDLL_CFLAGS = -fPIC $(TEMPLATE_VBOXMAINCLIENTEXE_CFLAGS)
|
---|
2310 | TEMPLATE_VBOXMAINCLIENTDLL_CXXFLAGS = -fPIC $(TEMPLATE_VBOXMAINCLIENTEXE_CXXFLAGS)
|
---|
2311 | TEMPLATE_VBOXMAINCLIENTDLL_LDFLAGS = -fPIC $(TEMPLATE_VBOXMAINCLIENTEXE_LDFLAGS)
|
---|
2312 | endif
|
---|
2313 | endif
|
---|
2314 | ifeq ($(KBUILD_TARGET),darwin)
|
---|
2315 | TEMPLATE_VBOXMAINCLIENTDLL_LDFLAGS = $(filter-out -bind_at_load,$(TEMPLATE_VBOXMAINCLIENTEXE_LDFLAGS))
|
---|
2316 | endif
|
---|
2317 |
|
---|
2318 |
|
---|
2319 | #
|
---|
2320 | # Template for building Qt GUI executables.
|
---|
2321 | #
|
---|
2322 | TEMPLATE_VBOXQTGUIEXE = VBox Qt GUI Executable
|
---|
2323 | TEMPLATE_VBOXQTGUIEXE_DEFS = IN_RING3 QT_NO_DEBUG QT_THREAD_SUPPORT $(ARCH_BITS_DEFS)
|
---|
2324 | TEMPLATE_VBOXQTGUIEXE_INCS = \
|
---|
2325 | $(VBOX_PATH_SDK)/include \
|
---|
2326 | $(VBOX_PATH_QT)/include
|
---|
2327 |
|
---|
2328 | ifeq ($(KBUILD_TARGET),win)
|
---|
2329 | # drag in library configuration (we need QMAKE_PRL_DEFINES)
|
---|
2330 | ifneq ($(LIB_QT_PRL),)
|
---|
2331 | include $(LIB_QT_PRL)
|
---|
2332 | endif
|
---|
2333 | TEMPLATE_VBOXQTGUIEXE_TOOL = $(VBOX_VCC_TOOL)
|
---|
2334 | TEMPLATE_VBOXQTGUIEXE_DEFS += \
|
---|
2335 | _WIN32_WINNT=0x0500 UNICODE _UNICODE \
|
---|
2336 | QT_DLL _CRT_SECURE_NO_DEPRECATE \
|
---|
2337 | $(QMAKE_PRL_DEFINES)
|
---|
2338 | ## @todo VCC70 flags?
|
---|
2339 | ifdef VBOX_USE_VCC80
|
---|
2340 | TEMPLATE_VBOXQTGUIEXE_CXXFLAGS = \
|
---|
2341 | -nologo -Zm200 -W3 -MD -Zi -EHsc -Zc:wchar_t-
|
---|
2342 | TEMPLATE_VBOXQTGUIEXE_CXXFLAGS.debug = -RTCsu
|
---|
2343 | else
|
---|
2344 | TEMPLATE_VBOXQTGUIEXE_CXXFLAGS = \
|
---|
2345 | -nologo -Zm200 -W3 -MD -Zi -GX
|
---|
2346 | TEMPLATE_VBOXQTGUIEXE_CXXFLAGS.debug = -GZ
|
---|
2347 | endif
|
---|
2348 | TEMPLATE_VBOXQTGUIEXE_INCS += \
|
---|
2349 | $(PATH_TOOL_$(VBOX_VCC_TOOL)_ATLMFC_INC)
|
---|
2350 | TEMPLATE_VBOXQTGUIEXE_LDFLAGS = \
|
---|
2351 | /NOD /NOLOGO /INCREMENTAL:NO /MAPINFO:EXPORTS /DEBUG \
|
---|
2352 | /DELAYLOAD:oleaut32.dll
|
---|
2353 | TEMPLATE_VBOXQTGUIEXE_SDKS = WINPSDK
|
---|
2354 | TEMPLATE_VBOXQTGUIEXE_LIBS = \
|
---|
2355 | $(LIB_QT) \
|
---|
2356 | $(LIB_QTMAIN) \
|
---|
2357 | $(LIB_RUNTIME) \
|
---|
2358 | $(PATH_TOOL_$(VBOX_VCC_TOOL)_LIB)/msvcprt.lib \
|
---|
2359 | $(PATH_TOOL_$(VBOX_VCC_TOOL)_LIB)/msvcrt.lib \
|
---|
2360 | $(PATH_TOOL_$(VBOX_VCC_TOOL)_LIB)/oldnames.lib \
|
---|
2361 | $(PATH_TOOL_$(VBOX_VCC_TOOL)_LIB)/delayimp.lib \
|
---|
2362 | $(PATH_TOOL_$(VBOX_VCC_TOOL)_ATLMFC_LIB)/atls.lib
|
---|
2363 | TEMPLATE_VBOXQTGUIEXE_POST_CMDS = $(VBOX_SIGN_IMAGE_CMDS)
|
---|
2364 |
|
---|
2365 | else # the gcc guys:
|
---|
2366 | TEMPLATE_VBOXQTGUIEXE_TOOL = $(VBOX_GCC_TOOL)
|
---|
2367 | TEMPLATE_VBOXQTGUIEXE_DEFS.linux = _REENTRANT
|
---|
2368 | TEMPLATE_VBOXQTGUIEXE_DEFS.solaris = _REENTRANT
|
---|
2369 |
|
---|
2370 | TEMPLATE_VBOXQTGUIEXE_INCS += \
|
---|
2371 | $(LIB_SDL_INC)
|
---|
2372 | TEMPLATE_VBOXQTGUIEXE_CXXFLAGS = \
|
---|
2373 | -pipe -Wall -W -frtti -fno-exceptions -Wno-non-virtual-dtor \
|
---|
2374 | -Wno-long-long -fshort-wchar -fno-strict-aliasing \
|
---|
2375 | $(VBOX_GCC_fvisibility-hidden) $(VBOX_GCC_fvisibility-inlines-hidden)
|
---|
2376 | TEMPLATE_VBOXQTGUIEXE_CXXFLAGS.x86 = -m32
|
---|
2377 | TEMPLATE_VBOXQTGUIEXE_CXXFLAGS.amd64 = -m64
|
---|
2378 | TEMPLATE_VBOXQTGUIEXE_CXXFLAGS.linux = -pthread
|
---|
2379 | TEMPLATE_VBOXQTGUIEXE_LDFLAGS.x86 = -m32
|
---|
2380 | TEMPLATE_VBOXQTGUIEXE_LDFLAGS.amd64 = -m64
|
---|
2381 | TEMPLATE_VBOXQTGUIEXE_LIBS = \
|
---|
2382 | $(LIB_QT) \
|
---|
2383 | $(LIB_SDL) \
|
---|
2384 | $(LIB_RUNTIME) \
|
---|
2385 | $(LIB_REM) \
|
---|
2386 | $(LIB_VMM)
|
---|
2387 |
|
---|
2388 | ifeq ($(KBUILD_TARGET_ARCH),amd64)
|
---|
2389 | TEMPLATE_VBOXQTGUIEXE_LIBPATH = \
|
---|
2390 | $(VBOX_PATH_QT)/lib64 $(VBOX_PATH_QT)/lib
|
---|
2391 | else
|
---|
2392 | TEMPLATE_VBOXQTGUIEXE_LIBPATH = \
|
---|
2393 | $(VBOX_PATH_QT)/lib
|
---|
2394 | endif
|
---|
2395 |
|
---|
2396 | ifeq ($(KBUILD_TARGET),linux)
|
---|
2397 | TEMPLATE_VBOXQTGUIEXE_LDFLAGS += $(VBOX_LD_as_needed)
|
---|
2398 | else ifeq ($(KBUILD_TARGET),darwin)
|
---|
2399 | TEMPLATE_VBOXQTGUIEXE_DEFS += $(VBOX_DARWIN_DEF_SDK_DEFS)
|
---|
2400 | TEMPLATE_VBOXQTGUIEXE_CFLAGS += $(VBOX_DARWIN_DEF_SDK_CFLAGS)
|
---|
2401 | TEMPLATE_VBOXQTGUIEXE_CXXFLAGS += $(VBOX_DARWIN_DEF_SDK_CXXFLAGS)
|
---|
2402 | TEMPLATE_VBOXQTGUIEXE_OBJCFLAGS += $(VBOX_DARWIN_DEF_SDK_OBJCFLAGS)
|
---|
2403 | TEMPLATE_VBOXQTGUIEXE_LDFLAGS += $(VBOX_DARWIN_DEF_SDK_LDFLAGS) -framework Carbon -framework QuickTime -bind_at_load
|
---|
2404 | TEMPLATE_VBOXQTGUIEXE_LIBS +=
|
---|
2405 | TEMPLATE_VBOXQTGUIEXE_LIBPATH +=
|
---|
2406 | else ifeq ($(KBUILD_TARGET),os2)
|
---|
2407 | # drag in library configuration (we need QMAKE_PRL_DEFINES)
|
---|
2408 | ifneq ($(LIB_QT_PRL),)
|
---|
2409 | include $(LIB_QT_PRL)
|
---|
2410 | endif
|
---|
2411 | TEMPLATE_VBOXQTGUIEXE_DEFS += $(QMAKE_PRL_DEFINES)
|
---|
2412 | TEMPLATE_VBOXQTGUIEXE_LIBS +=
|
---|
2413 | TEMPLATE_VBOXQTGUIEXE_LIBPATH +=
|
---|
2414 | else
|
---|
2415 | TEMPLATE_VBOXQTGUIEXE_INCS += \
|
---|
2416 | $(VBOX_XCURSOR_INCS)
|
---|
2417 | TEMPLATE_VBOXQTGUIEXE_LIBS += \
|
---|
2418 | $(VBOX_XCURSOR_LIBS) \
|
---|
2419 | Xext \
|
---|
2420 | X11 \
|
---|
2421 | m \
|
---|
2422 | $(LIB_PTHREAD)
|
---|
2423 | TEMPLATE_VBOXQTGUIEXE_LIBPATH += \
|
---|
2424 | $(VBOX_LIBPATH_X11)
|
---|
2425 | ifeq ($(KBUILD_TARGET),freebsd)
|
---|
2426 | TEMPLATE_VBOXQTGUIEXE_INCS += \
|
---|
2427 | /usr/include \
|
---|
2428 | /usr/X11R6/include \
|
---|
2429 | /usr/local/include
|
---|
2430 | endif
|
---|
2431 | ifeq ($(KBUILD_TARGET),solaris)
|
---|
2432 | TEMPLATE_VBOXQTGUIEXE_LIBS += \
|
---|
2433 | rt socket nsl
|
---|
2434 | endif
|
---|
2435 | endif
|
---|
2436 | ifdef VBOX_WITH_ORIGIN
|
---|
2437 | ifeq ($(KBUILD_TARGET),solaris)
|
---|
2438 | TEMPLATE_VBOXQTGUIEXE_LDFLAGS += '$(VBOX_GCC_RPATH_OPT)$$(VBOX_ORIGIN):$$(VBOX_ORIGIN)/qtgcc/lib'
|
---|
2439 | else
|
---|
2440 | TEMPLATE_VBOXQTGUIEXE_LDFLAGS += '$(VBOX_GCC_RPATH_OPT)$$(VBOX_ORIGIN)'
|
---|
2441 | endif
|
---|
2442 | endif
|
---|
2443 |
|
---|
2444 | endif # !win
|
---|
2445 |
|
---|
2446 | # Add COM/XPCOM stuff
|
---|
2447 | TEMPLATE_VBOXQTGUIEXE_LIBS += \
|
---|
2448 | $(PATH_LIB)/VBoxCOM$(VBOX_SUFF_LIB)
|
---|
2449 | ifdef VBOX_WITH_XPCOM
|
---|
2450 | ## @todo may be worth creating the VBOX_XPCOM SDK def
|
---|
2451 | TEMPLATE_VBOXQTGUIEXE_DEFS += VBOX_WITH_XPCOM
|
---|
2452 | TEMPLATE_VBOXQTGUIEXE_INCS += \
|
---|
2453 | $(VBOX_XPCOM_INCS)
|
---|
2454 | TEMPLATE_VBOXQTGUIEXE_LIBS += \
|
---|
2455 | $(LIB_XPCOM)
|
---|
2456 | endif
|
---|
2457 |
|
---|
2458 | #
|
---|
2459 | # Template for building Qt GUI components.
|
---|
2460 | #
|
---|
2461 | TEMPLATE_VBOXQTGUI = VBox Qt GUI Components
|
---|
2462 | TEMPLATE_VBOXQTGUI_EXTENDS = VBOXQTGUIEXE
|
---|
2463 | TEMPLATE_VBOXQTGUI_LIBS = $(filter-out $(QTMAIN),$(TEMPLATE_VBOXQTGUIEXE_LIBS))
|
---|
2464 | ifeq ($(KBUILD_TARGET),darwin)
|
---|
2465 | TEMPLATE_VBOXQTGUI_LDFLAGS = $(filter-out -framework Carbon -framework QuickTime -bind_at_load,$(TEMPLATE_VBOXQTGUIEXE_LDFLAGS))
|
---|
2466 | endif
|
---|
2467 | ifeq ($(filter-out solaris.x86 %.amd64,$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH)),)
|
---|
2468 | ifneq ($(KBUILD_TARGET),win)
|
---|
2469 | TEMPLATE_VBOXQTGUI_DEFS = PIC $(TEMPLATE_VBOXQTGUIEXE_DEFS)
|
---|
2470 | TEMPLATE_VBOXQTGUI_CFLAGS = -fPIC $(TEMPLATE_VBOXQTGUIEXE_CFLAGS)
|
---|
2471 | TEMPLATE_VBOXQTGUI_CXXFLAGS = -fPIC $(TEMPLATE_VBOXQTGUIEXE_CXXFLAGS)
|
---|
2472 | TEMPLATE_VBOXQTGUI_LDFLAGS = -fPIC $(TEMPLATE_VBOXQTGUIEXE_LDFLAGS)
|
---|
2473 | endif
|
---|
2474 | endif
|
---|
2475 |
|
---|
2476 |
|
---|
2477 | #
|
---|
2478 | # Template for building build bldprogs.
|
---|
2479 | #
|
---|
2480 | TEMPLATE_VBOXBLDPROG = VBox Build Program
|
---|
2481 | TEMPLATE_VBOXBLDPROG_DEFS = IN_RING3
|
---|
2482 | ifeq ($(KBUILD_HOST),win)
|
---|
2483 | ifeq ($(KBUILD_HOST_ARCH),x86)
|
---|
2484 | ifdef VBOX_USE_VCC80
|
---|
2485 | TEMPLATE_VBOXBLDPROG_TOOL = VCC80X86
|
---|
2486 | else
|
---|
2487 | TEMPLATE_VBOXBLDPROG_TOOL = VCC70
|
---|
2488 | endif
|
---|
2489 | TEMPLATE_VBOXBLDPROG_SDKS = WIN32SDK
|
---|
2490 | else
|
---|
2491 | TEMPLATE_VBOXBLDPROG_TOOL = VCC80AMD64
|
---|
2492 | TEMPLATE_VBOXBLDPROG_SDKS = WIN64SDK
|
---|
2493 | endif
|
---|
2494 | ifneq ($(TEMPLATE_VBOXBLDPROG_TOOL),VCC70)
|
---|
2495 | TEMPLATE_VBOXBLDPROG_CXXFLAGS = -Zi -Zl -GR- -EHs-c- -GF- -MT -W3 -wd4996 -Zc:wchar_t-
|
---|
2496 | TEMPLATE_VBOXBLDPROG_CXXFLAGS.debug = -RTCsu
|
---|
2497 | TEMPLATE_VBOXBLDPROG_CXXFLAGS.release = -O2 -Oy- -GS-
|
---|
2498 | else
|
---|
2499 | TEMPLATE_VBOXBLDPROG_CXXFLAGS = -Zi -Zl -GR- -GX- -GF- -MT -W3
|
---|
2500 | TEMPLATE_VBOXBLDPROG_CXXFLAGS.debug = -GZ
|
---|
2501 | TEMPLATE_VBOXBLDPROG_CXXFLAGS.release = -Ogitb2 -Oy-
|
---|
2502 | endif
|
---|
2503 | TEMPLATE_VBOXBLDPROG_CXXFLAGS.profile = $(TEMPLATE_VBOXBLDPROG_CXXFLAGS.release)
|
---|
2504 | TEMPLATE_VBOXBLDPROG_CXXFLAGS.kprofile = $(TEMPLATE_VBOXBLDPROG_CXXFLAGS.release)
|
---|
2505 | TEMPLATE_VBOXBLDPROG_CFLAGS = $(TEMPLATE_VBOXBLDPROG_CXXFLAGS)
|
---|
2506 | TEMPLATE_VBOXBLDPROG_CFLAGS.debug = $(TEMPLATE_VBOXBLDPROG_CXXFLAGS.debug)
|
---|
2507 | TEMPLATE_VBOXBLDPROG_CFLAGS.release = $(TEMPLATE_VBOXBLDPROG_CXXFLAGS.release)
|
---|
2508 | TEMPLATE_VBOXBLDPROG_CFLAGS.profile = $(TEMPLATE_VBOXBLDPROG_CXXFLAGS.profile)
|
---|
2509 | TEMPLATE_VBOXBLDPROG_CFLAGS.kprofile = $(TEMPLATE_VBOXBLDPROG_CXXFLAGS.kprofile)
|
---|
2510 | TEMPLATE_VBOXBLDPROG_LDFLAGS = \
|
---|
2511 | /NOD /INCREMENTAL:NO /MAPINFO:EXPORTS /LARGEADDRESSAWARE /DEBUG \
|
---|
2512 | /DISALLOWLIB:libcd.lib \
|
---|
2513 | /DISALLOWLIB:libcmtd.lib \
|
---|
2514 | /DISALLOWLIB:msvcrt.lib \
|
---|
2515 | /DISALLOWLIB:msvcrtd.lib \
|
---|
2516 | /DISALLOWLIB:msvcprt.lib \
|
---|
2517 | /DISALLOWLIB:msvcprtd.lib
|
---|
2518 | TEMPLATE_VBOXBLDPROG_LIBS = \
|
---|
2519 | $(PATH_TOOL_$(TEMPLATE_VBOXBLDPROG_TOOL)_LIB)/oldnames.lib \
|
---|
2520 | $(PATH_TOOL_$(TEMPLATE_VBOXBLDPROG_TOOL)_LIB)/libcmt.lib \
|
---|
2521 | $(PATH_TOOL_$(TEMPLATE_VBOXBLDPROG_TOOL)_LIB)/libcpmt.lib
|
---|
2522 |
|
---|
2523 | else
|
---|
2524 | # (gcc of some kind )
|
---|
2525 | TEMPLATE_VBOXBLDPROG_TOOL = GXX3
|
---|
2526 | TEMPLATE_VBOXBLDPROG_CFLAGS = -g -Wall -pedantic -Wno-long-long -Wno-trigraphs $(VBOX_GCC_Wno-variadic-macros) -pipe -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations
|
---|
2527 | TEMPLATE_VBOXBLDPROG_CFLAGS.x86 = -m32
|
---|
2528 | TEMPLATE_VBOXBLDPROG_CFLAGS.amd64 = -m64
|
---|
2529 | TEMPLATE_VBOXBLDPROG_CFLAGS.release = -O2 -fno-omit-frame-pointer -fno-strict-aliasing
|
---|
2530 | TEMPLATE_VBOXBLDPROG_CFLAGS.profile = $(TEMPLATE_VBOXBLDPROG_CXXFLAGS.profile)
|
---|
2531 | TEMPLATE_VBOXBLDPROG_CFLAGS.kprofile = $(TEMPLATE_VBOXBLDPROG_CXXFLAGS.kprofile)
|
---|
2532 | TEMPLATE_VBOXBLDPROG_CXXFLAGS = -g -Wall -pedantic -Wno-long-long -Wno-trigraphs -pipe
|
---|
2533 | TEMPLATE_VBOXBLDPROG_CXXFLAGS.x86 = -m32
|
---|
2534 | TEMPLATE_VBOXBLDPROG_CXXFLAGS.amd64 = -m64
|
---|
2535 | TEMPLATE_VBOXBLDPROG_CXXFLAGS.release = -O2 -fno-omit-frame-pointer -fno-strict-aliasing
|
---|
2536 | TEMPLATE_VBOXBLDPROG_CXXFLAGS.profile = $(TEMPLATE_VBOXBLDPROG_CXXFLAGS.release)
|
---|
2537 | TEMPLATE_VBOXBLDPROG_CXXFLAGS.kprofile = $(TEMPLATE_VBOXBLDPROG_CXXFLAGS.release)
|
---|
2538 | TEMPLATE_VBOXBLDPROG_LDFLAGS.x86 = -m32
|
---|
2539 | TEMPLATE_VBOXBLDPROG_LDFLAGS.amd64 = -m64
|
---|
2540 | ifeq ($(KBUILD_HOST),linux)
|
---|
2541 | TEMPLATE_VBOXBLDPROG_LIBS = pthread m rt dl
|
---|
2542 | else ifeq ($(KBUILD_HOST),os2)
|
---|
2543 | TEMPLATE_VBOXBLDPROG_TOOL = GXX3OMF
|
---|
2544 | TEMPLATE_VBOXBLDPROG_LIBS = socket iconv
|
---|
2545 | else ifeq ($(KBUILD_HOST),darwin)
|
---|
2546 | TEMPLATE_VBOXBLDPROG_TOOL = GXX4MACHO
|
---|
2547 | TEMPLATE_VBOXBLDPROG_CFLAGS.darwin = $(VBOX_DARWIN_DEF_SDK_CFLAGS) -fno-common
|
---|
2548 | TEMPLATE_VBOXBLDPROG_CXXFLAGS.darwin = $(VBOX_DARWIN_DEF_SDK_CXXFLAGS)
|
---|
2549 | TEMPLATE_VBOXBLDPROG_OBJCFLAGS.darwin = $(VBOX_DARWIN_DEF_SDK_OBJCFLAGS)
|
---|
2550 | TEMPLATE_VBOXBLDPROG_LDFLAGS.darwin = $(VBOX_DARWIN_DEF_SDK_LDFLAGS)
|
---|
2551 | TEMPLATE_VBOXBLDPROG_LIBS =
|
---|
2552 | else if1of ($(KBUILD_HOST), freebsd netbsd openbsd)
|
---|
2553 | TEMPLATE_VBOXBLDPROG_TOOL = GXX3
|
---|
2554 | TEMPLATE_VBOXBLDPROG_LIBS =
|
---|
2555 | else ifeq ($(KBUILD_HOST),solaris)
|
---|
2556 | TEMPLATE_VBOXBLDPROG_TOOL = GXX3PLAIN
|
---|
2557 | TEMPLATE_VBOXBLDPROG_LIBS = rt
|
---|
2558 | else
|
---|
2559 | $(warning Warning: VBOX Build: Target $(KBUILD_HOST) is not officially supported!)
|
---|
2560 | endif
|
---|
2561 |
|
---|
2562 | endif # !win
|
---|
2563 |
|
---|
2564 |
|
---|
2565 | #
|
---|
2566 | # Windows rc workaround for crosscompiling.
|
---|
2567 | # (Some (old) Wine versions fails loading msvcrt.dll from the VCC bin directory.)
|
---|
2568 | #
|
---|
2569 | ifneq ($(KBUILD_HOST),win)
|
---|
2570 | TOOL_VCC80X86_RC := $(EXEC_X86_WIN32) $(PATH_DEVTOOLS)/win.x86/bin/rc.exe
|
---|
2571 | TOOL_VCC80AMD64_RC := $(EXEC_X86_WIN32) $(PATH_DEVTOOLS)/win.x86/bin/rc.exe
|
---|
2572 | TOOL_VCC70_RC := $(EXEC_X86_WIN32) $(PATH_DEVTOOLS)/win.x86/bin/rc.exe
|
---|
2573 | WIN32_MC = $(EXEC_X86_WIN32) $(PATH_DEVTOOLS)/win.x86/bin/mc.exe
|
---|
2574 | else
|
---|
2575 | WIN32_MC = $(EXEC_X86_WIN32) $(firstword $(wildcard \
|
---|
2576 | $(PATH_SDK_WINPSDK_BIN)/MC.Exe\
|
---|
2577 | $(PATH_SDK_WINPSDK)/Bin/MC.Exe\
|
---|
2578 | $(PATH_SDK_WIN32SDK_BIN)/MC.Exe\
|
---|
2579 | $(PATH_SDK_WIN64SDK_BIN)/MC.Exe\
|
---|
2580 | $(PATH_DEVTOOLS)/win.x86/bin/mc.exe\
|
---|
2581 | ) Sorry_Cannot_find_mc_in_the_PSDK)
|
---|
2582 | endif
|
---|
2583 |
|
---|
2584 |
|
---|
2585 | #
|
---|
2586 | # Template for building Linux host tools (only for KBUILD_TARGET=l4).
|
---|
2587 | #
|
---|
2588 | TEMPLATE_VBOXLNXHOSTR3EXE = Template for building linux host programs when targeting L4.
|
---|
2589 | TEMPLATE_VBOXLNXHOSTR3EXE_INST = $(INST_BIN)
|
---|
2590 | TEMPLATE_VBOXLNXHOSTR3EXE_BLD_TRG = linux
|
---|
2591 | TEMPLATE_VBOXLNXHOSTR3EXE_TOOL = $(VBOX_GCC_TOOL)
|
---|
2592 | TEMPLATE_VBOXLNXHOSTR3EXE_ASTOOL = YASM
|
---|
2593 | TEMPLATE_VBOXLNXHOSTR3EXE_DLLSUFF = .so
|
---|
2594 | TEMPLATE_VBOXLNXHOSTR3EXE_ASFLAGS = $(VBOX_ASFLAGS)
|
---|
2595 | TEMPLATE_VBOXLNXHOSTR3EXE_DEFS = IN_RING3 $(ARCH_BITS_DEFS)
|
---|
2596 | TEMPLATE_VBOXLNXHOSTR3EXE_CXXFLAGS = -g -Wall -pedantic -Wno-long-long -Wno-trigraphs -pipe $(VBOX_GCC_fno-stack-protector)
|
---|
2597 | TEMPLATE_VBOXLNXHOSTR3EXE_CXXFLAGS.debug = -fno-inline
|
---|
2598 | TEMPLATE_VBOXLNXHOSTR3EXE_CXXFLAGS.release = -O2 -fno-omit-frame-pointer -fno-strict-aliasing
|
---|
2599 | TEMPLATE_VBOXLNXHOSTR3EXE_CXXFLAGS.profile = $(TEMPLATE_VBOXLNXHOSTR3EXE_CXXFLAGS.release)
|
---|
2600 | TEMPLATE_VBOXLNXHOSTR3EXE_CXXFLAGS.kprofile = $(TEMPLATE_VBOXLNXHOSTR3EXE_CXXFLAGS.release)
|
---|
2601 | TEMPLATE_VBOXLNXHOSTR3EXE_CFLAGS.release = $(TEMPLATE_VBOXLNXHOSTR3EXE_CXXFLAGS.release)
|
---|
2602 | TEMPLATE_VBOXLNXHOSTR3EXE_CFLAGS.debug = $(TEMPLATE_VBOXLNXHOSTR3EXE_CXXFLAGS.debug)
|
---|
2603 | TEMPLATE_VBOXLNXHOSTR3EXE_CFLAGS.profile = $(TEMPLATE_VBOXLNXHOSTR3EXE_CXXFLAGS.profile)
|
---|
2604 | TEMPLATE_VBOXLNXHOSTR3EXE_CFLAGS.kprofile = $(TEMPLATE_VBOXLNXHOSTR3EXE_CXXFLAGS.kprofile)
|
---|
2605 | TEMPLATE_VBOXLNXHOSTR3EXE_CFLAGS = -g -Wall -pedantic -Wno-long-long -Wno-trigraphs -pipe -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations $(VBOX_GCC_fno-stack-protector)
|
---|
2606 | TEMPLATE_VBOXLNXHOSTR3EXE_LIBS = pthread m rt dl
|
---|
2607 |
|
---|
2608 | TEMPLATE_VBOXLNXHOSTR3LIB = Template for linux host libraries.
|
---|
2609 | TEMPLATE_VBOXLNXHOSTR3LIB_EXTENDS = VBOXLNXHOSTR3EXE
|
---|
2610 | TEMPLATE_VBOXLNXHOSTR3LIB_INST = $(INST_LIB)
|
---|
2611 |
|
---|
2612 |
|
---|
2613 | #
|
---|
2614 | # Template for building R3 programs for the guest additions.
|
---|
2615 | # Note: Make sure you don't break VBOXGUESTR3CPPEXE when changing this.
|
---|
2616 | #
|
---|
2617 | TEMPLATE_VBOXGUESTR3EXE = VBox Guest Program
|
---|
2618 | ifeq ($(KBUILD_TARGET),win)
|
---|
2619 | TEMPLATE_VBOXGUESTR3EXE_EXTENDS = VBOXR3EXE
|
---|
2620 | TEMPLATE_VBOXGUESTR3EXE_CFLAGS = $(filter-out -MD, $(TEMPLATE_VBOXR3EXE_CFLAGS)) -MT
|
---|
2621 | TEMPLATE_VBOXGUESTR3EXE_CXXFLAGS = $(filter-out -MD, $(TEMPLATE_VBOXR3EXE_CFLAGS)) -MT
|
---|
2622 | TEMPLATE_VBOXGUESTR3EXE_LDFLAGS = $(filter-out /DISALLOWLIB:libcmt.lib, $(TEMPLATE_VBOXR3EXE_LDFLAGS)) \
|
---|
2623 | /DISALLOWLIB:msvcrt.lib \
|
---|
2624 | /DISALLOWLIB:msvcprt.lib
|
---|
2625 | TEMPLATE_VBOXGUESTR3EXE_LIBS = \
|
---|
2626 | $(PATH_TOOL_$(TEMPLATE_VBOXGUESTR3EXE_TOOL)_LIB)/oldnames.lib \
|
---|
2627 | $(PATH_TOOL_$(TEMPLATE_VBOXGUESTR3EXE_TOOL)_LIB)/libcmt.lib \
|
---|
2628 | $(PATH_TOOL_$(TEMPLATE_VBOXGUESTR3EXE_TOOL)_LIB)/libcpmt.lib
|
---|
2629 | else # the gcc guys
|
---|
2630 | TEMPLATE_VBOXGUESTR3EXE_EXTENDS = VBOXR3EXE
|
---|
2631 | TEMPLATE_VBOXGUESTR3EXE_TOOL := $(subst GXX,GCC,$(TEMPLATE_VBOXR3EXE_TOOL))
|
---|
2632 | TEMPLATE_VBOXGUESTR3EXE_CXXFLAGS = $(TEMPLATE_VBOXR3EXE_CXXFLAGS) -fno-exceptions
|
---|
2633 | endif
|
---|
2634 | TEMPLATE_VBOXGUESTR3EXE_INST = $(INST_ADDITIONS)
|
---|
2635 | TEMPLATE_VBOXGUESTR3EXE_DEFS := $(TEMPLATE_VBOXR3EXE_DEFS) IN_GUEST IN_GUEST_R3 IN_RT_R3
|
---|
2636 | ifeq ($(KBUILD_TARGET),linux) # As few libs as possible on linux.
|
---|
2637 | TEMPLATE_VBOXGUESTR3EXE_LIBS = pthread rt m
|
---|
2638 | endif
|
---|
2639 |
|
---|
2640 | #
|
---|
2641 | # Template for building R3 (dynamic) libraries for the guest additions.
|
---|
2642 | #
|
---|
2643 | TEMPLATE_VBOXGUESTR3DLL = VBox Guest User Dynamic Libraries
|
---|
2644 | TEMPLATE_VBOXGUESTR3DLL_EXTENDS = VBOXGUESTR3EXE
|
---|
2645 | ## @todo add a INSTFUN that separates dlls and libs.
|
---|
2646 | ifn1of ($(KBUILD_TARGET), os2 win)
|
---|
2647 | TEMPLATE_VBOXGUESTR3DLL_DEFS = $(TEMPLATE_VBOXGUESTR3EXE_DEFS) PIC
|
---|
2648 | TEMPLATE_VBOXGUESTR3DLL_CFLAGS = $(TEMPLATE_VBOXGUESTR3EXE_CFLAGS) -fPIC
|
---|
2649 | TEMPLATE_VBOXGUESTR3DLL_CXXFLAGS = $(TEMPLATE_VBOXGUESTR3EXE_CXXFLAGS) -fPIC -fno-exceptions
|
---|
2650 | TEMPLATE_VBOXGUESTR3DLL_LDFLAGS = $(TEMPLATE_VBOXGUESTR3EXE_LDFLAGS) -fPIC
|
---|
2651 | endif
|
---|
2652 |
|
---|
2653 | #
|
---|
2654 | # Template for building R3 (static) libraries for the guest additions.
|
---|
2655 | #
|
---|
2656 | TEMPLATE_VBOXGUESTR3LIB = VBox Guest User Libraries
|
---|
2657 | TEMPLATE_VBOXGUESTR3LIB_EXTENDS = VBOXGUESTR3EXE
|
---|
2658 | TEMPLATE_VBOXGUESTR3LIB_INST = $(INST_ADDITIONS_LIB)
|
---|
2659 | if1of ($(KBUILD_TARGET), solaris) ## @todo r=bird: Fix the *R3Mini template to VBOXGUESTR3DLL and remove this hack.
|
---|
2660 | TEMPLATE_VBOXGUESTR3LIB_DEFS = $(TEMPLATE_VBOXGUESTR3EXE_DEFS) PIC
|
---|
2661 | TEMPLATE_VBOXGUESTR3LIB_CFLAGS = $(TEMPLATE_VBOXGUESTR3EXE_CFLAGS) -fPIC
|
---|
2662 | TEMPLATE_VBOXGUESTR3LIB_CXXFLAGS = $(TEMPLATE_VBOXGUESTR3EXE_CXXFLAGS) -fPIC -fno-exceptions
|
---|
2663 | endif
|
---|
2664 |
|
---|
2665 |
|
---|
2666 | #
|
---|
2667 | # Template for XFree86 guest modules (relocatable module, i.e. sysmod).
|
---|
2668 | # This mostly about zapping the VBOXR3EXE linker flags and libraries.
|
---|
2669 | #
|
---|
2670 | TEMPLATE_VBOXGUESTR3XF86MOD = VBox Guest Program with C++ library dependencies
|
---|
2671 | TEMPLATE_VBOXGUESTR3XF86MOD_EXTENDS = VBOXGUESTR3EXE
|
---|
2672 | TEMPLATE_VBOXGUESTR3XF86MOD_LIBS.$(KBUILD_TYPE) = $(NO_SUCH_VARIABLE)
|
---|
2673 | TEMPLATE_VBOXGUESTR3XF86MOD_LIBS.$(KBUILD_TARGET) = $(NO_SUCH_VARIABLE)
|
---|
2674 | TEMPLATE_VBOXGUESTR3XF86MOD_LDFLAGS.$(KBUILD_TARGET) = $(NO_SUCH_VARIABLE)
|
---|
2675 | TEMPLATE_VBOXGUESTR3XF86MOD_LDFLAGS.$(KBUILD_TYPE) = $(NO_SUCH_VARIABLE)
|
---|
2676 | TEMPLATE_VBOXGUESTR3XF86MOD_LDFLAGS = -r
|
---|
2677 | if1of ($(KBUILD_TARGET), dragonfly freebsd linux netbsd openbsd) # the gnu ld guys.
|
---|
2678 | TEMPLATE_VBOXGUESTR3XF86MOD_LDFLAGS.release = -S
|
---|
2679 | TEMPLATE_VBOXGUESTR3XF86MOD_LDFLAGS.x86 = -m elf_i386
|
---|
2680 | TEMPLATE_VBOXGUESTR3XF86MOD_LDFLAGS.amd64 = -m elf_x86_64
|
---|
2681 | endif
|
---|
2682 | TEMPLATE_VBOXGUESTR3XF86MOD_CFLAGS = $(TEMPLATE_VBOXGUESTR3EXE_CFLAGS) -fno-merge-constants -std=c99
|
---|
2683 | TEMPLATE_VBOXGUESTR3XF86MOD_CXXFLAGS= $(TEMPLATE_VBOXGUESTR3EXE_CXXFLAGS) -fno-merge-constants
|
---|
2684 | TEMPLATE_VBOXGUESTR3XF86MOD_SYSSUFF = .o
|
---|
2685 | TEMPLATE_VBOXGUESTR3XF86MOD_LIBS = \
|
---|
2686 | $(VBOX_LIB_VBGL_R3_XFREE86)
|
---|
2687 | TEMPLATE_VBOXGUESTR3XF86MOD_DEFS = $(TEMPLATE_VBOXGUESTR3DLL_DEFS) LOG_TO_BACKDOOR
|
---|
2688 |
|
---|
2689 |
|
---|
2690 | #
|
---|
2691 | # Template for X.org guest modules (shared libs).
|
---|
2692 | # This mostly about zapping unnecessary LIBS from VBOXGUESTR3DLL and adding some flags.
|
---|
2693 | #
|
---|
2694 | TEMPLATE_VBOXGUESTR3XORGMOD = VBox Guest Program with C++ library dependencies
|
---|
2695 | TEMPLATE_VBOXGUESTR3XORGMOD_EXTENDS = VBOXGUESTR3DLL
|
---|
2696 | TEMPLATE_VBOXGUESTR3XORGMOD_LIBS.$(KBUILD_TYPE) = $(NO_SUCH_VARIABLE)
|
---|
2697 | TEMPLATE_VBOXGUESTR3XORGMOD_LIBS.$(KBUILD_TARGET) = $(NO_SUCH_VARIABLE)
|
---|
2698 | TEMPLATE_VBOXGUESTR3XORGMOD_CFLAGS = $(TEMPLATE_VBOXGUESTR3DLL_CFLAGS) -std=c99
|
---|
2699 | TEMPLATE_VBOXGUESTR3XORGMOD_DEFS = $(TEMPLATE_VBOXGUESTR3DLL_DEFS) LOG_TO_BACKDOOR
|
---|
2700 | if1of ($(KBUILD_TARGET), linux)
|
---|
2701 | TEMPLATE_VBOXGUESTR3XORGMOD_LDFLAGS = $(TEMPLATE_VBOXGUESTR3DLL_LDFLAGS) -s
|
---|
2702 | endif
|
---|
2703 | TEMPLATE_VBOXGUESTR3XORGMOD_LIBS = \
|
---|
2704 | $(VBOX_LIB_VBGL_R3_SHARED) \
|
---|
2705 | $(VBOX_LIB_IPRT_GUEST_R3_MINI) \
|
---|
2706 | $(VBOX_LIB_VBGL_R3_SHARED)
|
---|
2707 |
|
---|
2708 |
|
---|
2709 | #
|
---|
2710 | # Template for guest stuff that makes use of the C++ library and features.
|
---|
2711 | # (This is mostly about undoing what was done to C++ for VBOXGUESTR3EXE.)
|
---|
2712 | #
|
---|
2713 | TEMPLATE_VBOXGUESTR3CPPEXE = VBox Guest Program with C++ library dependencies
|
---|
2714 | TEMPLATE_VBOXGUESTR3CPPEXE_EXTENDS = VBOXGUESTR3EXE
|
---|
2715 | ifeq ($(KBUILD_TARGET),win)
|
---|
2716 | # later if necessary
|
---|
2717 | else
|
---|
2718 | TEMPLATE_VBOXGUESTR3CPPEXE_TOOL = $(TEMPLATE_VBOXR3EXE_TOOL)
|
---|
2719 | TEMPLATE_VBOXGUESTR3CPPEXE_CXXFLAGS = $(TEMPLATE_VBOXR3EXE_CXXFLAGS)
|
---|
2720 | endif
|
---|
2721 |
|
---|
2722 |
|
---|
2723 | #
|
---|
2724 | # Template for building R0 drivers for the guest additions.
|
---|
2725 | #
|
---|
2726 | TEMPLATE_VBOXGUESTR0 = VBox Guest Driver
|
---|
2727 | TEMPLATE_VBOXGUESTR0_EXTENDS = VBOXR0DRV
|
---|
2728 | TEMPLATE_VBOXGUESTR0_INST = $(INST_ADDITIONS)
|
---|
2729 | TEMPLATE_VBOXGUESTR0_SDKS.win.x86 = WIN32SDK W2K3DDK
|
---|
2730 | TEMPLATE_VBOXGUESTR0_SDKS.win.amd64 = W2K3DDK WINPSDKINCS
|
---|
2731 | TEMPLATE_VBOXGUESTR0_LIBS.win.x86 = \
|
---|
2732 | $(PATH_SDK_W2K3DDK_LIB)/int64.lib
|
---|
2733 | TEMPLATE_VBOXGUESTR0_DEFS = $(TEMPLATE_VBOXR0DRV_DEFS) IN_GUEST IN_GUEST_R0
|
---|
2734 | ifeq ($(KBUILD_TARGET),solaris) # No VBI for the guest additions yet.
|
---|
2735 | TEMPLATE_VBOXGUESTR0_LDFLAGS = -r
|
---|
2736 | endif
|
---|
2737 |
|
---|
2738 | #
|
---|
2739 | # Template for building R0 libraries for the guest additions.
|
---|
2740 | #
|
---|
2741 | TEMPLATE_VBOXGUESTR0LIB = VBox Guest Driver Libraries
|
---|
2742 | TEMPLATE_VBOXGUESTR0LIB_EXTENDS = VBOXGUESTR0
|
---|
2743 | TEMPLATE_VBOXGUESTR0LIB_INST = $(INST_ADDITIONS_LIB)
|
---|
2744 |
|
---|
2745 |
|
---|
2746 | #
|
---|
2747 | # Guest additions libraries (all static).
|
---|
2748 | # The _MINI and _SHARED are both compiled as PIC and intended for linking into a .so/.dll/.dylib.
|
---|
2749 | #
|
---|
2750 | VBOX_LIB_IPRT_GUEST_R3 = $(VBOX_PATH_ADDITIONS_LIB)/RuntimeGuestR3$(VBOX_SUFF_LIB)
|
---|
2751 | VBOX_LIB_IPRT_GUEST_R3_MINI = $(VBOX_PATH_ADDITIONS_LIB)/RuntimeGuestR3Mini$(VBOX_SUFF_LIB)
|
---|
2752 | VBOX_LIB_IPRT_GUEST_R0 = $(VBOX_PATH_ADDITIONS_LIB)/RuntimeGuestR0$(VBOX_SUFF_LIB)
|
---|
2753 | ifeq ($(KBUILD_TARGET_ARCH),x86)
|
---|
2754 | VBOX_LIB_IPRT_GUEST_R0_NT4 = $(VBOX_PATH_ADDITIONS_LIB)/RuntimeGuestR0NT4$(VBOX_SUFF_LIB)
|
---|
2755 | else
|
---|
2756 | VBOX_LIB_IPRT_GUEST_R0_NT4 = $(VBOX_LIB_IPRT_GUEST_R0)
|
---|
2757 | endif
|
---|
2758 | VBOX_LIB_VBGL_R3 = $(VBOX_PATH_ADDITIONS_LIB)/VBoxGuestR3Lib$(VBOX_SUFF_LIB)
|
---|
2759 | VBOX_LIB_VBGL_R3_XFREE86 = $(VBOX_PATH_ADDITIONS_LIB)/VBoxGuestR3LibXFree86$(VBOX_SUFF_LIB)
|
---|
2760 | VBOX_LIB_VBGL_R3_SHARED = $(VBOX_PATH_ADDITIONS_LIB)/VBoxGuestR3LibShared$(VBOX_SUFF_LIB)
|
---|
2761 | VBOX_LIB_VBGL_R0BASE = $(VBOX_PATH_ADDITIONS_LIB)/VBoxGuestR0LibBase$(VBOX_SUFF_LIB)
|
---|
2762 | VBOX_LIB_VBGL_R0 = $(VBOX_PATH_ADDITIONS_LIB)/VBoxGuestR0Lib$(VBOX_SUFF_LIB)
|
---|
2763 |
|
---|
2764 |
|
---|
2765 |
|
---|
2766 | #
|
---|
2767 | # Two targets to coordinate version number changes properly. Note that the
|
---|
2768 | # only way to get a really consistent build is to run 'kmk' in the top-level
|
---|
2769 | # directory. If you don't run it there, you get a consistent sub-tree only.
|
---|
2770 | #
|
---|
2771 | VBOX_VERSION_STAMP = $(PATH_OUT)/version-stamp-$(VBOX_VERSION_STRING)
|
---|
2772 | VBOX_VERSION_HEADER = $(PATH_OUT)/version-generated.h
|
---|
2773 | VBOX_VERSION_MK = $(PATH_OUT)/version-generated.mk
|
---|
2774 |
|
---|
2775 | $(VBOX_VERSION_STAMP): | $(PATH_ROOT)/Config.kmk
|
---|
2776 | $(call MSG_GENERATE,,$@)
|
---|
2777 | $(QUIET)$(MKDIR) -p $(@D)
|
---|
2778 | $(QUIET)$(RM) -f $(wildcard $(PATH_OUT)/version-stamp-*)
|
---|
2779 | $(QUIET)$(APPEND) $@ $(VBOX_VERSION_STRING)
|
---|
2780 |
|
---|
2781 | $(VBOX_VERSION_HEADER): $(VBOX_VERSION_STAMP)
|
---|
2782 | $(call MSG_GENERATE,,$@)
|
---|
2783 | $(QUIET)$(MKDIR) -p $(@D)
|
---|
2784 | $(QUIET)$(RM) -f $@ $@.tmp
|
---|
2785 | $(QUIET)$(APPEND) $@.tmp '#ifndef ___version_generated_h___'
|
---|
2786 | $(QUIET)$(APPEND) $@.tmp '#define ___version_generated_h___'
|
---|
2787 | $(QUIET)$(APPEND) $@.tmp ''
|
---|
2788 | $(QUIET)$(APPEND) $@.tmp '#define VBOX_VERSION_MAJOR $(VBOX_VERSION_MAJOR)'
|
---|
2789 | $(QUIET)$(APPEND) $@.tmp '#define VBOX_VERSION_MINOR $(VBOX_VERSION_MINOR)'
|
---|
2790 | $(QUIET)$(APPEND) $@.tmp '#define VBOX_VERSION_BUILD $(VBOX_VERSION_BUILD)'
|
---|
2791 | $(QUIET)$(APPEND) $@.tmp '#define VBOX_VERSION_STRING "$(VBOX_VERSION_STRING)"'
|
---|
2792 | $(QUIET)$(APPEND) $@.tmp ''
|
---|
2793 | $(QUIET)$(APPEND) $@.tmp '#endif'
|
---|
2794 | $(QUIET)$(MV) -f $@.tmp $@
|
---|
2795 |
|
---|
2796 | #
|
---|
2797 | # Used for external makefiles which cannot include Config.kmk
|
---|
2798 | #
|
---|
2799 | $(VBOX_VERSION_MK): $(VBOX_VERSION_STAMP)
|
---|
2800 | $(call MSG_GENERATE,,$@)
|
---|
2801 | $(QUIET)$(RM) -f $@ $@.tmp
|
---|
2802 | $(QUIET)$(MKDIR) -p $(@D)
|
---|
2803 | $(QUIET)$(APPEND) $@.tmp 'VBOX_VERSION_MAJOR = $(VBOX_VERSION_MAJOR)'
|
---|
2804 | $(QUIET)$(APPEND) $@.tmp 'VBOX_VERSION_MINOR = $(VBOX_VERSION_MINOR)'
|
---|
2805 | $(QUIET)$(APPEND) $@.tmp 'VBOX_VERSION_BUILD = $(VBOX_VERSION_BUILD)'
|
---|
2806 | $(QUIET)$(APPEND) $@.tmp 'VBOX_VERSION_STRING = $(VBOX_VERSION_STRING)'
|
---|
2807 | $(QUIET)$(MV) -f $@.tmp $@
|
---|
2808 |
|
---|
2809 | ifndef VBOX_OSE
|
---|
2810 | if1of ($(KBUILD_TARGET),freebsd linux netbsd openbsd solaris)
|
---|
2811 | # VBOX_LICENSE_VER is used in several Makefiles
|
---|
2812 | VBOX_LICENSE_SRC := $(PATH_ROOT)/doc/License.html
|
---|
2813 | VBOX_LICENSE_VER_KMK = $(PATH_OUT)/license-version.kmk
|
---|
2814 | $(VBOX_LICENSE_VER_KMK): $(VBOX_LICENSE_SRC)
|
---|
2815 | $(call MSG_GENERATE,,$(VBOX_LICENSE_VER_KMK))
|
---|
2816 | $(QUIET)$(MKDIR) -p $(@D)
|
---|
2817 | $(QUIET)$(SED) -e "s/.*License version \([0-9.]*\),.*/VBOX_LICENSE_VER=\1/;t;d" --output $@ $(VBOX_LICENSE_SRC)
|
---|
2818 | -include $(VBOX_LICENSE_VER_KMK)
|
---|
2819 | VBOX_LICENSE_BIN = $(PATH_BIN)/License-$(VBOX_LICENSE_VER).html
|
---|
2820 | endif
|
---|
2821 | endif
|
---|
2822 |
|
---|
2823 |
|
---|
2824 | # Force building of the version header file as the first thing anywhere in
|
---|
2825 | # the tree. This eliminates the need for manual dependencies on it.
|
---|
2826 | ## @todo there gotta be a better way of doing this.
|
---|
2827 | Makefile.kmk: | $(VBOX_VERSION_HEADER) $(VBOX_VERSION_MK)
|
---|
2828 | Makefile: | $(VBOX_VERSION_HEADER) $(VBOX_VERSION_MK)
|
---|
2829 | makefile: | $(VBOX_VERSION_HEADER) $(VBOX_VERSION_MK)
|
---|
2830 |
|
---|
2831 |
|
---|
2832 | #
|
---|
2833 | # Subversion tree revision.
|
---|
2834 | #
|
---|
2835 | # The VBOX_SVN_REV contains our best guess. Use svn info on the
|
---|
2836 | # root of the treeto determin this it if .svn/entries is found,
|
---|
2837 | # otherwise fall back on the Config.kmk revision.
|
---|
2838 | #
|
---|
2839 | SVN ?= svn$(HOSTSUFF_EXE)
|
---|
2840 | VBOX_SVN_REV_KMK = $(PATH_OUT)/revision.kmk
|
---|
2841 | ifndef VBOX_SVN_REV
|
---|
2842 | VBOX_SVN_REV_FALLBACK := $(patsubst %:,, $Rev: 9696 $ )
|
---|
2843 | VBOX_SVN_DEP := $(wildcard $(PATH_ROOT)/.svn/entries)
|
---|
2844 | ifeq ($(which $(SVN)),)
|
---|
2845 | VBOX_SVN_DEP :=
|
---|
2846 | endif
|
---|
2847 |
|
---|
2848 | # Rule for generating a timestamp and updating the real thing on change.
|
---|
2849 | $(VBOX_SVN_REV_KMK).ts +| $(VBOX_SVN_REV_KMK): $(if $(VBOX_SVN_DEP), $(VBOX_SVN_DEP), $(PATH_ROOT)/Config.kmk)
|
---|
2850 | $(call MSG_GENERATE,,$(VBOX_SVN_REV_KMK))
|
---|
2851 | $(QUIET)$(RM) -f $@ $@.tmp
|
---|
2852 | $(QUIET)$(MKDIR) -p $(@D)
|
---|
2853 | ifneq ($(VBOX_SVN_DEP),)
|
---|
2854 | $(REDIRECT) -E 'LC_ALL=C' -wo $@.tmp -- $(SVN) info $(PATH_ROOT)
|
---|
2855 | $(SED) -e '/^Revision/!d' -e 's/Revision\: */export VBOX_SVN_REV=/' --output $@ $@.tmp
|
---|
2856 | $(QUIET)$(RM) -f $@.tmp
|
---|
2857 | else
|
---|
2858 | $(QUIET)$(APPEND) $@ 'export VBOX_SVN_REV=$(VBOX_SVN_REV_FALLBACK)'
|
---|
2859 | endif
|
---|
2860 | $(QUIET)$(CP) --changed -fv $@ $(VBOX_SVN_REV_KMK)
|
---|
2861 |
|
---|
2862 | include $(VBOX_SVN_REV_KMK)
|
---|
2863 | else
|
---|
2864 | # allow to overwrite VBOX_SVN_REV externally (mainly for building .debs/.rpms)
|
---|
2865 | $(VBOX_SVN_REV_KMK):
|
---|
2866 | $(call MSG_GENERATE,,$(VBOX_SVN_REV_KMK))
|
---|
2867 | $(QUIET)$(RM) -f $@
|
---|
2868 | $(QUIET)$(MKDIR) -p $(@D)
|
---|
2869 | $(QUIET)$(APPEND) $@ 'export VBOX_SVN_REV=$(VBOX_SVN_REV)'
|
---|
2870 | $(QUIET)echo '* $(VBOX_SVN_REV_KMK) was externally overwritten:'
|
---|
2871 | $(QUIET)$(CAT) $(VBOX_SVN_REV_KMK)
|
---|
2872 | endif
|
---|
2873 |
|
---|
2874 |
|
---|
2875 | #
|
---|
2876 | # Legacy.
|
---|
2877 | #
|
---|
2878 | ifneq ($(LOCALCFG),)
|
---|
2879 | include $(LOCALCFG)
|
---|
2880 | endif
|
---|
2881 |
|
---|
2882 |
|
---|
2883 | #
|
---|
2884 | # Some extra goals.
|
---|
2885 | #
|
---|
2886 | .PHONY: up update st stat status
|
---|
2887 | up update::
|
---|
2888 | $(SVN) up
|
---|
2889 |
|
---|
2890 | up2 update2::
|
---|
2891 | $(SVN) up --ignore-externals
|
---|
2892 |
|
---|
2893 | st stat status:
|
---|
2894 | $(SVN) status
|
---|
2895 |
|
---|
2896 | quick:
|
---|
2897 | $(MAKE) VBOX_QUICK=1
|
---|
2898 |
|
---|