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