VirtualBox

source: vbox/trunk/Makefile.kmk@ 11632

Last change on this file since 11632 was 11560, checked in by vboxsync, 16 years ago

vslick.h: use $(APPEND), some small adjustments.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 24.8 KB
Line 
1# $Id: Makefile.kmk 11560 2008-08-21 22:34:10Z vboxsync $
2## @file
3# Top level makefile.
4#
5
6#
7# Copyright (C) 2006-2007 Sun Microsystems, Inc.
8#
9# This file is part of VirtualBox Open Source Edition (OSE), as
10# available from http://www.virtualbox.org. This file is free software;
11# you can redistribute it and/or modify it under the terms of the GNU
12# General Public License (GPL) as published by the Free Software
13# Foundation, in version 2 as it comes in the "COPYING" file of the
14# VirtualBox OSE distribution. VirtualBox OSE is distributed in the
15# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
16#
17# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
18# Clara, CA 95054 USA or visit http://www.sun.com if you need
19# additional information or have any questions.
20#
21
22SUB_DEPTH = .
23include $(KBUILD_PATH)/subheader.kmk
24
25ifdef VBOX_WITH_DOCS
26 ifndef VBOX_ONLY_ADDITIONS
27 ifdef VBOX_SINGLE_MAKEFILE
28 include $(PATH_SUB_CURRENT)/doc/manual/Makefile.kmk
29 else
30 SUBDIRS = doc/manual
31 endif
32 endif
33endif
34ifdef VBOX_SINGLE_MAKEFILE
35 include $(PATH_SUB_CURRENT)/src/Makefile.kmk
36else
37 SUBDIRS += src
38endif
39
40ifndef VBOX_ONLY_ADDITIONS
41#
42# Install external binaries (mostly redistributable parts of tools we use).
43# This must be done *before* we build the manual.
44#
45# To avoid dragging in unnecessary tools and sdks here, we don't use the .win
46# and .linux property suffixes.
47#
48INSTALLS += bin
49
50bin_INST = $(INST_BIN)
51
52# The SDL DLLs
53if1of ($(KBUILD_TARGET), win os2)
54 ifneq ($(VBOX_WITH_VBOXSDL)$(VBOX_WITH_VBOXBFE),)
55 include $(KBUILD_PATH)/sdks/LIBSDL.kmk
56 bin_SOURCES += \
57 $(DLL_SDK_LIBSDL_SDL)
58 ifdef VBOX_WITH_SECURELABEL
59 bin_SOURCES += \
60 $(DLL_SDK_LIBSDL_SDLTTF)
61 endif
62 ifeq ($(KBUILD_TARGET),os2)
63 bin_SOURCES += \
64 $(DLL_SDK_LIBSDL_FSLIB)
65 endif
66 endif
67endif
68
69
70# The Qt DLLs.
71ifneq ($(VBOX_WITH_QTGUI),)
72 if1of ($(KBUILD_TARGET), win os2)
73 #include $(KBUILD_PATH)/sdks/QT3.kmk
74 #bin_SOURCES += \
75 # $(DLL_SDK_QT3_QT)
76 ifneq ($(strip $(VBOX_DLL_QT)),)
77 bin_SOURCES += \
78 $(VBOX_DLL_QT)=>$(not-dir $(VBOX_DLL_QT))
79 endif
80 ifdef VBOX_QT_BINARIES
81 bin_SOURCES += $(VBOX_QT_BINARIES)
82 endif
83 else ifeq ($(VBOX_MUST_INSTALL_LIB_QT),1)
84 bin_SOURCES += \
85 $(LIB_QT)
86 endif
87endif
88
89
90# The compiler runtime DLLs.
91ifeq ($(KBUILD_TARGET).$(VBOX_WITHOUT_COMPILER_REDIST),win.)
92 ifdef VBOX_USE_VCC80
93 include $(KBUILD_PATH)/tools/VCC80X86.kmk
94 include $(KBUILD_PATH)/tools/VCC80AMD64.kmk
95 bin_SOURCES.x86 += \
96 $(PATH_TOOL_VCC80X86)/redist/x86/Microsoft.VC80.CRT/Microsoft.VC80.CRT.manifest=>Microsoft.VC80.CRT/Microsoft.VC80.CRT.manifest \
97 $(PATH_TOOL_VCC80X86)/redist/x86/Microsoft.VC80.CRT/msvcr80.dll=>Microsoft.VC80.CRT/msvcr80.dll \
98 $(PATH_TOOL_VCC80X86)/redist/x86/Microsoft.VC80.CRT/msvcp80.dll=>Microsoft.VC80.CRT/msvcp80.dll \
99 $(PATH_TOOL_VCC80X86)/redist/x86/Microsoft.VC80.CRT/Microsoft.VC80.CRT.manifest=>testcase/Microsoft.VC80.CRT/Microsoft.VC80.CRT.manifest \
100 $(PATH_TOOL_VCC80X86)/redist/x86/Microsoft.VC80.CRT/msvcr80.dll=>testcase/Microsoft.VC80.CRT/msvcr80.dll \
101 $(PATH_TOOL_VCC80X86)/redist/x86/Microsoft.VC80.CRT/msvcp80.dll=>testcase/Microsoft.VC80.CRT/msvcp80.dll
102 bin_SOURCES.amd64 += \
103 $(PATH_TOOL_VCC80AMD64)/redist/amd64/Microsoft.VC80.CRT/Microsoft.VC80.CRT.manifest=>Microsoft.VC80.CRT/Microsoft.VC80.CRT.manifest \
104 $(PATH_TOOL_VCC80AMD64)/redist/amd64/Microsoft.VC80.CRT/msvcr80.dll=>Microsoft.VC80.CRT/msvcr80.dll \
105 $(PATH_TOOL_VCC80AMD64)/redist/amd64/Microsoft.VC80.CRT/msvcp80.dll=>Microsoft.VC80.CRT/msvcp80.dll \
106 $(PATH_TOOL_VCC80AMD64)/redist/amd64/Microsoft.VC80.CRT/Microsoft.VC80.CRT.manifest=>testcase/Microsoft.VC80.CRT/Microsoft.VC80.CRT.manifest \
107 $(PATH_TOOL_VCC80AMD64)/redist/amd64/Microsoft.VC80.CRT/msvcr80.dll=>testcase/Microsoft.VC80.CRT/msvcr80.dll \
108 $(PATH_TOOL_VCC80AMD64)/redist/amd64/Microsoft.VC80.CRT/msvcp80.dll=>testcase/Microsoft.VC80.CRT/msvcp80.dll
109 endif
110 ifndef VBOX_USE_VCC80
111 VBOX_INSTALL_VCC70_RT = 1
112 endif
113 ifeq ($(KBUILD_TARGET).$(KBUILD_TARGET_ARCH),win.x86)
114 VBOX_INSTALL_VCC70_RT = 1
115 endif
116 ifdef VBOX_INSTALL_VCC70_RT
117 include $(KBUILD_PATH)/tools/VCC70.kmk
118 ## @todo Move these defines to VCC70.
119 DLL_TOOL_VCC70_MSVCR71 ?= $(PATH_TOOL_VCC70)/bin/msvcr71.dll
120 ifneq ($(wildcard $(DLL_TOOL_VCC70_MSVCR71)),)
121 bin_SOURCES += \
122 $(DLL_TOOL_VCC70_MSVCR71)=>msvcr71.dll \
123 $(DLL_TOOL_VCC70_MSVCR71)=>testcase/msvcr71.dll
124 endif
125 DLL_TOOL_VCC70_MSVCP71 ?= $(PATH_TOOL_VCC70)/bin/msvcp71.dll
126 ifneq ($(wildcard $(DLL_TOOL_VCC70_MSVCP71)),)
127 bin_SOURCES += \
128 $(DLL_TOOL_VCC70_MSVCP71)=>msvcp71.dll \
129 $(DLL_TOOL_VCC70_MSVCP71)=>testcase/msvcp71.dll
130 endif
131 DLL_TOOL_VCC70_MSVCRT ?= $(PATH_TOOL_VCC70)/bin/msvcrt.dll
132 ifneq ($(wildcard $(DLL_TOOL_VCC70_MSVCRT)),)
133 bin_SOURCES += \
134 $(DLL_TOOL_VCC70_MSVCRT)=>msvcrt.dll \
135 $(DLL_TOOL_VCC70_MSVCRT)=>testcase/msvcrt.dll
136 endif
137 endif
138endif
139
140
141#
142# Install additions iso from the build server.
143# The $(CP)/$(RM) stuff can be replaced by a simple $(TOUCH) once that has
144# been added to kBuild.
145#
146## @todo need kmk_builtin_touch!
147ifdef VBOX_WITH_ADDITIONS_FROM_BUILD_SERVER
148INSTALLS += buildserver-additions
149buildserver-additions_INST = $(INST_ADDITIONS)
150buildserver-additions_MODE = 0644
151buildserver-additions_SOURCES = $(PATH_TARGET)/VBoxGuestAdditions.iso
152buildserver-additions_CLEANS = $(PATH_TARGET)/VBoxGuestAdditions.iso $(PATH_TARGET)/VBoxGuestAdditions.iso.tmp
153
154$(PATH_TARGET)/VBoxGuestAdditions.iso: $(VBOX_SVN_REV_KMK) $(PATH_DEVTOOLS)/bin/additions.sh | $(call DIRDEP, $(PATH_TARGET))
155 $(RM) -f $(PATH_TARGET)/VBoxGuestAdditions.iso $(PATH_TARGET)/VBoxGuestAdditions.iso.tmp
156# $(PATH_DEVTOOLS)/bin/additions.sh --cmd fetch --filename $(PATH_TARGET)/VBoxGuestAdditions.iso.tmp
157 $(KMK) --affinity 1 -f $(MAKEFILE) buildserver-additions-affinity-hack
158 $(CP) -f $(PATH_TARGET)/VBoxGuestAdditions.iso.tmp $(PATH_TARGET)/VBoxGuestAdditions.iso
159 $(RM) -f $(PATH_TARGET)/VBoxGuestAdditions.iso.tmp
160
161buildserver-additions-affinity-hack:
162 $(SHELL) $(PATH_DEVTOOLS)/bin/additions.sh --cmd fetch --filename $(PATH_TARGET)/VBoxGuestAdditions.iso.tmp
163endif
164
165
166#
167# Install staged binaries on platforms where we can't cross
168# compile things.
169#
170ifn1of ($(KBUILD_TARGET), l4 linux win)
171 VBOX_PATH_STAGED ?= .
172
173 # Additions.
174 ifndef VBOX_WITH_LINUX_ADDITIONS
175 ifndef VBOX_WITH_WIN32_ADDITIONS
176 ifneq ($(wildcard $(VBOX_PATH_STAGED)/VBoxGuestAdditions.iso),)
177 INSTALLS += staged-additions
178 staged-additions_INST = $(INST_ADDITIONS)
179 staged-additions_MODE = 0644
180 staged-additions_SOURCES = $(VBOX_PATH_STAGED)/VBoxGuestAdditions.iso
181 endif
182 endif
183 endif
184
185 # guesttool.exe
186 ifndef VBOX_WITH_WIN32_ADDITIONS
187 ifneq ($(wildcard $(VBOX_PATH_STAGED)/guesttool.exe),)
188 INSTALLS += staged-guesttool
189 staged-guesttool_INST = $(INST_BIN)
190 staged-guesttool_SOURCES = $(VBOX_PATH_STAGED)/guesttool.exe
191 endif
192 endif
193
194endif
195
196endif # !VBOX_ONLY_ADDITIONS
197
198
199include $(KBUILD_PATH)/subfooter.kmk
200
201
202#
203# Generate documentation.
204# (This should be converted into a separate pass or merged with an existing one later.)
205#
206docs: $(if $(VBOX_WITH_ALL_DOXYGEN_TARGETS),docs.Core)
207 $(KMK) -C src/VBox/Main docs
208ifdef VBOX_WITH_ALL_DOXYGEN_TARGETS
209 $(KMK) -C src/VBox/Runtime docs
210endif
211
212docs.Core: $(PATH_TARGET)/docs.Core
213
214
215
216#
217# The core (VMM+REM+Devices+Main) documentation.
218#
219# This includes so much because we wish to have the complete CFGM
220# and GCFGM lists.
221#
222OTHER_CLEAN += \
223 $(PATH_TARGET)/Doxyfile.Core \
224 $(PATH_TARGET)/Doxyfile.Core.dep
225
226VBOX_CORE_DOXYFILE_INPUT_DIRS = \
227 include/iprt \
228 include/VBox \
229 include/VBox/com \
230 include/VBox/HostServices \
231 src/VBox/VMM \
232 src/VBox/VMM/VMMR0 \
233 src/VBox/VMM/VMMGC \
234 src/VBox/VMM/VMMAll \
235 src/VBox/VMM/PATM \
236 src/VBox/VMM/PATM/VMMR0 \
237 src/VBox/VMM/PATM/VMMGC \
238 src/VBox/VMM/PATM/VMMAll \
239 src/VBox/VMM/VMMSwitcher \
240 src/VBox/Debugger \
241 src/VBox/Devices \
242 src/VBox/Devices/Audio \
243 src/VBox/Devices/Bus \
244 src/VBox/Devices/Graphics \
245 src/VBox/Devices/Graphics/BIOS \
246 src/VBox/Devices/Input \
247 src/VBox/Devices/Networking \
248 src/VBox/Devices/PC \
249 src/VBox/Devices/PC/BIOS \
250 src/VBox/Devices/Parallel \
251 src/VBox/Devices/Serial \
252 src/VBox/Devices/Storage \
253 src/VBox/Devices/VBoxHDDFormats \
254 src/VBox/Devices/VBoxHDDFormats/StorageCraft \
255 src/VBox/Devices/USB \
256 src/VBox/Devices/USB/darwin \
257 src/VBox/Devices/USB/linux \
258 src/VBox/Devices/USB/os2 \
259 src/VBox/Devices/USB/solaris \
260 src/VBox/Devices/USB/vrdp \
261 src/VBox/Devices/USB/win32 \
262 src/VBox/Devices/VMMDev \
263 src/VBox/Main/include \
264 src/VBox/Main/include/hgcm \
265 src/VBox/Main \
266 src/VBox/Main/glue \
267 src/VBox/Main/hgcm \
268 src/VBox/Main/webservice \
269 src/VBox/Main/xml \
270 src/VBox/Main/darwin \
271 src/VBox/Main/linux \
272 src/VBox/Main/os2 \
273 src/VBox/Main/solaris \
274 src/VBox/Main/win \
275 src/VBox/Main/xpcom \
276 src/VBox/HostServices \
277 src/VBox/HostServices/SharedClipboard \
278 src/VBox/HostServices/SharedFolders \
279 src/VBox/HostServices/SharedInfoServices \
280 src/VBox/HostServices/SharedOpenGL \
281 src/VBox/HostDrivers/Support \
282 src/VBox/HostDrivers/Support/darwin \
283 src/VBox/HostDrivers/Support/freebsd \
284 src/VBox/HostDrivers/Support/l4 \
285 src/VBox/HostDrivers/Support/linux \
286 src/VBox/HostDrivers/Support/os2 \
287 src/VBox/HostDrivers/Support/solaris \
288 src/VBox/HostDrivers/Support/win \
289 src/VBox/HostDrivers/VBoxNetFlt \
290 src/VBox/HostDrivers/VBoxNetFlt/darwin \
291 src/VBox/HostDrivers/VBoxNetFlt/linux \
292 src/VBox/HostDrivers/VBoxNetFlt/solaris \
293 src/VBox/HostDrivers/VBoxNetFlt/win \
294 src/VBox/HostDrivers/VBoxNetNat \
295 src/VBox/HostDrivers/VBoxNetNat/darwin \
296 src/VBox/HostDrivers/VBoxNetNat/linux \
297 src/VBox/HostDrivers/VBoxNetNat/solaris \
298 src/VBox/HostDrivers/VBoxNetNat/win \
299 src/VBox/HostDrivers/VBoxNetTap \
300 src/VBox/HostDrivers/VBoxNetTap/darwin \
301 src/VBox/HostDrivers/VBoxNetTap/linux \
302 src/VBox/HostDrivers/VBoxNetTap/solaris \
303 src/VBox/HostDrivers/VBoxNetTap/win \
304 src/VBox/HostDrivers/VBoxTAP \
305 src/VBox/HostDrivers/VBoxTAP/win \
306 src/VBox/HostDrivers/VBoxUSB \
307 src/VBox/HostDrivers/VBoxUSB/darwin \
308 src/VBox/HostDrivers/VBoxUSB/os2 \
309 src/VBox/HostDrivers/VBoxUSB/solaris \
310 src/VBox/HostDrivers/VBoxUSB/win \
311 src/VBox/HostDrivers/VBoxUSB/win/Device \
312 src/VBox/HostDrivers/VBoxUSB/win/Device/amd64 \
313 src/VBox/HostDrivers/VBoxUSB/win/Device/x86 \
314 src/VBox/HostDrivers/VBoxUSB/win/Filter \
315 src/VBox/HostDrivers/VBoxUSB/win/Install \
316 src/VBox/HostDrivers/VBoxUSB/win/Monitor \
317 src/VBox/HostDrivers/VBoxUSB/win/Monitor/win32 \
318 src/VBox/HostDrivers/VBoxUSB/win/Monitor/win64 \
319 src/VBox/HostDrivers/VBoxUSB/win/usbd \
320
321# These must come first in order to make things look nice.
322VBOX_CORE_DOXYFILE_INPUT_FIRST =\
323 $(PATH_ROOT)/doc/VBox-doc.c \
324 $(PATH_ROOT)/doc/VBox-CodingGuidelines.cpp \
325 $(PATH_ROOT)/src/VBox/VMM/VMMCodingGuidelines.cpp \
326 $(PATH_ROOT)/src/VBox/VMM/VMMDocsRawMode.cpp \
327 $(PATH_ROOT)/include/VBox/cdefs.h \
328 $(PATH_ROOT)/include/VBox/vmapi.h \
329 $(PATH_ROOT)/include/VBox/vmm.h \
330 $(PATH_ROOT)/include/VBox/cpum.h \
331 $(PATH_ROOT)/include/VBox/mm.h \
332 $(PATH_ROOT)/include/VBox/pgm.h \
333 $(PATH_ROOT)/include/VBox/selm.h \
334 $(PATH_ROOT)/include/VBox/trpm.h \
335 $(PATH_ROOT)/include/VBox/patm.h \
336 $(PATH_ROOT)/include/VBox/dbgf.h \
337 $(PATH_ROOT)/include/VBox/stam.h \
338 $(PATH_ROOT)/include/VBox/em.h \
339 $(PATH_ROOT)/include/VBox/pdm.h \
340 $(PATH_ROOT)/include/VBox/rem.h \
341 $(PATH_ROOT)/include/VBox/iom.h \
342 $(PATH_ROOT)/include/VBox/cfgm.h \
343 $(PATH_ROOT)/include/VBox/tm.h \
344 $(PATH_ROOT)/include/VBox/csam.h \
345 $(PATH_ROOT)/include/VBox/ssm.h \
346 $(PATH_ROOT)/include/VBox/hwaccm.h \
347 $(PATH_ROOT)/include/VBox/hwacc_svm.h \
348 $(PATH_ROOT)/include/VBox/hwacc_vmx.h \
349 \
350 $(PATH_ROOT)/src/VBox/VMM/CFGMInternal.h \
351 $(PATH_ROOT)/src/VBox/VMM/CPUMInternal.h \
352 $(PATH_ROOT)/src/VBox/VMM/DBGFInternal.h \
353 $(PATH_ROOT)/src/VBox/VMM/EMInternal.h \
354 $(PATH_ROOT)/src/VBox/VMM/HWACCMInternal.h \
355 $(PATH_ROOT)/src/VBox/VMM/IOMInternal.h \
356 $(PATH_ROOT)/src/VBox/VMM/MMInternal.h \
357 $(PATH_ROOT)/src/VBox/VMM/PDMInternal.h \
358 $(PATH_ROOT)/src/VBox/VMM/PGMInternal.h \
359 $(PATH_ROOT)/src/VBox/VMM/PATM/CSAMInternal.h \
360 $(PATH_ROOT)/src/VBox/VMM/PATM/PATMInternal.h \
361 $(PATH_ROOT)/src/VBox/VMM/REMInternal.h \
362 $(PATH_ROOT)/src/VBox/VMM/SELMInternal.h \
363 $(PATH_ROOT)/src/VBox/VMM/SSMInternal.h \
364 $(PATH_ROOT)/src/VBox/VMM/STAMInternal.h \
365 $(PATH_ROOT)/src/VBox/VMM/TMInternal.h \
366 $(PATH_ROOT)/src/VBox/VMM/TRPMInternal.h \
367 $(PATH_ROOT)/src/VBox/VMM/VMInternal.h \
368 $(PATH_ROOT)/src/VBox/VMM/VMMInternal.h \
369 \
370 $(PATH_ROOT)/include/VBox/vm.h \
371 \
372 $(PATH_ROOT)/include/VBox/sup.h \
373 $(PATH_ROOT)/include/VBox/VBoxHDD.h \
374 $(PATH_ROOT)/include/VBox/types.h \
375 $(PATH_ROOT)/include/VBox/err.h \
376 $(PATH_ROOT)/include/VBox/x86.h \
377 $(PATH_ROOT)/include/VBox/cpumdis.h \
378 $(PATH_ROOT)/include/VBox/dbggui.h \
379 $(PATH_ROOT)/include/VBox/dis.h \
380 $(PATH_ROOT)/include/VBox/disopcode.h \
381 $(PATH_ROOT)/include/VBox/intnet.h \
382 $(PATH_ROOT)/include/VBox/settings.h \
383 $(PATH_ROOT)/include/VBox/pci.h \
384 $(PATH_ROOT)/include/VBox/scsi.h \
385 $(PATH_ROOT)/include/VBox/shflsvc.h \
386 $(PATH_ROOT)/include/VBox/hgcmsvc.h \
387 $(PATH_ROOT)/include/VBox/usb.h \
388 $(PATH_ROOT)/include/VBox/vusb.h \
389 \
390 $(PATH_ROOT)/include/VBox/log.h \
391 $(PATH_ROOT)/include/VBox/param.h \
392 $(PATH_ROOT)/include/VBox/version.h
393
394VBOX_CORE_DOXYFILE_INPUT := \
395 $(filter-out %.cpp.h, $(sort $(wildcard $(addsuffix /*.h, $(VBOX_CORE_DOXYFILE_INPUT_DIRS)))) ) \
396 $(foreach dir, $(VBOX_CORE_DOXYFILE_INPUT_DIRS), $(wildcard $(dir)/*.cpp $(dir)/*.c $(dir)/.asm))
397VBOX_CORE_DOXYFILE_INPUT := \
398 $(VBOX_CORE_DOXYFILE_INPUT_FIRST) \
399 $(filter-out $(VBOX_CORE_DOXYFILE_INPUT_FIRST), $(VBOX_CORE_DOXYFILE_INPUT))
400
401# And some some additional stuff.
402VBOX_CORE_DOXYFILE_INPUT += \
403 $(PATH_ROOT)/src/recompiler/VBoxRecompiler.c \
404 $(PATH_ROOT)/src/recompiler/VBoxREMWrapper.cpp
405
406
407VBOX_CORE_DOXYFILE_OUTPUT = $(PATH_OUT)/docs/Core
408
409-include $(PATH_TARGET)/Doxyfile.Core.dep
410
411# Generate the Doxyfile
412$(PATH_TARGET)/Doxyfile.Core: Doxyfile.Core \
413 $(comp-vars VBOX_CORE_DOXYFILE_INPUT,DOXYGEN_INPUT_PREV,FORCE) \
414 $(comp-vars VBOX_CORE_DOXYFILE_OUTPUT,DOXYGEN_OUTPUT_PREV,FORCE) \
415 | $(call DIRDEP, $(PATH_TARGET))
416 $(RM) -f $@ [email protected] $(PATH_TARGET)/Doxyfile.Core.dep
417 $(CP) -f Doxyfile.Core [email protected]
418 $(APPEND) [email protected]
419 $(APPEND) [email protected] "OUTPUT_DIRECTORY = $(VBOX_CORE_DOXYFILE_OUTPUT)"
420 $(APPEND) [email protected] "WARN_LOGFILE = $(VBOX_CORE_DOXYFILE_OUTPUT)/errors"
421 $(APPEND) [email protected] "INCLUDE_PATH = $(PATH_ROOT)/include $(PATH_ROOT)/src/VBox/VMM $(PATH_ROOT)/src/VBox/Main/include "
422 $(APPEND) [email protected] "INCLUDE_FILE_PATTERNS = *.cpp.h"
423 $(APPEND) [email protected]
424 $(APPEND) [email protected] "INPUT = $(VBOX_CORE_DOXYFILE_INPUT)"
425 $(APPEND) [email protected]
426 $(APPEND) [email protected] "PREDEFINED += $(DEFS) $(DEFS.$(KBUILD_TARGET)) $(DEFS.$(KBUILD_TARGET_ARCH)) $(ARCH_BITS_DEFS)"
427 $(APPEND) [email protected] "PREDEFINED += ARCH_BITS=HC_ARCH_BITS R3_ARCH_BITS=HC_ARCH_BITS R0_ARCH_BITS=HC_ARCH_BITS "
428 $(APPEND) [email protected]
429 $(MV) -f [email protected] $@
430 @$(APPEND) $(PATH_TARGET)/Doxyfile.Core.dep "DOXYGEN_OUTPUT_PREV = $(VBOX_CORE_DOXYFILE_OUTPUT)"
431 @$(APPEND) $(PATH_TARGET)/Doxyfile.Core.dep "DOXYGEN_INPUT_PREV = $(VBOX_CORE_DOXYFILE_INPUT)"
432
433# Create the output directory.
434$(call DIRDEP, $(VBOX_CORE_DOXYFILE_OUTPUT)):
435 $(MKDIR) -p $@
436
437# Do the actual job.
438$(PATH_TARGET)/docs.Core: $(PATH_TARGET)/Doxyfile.Core $(VBOX_CORE_DOXYFILE_INPUT) | $(call DIRDEP, $(VBOX_CORE_DOXYFILE_OUTPUT))
439 $(RM) -f $(PATH_TARGET)/docs.Core
440 $(RM) -Rf $(VBOX_CORE_DOXYFILE_OUTPUT)/html/
441 doxygen $(PATH_TARGET)/Doxyfile.Core
442 $(APPEND) $(PATH_TARGET)/docs.Core
443
444
445#
446# Generate x86.mac and err.mac.
447#
448incs:
449 $(SED) -f include/VBox/err.sed --output include/VBox/err.mac include/VBox/err.h
450 $(APPEND) include/VBox/err.mac '%include "iprt/err.mac"'
451 $(SED) -f include/VBox/err.sed --output include/iprt/err.mac include/iprt/err.h
452 $(SED) \
453 -e '/__VBox_x86_h__/d' \
454 -e '/#define/!d' \
455 -e '/\\$$/d' \
456 -e 's/#define/%define/' \
457 --output include/VBox/x86.mac \
458 include/VBox/x86.h
459
460
461#
462# Generate Visual SlickEdit tagging #defines.
463#
464vslick.h: include/VBox/cdefs.h include/iprt/cdefs.h $(MAKEFILE)
465 $(RM) -f -- $@ [email protected] [email protected] [email protected]
466 $(APPEND) [email protected] '// autogenerated'
467 #@$(APPEND) [email protected] '#define __BEGIN_DECLS '
468 #@$(APPEND) [email protected] '#define __END_DECLS '
469
470 @$(APPEND) [email protected] '#define ATL_NO_VTABLE '
471 @$(APPEND) [email protected] '#define BEGIN_COM_MAP(a) '
472 @$(APPEND) [email protected] '#define END_COM_MAP(a) '
473
474 @$(APPEND) [email protected] '#define CHECKREADY if(!isReady()) return E_UNEXPECTED; '
475 @$(APPEND) [email protected] '#define COM_DECL_READONLY_ENUM_AND_COLLECTION(a) '
476 @$(APPEND) [email protected] '#define COM_INTERFACE_ENTRY(a) '
477 @$(APPEND) [email protected] '#define COMGETTER(n) Get##n '
478 @$(APPEND) [email protected] '#define COMSETTER(n) Set##n '
479 @$(APPEND) [email protected] '#define ComSafeArrayIn(t,a) t a[] '
480 @$(APPEND) [email protected] '#define ComSafeArrayOut(t,a) t * a[] '
481 @$(APPEND) [email protected] '#define DECLARE_NOT_AGGREGATABLE(a) '
482 @$(APPEND) [email protected] '#define DECLARE_PROTECT_FINAL_CONSTRUCT(a) '
483 @$(APPEND) [email protected] '#define NS_DECL_ISUPPORTS '
484 @$(APPEND) [email protected] '#define NS_IMETHOD NS_IMETHOD_(nsresult) '
485 @$(APPEND) [email protected] '#define NS_IMETHOD_(type) type '
486 @$(APPEND) [email protected] '#define PARSERS_EXPORT '
487 @$(APPEND) [email protected] '#define STDMETHOD(a) NS_IMETHOD a '
488
489 @$(APPEND) [email protected] '#define CTX_SUFF(var) var##R3 '
490 @$(APPEND) [email protected] '#define CTXAllSUFF(var) var##R3 '
491 @$(APPEND) [email protected] '#define CTXSUFF(var) var##HC '
492 @$(APPEND) [email protected] '#define OTHERCTXSUFF(var) var##GC '
493 @$(APPEND) [email protected] '#define CTXALLMID(first, last) first##R3##last '
494 @$(APPEND) [email protected] '#define CTXMID(first, last) first##HC##last '
495 @$(APPEND) [email protected] '#define OTHERCTXMID(first, last) first##GC##last '
496 @$(APPEND) [email protected] '#define CTXTYPE(GCType, R3Type, R0Type) R3Type '
497 @$(APPEND) [email protected] '#define RCTYPE(RCType, HCType) RCType '
498 @$(APPEND) [email protected] '#define GCTYPE(GCType, HCType) GCType '
499 @$(APPEND) [email protected] '#define RCPTRTYPE(RCType) RCType '
500 @$(APPEND) [email protected] '#define GCPTRTYPE(GCType) GCType '
501 @$(APPEND) [email protected] '#define HCPTRTYPE(HCType) HCType '
502 @$(APPEND) [email protected] '#define R3R0PTRTYPE(HCType) HCType '
503 @$(APPEND) [email protected] '#define R0PTRTYPE(R3Type) R3Type '
504 @$(APPEND) [email protected] '#define R3PTRTYPE(R0Type) R0Type '
505 @$(APPEND) [email protected] '#define RT_SRC_POS __FILE__, __LINE__, __PRETTY_FUNCTION__ '
506 @$(APPEND) [email protected] '#define RT_SRC_POS_DECL const char *pszFile, unsigned iLine, const char *pszFunction '
507 @$(APPEND) [email protected] '#define RT_SRC_POS_ARGS pszFile, iLine, pszFunction '
508 @$(APPEND) [email protected] '#define RTCALL'
509 @$(APPEND) [email protected] '#define DECLINLINE(type) inline type '
510
511 @$(APPEND) [email protected] '#define PDMDEVINSINT_DECLARED 1'
512 @$(APPEND) [email protected] '#define VBOXCALL'
513
514 $(SED) -e '/__cdecl/d' \
515 -e '/^ *# *define.*DECL/!d' \
516 -e '/DECLS/d' \
517 -e '/DECLARE_CLS_/d' \
518 -e '/_SRC_POS_DECL/d' \
519 -e '/declspec/d' \
520 -e '/__attribute__/d' \
521 -e 's/# */#/g' \
522 -e 's/ */ /g' \
523 -e '/(type) DECLEXPORT/d' \
524 -e '/ DECLEXPORT_CLASS/d' \
525 -e 's/ *VBOXCALL//' \
526 -e 's/ *RTCALL//' \
527 -e 's/(type) DECLIMPORT(type)/(type) type/' \
528 -e '/ DECLASM(type) type/d' \
529 -e '/define *DECL..CALLBACKMEMBER(type[^)]*) *RT/d' \
530 -e '/define *DECLINLINE(type)/d' \
531 -e '/define RT[DATGRC03]*DECL(type) *DECLHIDDEN(type)/d' \
532 \
533 --append [email protected] \
534 $(filter-out include/VBox/err.h, $(wildcard include/VBox/*.h)) \
535 include/iprt/cdefs.h
536 $(CAT_EXT) [email protected] | sort | $(SED_EXT) -e 's/$$/\n/' --output [email protected]
537 $(MV) -f [email protected] $@
538 $(RM) -f [email protected] [email protected] [email protected]
539ifeq ($(KBUILD_HOST),win)
540 @$(ECHO) 'TODO: Merge vslick.h with your "$(HOMEDRIVE)$(HOMEPATH)\Documents\My SlickEdit Config\x.y.z\usercpp.h" file.'
541else
542 @$(ECHO) "TODO: Merge ./vslick.h with your ~/.slickedit/x.y.z/unxcpp.h file."
543endif
544
545
546#
547# Add fetching of the tools to the 'up[date][2]' targets.
548#
549up update up2 update2::
550ifndef VBOX_OSE
551 $(MAKE) -C tools fetch
552else
553 $(MAKE) -C tools -f Makefile-ose.kmk fetch
554endif
555
556
557#
558# Build the additions, all of them.
559#
560# This is currently tailored (hardcoded) for the additions
561# build box. Can make it pretty and configurable later.
562#
563# The fetching must be done in serial fashion, while the building
564# should be more flexible wrt to -jN.
565#
566additions-fetch:
567 + $(KMK) -C tools fetch
568 + $(KMK) -C tools fetch KBUILD_TARGET_ARCH=x86 KBUILD_TARGET=linux BUILD_TARGET_ARCH=x86 BUILD_TARGET=linux
569# + $(KMK) -C tools fetch KBUILD_TARGET_ARCH=x86 KBUILD_TARGET=os2 BUILD_TARGET_ARCH=x86 BUILD_TARGET=os2
570 + $(KMK) -C tools fetch KBUILD_TARGET_ARCH=x86 KBUILD_TARGET=solaris BUILD_TARGET_ARCH=x86 BUILD_TARGET=solaris
571 + $(KMK) -C tools fetch KBUILD_TARGET_ARCH=x86 KBUILD_TARGET=win BUILD_TARGET_ARCH=x86 BUILD_TARGET=win
572
573
574additions-build: \
575 additions-build-win.x86 \
576 additions-build-solaris.x86 \
577 additions-build-os2.x86 \
578 additions-build-linux.x86
579
580VBOX_ADDITIONS_BUILD.amd64 = VBOX_ONLY_ADDITIONS=1 VBOX_WITHOUT_ADDITIONS_ISO=1 \
581 KBUILD_TYPE=$(KBUILD_TYPE) BUILD_TYPE=$(KBUILD_TYPE) \
582 KBUILD_TARGET_ARCH=amd64 BUILD_TARGET_ARCH=amd64 \
583 VBOX_SVN_REV=$(VBOX_SVN_REV) \
584 all packing
585
586VBOX_ADDITIONS_BUILD.x86 = VBOX_ONLY_ADDITIONS=1 VBOX_WITHOUT_ADDITIONS_ISO=1 \
587 KBUILD_TYPE=$(KBUILD_TYPE) BUILD_TYPE=$(KBUILD_TYPE) \
588 KBUILD_TARGET_ARCH=x86 BUILD_TARGET_ARCH=x86 \
589 VBOX_SVN_REV=$(VBOX_SVN_REV) \
590 all packing
591
592additions-build-win.amd64:
593ifeq ($(KBUILD_TARGET),win)
594 + $(KMK) $(VBOX_ADDITIONS_BUILD.amd64)
595else
596 false
597 rsync -av --delete --delete-excluded --exclude .svn/ --exclude out/ --exclude tinderclient.log . 192.168.27.5:/cygdrive/c/vbox
598 ssh [email protected] " cd /cygdrive/c/vbox && PATH_OUT_BASE=Z:/add/out tools/env.sh kmk $(VBOX_ADDITIONS_BUILD.amd64)"
599# ssh [email protected] "cmd.exe /c cd /d z:\\add && set PATH_DEVTOOLS=c:\\vbox\\tools && c:\\vbox\\tools\\env.cmd -KBUILD c:\\vbox\\kBuild && set KMK_DONT_USE_NT_QUERY_INFORMATION_FILE=1 && set USER=vbox && kmk $(VBOX_ADDITIONS_BUILD.amd64)"
600endif
601
602additions-build-win.x86:
603ifeq ($(KBUILD_TARGET),win)
604 + $(KMK) $(VBOX_ADDITIONS_BUILD.x86)
605else
606 rsync -av --delete --delete-excluded --exclude .svn/ --exclude out/ --exclude tinderclient.log . 192.168.27.5:/cygdrive/c/vbox
607 ssh [email protected] " cd /cygdrive/c/vbox && PATH_OUT_BASE=Z:/add/out tools/env.sh kmk $(VBOX_ADDITIONS_BUILD.x86)"
608# ssh [email protected] "cmd.exe /c cd /d z:\\add && set PATH_DEVTOOLS=c:\\vbox\\tools && c:\\vbox\\tools\\env.cmd -KBUILD c:\\vbox\\kBuild && set KMK_DONT_USE_NT_QUERY_INFORMATION_FILE=1 && set USER=vbox && kmk $(VBOX_ADDITIONS_BUILD.x86)"
609endif
610
611additions-build-solaris.amd64:
612ifeq ($(KBUILD_TARGET),solaris)
613 + $(KMK) $(VBOX_ADDITIONS_BUILD.amd64)
614else
615 ssh [email protected] " cd /mnt/vbox/add && ./tools/env.sh --no-wine kmk $(VBOX_ADDITIONS_BUILD.amd64) "
616endif
617
618additions-build-solaris.x86:
619ifeq ($(KBUILD_TARGET),solaris)
620 + $(KMK) $(VBOX_ADDITIONS_BUILD.x86)
621else
622 ssh [email protected] " cd /mnt/vbox/add && ./tools/env.sh --no-wine kmk $(VBOX_ADDITIONS_BUILD.x86) "
623endif
624
625additions-build-os2.x86:
626#ifeq ($(KBUILD_TARGET),os2)
627# + $(KMK) $(VBOX_ADDITIONS_BUILD.x86)
628#else
629# ssh [email protected] " cd /mnt/vbox/add && ./tools/env.sh --no-wine kmk $(VBOX_ADDITIONS_BUILD.x86) "
630#endif
631
632additions-build-linux.amd64:
633ifeq ($(KBUILD_TARGET).$(KBUILD_TARGET_ARCH),linux.amd64)
634 + $(KMK) $(VBOX_ADDITIONS_BUILD.amd64)
635else
636 ssh [email protected] " cd /mnt/vbox/add && ./tools/env.sh --no-wine kmk $(VBOX_ADDITIONS_BUILD.amd64) "
637endif
638
639additions-build-linux.x86:
640ifeq ($(KBUILD_TARGET).$(KBUILD_TARGET_ARCH),linux.x86)
641 + $(KMK) $(VBOX_ADDITIONS_BUILD.x86)
642else
643 ssh [email protected] " cd /mnt/vbox/add && ./tools/env.sh --no-wine kmk $(VBOX_ADDITIONS_BUILD.x86) "
644endif
645
646
647additions-packing:
648 + $(KMK) VBOX_ONLY_ADDITIONS=1 \
649 VBOX_WITH_ADDITIONS_ISO.freebsd.amd64= \
650 VBOX_WITH_ADDITIONS_ISO.freebsd.x86= \
651 VBOX_WITH_ADDITIONS_ISO.linux.amd64= \
652 VBOX_WITH_ADDITIONS_ISO.linux.x86=1 \
653 VBOX_WITH_ADDITIONS_ISO.solaris.amd64= \
654 VBOX_WITH_ADDITIONS_ISO.solaris.x86=1 \
655 VBOX_WITH_ADDITIONS_ISO.win.amd64= \
656 VBOX_WITH_ADDITIONS_ISO.win.x86=1 \
657 -C src/VBox/Additions \
658 $(VBOX_PATH_ADDITIONS)/VBoxGuestAdditions.iso
659
660
661#
662# Generate VirtualBox-OSE-x.x.x.tar.bz2 tarballs for distribution
663#
664# - includes kBuild
665# - must be executed on an OSE checkout
666#
667
668# the path where to store the tarball
669TARBALLPATH ?= $(shell cd $(PATH_ROOT)/..; pwd)
670#TARBALLPATH ?= $(abspath $(PATH_ROOT)/..) - this should also do the trick without spawning a shell.
671# the root directory inside the tarball
672TARBALLROOT ?= VirtualBox-$(VBOX_VERSION_STRING)
673# the name of the tarball file
674TARBALLNAME ?= VirtualBox-$(VBOX_VERSION_STRING).tar.bz2
675snapshot:
676 @$(call MSG_L1,Creating tarball $(TARBALLPATH)/$(TARBALLNAME))
677 @if [ -d "$(PATH_ROOT)/src/VBox/Devices/USB" ]; then echo; echo "Found USB stuff, refused to build OSE tarball!"; echo; exit 1; fi
678 $(QUIET)$(MKDIR) -p $(TARBALLPATH)
679 $(QUIET)$(RM) -f $(wildcard $(TARBALLPATH)/VirtualBox*)
680 $(QUIET)$(LN_SYMLINK) $(PATH_ROOT) $(TARBALLPATH)/$(TARBALLROOT)
681 $(QUIET)tar -cjh --owner 0 --group 0 --totals \
682 --exclude=.svn \
683 --exclude=$(TARBALLROOT)/out \
684 --exclude=$(TARBALLROOT)/env.sh \
685 --exclude=$(TARBALLROOT)/configure.log \
686 --exclude=$(TARBALLROOT)/AutoConfig.kmk \
687 --exclude=$(TARBALLROOT)/LocalConfig.kmk \
688 -C $(TARBALLPATH) \
689 -f $(TARBALLPATH)/$(TARBALLNAME) \
690 $(TARBALLROOT)
691 $(QUIET)$(RM) $(TARBALLPATH)/$(TARBALLROOT)
692
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette