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