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