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