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