VirtualBox

source: vbox/trunk/Makefile@ 940

Last change on this file since 940 was 800, checked in by vboxsync, 18 years ago

Moved the lnx64-* builds so we can enable packing and docs now.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 10.6 KB
Line 
1#
2# Top level makefile.
3#
4#
5# Copyright (C) 2006 InnoTek Systemberatung GmbH
6#
7# This file is part of VirtualBox Open Source Edition (OSE), as
8# available from http://www.virtualbox.org. This file is free software;
9# you can redistribute it and/or modify it under the terms of the GNU
10# General Public License as published by the Free Software Foundation,
11# in version 2 as it comes in the "COPYING" file of the VirtualBox OSE
12# distribution. VirtualBox OSE is distributed in the hope that it will
13# be useful, but WITHOUT ANY WARRANTY of any kind.
14#
15# If you received this file as part of a commercial VirtualBox
16# distribution, then only the terms of your commercial VirtualBox
17# license agreement apply instead of the previous paragraph.
18#
19
20DEPTH = .
21include $(PATH_KBUILD)/header.kmk
22
23ifdef VBOX_WITH_DOCS
24 SUBDIRS = doc/manual
25endif
26SUBDIRS += src
27
28#
29# Install external binaries (mostly redistributable parts of tools we use).
30# This must be done *before* we build the manual.
31#
32# To avoid dragging in unnecessary tools and sdks here, we don't use the .win
33# and .linux property suffixes.
34#
35INSTALLS = bin
36
37bin_INST = bin/
38
39# The SDL DLLs
40ifeq ($(filter-out win os2,$(BUILD_TARGET)),)
41 ifneq ($(VBOX_WITH_VBOXSDL)$(VBOX_WITH_VBOXBFE),)
42 include $(PATH_KBUILD)/sdks/LIBSDL.kmk
43 bin_SOURCES += \
44 $(DLL_SDK_LIBSDL_SDL)
45 ifdef VBOX_WITH_SECURELABEL
46 bin_SOURCES += \
47 $(DLL_SDK_LIBSDL_SDLTTF)
48 endif
49 ifeq ($(BUILD_TARGET),os2)
50 bin_SOURCES += \
51 $(DLL_SDK_LIBSDL_FSLIB)
52 endif
53 endif
54endif
55
56# The Qt DLLs.
57#ifeq ($(filter-out win os2,$(BUILD_TARGET)),)
58ifeq ($(filter-out win,$(BUILD_TARGET)),)
59 ifneq ($(VBOX_WITH_QTGUI),)
60 #include $(PATH_KBUILD)/sdks/QT3.kmk
61 #bin_SOURCES += \
62 # $(DLL_SDK_QT3_QT)
63 ifeq ($(BUILD_TARGET).$(BUILD_TARGET_ARCH),win.x86)
64 VBOX_DLL_QT ?= $(VBOX_PATH_QT)/bin/qt-mt333.dll
65 else ifeq ($(BUILD_TARGET).$(BUILD_TARGET_ARCH),win.amd64)
66 VBOX_DLL_QT ?= $(PATH_DEVTOOLS)/win.amd64/Qt/v3.3.6/bin/qt-mt336.dll=>qt-mt336.dll
67 #else ifeq ($(BUILD_TARGET).$(BUILD_TARGET_ARCH),os2.x86)
68 # VBOX_DLL_QT ?= $(PATH_DEVTOOLS)/os2.x86/Qt/v3.3.6/bin/qt-mt336.dll=>qt-mt336.dll
69 endif
70 ifdef VBOX_DLL_QT
71 bin_SOURCES += \
72 $(VBOX_DLL_QT)=>$(not-dir $(VBOX_DLL_QT))
73 endif
74 endif
75endif
76
77# The compiler runtime DLLs.
78ifeq ($(BUILD_TARGET).$(VBOX_WITHOUT_COMPILER_REDIST),win.)
79 ifdef VBOX_USE_VCC80
80 include $(PATH_KBUILD)/tools/VCC80X86.kmk
81 include $(PATH_KBUILD)/tools/VCC80AMD64.kmk
82 bin_SOURCES.x86 += \
83 $(PATH_TOOL_VCC80X86)/redist/x86/Microsoft.VC80.CRT/Microsoft.VC80.CRT.manifest=>Microsoft.VC80.CRT/Microsoft.VC80.CRT.manifest \
84 $(PATH_TOOL_VCC80X86)/redist/x86/Microsoft.VC80.CRT/msvcr80.dll=>Microsoft.VC80.CRT/msvcr80.dll \
85 $(PATH_TOOL_VCC80X86)/redist/x86/Microsoft.VC80.CRT/msvcp80.dll=>Microsoft.VC80.CRT/msvcp80.dll \
86 $(PATH_TOOL_VCC80X86)/redist/x86/Microsoft.VC80.CRT/Microsoft.VC80.CRT.manifest=>testcase/Microsoft.VC80.CRT/Microsoft.VC80.CRT.manifest \
87 $(PATH_TOOL_VCC80X86)/redist/x86/Microsoft.VC80.CRT/msvcr80.dll=>testcase/Microsoft.VC80.CRT/msvcr80.dll \
88 $(PATH_TOOL_VCC80X86)/redist/x86/Microsoft.VC80.CRT/msvcp80.dll=>testcase/Microsoft.VC80.CRT/msvcp80.dll
89 bin_SOURCES.amd64 += \
90 $(PATH_TOOL_VCC80AMD64)/redist/amd64/Microsoft.VC80.CRT/Microsoft.VC80.CRT.manifest=>Microsoft.VC80.CRT/Microsoft.VC80.CRT.manifest \
91 $(PATH_TOOL_VCC80AMD64)/redist/amd64/Microsoft.VC80.CRT/msvcr80.dll=>Microsoft.VC80.CRT/msvcr80.dll \
92 $(PATH_TOOL_VCC80AMD64)/redist/amd64/Microsoft.VC80.CRT/msvcp80.dll=>Microsoft.VC80.CRT/msvcp80.dll \
93 $(PATH_TOOL_VCC80AMD64)/redist/amd64/Microsoft.VC80.CRT/Microsoft.VC80.CRT.manifest=>testcase/Microsoft.VC80.CRT/Microsoft.VC80.CRT.manifest \
94 $(PATH_TOOL_VCC80AMD64)/redist/amd64/Microsoft.VC80.CRT/msvcr80.dll=>testcase/Microsoft.VC80.CRT/msvcr80.dll \
95 $(PATH_TOOL_VCC80AMD64)/redist/amd64/Microsoft.VC80.CRT/msvcp80.dll=>testcase/Microsoft.VC80.CRT/msvcp80.dll
96 else
97 include $(PATH_KBUILD)/tools/VCC70.kmk
98 ## @todo Move these defines to VCC70.
99 DLL_TOOL_VCC70_MSVCR71 ?= $(PATH_TOOL_VCC70)/bin/msvcr71.dll
100 ifneq ($(wildcard $(DLL_TOOL_VCC70_MSVCR71)),)
101 bin_SOURCES += \
102 $(DLL_TOOL_VCC70_MSVCR71)=>msvcr71.dll \
103 $(DLL_TOOL_VCC70_MSVCR71)=>testcase/msvcr71.dll
104 endif
105 DLL_TOOL_VCC70_MSVCP71 ?= $(PATH_TOOL_VCC70)/bin/msvcp71.dll
106 ifneq ($(wildcard $(DLL_TOOL_VCC70_MSVCP71)),)
107 bin_SOURCES += \
108 $(DLL_TOOL_VCC70_MSVCP71)=>msvcp71.dll \
109 $(DLL_TOOL_VCC70_MSVCP71)=>testcase/msvcp71.dll
110 endif
111 DLL_TOOL_VCC70_MSVCRT ?= $(PATH_TOOL_VCC70)/bin/msvcrt.dll
112 ifneq ($(wildcard $(DLL_TOOL_VCC70_MSVCRT)),)
113 bin_SOURCES += \
114 $(DLL_TOOL_VCC70_MSVCRT)=>msvcrt.dll \
115 $(DLL_TOOL_VCC70_MSVCRT)=>testcase/msvcrt.dll
116 endif
117 endif
118endif
119
120# The Xerces DLL
121ifneq ($(DLL_SDK_VBOX_XERCES_XERCES),)
122 bin_SOURCES += $(DLL_SDK_VBOX_XERCES_XERCES)
123endif
124
125# The Xalan DLLs
126ifneq ($(DLL_SDK_VBOX_XALAN_XALAN),)
127 bin_SOURCES += $(DLL_SDK_VBOX_XALAN_XALAN)
128endif
129ifneq ($(DLL_SDK_VBOX_XALAN_XALAN-MESSAGES),)
130 bin_SOURCES += $(DLL_SDK_VBOX_XALAN_XALAN-MESSAGES)
131endif
132
133
134include $(PATH_KBUILD)/footer.kmk
135
136
137#
138# Generate documentation.
139# (This should be converted into a separate pass or merged with an existing one later.)
140#
141docs: docs.Core
142 $(MAKE) -C src/VBox/Main docs
143 $(MAKE) -C src/VBox/Runtime docs
144
145docs.Core: $(PATH_TARGET)/docs.Core
146
147
148#
149# The core (VMM+Runtime+Devices) documentation.
150#
151$(PATH_TARGET)/docs.Core: \
152 Doxyfile.Core \
153 | $(call DIRDEP, $(PATH_TARGET)) \
154 $(call DIRDEP, $(PATH_OUT)/docs/Core)
155 $(RM) -f $(wildcard $(PATH_OUT)/docs/Core/html/*)
156 PATH_OUT="$(PATH_OUT)" PATH_TARGET="$(PATH_TARGET)" doxygen Doxyfile.Core
157
158$(call DIRDEP, $(PATH_OUT)/docs/Core):
159 $(MKDIR) -p $@
160
161
162#
163# Generate x86.mac and err.mac.
164#
165incs:
166 $(SED) -f include/VBox/err.sed include/VBox/err.h > include/VBox/err.mac
167 echo '%include "iprt/err.mac"' >> include/VBox/err.mac
168 $(SED) -f include/VBox/err.sed include/iprt/err.h > include/iprt/err.mac
169 $(SED) -e '/__VBox_x86_h__/d' -e '/#define/!d' -e 's/#define/%define/' include/VBox/x86.h > include/VBox/x86.mac
170
171
172#
173# Generate Visual SlickEdit tagging #defines.
174#
175vslick.h: include/VBox/cdefs.h Makefile
176 echo '// autogenerated' > $@.tmp
177 #echo '#define __BEGIN_DECLS ' >> $@.tmp
178 #echo '#define __END_DECLS ' >> $@.tmp
179
180 echo '#define ATL_NO_VTABLE ' >> $@.tmp
181 echo '#define BEGIN_COM_MAP(a) ' >> $@.tmp
182 echo '#define END_COM_MAP(a) ' >> $@.tmp
183
184 echo '#define CHECKREADY if(!isReady()) return E_UNEXPECTED; ' >> $@.tmp
185 echo '#define COM_DECL_READONLY_ENUM_AND_COLLECTION(a) ' >> $@.tmp
186 echo '#define COM_INTERFACE_ENTRY(a) ' >> $@.tmp
187 echo '#define COMGETTER(n) Get##n ' >> $@.tmp
188 echo '#define COMSETTER(n) Set##n ' >> $@.tmp
189 echo '#define DECLARE_NOT_AGGREGATABLE(a) ' >> $@.tmp
190 echo '#define DECLARE_PROTECT_FINAL_CONSTRUCT(a) ' >> $@.tmp
191 echo '#define NS_DECL_ISUPPORTS ' >> $@.tmp
192 echo '#define NS_IMETHOD NS_IMETHOD_(nsresult) ' >> $@.tmp
193 echo '#define NS_IMETHOD_(type) type ' >> $@.tmp
194 echo '#define PARSERS_EXPORT ' >> $@.tmp
195 echo '#define SAX_EXPORT ' >> $@.tmp
196 echo '#define STDMETHOD(a) NS_IMETHOD a ' >> $@.tmp
197 echo '#define XERCES_CPP_NAMESPACE_BEGIN ' >> $@.tmp
198 echo '#define XERCES_CPP_NAMESPACE_END ' >> $@.tmp
199
200 echo '#define CTXAllSUFF(var) var##R3 ' >> $@.tmp
201 echo '#define CTXSUFF(var) var##HC ' >> $@.tmp
202 echo '#define OTHERCTXSUFF(var) var##GC ' >> $@.tmp
203 echo '#define CTXALLMID(first, last) first##R3##last ' >> $@.tmp
204 echo '#define CTXMID(first, last) first##HC##last ' >> $@.tmp
205 echo '#define OTHERCTXMID(first, last) first##GC##last ' >> $@.tmp
206 echo '#define CTXTYPE(GCType, R3Type, R0Type) R3Type ' >> $@.tmp
207 echo '#define GCPTRTYPE(GCType) GCType ' >> $@.tmp
208 echo '#define GCTYPE(GCType, HCType) GCType ' >> $@.tmp
209 echo '#define HCPTRTYPE(HCType) HCType ' >> $@.tmp
210 echo '#define R0PTRTYPE(R3Type) R3Type ' >> $@.tmp
211 echo '#define R3PTRTYPE(R0Type) R0Type ' >> $@.tmp
212 echo '#define RT_SRC_POS __FILE__, __LINE__, __PRETTY_FUNCTION__ ' >> $@.tmp
213 echo '#define RT_SRC_POS_DECL const char *pszFile, unsigned iLine, const char *pszFunction ' >> $@.tmp
214 echo '#define RT_SRC_POS_ARGS pszFile, iLine, pszFunction ' >> $@.tmp
215 echo '#define RTCALL' >> $@.tmp
216 echo '#define DECLINLINE(type) inline type ' >> $@.tmp
217
218 echo '#define PDM_SRC_POS __FILE__, __LINE__, __PRETTY_FUNCTION__ ' >> $@.tmp
219 echo '#define PDM_SRC_POS_DECL const char *pszFile, unsigned iLine, const char *pszFunction ' >> $@.tmp
220 echo '#define PDM_SRC_POS_ARGS pszFile, iLine, pszFunction ' >> $@.tmp
221 echo '#define PDMDEVINSINT_DECLARED 1' >> $@.tmp
222 echo '#define VBOXCALL' >> $@.tmp
223
224 $(SED) -e '/__cdecl/d' \
225 -e '/^ *# *define.*DECL/!d' \
226 -e '/DECLS/d' \
227 -e '/_SRC_POS_DECL/d' \
228 -e '/declspec/d' \
229 -e 's/# */#/g' \
230 -e 's/ */ /g' \
231 -e '/(type) DECLEXPORT/d' \
232 -e 's/ *VBOXCALL//' \
233 -e 's/ *RTCALL//' \
234 -e 's/(type) DECLIMPORT(type)/(type) type/' \
235 -e '/ DECLASM(type) type/d' \
236 -e '/define *DECL..CALLBACKMEMBER(type[^)]*) *RT/d' \
237 -e '/define *DECLINLINE(type)/d' \
238 \
239 include/iprt/cdefs.h \
240 include/VBox/cdefs.h \
241 >> $@.tmp
242 sort $@.tmp | sort | sed -e 's/$$/\n/' > $@.tmp2
243 $(MV) -f $@.tmp2 $@
244 $(RM) -f $@.tmp $@.tmp2 $@.tmp3
245
246
247ifndef VBOX_OSE
248## add tools fetching to the 'up' / 'update' target.
249up update::
250# this doesn't work of course if kmk is updated: svn$(HOSTSUFF_EXE) up $(PATH_KBUILD)
251 $(MAKE) -C tools fetch
252endif
253
254#
255# Generate VirtualBox-OSE-x.x.x.tar.bz2 tarballs for distribution
256#
257# - includes kBuild
258# - must be executed on an OSE checkout
259#
260
261# the path where to store the tarball
262TARBALLPATH ?= $(shell cd $(PATH_ROOT)/..; pwd)
263#TARBALLPATH ?= $(abspath $(PATH_ROOT)/..) - this should also do the trick without spawning a shell.
264# the root directory inside the tarball
265TARBALLROOT ?= VirtualBox-OSE-$(VBOX_VERSION)
266# the name of the tarball file
267TARBALLNAME ?= VirtualBox-OSE-$(VBOX_VERSION).tar.bz2
268snapshot:
269 @$(call MSG_L1,Creating tarball $(TARBALLPATH)/$(TARBALLNAME))
270 @if [ -d "$(PATH_ROOT)/src/VBox/Devices/USB" ]; then echo; echo "Found USB stuff, refused to build OSE tarball!"; echo; exit 1; fi
271 $(QUIET)$(MKDIR) -p $(TARBALLPATH)
272 $(QUIET)$(RM) -f $(wildcard $(TARBALLPATH)/VirtualBox*)
273 $(QUIET)$(LN_SYMLINK) $(PATH_ROOT) $(TARBALLPATH)/$(TARBALLROOT)
274 $(QUIET)tar -cjh --owner 0 --group 0 --totals \
275 --exclude=.svn \
276 --exclude=$(TARBALLROOT)/out \
277 --exclude=$(TARBALLROOT)/env.sh \
278 --exclude=$(TARBALLROOT)/configure.log \
279 --exclude=$(TARBALLROOT)/AutoConfig.kmk \
280 --exclude=$(TARBALLROOT)/LocalConfig.kmk \
281 -C $(TARBALLPATH) \
282 -f $(TARBALLPATH)/$(TARBALLNAME) \
283 $(TARBALLROOT)
284 $(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