~ubuntu-branches/ubuntu/raring/virtualbox-ose/raring

« back to all changes in this revision

Viewing changes to Makefile.kmk

  • Committer: Bazaar Package Importer
  • Author(s): Felix Geyer
  • Date: 2009-12-18 16:44:29 UTC
  • mfrom: (0.3.3 upstream) (0.4.6 squeeze)
  • Revision ID: james.westby@ubuntu.com-20091218164429-jd34ccexpv5na11a
Tags: 3.1.2-dfsg-1ubuntu1
* Merge from Debian unstable (LP: #498219), remaining changes:
  - Disable update action
    - debian/patches/u01-disable-update-action.dpatch
  - VirtualBox should go in Accessories, not in System tools (LP: #288590)
    - debian/virtualbox-ose-qt.files/virtualbox-ose.desktop
  - Add Apport hook
    - debian/virtualbox-ose.files/source_virtualbox-ose.py
    - debian/virtualbox-ose.install
  - Add Launchpad integration
    - debian/control
    - debian/lpi-bug.xpm
    - debian/patches/u02-lp-integration.dpatch
* Fixes the following bugs:
  - Kernel module fails to build with Linux >= 2.6.32 (LP: #474625)
  - X.Org drivers need to be rebuilt against X-Server 1.7 (LP: #495935)
  - The *-source packages try to build the kernel modules even though the
    kernel headers aren't available (LP: #473334)
* Replace *-source packages with transitional packages for *-dkms.
* Adapt u01-disable-update-action.dpatch and u02-lp-integration.dpatch for
  new upstream version.

Show diffs side-by-side

added added

removed removed

Lines of Context:
107
107
  include $(KBUILD_PATH)/tools/VCC80X86.kmk
108
108
  include $(KBUILD_PATH)/tools/VCC80AMD64.kmk
109
109
  bin_SOURCES.x86 += \
110
 
        $(PATH_TOOL_VCC80X86)/redist/x86/Microsoft.VC80.CRT/Microsoft.VC80.CRT.manifest=>Microsoft.VC80.CRT/Microsoft.VC80.CRT.manifest \
111
 
        $(PATH_TOOL_VCC80X86)/redist/x86/Microsoft.VC80.CRT/msvcr80.dll=>Microsoft.VC80.CRT/msvcr80.dll \
112
 
        $(PATH_TOOL_VCC80X86)/redist/x86/Microsoft.VC80.CRT/msvcp80.dll=>Microsoft.VC80.CRT/msvcp80.dll \
113
 
        $(PATH_TOOL_VCC80X86)/redist/x86/Microsoft.VC80.CRT/Microsoft.VC80.CRT.manifest=>testcase/Microsoft.VC80.CRT/Microsoft.VC80.CRT.manifest \
114
 
        $(PATH_TOOL_VCC80X86)/redist/x86/Microsoft.VC80.CRT/msvcr80.dll=>testcase/Microsoft.VC80.CRT/msvcr80.dll \
115
 
        $(PATH_TOOL_VCC80X86)/redist/x86/Microsoft.VC80.CRT/msvcp80.dll=>testcase/Microsoft.VC80.CRT/msvcp80.dll
 
110
        $(PATH_TOOL_VCC80X86)/redist/x86/Microsoft.VC80.CRT/Microsoft.VC80.CRT.manifest=>Microsoft.VC80.CRT/Microsoft.VC80.CRT.manifest \
 
111
        $(PATH_TOOL_VCC80X86)/redist/x86/Microsoft.VC80.CRT/msvcr80.dll=>Microsoft.VC80.CRT/msvcr80.dll \
 
112
        $(PATH_TOOL_VCC80X86)/redist/x86/Microsoft.VC80.CRT/msvcp80.dll=>Microsoft.VC80.CRT/msvcp80.dll \
 
113
        $(PATH_TOOL_VCC80X86)/redist/x86/Microsoft.VC80.CRT/Microsoft.VC80.CRT.manifest=>testcase/Microsoft.VC80.CRT/Microsoft.VC80.CRT.manifest \
 
114
        $(PATH_TOOL_VCC80X86)/redist/x86/Microsoft.VC80.CRT/msvcr80.dll=>testcase/Microsoft.VC80.CRT/msvcr80.dll \
 
115
        $(PATH_TOOL_VCC80X86)/redist/x86/Microsoft.VC80.CRT/msvcp80.dll=>testcase/Microsoft.VC80.CRT/msvcp80.dll
116
116
  bin_SOURCES.amd64 += \
117
 
        $(PATH_TOOL_VCC80AMD64)/redist/amd64/Microsoft.VC80.CRT/Microsoft.VC80.CRT.manifest=>Microsoft.VC80.CRT/Microsoft.VC80.CRT.manifest \
118
 
        $(PATH_TOOL_VCC80AMD64)/redist/amd64/Microsoft.VC80.CRT/msvcr80.dll=>Microsoft.VC80.CRT/msvcr80.dll \
119
 
        $(PATH_TOOL_VCC80AMD64)/redist/amd64/Microsoft.VC80.CRT/msvcp80.dll=>Microsoft.VC80.CRT/msvcp80.dll \
120
 
        $(PATH_TOOL_VCC80AMD64)/redist/amd64/Microsoft.VC80.CRT/Microsoft.VC80.CRT.manifest=>testcase/Microsoft.VC80.CRT/Microsoft.VC80.CRT.manifest \
121
 
        $(PATH_TOOL_VCC80AMD64)/redist/amd64/Microsoft.VC80.CRT/msvcr80.dll=>testcase/Microsoft.VC80.CRT/msvcr80.dll \
122
 
        $(PATH_TOOL_VCC80AMD64)/redist/amd64/Microsoft.VC80.CRT/msvcp80.dll=>testcase/Microsoft.VC80.CRT/msvcp80.dll
 
117
        $(PATH_TOOL_VCC80AMD64)/redist/amd64/Microsoft.VC80.CRT/Microsoft.VC80.CRT.manifest=>Microsoft.VC80.CRT/Microsoft.VC80.CRT.manifest \
 
118
        $(PATH_TOOL_VCC80AMD64)/redist/amd64/Microsoft.VC80.CRT/msvcr80.dll=>Microsoft.VC80.CRT/msvcr80.dll \
 
119
        $(PATH_TOOL_VCC80AMD64)/redist/amd64/Microsoft.VC80.CRT/msvcp80.dll=>Microsoft.VC80.CRT/msvcp80.dll \
 
120
        $(PATH_TOOL_VCC80AMD64)/redist/amd64/Microsoft.VC80.CRT/Microsoft.VC80.CRT.manifest=>testcase/Microsoft.VC80.CRT/Microsoft.VC80.CRT.manifest \
 
121
        $(PATH_TOOL_VCC80AMD64)/redist/amd64/Microsoft.VC80.CRT/msvcr80.dll=>testcase/Microsoft.VC80.CRT/msvcr80.dll \
 
122
        $(PATH_TOOL_VCC80AMD64)/redist/amd64/Microsoft.VC80.CRT/msvcp80.dll=>testcase/Microsoft.VC80.CRT/msvcp80.dll
 
123
  ifeq ($(VBOX_VCC_CRT_TYPE),d)
 
124
   bin_SOURCES.x86 += \
 
125
        $(PATH_TOOL_VCC80X86)/redist/Debug_NonRedist/x86/Microsoft.VC80.DebugCRT/Microsoft.VC80.DebugCRT.manifest=>Microsoft.VC80.DebugCRT/Microsoft.VC80.DebugCRT.manifest \
 
126
        $(PATH_TOOL_VCC80X86)/redist/Debug_NonRedist/x86/Microsoft.VC80.DebugCRT/msvcr80d.dll=>Microsoft.VC80.DebugCRT/msvcr80d.dll \
 
127
        $(PATH_TOOL_VCC80X86)/redist/Debug_NonRedist/x86/Microsoft.VC80.DebugCRT/msvcp80d.dll=>Microsoft.VC80.DebugCRT/msvcp80d.dll \
 
128
        $(PATH_TOOL_VCC80X86)/redist/Debug_NonRedist/x86/Microsoft.VC80.DebugCRT/Microsoft.VC80.DebugCRT.manifest=>testcase/Microsoft.VC80.DebugCRT/Microsoft.VC80.DebugCRT.manifest \
 
129
        $(PATH_TOOL_VCC80X86)/redist/Debug_NonRedist/x86/Microsoft.VC80.DebugCRT/msvcr80d.dll=>testcase/Microsoft.VC80.DebugCRT/msvcr80d.dll \
 
130
        $(PATH_TOOL_VCC80X86)/redist/Debug_NonRedist/x86/Microsoft.VC80.DebugCRT/msvcp80d.dll=>testcase/Microsoft.VC80.DebugCRT/msvcp80d.dll
 
131
   bin_SOURCES.amd64 += \
 
132
        $(PATH_TOOL_VCC80AMD64)/redist/Debug_NonRedist/amd64/Microsoft.VC80.DebugCRT/Microsoft.VC80.DebugCRT.manifest=>Microsoft.VC80.DebugCRT/Microsoft.VC80.DebugCRT.manifest \
 
133
        $(PATH_TOOL_VCC80AMD64)/redist/Debug_NonRedist/amd64/Microsoft.VC80.DebugCRT/msvcr80d.dll=>Microsoft.VC80.DebugCRT/msvcr80d.dll \
 
134
        $(PATH_TOOL_VCC80AMD64)/redist/Debug_NonRedist/amd64/Microsoft.VC80.DebugCRT/msvcp80d.dll=>Microsoft.VC80.DebugCRT/msvcp80d.dll \
 
135
        $(PATH_TOOL_VCC80AMD64)/redist/Debug_NonRedist/amd64/Microsoft.VC80.DebugCRT/Microsoft.VC80.DebugCRT.manifest=>testcase/Microsoft.VC80.DebugCRT/Microsoft.VC80.DebugCRT.manifest \
 
136
        $(PATH_TOOL_VCC80AMD64)/redist/Debug_NonRedist/amd64/Microsoft.VC80.DebugCRT/msvcr80d.dll=>testcase/Microsoft.VC80.DebugCRT/msvcr80d.dll \
 
137
        $(PATH_TOOL_VCC80AMD64)/redist/Debug_NonRedist/amd64/Microsoft.VC80.DebugCRT/msvcp80d.dll=>testcase/Microsoft.VC80.DebugCRT/msvcp80d.dll
 
138
  endif
123
139
 endif
124
140
 ifndef VBOX_USE_VCC80
125
141
  VBOX_INSTALL_VCC70_RT = 1
129
145
 endif
130
146
 ifdef VBOX_INSTALL_VCC70_RT
131
147
  include $(KBUILD_PATH)/tools/VCC70.kmk
 
148
 
132
149
  ## @todo Move these defines to VCC70.
133
150
  DLL_TOOL_VCC70_MSVCR71 ?= $(PATH_TOOL_VCC70)/bin/msvcr71.dll
134
151
  ifneq ($(wildcard $(DLL_TOOL_VCC70_MSVCR71)),)
135
152
   bin_SOURCES += \
136
 
        $(DLL_TOOL_VCC70_MSVCR71)=>msvcr71.dll \
137
 
        $(DLL_TOOL_VCC70_MSVCR71)=>testcase/msvcr71.dll
138
 
  endif
 
153
        $(DLL_TOOL_VCC70_MSVCR71)=>msvcr71.dll \
 
154
        $(DLL_TOOL_VCC70_MSVCR71)=>testcase/msvcr71.dll
 
155
  endif
 
156
  ifeq ($(VBOX_VCC_CRT_TYPE),d)
 
157
   DLL_TOOL_VCC70_MSVCR71D ?= $(PATH_TOOL_VCC70)/bin/msvcr71d.dll
 
158
   ifneq ($(wildcard $(DLL_TOOL_VCC70_MSVCR71D)),)
 
159
    bin_SOURCES += \
 
160
        $(DLL_TOOL_VCC70_MSVCR71D)=>msvcr71d.dll \
 
161
        $(DLL_TOOL_VCC70_MSVCR71D)=>testcase/msvcr71d.dll
 
162
   endif
 
163
  endif
 
164
 
139
165
  DLL_TOOL_VCC70_MSVCP71 ?= $(PATH_TOOL_VCC70)/bin/msvcp71.dll
140
166
  ifneq ($(wildcard $(DLL_TOOL_VCC70_MSVCP71)),)
141
167
   bin_SOURCES += \
142
168
        $(DLL_TOOL_VCC70_MSVCP71)=>msvcp71.dll \
143
169
        $(DLL_TOOL_VCC70_MSVCP71)=>testcase/msvcp71.dll
 
170
  endif
 
171
  ifeq ($(VBOX_VCC_CRT_TYPE),d)
 
172
   DLL_TOOL_VCC70_MSVCP71D ?= $(PATH_TOOL_VCC70)/bin/msvcp71d.dll
 
173
   ifneq ($(wildcard $(DLL_TOOL_VCC70_MSVCP71D)),)
 
174
    bin_SOURCES += \
 
175
        $(DLL_TOOL_VCC70_MSVCP71D)=>msvcp71d.dll \
 
176
        $(DLL_TOOL_VCC70_MSVCP71D)=>testcase/msvcp71d.dll
144
177
   endif
 
178
  endif
 
179
 
145
180
  DLL_TOOL_VCC70_MSVCRT  ?= $(PATH_TOOL_VCC70)/bin/msvcrt.dll
146
181
  ifneq ($(wildcard $(DLL_TOOL_VCC70_MSVCRT)),)
147
182
   bin_SOURCES += \
161
196
 qt4-bin_MODE = 755
162
197
 ifeq ($(KBUILD_TARGET),darwin)
163
198
  qt4-bin_INST = $(INST_VIRTUALBOX)Contents/
164
 
  qt4-bin_SOURCES = $(foreach qtmod, QtCore QtGui QtNetwork \
 
199
  qt4-bin_SOURCES = $(foreach qtmod, QtCore QtGui QtNetwork $(if $(VBOX_GUI_USE_QGL), QtOpenGL,) \
165
200
        ,$(VBOX_PATH_QT4)/Frameworks/$(qtmod)VBox.framework/Versions/4/$(qtmod)VBox=>Frameworks/$(qtmod)VBox.framework/Versions/4/$(qtmod)VBox)
166
201
  ifdef VBOX_WITH_COCOA_QT
167
202
   qt4-bin_SOURCES += \
171
206
  endif
172
207
  qt4-bin_SOURCES += \
173
208
        $(VBOX_PATH_QT4)/plugins/accessible/libqtaccessiblewidgets.dylib=>MacOS/accessible/libqtaccessiblewidgets.dylib
174
 
  qt4-bin_SYMLINKS = $(foreach qtmod, QtCore QtGui QtNetwork \
 
209
  qt4-bin_SYMLINKS = $(foreach qtmod, QtCore QtGui QtNetwork $(if $(VBOX_GUI_USE_QGL), QtOpenGL,) \
175
210
                ,Frameworks/$(qtmod)VBox.framework/$(qtmod)VBox=>Versions/4/$(qtmod)VBox)
176
211
  ifdef VBOX_WITH_COCOA_QT
177
212
   qt4-bin_SYMLINKS += \
183
218
        $(VBOX_PATH_QT4_LIB)/QtCoreVBox4.dll \
184
219
        $(VBOX_PATH_QT4_LIB)/QtGuiVBox4.dll \
185
220
        $(VBOX_PATH_QT4_LIB)/QtNetworkVBox4.dll \
 
221
        $(if $(VBOX_GUI_USE_QGL), $(VBOX_PATH_QT4_LIB)/QtOpenGLVBox4.dll,) \
186
222
        $(VBOX_PATH_QT4)/plugins/accessible/qtaccessiblewidgets4.dll=>accessible/qtaccessiblewidgets4.dll
187
223
 else
188
224
  qt4-bin_INST = $(INST_BIN)
190
226
        $(VBOX_PATH_QT4_LIB)/libQtCoreVBox.so.4 \
191
227
        $(VBOX_PATH_QT4_LIB)/libQtGuiVBox.so.4 \
192
228
        $(VBOX_PATH_QT4_LIB)/libQtNetworkVBox.so.4 \
 
229
        $(if $(VBOX_GUI_USE_QGL), $(VBOX_PATH_QT4_LIB)/libQtOpenGLVBox.so.4,) \
193
230
        $(VBOX_PATH_QT4)/plugins/accessible/libqtaccessiblewidgets$(SUFF_DLL)=>accessible/libqtaccessiblewidgets$(SUFF_DLL)
194
231
 endif
195
232
endif # VBOX_WITH_QT4_SUN
203
240
ifdef VBOX_WITH_ADDITIONS_FROM_BUILD_SERVER
204
241
 ifdef VBOX_WITH_COMBINED_PACKAGE
205
242
  ifeq ($(KBUILD_TARGET_ARCH),amd64)
 
243
 
 
244
if defined(VBOX_WITH_VIDEOHWACCEL) || defined(VBOX_GUI_USE_QGL)
 
245
 VirtualBox_LDFLAGS.win += /DelayLoad:QtOpenGLVBox4.dll /DelayLoad:OPENGL32.dll
 
246
endif
 
247
 
206
248
   INSTALLS += buildserver-additions
207
249
  endif
208
250
 else
239
281
#
240
282
#
241
283
# Install documentation files (at the moment the .chm) from the build server.
242
 
# The $(CP)/$(RM) stuff can be replaced by a simple $(TOUCH) once that has
243
 
# been added to kBuild.
244
284
#
245
285
ifdef VBOX_WITH_DOCS_FROM_BUILD_SERVER
246
286
## @todo r=bird: Too much mess now for $(PATH_TARGET); move to doc/manual/.
252
292
                VirtualBox.chm UserManual.pdf \
253
293
                $(foreach f,$(VBOX_MANUAL_ADD_LANGUAGES),VirtualBox_$(f).chm UserManual_$(f).pdf))
254
294
buildserver-docs_CLEANS = \
 
295
        $(buildserver-docs_0_OUTDIR)/unpacked.ts \
 
296
        $(buildserver-docs_0_OUTDIR)/VBoxDocumentation.zip \
 
297
        $(buildserver-docs_0_OUTDIR)/VBoxDocumentation.zip.tmp \
255
298
        $(addprefix $(PATH_TARGET)/, \
256
 
                VBoxDocumentation.zip VBoxDocumentation.zip.tmp \
257
299
                VirtualBox.chm UserManual.pdf \
258
300
                $(foreach f,$(VBOX_MANUAL_ADD_LANGUAGES),VirtualBox_$(f).chm UserManual_$(f).pdf))
259
301
 
260
302
## @todo Hack to get at TOOL_ZIP_UNPACK; see if this can be integrated somehow...
261
303
include $(KBUILD_PATH)/tools/ZIP.kmk
262
304
 
263
 
$(PATH_TARGET)/VirtualBox.chm + $(PATH_TARGET)/UserManual.pdf \
264
 
$(foreach f,$(VBOX_MANUAL_ADD_LANGUAGES), + $(PATH_TARGET)/VirtualBox_$(f).chm + $(PATH_TARGET)/UserManual_$(f).pdf): \
265
 
                $(PATH_TARGET)/VBoxDocumentation.zip
 
305
$$(buildserver-docs_0_OUTDIR)/unpacked.ts +| $(PATH_TARGET)/VirtualBox.chm $(PATH_TARGET)/UserManual.pdf \
 
306
$(foreach f,$(VBOX_MANUAL_ADD_LANGUAGES),$(PATH_TARGET)/VirtualBox_$(f).chm $(PATH_TARGET)/UserManual_$(f).pdf): \
 
307
                $$(buildserver-docs_0_OUTDIR)/VBoxDocumentation.zip
266
308
        $(call MSG_L1,Unpacking documentation)
267
309
        $(QUIET)$(TOOL_ZIP_UNPACK) $(TOOL_ZIP_UNPACKFLAGS) -o $< -d $(PATH_TARGET)
 
310
        $(APPEND) -t $@ "done"
268
311
 
269
 
$(PATH_TARGET)/VBoxDocumentation.zip: $(VBOX_SVN_REV_KMK) $(PATH_DEVTOOLS)/bin/documentation.sh | $$(dir $$@)
270
 
        $(RM) -f $(PATH_TARGET)/VBoxDocumentation.zip $(PATH_TARGET)/VBoxDocumentation.zip.tmp
 
312
$$(buildserver-docs_0_OUTDIR)/VBoxDocumentation.zip: $(VBOX_SVN_REV_KMK) $(PATH_DEVTOOLS)/bin/documentation.sh | $$(dir $$@)
 
313
        $(RM) -f $@ $@.tmp
271
314
 ifneq ($(KBUILD_HOST),win)
272
 
        $(SHELL) $(PATH_DEVTOOLS)/bin/documentation.sh --cmd fetch --filename $(PATH_TARGET)/VBoxDocumentation.zip.tmp
 
315
        $(SHELL) $(PATH_DEVTOOLS)/bin/documentation.sh --cmd fetch --filename $@.tmp
273
316
 else
274
317
        $(KMK) --affinity 1 -f $(MAKEFILE) VBOX_SINGLE_MAKEFILE= buildserver-documentation-affinity-hack
275
318
 endif
276
 
        $(CP) -f $(PATH_TARGET)/VBoxDocumentation.zip.tmp $(PATH_TARGET)/VBoxDocumentation.zip
277
 
        $(RM) -f $(PATH_TARGET)/VBoxDocumentation.zip.tmp
 
319
        $(CP) -f $@.tmp $@
 
320
        $(RM) -f $@.tmp
 
321
## @todo kBuild: The $(CP)/$(RM) stuff can be replaced by a simple $(TOUCH) once that has been added to kBuild.
278
322
 
279
323
 ifeq ($(KBUILD_HOST),win)
280
324
buildserver-documentation-affinity-hack:
281
 
        $(SHELL) $(PATH_DEVTOOLS)/bin/documentation.sh --cmd fetch --filename $(PATH_TARGET)/VBoxDocumentation.zip.tmp
 
325
        $(SHELL) $(PATH_DEVTOOLS)/bin/documentation.sh --cmd fetch --filename $(buildserver-docs_0_OUTDIR)/VBoxDocumentation.zip.tmp
282
326
 endif
283
327
endif # VBOX_WITH_DOCS_FROM_BUILD_SERVER
284
328
 
285
329
 
286
330
#
 
331
# Install EFI firmware image
 
332
#
 
333
ifdef VBOX_WITH_EFIFW_FROM_BUILD_SERVER
 
334
#
 
335
# Either from the build server.
 
336
#
 
337
INSTALLS += buildserver-efifw
 
338
buildserver-efifw_INST = $(INST_BIN)
 
339
buildserver-efifw_MODE = 0644
 
340
buildserver-efifw_SOURCES = \
 
341
        $(buildserver-efifw_0_OUTDIR)/FV/VBOX.fd=>VBoxEFI32.fd \
 
342
        $(buildserver-efifw_0_OUTDIR)/FV/VBOX64.fd=>VBoxEFI64.fd
 
343
buildserver-efifw_CLEANS = \
 
344
        $(buildserver-efifw_0_OUTDIR)/FV/VBOX.fd \
 
345
        $(buildserver-efifw_0_OUTDIR)/FV/VBOX64.fd \
 
346
        $(buildserver-efifw_0_OUTDIR)/VBoxEfiFirmware.zip \
 
347
        $(buildserver-efifw_0_OUTDIR)/VBoxEfiFirmware.zip.tmp
 
348
## @todo rainy day: cleanup the output directory (zip contains lots more)
 
349
 
 
350
## @todo Hack to get at TOOL_ZIP_UNPACK; see if this can be integrated somehow...
 
351
include $(KBUILD_PATH)/tools/ZIP.kmk
 
352
 
 
353
$$(buildserver-efifw_0_OUTDIR)/FV/VBOX.fd \
 
354
+ $$(buildserver-efifw_0_OUTDIR)/FV/VBOX64.fd: $$(buildserver-efifw_0_OUTDIR)/VBoxEfiFirmware.zip
 
355
        $(QUIET)$(TOOL_ZIP_UNPACK) $(TOOL_ZIP_UNPACKFLAGS) -o $< -d $(buildserver-efifw_0_OUTDIR)
 
356
 
 
357
$$(buildserver-efifw_0_OUTDIR)/VBoxEfiFirmware.zip: $(VBOX_SVN_REV_KMK) $(PATH_DEVTOOLS)/bin/efi_firmware.sh | $$(dir $$@)
 
358
        $(RM) -f $@ $@.tmp
 
359
 ifneq ($(KBUILD_HOST),win)
 
360
        $(SHELL) $(PATH_DEVTOOLS)/bin/efi_firmware.sh --cmd fetch --filename $@.tmp
 
361
 else
 
362
        $(KMK) --affinity 1 -f $(MAKEFILE) VBOX_SINGLE_MAKEFILE= buildserver-efifw-affinity-hack
 
363
 endif
 
364
        $(CP) -f $@.tmp $@
 
365
        $(RM) -f $@.tmp
 
366
## @todo kBuild: The $(CP)/$(RM) stuff can be replaced by a simple $(TOUCH) once that has been added to kBuild.
 
367
 
 
368
 ifeq ($(KBUILD_HOST),win)
 
369
buildserver-efifw-affinity-hack:
 
370
        $(SHELL) $(PATH_DEVTOOLS)/bin/efi_firmware.sh --cmd fetch --filename $(buildserver-efifw_0_OUTDIR)/VBoxEfiFirmware.zip.tmp
 
371
 endif
 
372
else
 
373
#
 
374
# Or from the local copy
 
375
#
 
376
INSTALLS += local-efifw
 
377
local-efifw_INST = $(INST_BIN)
 
378
local-efifw_MODE = 0644
 
379
local-efifw_SOURCES = \
 
380
        $(PATH_ROOT)/src/VBox/Devices/EFI/FirmwareBin/VBoxEFI32.fd=>VBoxEFI32.fd \
 
381
        $(PATH_ROOT)/src/VBox/Devices/EFI/FirmwareBin/VBoxEFI64.fd=>VBoxEFI64.fd
 
382
endif # VBOX_WITH_EFIFW_FROM_BUILD_SERVER
 
383
 
 
384
 
 
385
#
287
386
# Install staged binaries on platforms where we can't cross
288
387
# compile things.
289
388
#
591
690
 
592
691
## @todo Currently combined solaris additions building assumes that amd64 is
593
692
# built first. The windows amd64 additions need some x86 files, so don't change
594
 
# the order of the windows builds.
595
 
# Do not change the order of dependencies here without testing.
 
693
# the order of the windows builds. TODO: Split building and packing for these two VMs.
596
694
additions-build: \
 
695
        additions-build-solaris.amd64 \
 
696
        additions-build-solaris.x86 \
597
697
        additions-build-win.x86 \
598
698
        additions-build-win.amd64 \
599
 
        additions-build-solaris.amd64 \
600
 
        additions-build-solaris.x86 \
601
699
        additions-build-os2.x86 \
602
700
        additions-build-linux.amd64 \
603
701
        additions-build-linux.x86
605
703
VBOX_ADDITIONS_BUILD.amd64 = VBOX_ONLY_ADDITIONS=1 VBOX_WITHOUT_ADDITIONS_ISO=1 \
606
704
        KBUILD_TYPE=$(KBUILD_TYPE) BUILD_TYPE=$(KBUILD_TYPE) \
607
705
        KBUILD_TARGET_ARCH=amd64 BUILD_TARGET_ARCH=amd64 \
608
 
        VBOX_SVN_REV=$(VBOX_SVN_REV) \
609
 
        all packing
 
706
        VBOX_SVN_REV=$(VBOX_SVN_REV)
610
707
 
611
708
VBOX_ADDITIONS_BUILD.x86 = VBOX_ONLY_ADDITIONS=1 VBOX_WITHOUT_ADDITIONS_ISO=1 \
612
709
        KBUILD_TYPE=$(KBUILD_TYPE) BUILD_TYPE=$(KBUILD_TYPE) \
613
710
        KBUILD_TARGET_ARCH=x86 BUILD_TARGET_ARCH=x86 \
614
 
        VBOX_SVN_REV=$(VBOX_SVN_REV) \
615
 
        all packing
 
711
        VBOX_SVN_REV=$(VBOX_SVN_REV)
616
712
 
617
713
# Automatically determine the additions build subdir name. Used for figuring
618
714
# out directory names inside the additions building VMs.
620
716
 
621
717
VBOX_KMK_TIME = $(KBUILD_BIN_PATH)/kmk_time
622
718
 
623
 
additions-build-win.amd64:
624
 
ifeq ($(KBUILD_TARGET),win)
625
 
        + $(VBOX_KMK_TIME) $(KMK) $(VBOX_ADDITIONS_BUILD.amd64)
 
719
# When building in parallel on a Windows host, make sure we finish the host
 
720
# bit before kicking off any UNIX guest or we'll run into file sharing issues.
 
721
ifeq ($(KBUILD_TARGET),win)
 
722
VBOX_ADDITIONS_BUILD_WIN_HOST_FIRST = additions-build-win.x86 additions-build-win.amd64
 
723
else
 
724
VBOX_ADDITIONS_BUILD_WIN_HOST_FIRST =
 
725
endif
 
726
 
 
727
# ASSUMES the 32-bit edition has been built already. Also for serializing VM access.
 
728
additions-build-win.amd64: additions-build-win.x86
 
729
ifeq ($(KBUILD_TARGET),win)
 
730
        + $(VBOX_KMK_TIME) $(KMK) $(VBOX_ADDITIONS_BUILD.amd64) all $(VBOX_ADD_HOST_BUILD_TWEAK)
 
731
        + $(VBOX_KMK_TIME) $(KMK) $(VBOX_ADDITIONS_BUILD.amd64) packing
626
732
else
627
733
        $(call MSG_L1,Building Windows/amd64 additions)
628
 
        $(VBOX_KMK_TIME) ssh vbox@192.168.27.5 "cd e:/$(VBOX_ADDITIONS_BUILD_SUBDIRNAME) && tools/env.sh kmk $(VBOX_ADDITIONS_BUILD.amd64)"
 
734
        $(VBOX_KMK_TIME) ssh vbox@192.168.27.5 " echo $@ && cd e:/$(VBOX_ADDITIONS_BUILD_SUBDIRNAME) && tools/env.sh kmk $(VBOX_ADDITIONS_BUILD.amd64) all packing "
629
735
endif
630
736
 
631
737
additions-build-win.x86:
632
738
ifeq ($(KBUILD_TARGET),win)
633
 
        + $(VBOX_KMK_TIME) $(KMK) $(VBOX_ADDITIONS_BUILD.x86)
 
739
        + $(VBOX_KMK_TIME) $(KMK) $(VBOX_ADDITIONS_BUILD.x86) all $(VBOX_ADD_HOST_BUILD_TWEAK)
 
740
        + $(VBOX_KMK_TIME) $(KMK) $(VBOX_ADDITIONS_BUILD.x86) packing
634
741
else
635
742
        $(call MSG_L1,Building Windows/x86 additions)
636
 
        $(VBOX_KMK_TIME) ssh vbox@192.168.27.5 " cd e:/$(VBOX_ADDITIONS_BUILD_SUBDIRNAME) && tools/env.sh kmk $(VBOX_ADDITIONS_BUILD.x86)"
 
743
        $(VBOX_KMK_TIME) ssh vbox@192.168.27.5 " echo $@ && cd e:/$(VBOX_ADDITIONS_BUILD_SUBDIRNAME) && tools/env.sh kmk $(VBOX_ADDITIONS_BUILD.x86) all packing"
637
744
endif
638
745
 
 
746
# ASSUMES the 64-bit edition are built first. This also serializes VM access.
 
747
ifeq ($(KBUILD_TARGET),solaris)
639
748
additions-build-solaris.amd64:
640
 
ifeq ($(KBUILD_TARGET),solaris)
641
 
        + $(VBOX_KMK_TIME) $(KMK) $(VBOX_ADDITIONS_BUILD.amd64)
 
749
        + $(VBOX_KMK_TIME) $(KMK) $(VBOX_ADDITIONS_BUILD.amd64) all $(VBOX_ADD_HOST_BUILD_TWEAK)
 
750
        + $(VBOX_KMK_TIME) $(KMK) $(VBOX_ADDITIONS_BUILD.amd64) packing
 
751
 
 
752
additions-build-solaris.x86: additions-build-solaris.amd64
 
753
        + $(VBOX_KMK_TIME) $(KMK) $(VBOX_ADDITIONS_BUILD.x86) VBOX_WITH_COMBINED_SOLARIS_GUEST_PACKAGE=1 all $(VBOX_ADD_HOST_BUILD_TWEAK)
 
754
        + $(VBOX_KMK_TIME) $(KMK) $(VBOX_ADDITIONS_BUILD.x86) VBOX_WITH_COMBINED_SOLARIS_GUEST_PACKAGE=1 packing
 
755
 
642
756
else
 
757
additions-build-solaris.rsync-into-vm:
 
758
        $(VBOX_KMK_TIME) rsync -a --delete --delete-excluded --exclude .svn --exclude FetchDir --exclude tinderclient.log --exclude win.amd64 --exclude win.x86 . 192.168.27.4:/mnt/tinderbox/$(VBOX_ADDITIONS_BUILD_SUBDIRNAME)
 
759
 
 
760
additions-build-solaris.build-it: $(VBOX_ADDITIONS_BUILD_WIN_HOST_FIRST)
643
761
        $(call MSG_L1,Building Solaris/amd64 additions)
644
 
        rsync -av --delete --delete-excluded --exclude .svn --exclude FetchDir --exclude tinderclient.log --exclude win.amd64 --exclude win.x86 . 192.168.27.4:/mnt/tinderbox/$(VBOX_ADDITIONS_BUILD_SUBDIRNAME)
645
 
        $(VBOX_KMK_TIME) ssh vbox@192.168.27.4 " cd /mnt/tinderbox/$(VBOX_ADDITIONS_BUILD_SUBDIRNAME) && tools/env.sh --no-wine kmk $(VBOX_ADDITIONS_BUILD.amd64) "
646
 
        rsync -av --delete 192.168.27.4:/mnt/tinderbox/$(VBOX_ADDITIONS_BUILD_SUBDIRNAME)/out/solaris.amd64 out/
647
 
endif
648
 
 
649
 
# ASSUMES 64-bit is built already. See @todo above.
650
 
additions-build-solaris.x86:
651
 
ifeq ($(KBUILD_TARGET),solaris)
652
 
        + $(VBOX_KMK_TIME) $(KMK) $(VBOX_ADDITIONS_BUILD.x86) VBOX_WITH_COMBINED_SOLARIS_GUEST_PACKAGE=1
653
 
else
 
762
        $(VBOX_KMK_TIME) ssh vbox@192.168.27.4 " echo $@/amd64 && cd /mnt/tinderbox/$(VBOX_ADDITIONS_BUILD_SUBDIRNAME) && tools/env.sh --no-wine kmk $(VBOX_ADDITIONS_BUILD.amd64) all packing"
654
763
        $(call MSG_L1,Building Solaris/x86 additions)
655
 
        rsync -av --delete --delete-excluded --exclude .svn --exclude FetchDir --exclude tinderclient.log --exclude win.amd64 --exclude win.x86 . 192.168.27.4:/mnt/tinderbox/$(VBOX_ADDITIONS_BUILD_SUBDIRNAME)
656
 
        $(VBOX_KMK_TIME) ssh vbox@192.168.27.4 " cd /mnt/tinderbox/$(VBOX_ADDITIONS_BUILD_SUBDIRNAME) && tools/env.sh --no-wine kmk $(VBOX_ADDITIONS_BUILD.x86) VBOX_WITH_COMBINED_SOLARIS_GUEST_PACKAGE=1"
657
 
        rsync -av --delete 192.168.27.4:/mnt/tinderbox/$(VBOX_ADDITIONS_BUILD_SUBDIRNAME)/out/solaris.x86 out/
 
764
        $(VBOX_KMK_TIME) ssh vbox@192.168.27.4 " echo $@/x86   && cd /mnt/tinderbox/$(VBOX_ADDITIONS_BUILD_SUBDIRNAME) && tools/env.sh --no-wine kmk $(VBOX_ADDITIONS_BUILD.x86) all packing VBOX_WITH_COMBINED_SOLARIS_GUEST_PACKAGE=1"
 
765
 
 
766
additions-build-solaris.rsync-out-of-vm: additions-build-solaris.build-it
 
767
        $(VBOX_KMK_TIME) rsync -a --delete 192.168.27.4:/mnt/tinderbox/$(VBOX_ADDITIONS_BUILD_SUBDIRNAME)/out/solaris.x86 out/
 
768
        $(VBOX_KMK_TIME) rsync -a --delete 192.168.27.4:/mnt/tinderbox/$(VBOX_ADDITIONS_BUILD_SUBDIRNAME)/out/solaris.amd64 out/
 
769
 
 
770
.NOTPARALLEL: additions-build-solaris.rsync-out-of-vm additions-build-solaris.rsync-into-vm
 
771
.PHONY:       additions-build-solaris.rsync-out-of-vm additions-build-solaris.rsync-into-vm additions-build-solaris.build-it
 
772
 
 
773
additions-build-solaris.amd64: additions-build-solaris.rsync-out-of-vm
 
774
additions-build-solaris.x86: additions-build-solaris.rsync-out-of-vm
658
775
endif
659
776
 
660
777
additions-build-os2.x86:
661
778
#ifeq ($(KBUILD_TARGET),os2)
662
 
#       + $(VBOX_KMK_TIME) $(KMK) $(VBOX_ADDITIONS_BUILD.x86)
 
779
#       + $(VBOX_KMK_TIME) $(KMK) $(VBOX_ADDITIONS_BUILD.x86) all $(VBOX_ADD_HOST_BUILD_TWEAK)
 
780
#       + $(VBOX_KMK_TIME) $(KMK) $(VBOX_ADDITIONS_BUILD.x86) packing
663
781
#else
664
782
#       $(VBOX_KMK_TIME) ssh vbox@192.168.27.3 " cd /mnt/tinderbox/$(VBOX_ADDITIONS_BUILD_SUBDIRNAME) && tools/env.sh --no-wine kmk $(VBOX_ADDITIONS_BUILD.x86) "
665
783
#endif
666
784
 
667
 
additions-build-linux.amd64:
 
785
additions-build-linux.amd64:   $(VBOX_ADDITIONS_BUILD_WIN_HOST_FIRST)
668
786
ifeq ($(KBUILD_TARGET).$(KBUILD_TARGET_ARCH),linux.amd64)
669
 
        + $(VBOX_KMK_TIME) $(KMK) $(VBOX_ADDITIONS_BUILD.amd64)
 
787
        + $(VBOX_KMK_TIME) $(KMK) $(VBOX_ADDITIONS_BUILD.amd64) all $(VBOX_ADD_HOST_BUILD_TWEAK)
 
788
        + $(VBOX_KMK_TIME) $(KMK) $(VBOX_ADDITIONS_BUILD.amd64) packing
670
789
else
671
790
        $(call MSG_L1,Building Linux/amd64 additions)
672
 
        $(VBOX_KMK_TIME) ssh vbox@192.168.27.12 " cd /mnt/tinderbox/$(VBOX_ADDITIONS_BUILD_SUBDIRNAME) && tools/env.sh --no-wine kmk $(VBOX_ADDITIONS_BUILD.amd64) "
 
791
        $(VBOX_KMK_TIME) ssh vbox@192.168.27.12 " echo $@ && cd /mnt/tinderbox/$(VBOX_ADDITIONS_BUILD_SUBDIRNAME) && tools/env.sh --no-wine kmk $(VBOX_ADDITIONS_BUILD.amd64) all packing"
673
792
endif
674
793
 
675
 
additions-build-linux.x86:
 
794
additions-build-linux.x86:   $(VBOX_ADDITIONS_BUILD_WIN_HOST_FIRST)
676
795
ifeq ($(KBUILD_TARGET).$(KBUILD_TARGET_ARCH),linux.x86)
677
 
        + $(VBOX_KMK_TIME) $(KMK) $(VBOX_ADDITIONS_BUILD.x86)
 
796
        + $(VBOX_KMK_TIME) $(KMK) $(VBOX_ADDITIONS_BUILD.x86) all $(VBOX_ADD_HOST_BUILD_TWEAK)
 
797
        + $(VBOX_KMK_TIME) $(KMK) $(VBOX_ADDITIONS_BUILD.x86) packing
678
798
else
679
799
        $(call MSG_L1,Building Linux/x86 additions)
680
 
        $(VBOX_KMK_TIME) ssh vbox@192.168.27.2 " cd /mnt/tinderbox/$(VBOX_ADDITIONS_BUILD_SUBDIRNAME) && tools/env.sh --no-wine kmk $(VBOX_ADDITIONS_BUILD.x86) "
 
800
        $(VBOX_KMK_TIME) ssh vbox@192.168.27.2 " echo $@ && cd /mnt/tinderbox/$(VBOX_ADDITIONS_BUILD_SUBDIRNAME) && tools/env.sh --no-wine kmk $(VBOX_ADDITIONS_BUILD.x86) all packing"
681
801
endif
682
802
 
683
803
 
695
815
                -C src/VBox/Additions \
696
816
                $(VBOX_PATH_ADDITIONS)/VBoxGuestAdditions.iso
697
817
 
698
 
 
 
818
.PHONY: \
 
819
        additions-build-win.x86 \
 
820
        additions-build-win.amd64 \
 
821
        additions-build-solaris.amd64 \
 
822
        additions-build-solaris.x86 \
 
823
        additions-build-os2.x86 \
 
824
        additions-build-linux.amd64 \
 
825
        additions-build-linux.x86 \
 
826
        additions-packing
 
827
 
 
828
 
 
829
#
 
830
# Build the EFI firmware, all of it.
 
831
#
 
832
# Mainly hooks right now, maybe we need them later.
 
833
#
 
834
efi-fetch:
 
835
 
 
836
efi-build: $(VBOX_VERSION_HEADER)
 
837
        $(PATH_ROOT)/webtools/tinderbox/client/efi-build.sh
 
838
 
 
839
efi-packing:
699
840
 
700
841
#
701
842
# Generate VirtualBox-OSE-x.x.x.tar.bz2 (OSE) tarballs for distribution
794
935
            -x!$(ZIPROOT)/doc/manual/de_DE \
795
936
            -x!$(ZIPROOT)/doc/manual/fr_FR \
796
937
            -x!$(ZIPROOT)/src/tests \
797
 
            -x!$(ZIPROOT)/src/VBox/Artwork \
 
938
            -x!$(ZIPROOT)/src/VBox/Artwork/2008-\* \
798
939
            -x!$(ZIPROOT)/src/VBox/Installer/AMI \
799
940
            -x!$(ZIPROOT)/src/VBox/Installer/Avanquest \
800
941
            -x!$(ZIPROOT)/src/VBox/Installer/Encore \
832
973
 
833
974
        @$(APPEND) $@.tmp '#define ATL_NO_VTABLE '
834
975
        @$(APPEND) $@.tmp '#define BEGIN_COM_MAP(a) '
 
976
        @$(APPEND) $@.tmp '#define COM_INTERFACE_ENTRY(a) '
 
977
        @$(APPEND) $@.tmp '#define COM_INTERFACE_ENTRY2(a,b) '
 
978
        @$(APPEND) $@.tmp '#define COM_INTERFACE_ENTRY3(a,b,c) '
 
979
        @$(APPEND) $@.tmp '#define COM_INTERFACE_ENTRY4(a,b,c,d) '
835
980
        @$(APPEND) $@.tmp '#define END_COM_MAP(a) '
836
981
 
837
 
        @$(APPEND) $@.tmp '#define CHECKREADY if(!isReady()) return E_UNEXPECTED; '
838
982
        @$(APPEND) $@.tmp '#define COM_DECL_READONLY_ENUM_AND_COLLECTION(a) '
839
 
        @$(APPEND) $@.tmp '#define COM_INTERFACE_ENTRY(a) '
840
983
        @$(APPEND) $@.tmp '#define COMGETTER(n)                    Get##n '
841
984
        @$(APPEND) $@.tmp '#define COMSETTER(n)                    Set##n '
842
985
        @$(APPEND) $@.tmp '#define ComSafeArrayIn(t,a)             t a[] '
843
986
        @$(APPEND) $@.tmp '#define ComSafeArrayOut(t,a)            t * a[] '
 
987
        @$(APPEND) $@.tmp '#define DECLARE_CLASSFACTORY(a) '
 
988
        @$(APPEND) $@.tmp '#define DECLARE_CLASSFACTORY_SINGLETON(a) '
 
989
        @$(APPEND) $@.tmp '#define DECLARE_REGISTRY_RESOURCEID(a) '
844
990
        @$(APPEND) $@.tmp '#define DECLARE_NOT_AGGREGATABLE(a) '
845
991
        @$(APPEND) $@.tmp '#define DECLARE_PROTECT_FINAL_CONSTRUCT(a) '
 
992
        @$(APPEND) $@.tmp '#define DECLARE_EMPTY_CTOR_DTOR(a)      a(); ~a();'
 
993
        @$(APPEND) $@.tmp '#define DEFINE_EMPTY_CTOR_DTOR(a)       a::a() {}   a::~a() {}'
846
994
        @$(APPEND) $@.tmp '#define NS_DECL_ISUPPORTS '
847
 
        @$(APPEND) $@.tmp '#define NS_IMETHOD NS_IMETHOD_(nsresult) '
848
 
        @$(APPEND) $@.tmp '#define NS_IMETHOD_(type) type '
 
995
        @$(APPEND) $@.tmp '#define NS_IMETHOD                      virtual nsresult '
 
996
        @$(APPEND) $@.tmp '#define NS_IMETHOD_(type)               virtual type '
 
997
        @$(APPEND) $@.tmp '#define NS_IMETHODIMP                   nsresult '
 
998
        @$(APPEND) $@.tmp '#define NS_IMETHODIMP_(type)            type '
849
999
        @$(APPEND) $@.tmp '#define PARSERS_EXPORT '
850
 
        @$(APPEND) $@.tmp '#define STDMETHOD(a) NS_IMETHOD a '
 
1000
if1of ($(KBUILD_HOST),win)
 
1001
        @$(APPEND) $@.tmp '#define STDMETHOD(m)                    virtual HRESULT m '
 
1002
        @$(APPEND) $@.tmp '#define STDMETHOD_(type,m)              virtual type m '
 
1003
        @$(APPEND) $@.tmp '#define STDMETHODIMP                    HRESULT '
 
1004
        @$(APPEND) $@.tmp '#define STDMETHODIMP_(type)             type '
 
1005
else
 
1006
        @$(APPEND) $@.tmp '#define STDMETHOD(m)                    virtual nsresult m '
 
1007
        @$(APPEND) $@.tmp '#define STDMETHOD_(type,m)              virtual type m '
 
1008
        @$(APPEND) $@.tmp '#define STDMETHODIMP                    nsresult '
 
1009
        @$(APPEND) $@.tmp '#define STDMETHODIMP_(type)             type '
 
1010
endif
 
1011
        @$(APPEND) $@.tmp '#define VBOX_SCRIPTABLE(a)              public a '
 
1012
        @$(APPEND) $@.tmp '#define VBOX_SCRIPTABLE_IMPL(a) '
 
1013
        @$(APPEND) $@.tmp '#define VIRTUALBOXBASE_ADD_ERRORINFO_SUPPORT(a) '
851
1014
 
852
1015
        @$(APPEND) $@.tmp '#define CTX_SUFF(var)                   var##R3 '
853
1016
        @$(APPEND) $@.tmp '#define CTXAllSUFF(var)                 var##R3 '
854
1017
        @$(APPEND) $@.tmp '#define CTXSUFF(var)                    var##HC '
855
 
        @$(APPEND) $@.tmp '#define OTHERCTXSUFF(var)          var##GC '
 
1018
        @$(APPEND) $@.tmp '#define OTHERCTXSUFF(var)               var##GC '
856
1019
        @$(APPEND) $@.tmp '#define CTXALLMID(first, last)          first##R3##last '
857
1020
        @$(APPEND) $@.tmp '#define CTXMID(first, last)             first##HC##last '
858
1021
        @$(APPEND) $@.tmp '#define OTHERCTXMID(first, last)        first##GC##last '
870
1033
        @$(APPEND) $@.tmp '#define RT_SRC_POS_ARGS                 pszFile, iLine, pszFunction '
871
1034
        @$(APPEND) $@.tmp '#define RTCALL'
872
1035
        @$(APPEND) $@.tmp '#define DECLINLINE(type)                inline type '
 
1036
        @$(APPEND) $@.tmp '#define DECL_FORCED_INLINE(type)        inline type '
 
1037
        @$(APPEND) $@.tmp '#define DECL_INVALID(type)              type '
873
1038
 
874
1039
        @$(APPEND) $@.tmp '#define PDMDEVINSINT_DECLARED           1'
 
1040
        @$(APPEND) $@.tmp '#define VBOX_WITH_HGCM                  1'
875
1041
        @$(APPEND) $@.tmp '#define VBOXCALL'
876
1042
 
877
1043
        $(SED)  -e '/__cdecl/d' \
891
1057
                -e '/ DECLASM(type) type/d' \
892
1058
                -e '/define  *DECL..CALLBACKMEMBER(type[^)]*) *RT/d' \
893
1059
                -e '/define  *DECLINLINE(type)/d' \
 
1060
                -e '/  *DECL_INVALID(/d' \
894
1061
                -e '/define RT[DATGRC03]*DECL(type) *DECLHIDDEN(type)/d' \
895
1062
                \
896
1063
                --append $@.tmp \