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