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