VirtualBox

source: vbox/trunk/Makefile.kmk@ 10053

Last change on this file since 10053 was 10029, checked in by vboxsync, 16 years ago

docs.Core: don't dep on dirs, include .c-file (typo), use rm -Rf.

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