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