VirtualBox

source: vbox/trunk/Makefile@ 28

Last change on this file since 28 was 1, checked in by vboxsync, 55 years ago

import

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 9.1 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.
57ifeq ($(filter-out win os2,$(BUILD_TARGET)),)
58 ifneq ($(VBOX_WITH_QTGUI),)
59 #include $(PATH_KBUILD)/sdks/QT3.kmk
60 #bin_SOURCES += \
61 # $(DLL_SDK_QT3_QT)
62 bin_SOURCES.win.x86 += \
63 $(VBOX_PATH_QT)/bin/qt-mt333.dll=>qt-mt333.dll
64 ifdef VBOX_USE_VCC80
65 bin_SOURCES.win.x86 += \
66 $(VBOX_PATH_QT)/bin/msvcr71.dll=>msvcr71.dll
67 endif
68 bin_SOURCES.win.amd64 += \
69 $(PATH_DEVTOOLS)/win.amd64/Qt/v3.3.6/bin/qt-mt336.dll=>qt-mt336.dll
70 endif
71endif
72
73# The compiler runtime DLLs.
74ifeq ($(BUILD_TARGET).$(VBOX_WITHOUT_COMPILER_REDIST),win.)
75 ifdef VBOX_USE_VCC80
76 include $(PATH_KBUILD)/tools/VCC80X86.kmk
77 include $(PATH_KBUILD)/tools/VCC80AMD64.kmk
78 bin_SOURCES.x86 += \
79 $(PATH_TOOL_VCC80X86)/redist/x86/Microsoft.VC80.CRT/Microsoft.VC80.CRT.manifest=>Microsoft.VC80.CRT/Microsoft.VC80.CRT.manifest \
80 $(PATH_TOOL_VCC80X86)/redist/x86/Microsoft.VC80.CRT/msvcr80.dll=>Microsoft.VC80.CRT/msvcr80.dll \
81 $(PATH_TOOL_VCC80X86)/redist/x86/Microsoft.VC80.CRT/msvcp80.dll=>Microsoft.VC80.CRT/msvcp80.dll \
82 $(PATH_TOOL_VCC80X86)/redist/x86/Microsoft.VC80.CRT/Microsoft.VC80.CRT.manifest=>testcase/Microsoft.VC80.CRT/Microsoft.VC80.CRT.manifest \
83 $(PATH_TOOL_VCC80X86)/redist/x86/Microsoft.VC80.CRT/msvcr80.dll=>testcase/Microsoft.VC80.CRT/msvcr80.dll \
84 $(PATH_TOOL_VCC80X86)/redist/x86/Microsoft.VC80.CRT/msvcp80.dll=>testcase/Microsoft.VC80.CRT/msvcp80.dll
85 bin_SOURCES.amd64 += \
86 $(PATH_TOOL_VCCAMD64)/redist/amd64/Microsoft.VC80.CRT/Microsoft.VC80.CRT.manifest=>Microsoft.VC80.CRT/Microsoft.VC80.CRT.manifest \
87 $(PATH_TOOL_VCCAMD64)/redist/amd64/Microsoft.VC80.CRT/msvcr80.dll=>Microsoft.VC80.CRT/msvcr80.dll \
88 $(PATH_TOOL_VCCAMD64)/redist/amd64/Microsoft.VC80.CRT/msvcp80.dll=>Microsoft.VC80.CRT/msvcp80.dll \
89 $(PATH_TOOL_VCCAMD64)/redist/amd64/Microsoft.VC80.CRT/Microsoft.VC80.CRT.manifest=>testcase/Microsoft.VC80.CRT/Microsoft.VC80.CRT.manifest \
90 $(PATH_TOOL_VCCAMD64)/redist/amd64/Microsoft.VC80.CRT/msvcr80.dll=>testcase/Microsoft.VC80.CRT/msvcr80.dll \
91 $(PATH_TOOL_VCCAMD64)/redist/amd64/Microsoft.VC80.CRT/msvcp80.dll=>testcase/Microsoft.VC80.CRT/msvcp80.dll
92 else
93 include $(PATH_KBUILD)/tools/VCC70.kmk
94 ## @todo Move these defines to VCC70.
95 DLL_TOOL_VCC70_MSVCR71 ?= $(PATH_TOOL_VCC70)/bin/msvcr71.dll
96 ifneq ($(wildcard $(DLL_TOOL_VCC70_MSVCR71)),)
97 bin_SOURCES += \
98 $(DLL_TOOL_VCC70_MSVCR71)=>msvcr71.dll \
99 $(DLL_TOOL_VCC70_MSVCR71)=>testcase/msvcr71.dll
100 endif
101 DLL_TOOL_VCC70_MSVCP71 ?= $(PATH_TOOL_VCC70)/bin/msvcp71.dll
102 ifneq ($(wildcard $(DLL_TOOL_VCC70_MSVCP71)),)
103 bin_SOURCES += \
104 $(DLL_TOOL_VCC70_MSVCP71)=>msvcp71.dll \
105 $(DLL_TOOL_VCC70_MSVCP71)=>testcase/msvcp71.dll
106 endif
107 DLL_TOOL_VCC70_MSVCRT ?= $(PATH_TOOL_VCC70)/bin/msvcrt.dll
108 ifneq ($(wildcard $(DLL_TOOL_VCC70_MSVCRT)),)
109 bin_SOURCES += \
110 $(DLL_TOOL_VCC70_MSVCRT)=>msvcrt.dll \
111 $(DLL_TOOL_VCC70_MSVCRT)=>testcase/msvcrt.dll
112 endif
113 endif
114endif
115
116# The Xerces DLL
117ifneq ($(DLL_SDK_VBOX_XERCES_XERCES),)
118 bin_SOURCES += $(DLL_SDK_VBOX_XERCES_XERCES)
119endif
120
121# The Xalan DLLs
122ifneq ($(DLL_SDK_VBOX_XALAN_XALAN),)
123 bin_SOURCES += $(DLL_SDK_VBOX_XALAN_XALAN)
124endif
125ifneq ($(DLL_SDK_VBOX_XALAN_XALAN-MESSAGES),)
126 bin_SOURCES += $(DLL_SDK_VBOX_XALAN_XALAN-MESSAGES)
127endif
128
129
130include $(PATH_KBUILD)/footer.kmk
131
132
133#
134# Generate documentation.
135# (This should be converted into a separate pass or merged with an existing one later.)
136#
137docs: docs.Core
138 $(MAKE) -C src/VBox/Main docs
139 $(MAKE) -C src/VBox/Runtime docs
140
141docs.Core: $(PATH_TARGET)/docs.Core
142
143
144#
145# The core (VMM+Runtime+Devices) documentation.
146#
147$(PATH_TARGET)/docs.Core: \
148 Doxyfile.Core \
149 | $(call DIRDEP, $(PATH_TARGET)) \
150 $(call DIRDEP, $(PATH_OUT)/docs/Core)
151 $(RM) -f $(wildcard $(PATH_OUT)/docs/Core/html/*)
152 PATH_OUT="$(PATH_OUT)" PATH_TARGET="$(PATH_TARGET)" doxygen Doxyfile.Core
153
154$(call DIRDEP, $(PATH_OUT)/docs/Core):
155 $(MKDIR) -p $@
156
157
158#
159# Generate x86.mac and err.mac.
160#
161incs:
162 $(SED) -f include/VBox/err.sed include/VBox/err.h > include/VBox/err.mac
163 echo '%include "iprt/err.mac"' >> include/VBox/err.mac
164 $(SED) -f include/VBox/err.sed include/iprt/err.h > include/iprt/err.mac
165 $(SED) -e '/__VBox_x86_h__/d' -e '/#define/!d' -e 's/#define/%define/' include/VBox/x86.h > include/VBox/x86.mac
166
167
168#
169# Generate Visual SlickEdit tagging #defines.
170#
171vslick.h: include/VBox/cdefs.h Makefile
172 echo '// autogenerated' > $@.tmp
173 #echo '#define __BEGIN_DECLS ' >> $@.tmp
174 #echo '#define __END_DECLS ' >> $@.tmp
175
176 echo '#define ATL_NO_VTABLE ' >> $@.tmp
177 echo '#define BEGIN_COM_MAP(a) ' >> $@.tmp
178 echo '#define END_COM_MAP(a) ' >> $@.tmp
179
180 echo '#define CHECKREADY if(!isReady()) return E_UNEXPECTED; ' >> $@.tmp
181 echo '#define COM_DECL_READONLY_ENUM_AND_COLLECTION(a) ' >> $@.tmp
182 echo '#define COM_INTERFACE_ENTRY(a) ' >> $@.tmp
183 echo '#define COMGETTER(n) Get##n ' >> $@.tmp
184 echo '#define COMSETTER(n) Set##n ' >> $@.tmp
185 echo '#define DECLARE_NOT_AGGREGATABLE(a) ' >> $@.tmp
186 echo '#define DECLARE_PROTECT_FINAL_CONSTRUCT(a) ' >> $@.tmp
187 echo '#define NS_DECL_ISUPPORTS ' >> $@.tmp
188 echo '#define NS_IMETHOD NS_IMETHOD_(nsresult) ' >> $@.tmp
189 echo '#define NS_IMETHOD_(type) type ' >> $@.tmp
190 echo '#define PARSERS_EXPORT ' >> $@.tmp
191 echo '#define SAX_EXPORT ' >> $@.tmp
192 echo '#define STDMETHOD(a) NS_IMETHOD a ' >> $@.tmp
193 echo '#define XERCES_CPP_NAMESPACE_BEGIN ' >> $@.tmp
194 echo '#define XERCES_CPP_NAMESPACE_END ' >> $@.tmp
195
196 echo '#define CTXAllSUFF(var) var##R3 ' >> $@.tmp
197 echo '#define CTXSUFF(var) var##HC ' >> $@.tmp
198 echo '#define OTHERCTXSUFF(var) var##GC ' >> $@.tmp
199 echo '#define CTXALLMID(first, last) first##R3##last ' >> $@.tmp
200 echo '#define CTXMID(first, last) first##HC##last ' >> $@.tmp
201 echo '#define OTHERCTXMID(first, last) first##GC##last ' >> $@.tmp
202 echo '#define CTXTYPE(GCType, R3Type, R0Type) R3Type ' >> $@.tmp
203 echo '#define GCPTRTYPE(GCType) GCType ' >> $@.tmp
204 echo '#define GCTYPE(GCType, HCType) GCType ' >> $@.tmp
205 echo '#define HCPTRTYPE(HCType) HCType ' >> $@.tmp
206 echo '#define R0PTRTYPE(R3Type) R3Type ' >> $@.tmp
207 echo '#define R3PTRTYPE(R0Type) R0Type ' >> $@.tmp
208 echo '#define RT_SRC_POS __FILE__, __LINE__, __PRETTY_FUNCTION__ ' >> $@.tmp
209 echo '#define RT_SRC_POS_DECL const char *pszFile, unsigned iLine, const char *pszFunction ' >> $@.tmp
210 echo '#define RT_SRC_POS_ARGS pszFile, iLine, pszFunction ' >> $@.tmp
211 echo '#define RTCALL' >> $@.tmp
212 echo '#define DECLINLINE(type) inline type ' >> $@.tmp
213
214 echo '#define PDM_SRC_POS __FILE__, __LINE__, __PRETTY_FUNCTION__ ' >> $@.tmp
215 echo '#define PDM_SRC_POS_DECL const char *pszFile, unsigned iLine, const char *pszFunction ' >> $@.tmp
216 echo '#define PDM_SRC_POS_ARGS pszFile, iLine, pszFunction ' >> $@.tmp
217 echo '#define PDMDEVINSINT_DECLARED 1' >> $@.tmp
218 echo '#define VBOXCALL' >> $@.tmp
219
220 $(SED) -e '/__cdecl/d' \
221 -e '/^ *# *define.*DECL/!d' \
222 -e '/DECLS/d' \
223 -e '/_SRC_POS_DECL/d' \
224 -e '/declspec/d' \
225 -e 's/# */#/g' \
226 -e 's/ */ /g' \
227 -e '/(type) DECLEXPORT/d' \
228 -e 's/ *VBOXCALL//' \
229 -e 's/ *RTCALL//' \
230 -e 's/(type) DECLIMPORT(type)/(type) type/' \
231 -e '/ DECLASM(type) type/d' \
232 -e '/define *DECL..CALLBACKMEMBER(type[^)]*) *RT/d' \
233 -e '/define *DECLINLINE(type)/d' \
234 \
235 include/iprt/cdefs.h \
236 include/VBox/cdefs.h \
237 >> $@.tmp
238 sort $@.tmp | sort | sed -e 's/$$/\n/' > $@.tmp2
239 $(MV) -f $@.tmp2 $@
240 $(RM) -f $@.tmp $@.tmp2 $@.tmp3
241
242
243ifndef VBOX_OSE
244## add tools fetching to the 'up' / 'update' target.
245up update::
246# this doesn't work of course if kmk is updated: svn$(HOSTSUFF_EXE) up $(PATH_KBUILD)
247 $(MAKE) -C tools fetch
248endif
249
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