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