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