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