VirtualBox

source: vbox/trunk/Makefile.kmk@ 10753

Last change on this file since 10753 was 10244, checked in by vboxsync, 16 years ago

nc

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 24.5 KB
Line 
1# $Id: Makefile.kmk 10244 2008-07-04 17:14:20Z 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: docs.Core
207 $(KMK) -C src/VBox/Main docs
208 $(KMK) -C src/VBox/Runtime docs
209
210docs.Core: $(PATH_TARGET)/docs.Core
211
212
213
214#
215# The core (VMM+REM+Devices+Main) documentation.
216#
217# This includes so much because we wish to have the complete CFGM
218# and GCFGM lists.
219#
220OTHER_CLEAN += \
221 $(PATH_TARGET)/Doxyfile.Core \
222 $(PATH_TARGET)/Doxyfile.Core.dep
223
224VBOX_CORE_DOXYFILE_INPUT_DIRS = \
225 include/iprt \
226 include/VBox \
227 include/VBox/com \
228 include/VBox/HostServices \
229 src/VBox/VMM \
230 src/VBox/VMM/VMMR0 \
231 src/VBox/VMM/VMMGC \
232 src/VBox/VMM/VMMAll \
233 src/VBox/VMM/PATM \
234 src/VBox/VMM/PATM/VMMR0 \
235 src/VBox/VMM/PATM/VMMGC \
236 src/VBox/VMM/PATM/VMMAll \
237 src/VBox/VMM/VMMSwitcher \
238 src/VBox/Debugger \
239 src/VBox/Devices \
240 src/VBox/Devices/Audio \
241 src/VBox/Devices/Bus \
242 src/VBox/Devices/Graphics \
243 src/VBox/Devices/Graphics/BIOS \
244 src/VBox/Devices/Input \
245 src/VBox/Devices/Networking \
246 src/VBox/Devices/PC \
247 src/VBox/Devices/PC/BIOS \
248 src/VBox/Devices/Parallel \
249 src/VBox/Devices/Serial \
250 src/VBox/Devices/Storage \
251 src/VBox/Devices/VBoxHDDFormats \
252 src/VBox/Devices/VBoxHDDFormats/StorageCraft \
253 src/VBox/Devices/USB \
254 src/VBox/Devices/USB/darwin \
255 src/VBox/Devices/USB/linux \
256 src/VBox/Devices/USB/os2 \
257 src/VBox/Devices/USB/solaris \
258 src/VBox/Devices/USB/vrdp \
259 src/VBox/Devices/USB/win32 \
260 src/VBox/Devices/VMMDev \
261 src/VBox/Main/include \
262 src/VBox/Main/include/hgcm \
263 src/VBox/Main \
264 src/VBox/Main/glue \
265 src/VBox/Main/hgcm \
266 src/VBox/Main/webservice \
267 src/VBox/Main/xml \
268 src/VBox/Main/darwin \
269 src/VBox/Main/linux \
270 src/VBox/Main/os2 \
271 src/VBox/Main/solaris \
272 src/VBox/Main/win \
273 src/VBox/Main/xpcom \
274 src/VBox/HostServices \
275 src/VBox/HostServices/SharedClipboard \
276 src/VBox/HostServices/SharedFolders \
277 src/VBox/HostServices/SharedInfoServices \
278 src/VBox/HostServices/SharedOpenGL \
279 src/VBox/HostDrivers/Support \
280 src/VBox/HostDrivers/Support/darwin \
281 src/VBox/HostDrivers/Support/freebsd \
282 src/VBox/HostDrivers/Support/l4 \
283 src/VBox/HostDrivers/Support/linux \
284 src/VBox/HostDrivers/Support/os2 \
285 src/VBox/HostDrivers/Support/solaris \
286 src/VBox/HostDrivers/Support/win \
287 src/VBox/HostDrivers/VBoxNetFlt \
288 src/VBox/HostDrivers/VBoxNetFlt/darwin \
289 src/VBox/HostDrivers/VBoxNetFlt/linux \
290 src/VBox/HostDrivers/VBoxNetFlt/solaris \
291 src/VBox/HostDrivers/VBoxNetFlt/win \
292 src/VBox/HostDrivers/VBoxNetNat \
293 src/VBox/HostDrivers/VBoxNetNat/darwin \
294 src/VBox/HostDrivers/VBoxNetNat/linux \
295 src/VBox/HostDrivers/VBoxNetNat/solaris \
296 src/VBox/HostDrivers/VBoxNetNat/win \
297 src/VBox/HostDrivers/VBoxNetTap \
298 src/VBox/HostDrivers/VBoxNetTap/darwin \
299 src/VBox/HostDrivers/VBoxNetTap/linux \
300 src/VBox/HostDrivers/VBoxNetTap/solaris \
301 src/VBox/HostDrivers/VBoxNetTap/win \
302 src/VBox/HostDrivers/VBoxTAP \
303 src/VBox/HostDrivers/VBoxTAP/win \
304 src/VBox/HostDrivers/VBoxUSB \
305 src/VBox/HostDrivers/VBoxUSB/darwin \
306 src/VBox/HostDrivers/VBoxUSB/os2 \
307 src/VBox/HostDrivers/VBoxUSB/solaris \
308 src/VBox/HostDrivers/VBoxUSB/win \
309 src/VBox/HostDrivers/VBoxUSB/win/Device \
310 src/VBox/HostDrivers/VBoxUSB/win/Device/amd64 \
311 src/VBox/HostDrivers/VBoxUSB/win/Device/x86 \
312 src/VBox/HostDrivers/VBoxUSB/win/Filter \
313 src/VBox/HostDrivers/VBoxUSB/win/Install \
314 src/VBox/HostDrivers/VBoxUSB/win/Monitor \
315 src/VBox/HostDrivers/VBoxUSB/win/Monitor/win32 \
316 src/VBox/HostDrivers/VBoxUSB/win/Monitor/win64 \
317 src/VBox/HostDrivers/VBoxUSB/win/usbd \
318
319# These must come first in order to make things look nice.
320VBOX_CORE_DOXYFILE_INPUT_FIRST =\
321 $(PATH_ROOT)/doc/VBox-doc.c \
322 $(PATH_ROOT)/doc/VBox-CodingGuidelines.cpp \
323 $(PATH_ROOT)/src/VBox/VMM/VMMCodingGuidelines.cpp \
324 $(PATH_ROOT)/src/VBox/VMM/VMMDocsRawMode.cpp \
325 $(PATH_ROOT)/include/VBox/cdefs.h \
326 $(PATH_ROOT)/include/VBox/vmapi.h \
327 $(PATH_ROOT)/include/VBox/vmm.h \
328 $(PATH_ROOT)/include/VBox/cpum.h \
329 $(PATH_ROOT)/include/VBox/mm.h \
330 $(PATH_ROOT)/include/VBox/pgm.h \
331 $(PATH_ROOT)/include/VBox/selm.h \
332 $(PATH_ROOT)/include/VBox/trpm.h \
333 $(PATH_ROOT)/include/VBox/patm.h \
334 $(PATH_ROOT)/include/VBox/dbgf.h \
335 $(PATH_ROOT)/include/VBox/stam.h \
336 $(PATH_ROOT)/include/VBox/em.h \
337 $(PATH_ROOT)/include/VBox/pdm.h \
338 $(PATH_ROOT)/include/VBox/rem.h \
339 $(PATH_ROOT)/include/VBox/iom.h \
340 $(PATH_ROOT)/include/VBox/cfgm.h \
341 $(PATH_ROOT)/include/VBox/tm.h \
342 $(PATH_ROOT)/include/VBox/csam.h \
343 $(PATH_ROOT)/include/VBox/ssm.h \
344 $(PATH_ROOT)/include/VBox/hwaccm.h \
345 $(PATH_ROOT)/include/VBox/hwacc_svm.h \
346 $(PATH_ROOT)/include/VBox/hwacc_vmx.h \
347 \
348 $(PATH_ROOT)/src/VBox/VMM/CFGMInternal.h \
349 $(PATH_ROOT)/src/VBox/VMM/CPUMInternal.h \
350 $(PATH_ROOT)/src/VBox/VMM/DBGFInternal.h \
351 $(PATH_ROOT)/src/VBox/VMM/EMInternal.h \
352 $(PATH_ROOT)/src/VBox/VMM/HWACCMInternal.h \
353 $(PATH_ROOT)/src/VBox/VMM/IOMInternal.h \
354 $(PATH_ROOT)/src/VBox/VMM/MMInternal.h \
355 $(PATH_ROOT)/src/VBox/VMM/PDMInternal.h \
356 $(PATH_ROOT)/src/VBox/VMM/PGMInternal.h \
357 $(PATH_ROOT)/src/VBox/VMM/PATM/CSAMInternal.h \
358 $(PATH_ROOT)/src/VBox/VMM/PATM/PATMInternal.h \
359 $(PATH_ROOT)/src/VBox/VMM/REMInternal.h \
360 $(PATH_ROOT)/src/VBox/VMM/SELMInternal.h \
361 $(PATH_ROOT)/src/VBox/VMM/SSMInternal.h \
362 $(PATH_ROOT)/src/VBox/VMM/STAMInternal.h \
363 $(PATH_ROOT)/src/VBox/VMM/TMInternal.h \
364 $(PATH_ROOT)/src/VBox/VMM/TRPMInternal.h \
365 $(PATH_ROOT)/src/VBox/VMM/VMInternal.h \
366 $(PATH_ROOT)/src/VBox/VMM/VMMInternal.h \
367 \
368 $(PATH_ROOT)/include/VBox/vm.h \
369 \
370 $(PATH_ROOT)/include/VBox/sup.h \
371 $(PATH_ROOT)/include/VBox/VBoxHDD.h \
372 $(PATH_ROOT)/include/VBox/types.h \
373 $(PATH_ROOT)/include/VBox/err.h \
374 $(PATH_ROOT)/include/VBox/x86.h \
375 $(PATH_ROOT)/include/VBox/cpumdis.h \
376 $(PATH_ROOT)/include/VBox/dbggui.h \
377 $(PATH_ROOT)/include/VBox/dis.h \
378 $(PATH_ROOT)/include/VBox/disopcode.h \
379 $(PATH_ROOT)/include/VBox/intnet.h \
380 $(PATH_ROOT)/include/VBox/settings.h \
381 $(PATH_ROOT)/include/VBox/pci.h \
382 $(PATH_ROOT)/include/VBox/scsi.h \
383 $(PATH_ROOT)/include/VBox/shflsvc.h \
384 $(PATH_ROOT)/include/VBox/hgcmsvc.h \
385 $(PATH_ROOT)/include/VBox/usb.h \
386 $(PATH_ROOT)/include/VBox/vusb.h \
387 \
388 $(PATH_ROOT)/include/VBox/log.h \
389 $(PATH_ROOT)/include/VBox/param.h \
390 $(PATH_ROOT)/include/VBox/version.h
391
392VBOX_CORE_DOXYFILE_INPUT := \
393 $(filter-out %.cpp.h, $(sort $(wildcard $(addsuffix /*.h, $(VBOX_CORE_DOXYFILE_INPUT_DIRS)))) ) \
394 $(foreach dir, $(VBOX_CORE_DOXYFILE_INPUT_DIRS), $(wildcard $(dir)/*.cpp $(dir)/*.c $(dir)/.asm))
395VBOX_CORE_DOXYFILE_INPUT := \
396 $(VBOX_CORE_DOXYFILE_INPUT_FIRST) \
397 $(filter-out $(VBOX_CORE_DOXYFILE_INPUT_FIRST), $(VBOX_CORE_DOXYFILE_INPUT))
398
399# And some some additional stuff.
400VBOX_CORE_DOXYFILE_INPUT += \
401 $(PATH_ROOT)/src/recompiler/VBoxRecompiler.c \
402 $(PATH_ROOT)/src/recompiler/VBoxREMWrapper.cpp
403
404
405VBOX_CORE_DOXYFILE_OUTPUT = $(PATH_OUT)/docs/Core
406
407-include $(PATH_TARGET)/Doxyfile.Core.dep
408
409# Generate the Doxyfile
410$(PATH_TARGET)/Doxyfile.Core: Doxyfile.Core \
411 $(comp-vars VBOX_CORE_DOXYFILE_INPUT,DOXYGEN_INPUT_PREV,FORCE) \
412 $(comp-vars VBOX_CORE_DOXYFILE_OUTPUT,DOXYGEN_OUTPUT_PREV,FORCE) \
413 | $(call DIRDEP, $(PATH_TARGET))
414 $(RM) -f $@ $@.tmp $(PATH_TARGET)/Doxyfile.Core.dep
415 $(CP) -f Doxyfile.Core $@.tmp
416 $(APPEND) $@.tmp
417 $(APPEND) $@.tmp "OUTPUT_DIRECTORY = $(VBOX_CORE_DOXYFILE_OUTPUT)"
418 $(APPEND) $@.tmp "WARN_LOGFILE = $(VBOX_CORE_DOXYFILE_OUTPUT)/errors"
419 $(APPEND) $@.tmp "INCLUDE_PATH = $(PATH_ROOT)/include $(PATH_ROOT)/src/VBox/VMM $(PATH_ROOT)/src/VBox/Main/include "
420 $(APPEND) $@.tmp "INCLUDE_FILE_PATTERNS = *.cpp.h"
421 $(APPEND) $@.tmp
422 $(APPEND) $@.tmp "INPUT = $(VBOX_CORE_DOXYFILE_INPUT)"
423 $(APPEND) $@.tmp
424 $(APPEND) $@.tmp "PREDEFINED += $(DEFS) $(DEFS.$(KBUILD_TARGET)) $(DEFS.$(KBUILD_TARGET_ARCH)) $(ARCH_BITS_DEFS)"
425 $(APPEND) $@.tmp "PREDEFINED += ARCH_BITS=HC_ARCH_BITS R3_ARCH_BITS=HC_ARCH_BITS R0_ARCH_BITS=HC_ARCH_BITS "
426 $(APPEND) $@.tmp
427 $(MV) -f $@.tmp $@
428 @$(APPEND) $(PATH_TARGET)/Doxyfile.Core.dep "DOXYGEN_OUTPUT_PREV = $(VBOX_CORE_DOXYFILE_OUTPUT)"
429 @$(APPEND) $(PATH_TARGET)/Doxyfile.Core.dep "DOXYGEN_INPUT_PREV = $(VBOX_CORE_DOXYFILE_INPUT)"
430
431# Create the output directory.
432$(call DIRDEP, $(VBOX_CORE_DOXYFILE_OUTPUT)):
433 $(MKDIR) -p $@
434
435# Do the actual job.
436$(PATH_TARGET)/docs.Core: $(PATH_TARGET)/Doxyfile.Core $(VBOX_CORE_DOXYFILE_INPUT) | $(call DIRDEP, $(VBOX_CORE_DOXYFILE_OUTPUT))
437 $(RM) -f $(PATH_TARGET)/docs.Core
438 $(RM) -Rf $(VBOX_CORE_DOXYFILE_OUTPUT)/html/
439 doxygen $(PATH_TARGET)/Doxyfile.Core
440 $(APPEND) $(PATH_TARGET)/docs.Core
441
442
443#
444# Generate x86.mac and err.mac.
445#
446incs:
447 $(SED) -f include/VBox/err.sed --output include/VBox/err.mac include/VBox/err.h
448 $(APPEND) include/VBox/err.mac '%include "iprt/err.mac"'
449 $(SED) -f include/VBox/err.sed --output include/iprt/err.mac include/iprt/err.h
450 $(SED) \
451 -e '/__VBox_x86_h__/d' \
452 -e '/#define/!d' \
453 -e '/\\$$/d' \
454 -e 's/#define/%define/' \
455 --output include/VBox/x86.mac \
456 include/VBox/x86.h
457
458
459#
460# Generate Visual SlickEdit tagging #defines.
461#
462vslick.h: include/VBox/cdefs.h Makefile
463 echo '// autogenerated' > $@.tmp
464 #echo '#define __BEGIN_DECLS ' >> $@.tmp
465 #echo '#define __END_DECLS ' >> $@.tmp
466
467 echo '#define ATL_NO_VTABLE ' >> $@.tmp
468 echo '#define BEGIN_COM_MAP(a) ' >> $@.tmp
469 echo '#define END_COM_MAP(a) ' >> $@.tmp
470
471 echo '#define CHECKREADY if(!isReady()) return E_UNEXPECTED; ' >> $@.tmp
472 echo '#define COM_DECL_READONLY_ENUM_AND_COLLECTION(a) ' >> $@.tmp
473 echo '#define COM_INTERFACE_ENTRY(a) ' >> $@.tmp
474 echo '#define COMGETTER(n) Get##n ' >> $@.tmp
475 echo '#define COMSETTER(n) Set##n ' >> $@.tmp
476 echo '#define ComSafeArrayIn(t,a) t a[] ' >> $@.tmp
477 echo '#define ComSafeArrayOut(t,a) t * a[] ' >> $@.tmp
478 echo '#define DECLARE_NOT_AGGREGATABLE(a) ' >> $@.tmp
479 echo '#define DECLARE_PROTECT_FINAL_CONSTRUCT(a) ' >> $@.tmp
480 echo '#define NS_DECL_ISUPPORTS ' >> $@.tmp
481 echo '#define NS_IMETHOD NS_IMETHOD_(nsresult) ' >> $@.tmp
482 echo '#define NS_IMETHOD_(type) type ' >> $@.tmp
483 echo '#define PARSERS_EXPORT ' >> $@.tmp
484 echo '#define SAX_EXPORT ' >> $@.tmp
485 echo '#define STDMETHOD(a) NS_IMETHOD a ' >> $@.tmp
486 echo '#define XERCES_CPP_NAMESPACE_BEGIN ' >> $@.tmp
487 echo '#define XERCES_CPP_NAMESPACE_END ' >> $@.tmp
488
489 echo '#define CTXAllSUFF(var) var##R3 ' >> $@.tmp
490 echo '#define CTXSUFF(var) var##HC ' >> $@.tmp
491 echo '#define OTHERCTXSUFF(var) var##GC ' >> $@.tmp
492 echo '#define CTXALLMID(first, last) first##R3##last ' >> $@.tmp
493 echo '#define CTXMID(first, last) first##HC##last ' >> $@.tmp
494 echo '#define OTHERCTXMID(first, last) first##GC##last ' >> $@.tmp
495 echo '#define CTXTYPE(GCType, R3Type, R0Type) R3Type ' >> $@.tmp
496 echo '#define GCPTRTYPE(GCType) GCType ' >> $@.tmp
497 echo '#define GCTYPE(GCType, HCType) GCType ' >> $@.tmp
498 echo '#define HCPTRTYPE(HCType) HCType ' >> $@.tmp
499 echo '#define R3R0PTRTYPE(HCType) HCType ' >> $@.tmp
500 echo '#define R0PTRTYPE(R3Type) R3Type ' >> $@.tmp
501 echo '#define R3PTRTYPE(R0Type) R0Type ' >> $@.tmp
502 echo '#define RT_SRC_POS __FILE__, __LINE__, __PRETTY_FUNCTION__ ' >> $@.tmp
503 echo '#define RT_SRC_POS_DECL const char *pszFile, unsigned iLine, const char *pszFunction ' >> $@.tmp
504 echo '#define RT_SRC_POS_ARGS pszFile, iLine, pszFunction ' >> $@.tmp
505 echo '#define RTCALL' >> $@.tmp
506 echo '#define DECLINLINE(type) inline type ' >> $@.tmp
507
508 echo '#define PDM_SRC_POS __FILE__, __LINE__, __PRETTY_FUNCTION__ ' >> $@.tmp
509 echo '#define PDM_SRC_POS_DECL const char *pszFile, unsigned iLine, const char *pszFunction ' >> $@.tmp
510 echo '#define PDM_SRC_POS_ARGS pszFile, iLine, pszFunction ' >> $@.tmp
511 echo '#define PDMDEVINSINT_DECLARED 1' >> $@.tmp
512 echo '#define VBOXCALL' >> $@.tmp
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 \
532 --append $@.tmp \
533 $(filter-out include/VBox/err.h, $(wildcard include/VBox/*.h)) \
534 include/iprt/cdefs.h
535 $(CAT_EXT) $@.tmp | sort | $(SED_EXT) -e 's/$$/\n/' --output $@.tmp2
536 $(MV) -f $@.tmp2 $@
537 $(RM) -f $@.tmp $@.tmp2 $@.tmp3
538 $(ECHO) "TODO: Merge ./vslick.h with your ~/.slickedit/x.y.z/unxcpp.h file."
539
540
541#
542# Add fetching of the tools to the 'up[date][2]' targets.
543#
544up update up2 update2::
545ifndef VBOX_OSE
546 $(MAKE) -C tools fetch
547else
548 $(MAKE) -C tools -f Makefile-ose.kmk fetch
549endif
550
551
552#
553# Build the additions, all of them.
554#
555# This is currently tailored (hardcoded) for the additions
556# build box. Can make it pretty and configurable later.
557#
558# The fetching must be done in serial fashion, while the building
559# should be more flexible wrt to -jN.
560#
561additions-fetch:
562 + $(KMK) -C tools fetch
563 + $(KMK) -C tools fetch KBUILD_TARGET_ARCH=x86 KBUILD_TARGET=linux BUILD_TARGET_ARCH=x86 BUILD_TARGET=linux
564# + $(KMK) -C tools fetch KBUILD_TARGET_ARCH=x86 KBUILD_TARGET=os2 BUILD_TARGET_ARCH=x86 BUILD_TARGET=os2
565 + $(KMK) -C tools fetch KBUILD_TARGET_ARCH=x86 KBUILD_TARGET=solaris BUILD_TARGET_ARCH=x86 BUILD_TARGET=solaris
566 + $(KMK) -C tools fetch KBUILD_TARGET_ARCH=x86 KBUILD_TARGET=win BUILD_TARGET_ARCH=x86 BUILD_TARGET=win
567
568
569additions-build: \
570 additions-build-win.x86 \
571 additions-build-solaris.x86 \
572 additions-build-os2.x86 \
573 additions-build-linux.x86
574
575VBOX_ADDITIONS_BUILD.amd64 = VBOX_ONLY_ADDITIONS=1 VBOX_WITHOUT_ADDITIONS_ISO=1 \
576 KBUILD_TYPE=$(KBUILD_TYPE) BUILD_TYPE=$(KBUILD_TYPE) \
577 KBUILD_TARGET_ARCH=amd64 BUILD_TARGET_ARCH=amd64 \
578 all packing
579
580VBOX_ADDITIONS_BUILD.x86 = VBOX_ONLY_ADDITIONS=1 VBOX_WITHOUT_ADDITIONS_ISO=1 \
581 KBUILD_TYPE=$(KBUILD_TYPE) BUILD_TYPE=$(KBUILD_TYPE) \
582 KBUILD_TARGET_ARCH=x86 BUILD_TARGET_ARCH=x86 \
583 all packing
584
585additions-build-win.amd64:
586ifeq ($(KBUILD_TARGET),win)
587 + $(KMK) $(VBOX_ADDITIONS_BUILD.amd64)
588else
589 false
590 rsync -av --delete --delete-excluded --exclude .svn/ --exclude out/ --exclude tinderclient.log . 192.168.27.5:/cygdrive/c/vbox
591 ssh vbox@192.168.27.15 " cd /cygdrive/c/vbox && PATH_OUT_BASE=Z:/add/out tools/env.sh kmk $(VBOX_ADDITIONS_BUILD.amd64)"
592# ssh vbox@192.168.27.15 "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)"
593endif
594
595additions-build-win.x86:
596ifeq ($(KBUILD_TARGET),win)
597 + $(KMK) $(VBOX_ADDITIONS_BUILD.x86)
598else
599 rsync -av --delete --delete-excluded --exclude .svn/ --exclude out/ --exclude tinderclient.log . 192.168.27.5:/cygdrive/c/vbox
600 ssh vbox@192.168.27.5 " cd /cygdrive/c/vbox && PATH_OUT_BASE=Z:/add/out tools/env.sh kmk $(VBOX_ADDITIONS_BUILD.x86)"
601# ssh vbox@192.168.27.5 "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)"
602endif
603
604additions-build-solaris.amd64:
605ifeq ($(KBUILD_TARGET),solaris)
606 + $(KMK) $(VBOX_ADDITIONS_BUILD.amd64)
607else
608 ssh vbox@192.168.27.14 " cd /mnt/vbox/add && ./tools/env.sh --no-wine kmk $(VBOX_ADDITIONS_BUILD.amd64) "
609endif
610
611additions-build-solaris.x86:
612ifeq ($(KBUILD_TARGET),solaris)
613 + $(KMK) $(VBOX_ADDITIONS_BUILD.x86)
614else
615 ssh vbox@192.168.27.4 " cd /mnt/vbox/add && ./tools/env.sh --no-wine kmk $(VBOX_ADDITIONS_BUILD.x86) "
616endif
617
618additions-build-os2.x86:
619#ifeq ($(KBUILD_TARGET),os2)
620# + $(KMK) $(VBOX_ADDITIONS_BUILD.x86)
621#else
622# ssh vbox@192.168.27.3 " cd /mnt/vbox/add && ./tools/env.sh --no-wine kmk $(VBOX_ADDITIONS_BUILD.x86) "
623#endif
624
625additions-build-linux.amd64:
626ifeq ($(KBUILD_TARGET).$(KBUILD_TARGET_ARCH),linux.amd64)
627 + $(KMK) $(VBOX_ADDITIONS_BUILD.amd64)
628else
629 ssh vbox@192.168.27.12 " cd /mnt/vbox/add && ./tools/env.sh --no-wine kmk $(VBOX_ADDITIONS_BUILD.amd64) "
630endif
631
632additions-build-linux.x86:
633ifeq ($(KBUILD_TARGET).$(KBUILD_TARGET_ARCH),linux.x86)
634 + $(KMK) $(VBOX_ADDITIONS_BUILD.x86)
635else
636 ssh vbox@192.168.27.2 " cd /mnt/vbox/add && ./tools/env.sh --no-wine kmk $(VBOX_ADDITIONS_BUILD.x86) "
637endif
638
639
640additions-packing:
641 + $(KMK) VBOX_ONLY_ADDITIONS=1 \
642 VBOX_WITH_ADDITIONS_ISO.freebsd.amd64= \
643 VBOX_WITH_ADDITIONS_ISO.freebsd.x86= \
644 VBOX_WITH_ADDITIONS_ISO.linux.amd64= \
645 VBOX_WITH_ADDITIONS_ISO.linux.x86=1 \
646 VBOX_WITH_ADDITIONS_ISO.solaris.amd64= \
647 VBOX_WITH_ADDITIONS_ISO.solaris.x86=1 \
648 VBOX_WITH_ADDITIONS_ISO.win.amd64= \
649 VBOX_WITH_ADDITIONS_ISO.win.x86=1 \
650 -C src/VBox/Additions \
651 $(VBOX_PATH_ADDITIONS)/VBoxGuestAdditions.iso
652
653
654#
655# Generate VirtualBox-OSE-x.x.x.tar.bz2 tarballs for distribution
656#
657# - includes kBuild
658# - must be executed on an OSE checkout
659#
660
661# the path where to store the tarball
662TARBALLPATH ?= $(shell cd $(PATH_ROOT)/..; pwd)
663#TARBALLPATH ?= $(abspath $(PATH_ROOT)/..) - this should also do the trick without spawning a shell.
664# the root directory inside the tarball
665TARBALLROOT ?= VirtualBox-$(VBOX_VERSION_STRING)
666# the name of the tarball file
667TARBALLNAME ?= VirtualBox-$(VBOX_VERSION_STRING).tar.bz2
668snapshot:
669 @$(call MSG_L1,Creating tarball $(TARBALLPATH)/$(TARBALLNAME))
670 @if [ -d "$(PATH_ROOT)/src/VBox/Devices/USB" ]; then echo; echo "Found USB stuff, refused to build OSE tarball!"; echo; exit 1; fi
671 $(QUIET)$(MKDIR) -p $(TARBALLPATH)
672 $(QUIET)$(RM) -f $(wildcard $(TARBALLPATH)/VirtualBox*)
673 $(QUIET)$(LN_SYMLINK) $(PATH_ROOT) $(TARBALLPATH)/$(TARBALLROOT)
674 $(QUIET)tar -cjh --owner 0 --group 0 --totals \
675 --exclude=.svn \
676 --exclude=$(TARBALLROOT)/out \
677 --exclude=$(TARBALLROOT)/env.sh \
678 --exclude=$(TARBALLROOT)/configure.log \
679 --exclude=$(TARBALLROOT)/AutoConfig.kmk \
680 --exclude=$(TARBALLROOT)/LocalConfig.kmk \
681 -C $(TARBALLPATH) \
682 -f $(TARBALLPATH)/$(TARBALLNAME) \
683 $(TARBALLROOT)
684 $(QUIET)$(RM) $(TARBALLPATH)/$(TARBALLROOT)
685
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