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