VirtualBox

source: vbox/trunk/src/VBox/Frontends/VirtualBox/Makefile.kmk@ 48831

Last change on this file since 48831 was 48816, checked in by vboxsync, 11 years ago

Reverted r89454: OS X host: leds sync and efence.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 41.7 KB
Line 
1# $Id: Makefile.kmk 48816 2013-10-02 11:36:31Z vboxsync $
2## @file
3# Makefile for the VirtualBox Qt GUI.
4#
5
6#
7# Copyright (C) 2006-2013 Oracle Corporation
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
18SUB_DEPTH = ../../../..
19include $(KBUILD_PATH)/subheader.kmk
20
21#
22# Globals.
23#
24VBOX_VIRTUALBOX4_SRC := $(PATH_SUB_CURRENT)
25VBOX_VIRTUALBOX4_OUT_DIR := $(PATH_TARGET)/VirtualBox/misc
26
27# Show the update notifier dialog during startup. If this setting is disabled
28# the user can still update using the menu if desired.
29ifndef VBOX_OSE
30VBOX_WITH_UPDATE_REQUEST := 1
31endif
32
33#
34# The targets.
35#
36ifdef VBOX_WITH_HARDENING
37PROGRAMS += VirtualBoxHardened
38DLLS += VirtualBox
39else
40PROGRAMS += VirtualBox
41endif
42
43INSTALLS += VirtualBox.nls
44
45
46#
47# Include the language lists.
48#
49include $(PATH_SUB_CURRENT)/nls/ApprovedLanguages.kmk
50
51
52#
53# Hardened VirtualBox.
54#
55VirtualBoxHardened_TEMPLATE = VBOXR3HARDENEDEXE
56VirtualBoxHardened_SOURCES = src/hardenedmain.cpp
57VirtualBoxHardened_NAME = VirtualBox
58VirtualBoxHardened_INST.darwin = $(INST_BIN)VirtualBox $(INST_BIN)VirtualBoxVM
59
60
61#
62# Include Qt project file, we'll use FORMS and TRANSLATIONS in
63# the VirtualBox setup below.
64#
65SAVED_TEMPLATE := $(TEMPLATE)
66include $(PATH_SUB_CURRENT)/VBoxUI.pro
67
68
69#
70# VirtualBox - The GUI program.
71#
72USES += qt4
73VirtualBox_TEMPLATE := $(if $(VBOX_WITH_HARDENING),VBOXQT4GUI,VBOXQT4GUIEXE)
74VirtualBox_NAME = VirtualBox
75ifndef VBOX_WITH_HARDENING # For the launch trick we need different inode numbers.
76 VirtualBox_INST.darwin = $(INST_BIN)VirtualBox $(INST_BIN)VirtualBoxVM
77endif
78VirtualBox_SDKS.win = ReorderCompilerIncs $(VBOX_WINPSDK) $(VBOX_WINDDK)
79
80VirtualBox_DEFS =
81VirtualBox_DEFS.debug = VBOX_CHECK_STATE # QT_FATAL_ASSERT
82VirtualBox_DEFS.darwin = VBOX_GUI_USE_QIMAGE VBOX_GUI_USE_QUARTZ2D VBOX_WITH_TRANSLUCENT_SEAMLESS
83VirtualBox_DEFS.freebsd = VBOX_GUI_USE_QIMAGE
84VirtualBox_DEFS.linux = VBOX_GUI_USE_QIMAGE
85VirtualBox_DEFS.netbsd = VBOX_GUI_USE_QIMAGE
86VirtualBox_DEFS.openbsd = VBOX_GUI_USE_QIMAGE
87VirtualBox_DEFS.solaris = VBOX_GUI_USE_QIMAGE
88VirtualBox_DEFS.win = VBOX_GUI_USE_QIMAGE UNICODE QT_DLL
89ifdef VBOX_WITH_ICHAT_THEATER
90 VirtualBox_DEFS.darwin += VBOX_WITH_ICHAT_THEATER
91endif
92VirtualBox_DEFS += \
93 $(if $(VBOX_WITH_ADDITIONS_AUTOUPDATE_UI),VBOX_WITH_ADDITIONS_AUTOUPDATE_UI) \
94 $(if $(VBOX_WITH_UPDATE_REQUEST),VBOX_WITH_UPDATE_REQUEST) \
95 $(if $(VBOX_WITH_ALSA),VBOX_WITH_ALSA) \
96 $(if $(VBOX_WITH_PULSE),VBOX_WITH_PULSE) \
97 $(if $(VBOX_WITH_SOLARIS_OSS),VBOX_WITH_SOLARIS_OSS) \
98 $(if $(VBOX_WITH_E1000),VBOX_WITH_E1000) \
99 $(if $(VBOX_WITH_NETFLT)$(eq $(KBUILD_TARGET),freebsd),VBOX_WITH_NETFLT) \
100 $(if $(VBOX_WITH_VDE),VBOX_WITH_VDE) \
101 $(if $(VBOX_WITH_UDPTUNNEL),VBOX_WITH_UDPTUNNEL) \
102 $(if $(VBOX_WITH_EXTPACK),VBOX_WITH_EXTPACK) \
103 $(if $(VBOX_WITH_EHCI),VBOX_WITH_EHCI) \
104 $(if $(VBOX_WITH_DRAG_AND_DROP),VBOX_WITH_DRAG_AND_DROP) \
105 $(if $(VBOX_WITH_DRAG_AND_DROP_GH),VBOX_WITH_DRAG_AND_DROP_GH) \
106 $(if $(VBOX_WITH_CRHGSMI),VBOX_WITH_CRHGSMI) \
107 $(if $(VBOX_WITH_VIRTIO),VBOX_WITH_VIRTIO) \
108 $(if $(VBOX_WITH_WDDM),VBOX_WITH_WDDM) \
109 $(if $(VBOX_WITH_CROGL),VBOX_WITH_CROGL) \
110 $(if $(VBOX_GUI_WITH_PIDFILE),VBOX_GUI_WITH_PIDFILE) \
111 $(if $(VBOX_GUI_WITH_KEYS_RESET_HANDLER),VBOX_GUI_WITH_KEYS_RESET_HANDLER) \
112 $(if $(VBOX_GUI_WITH_CUSTOMIZATIONS1),VBOX_GUI_WITH_CUSTOMIZATIONS1)
113ifdef VBOX_WITH_DEBUGGER_GUI
114 VirtualBox_DEFS += VBOX_WITH_DEBUGGER_GUI
115 if "$(KBUILD_TYPE)" != "release"
116 VirtualBox_DEFS += VBOX_WITH_DEBUGGER_GUI_MENU
117 endif
118endif
119ifdef VBOX_WITH_VIDEOHWACCEL
120 VirtualBox_DEFS += VBOX_WITH_VIDEOHWACCEL \
121 VBOX_GUI_USE_QGL
122else ifdef VBOX_GUI_USE_QGL
123 VirtualBox_DEFS += VBOX_GUI_USE_QGL
124endif
125ifdef VBOX_BLEEDING_EDGE
126VirtualBox_src/selector/UISelectorWindow.cpp_DEFS += \
127 VBOX_BLEEDING_EDGE=\"$(VBOX_BLEEDING_EDGE)\"
128VirtualBox_src/runtime/UIMachineWindow.cpp_DEFS += \
129 VBOX_BLEEDING_EDGE=\"$(VBOX_BLEEDING_EDGE)\"
130VirtualBox_src/VBoxAboutDlg.cpp_DEFS += \
131 VBOX_BLEEDING_EDGE=\"$(VBOX_BLEEDING_EDGE)\"
132VirtualBox_src/main.cpp_DEFS += \
133 VBOX_BLEEDING_EDGE=\"$(VBOX_BLEEDING_EDGE)\"
134endif
135
136
137VBOX_GUI_INC_DIRS = \
138 ./src \
139 ./src/converter \
140 ./src/extensions \
141 ./src/extensions/graphics \
142 ./src/globals \
143 ./src/net \
144 ./src/medium \
145 ./src/platform \
146 ./src/platform/darwin \
147 ./src/platform/win \
148 ./src/platform/x11 \
149 ./src/runtime \
150 ./src/runtime/fullscreen \
151 ./src/runtime/normal \
152 ./src/runtime/scale \
153 ./src/runtime/seamless \
154 ./src/selector \
155 ./src/selector/graphics/chooser \
156 ./src/selector/graphics/details \
157 ./src/settings \
158 ./src/settings/global \
159 ./src/settings/machine \
160 ./src/widgets \
161 ./src/widgets/graphics \
162 ./src/wizards \
163 ./src/wizards/newvm \
164 ./src/wizards/newvd \
165 ./src/wizards/clonevm \
166 ./src/wizards/clonevd \
167 ./src/wizards/exportappliance \
168 ./src/wizards/importappliance \
169 ./src/wizards/firstrun
170
171VirtualBox_INCS = \
172 $(VBOX_GUI_INC_DIRS) \
173 $(VirtualBox_0_OUTDIR)/include
174
175# Necessary for the hdd backend enumeration
176VirtualBox_LIBS = $(LIB_DDU)
177
178if1of ($(KBUILD_TARGET), linux freebsd netbsd openbsd)
179 VirtualBox_LIBS += dl
180endif
181
182# This library is required for multi-monitor support
183VirtualBox_LIBS.linux += Xinerama
184VirtualBox_LIBS.solaris += Xinerama
185VirtualBox_LIBS.freebsd += Xinerama
186
187ifneq ($(KBUILD_TARGET),win)
188VirtualBox_CXXFLAGS += -Wno-switch
189endif
190
191ifeq ($(KBUILD_TYPE),release)
192 VirtualBox_LDFLAGS.win += /SUBSYSTEM:windows
193else
194 VirtualBox_LDFLAGS.linux += -rdynamic # for backtrace_symbols()
195 VirtualBox_LDFLAGS.win += /SUBSYSTEM:console
196endif
197
198# delay loading causes VM process crashes due to the misbehave of the current QtOpenGLVBox4.dll we use
199# (i.e. it does not create the ogl context properly when loaded this way)
200#
201# @todo: investigate a better work-around and enable back delay loading since it is needed to avoid
202# crashes caused by buggy ogl drivers for the case 2D is not used (i.e. no ogl stuff loaded)
203#if defined(VBOX_WITH_VIDEOHWACCEL) || defined(VBOX_GUI_USE_QGL)
204# VirtualBox_LDFLAGS.win += /DelayLoad:QtOpenGLVBox4.dll /DelayLoad:OPENGL32.dll
205#endif
206
207VirtualBox_LDFLAGS.darwin = \
208 -framework AppKit -framework Carbon -framework IOKit \
209 $(if $(VBOX_WITH_HARDENING),-install_name $(VBOX_DYLD_EXECUTABLE_PATH)/VirtualBox.dylib)
210ifdef VBOX_WITH_ICHAT_THEATER
211 VirtualBox_LDFLAGS.darwin += -framework InstantMessage -framework QuartzCore
212endif
213
214VirtualBox_LIBS.win = \
215 $(PATH_SDK_$(VBOX_WINPSDK)_LIB)/Htmlhelp.Lib \
216 $(PATH_SDK_$(VBOX_WINDDK)_LIB)/ddraw.lib \
217 $(PATH_SDK_$(VBOX_WINDDK)_LIB)/dxguid.lib
218if1of ($(KBUILD_TARGET), freebsd linux netbsd openbsd solaris) # X11
219 VirtualBox_LIBS += $(PATH_STAGE_DLL)/VBoxKeyboard$(VBOX_SUFF_DLL)
220endif
221
222if defined(VBOX_WITH_VIDEOHWACCEL) || defined(VBOX_GUI_USE_QGL)
223 VirtualBox_LIBS.win += $(PATH_SDK_$(VBOX_WINPSDK)_LIB)/Opengl32.lib
224 VirtualBox_LIBS.solaris += GL
225 VirtualBox_LIBS.linux += GL
226 VirtualBox_LIBS.freebsd += GL
227 VirtualBox_LDFLAGS.darwin += -framework OpenGL
228endif
229ifdef VBOX_WITH_CROGL
230 VirtualBox_LIBS += $(PATH_STAGE_LIB)/VBoxOGLTest$(VBOX_SUFF_LIB)
231endif
232
233
234# Headers containing definitions of classes that use the Q_OBJECT macro.
235VirtualBox_QT_MOCHDRS = \
236 src/UIMediumTypeChangeDialog.h \
237 src/VBoxAboutDlg.h \
238 src/VBoxGlobalSettings.h \
239 src/VBoxLicenseViewer.h \
240 src/VBoxSnapshotDetailsDlg.h \
241 src/VBoxTakeSnapshotDlg.h \
242 src/VBoxVMInformationDlg.h \
243 src/UIVMLogViewer.h \
244 src/extensions/QIAdvancedSlider.h \
245 src/extensions/QIArrowButtonPress.h \
246 src/extensions/QIArrowButtonSwitch.h \
247 src/extensions/QIArrowSplitter.h \
248 src/extensions/QIDialog.h \
249 src/extensions/QIFileDialog.h \
250 src/extensions/QILabel.h \
251 src/extensions/QILabelSeparator.h \
252 src/extensions/QIListView.h \
253 src/extensions/QIMainDialog.h \
254 src/extensions/QIMessageBox.h \
255 src/extensions/QIProcess.h \
256 src/extensions/QIRichTextLabel.h \
257 src/extensions/QIRichToolButton.h \
258 src/extensions/QISplitter.h \
259 src/extensions/QIStateIndicator.h \
260 src/extensions/QIStatusBar.h \
261 src/extensions/QITabWidget.h \
262 src/extensions/QITableView.h \
263 src/extensions/QIToolButton.h \
264 src/extensions/QITextEdit.h \
265 src/extensions/QITreeView.h \
266 src/extensions/QITreeWidget.h \
267 src/extensions/QIWidgetValidator.h \
268 src/extensions/QIAdvancedToolBar.h \
269 src/extensions/graphics/QIGraphicsWidget.h \
270 src/globals/UIActionPool.h \
271 src/globals/UIAnimationFramework.h \
272 src/globals/UIExtraDataEventHandler.h \
273 src/globals/UIMainEventListener.h \
274 src/globals/UIMessageCenter.h \
275 src/globals/UIModalWindowManager.h \
276 src/globals/UIPopupCenter.h \
277 src/globals/UIShortcutPool.h \
278 src/globals/UIThreadPool.h \
279 src/globals/VBoxGlobal.h \
280 src/globals/VBoxUtils.h \
281 src/net/UINetworkManager.h \
282 src/net/UINetworkManagerDialog.h \
283 src/net/UINetworkManagerIndicator.h \
284 src/net/UINetworkRequest.h \
285 src/net/UINetworkRequestWidget.h \
286 src/net/UINetworkReply.h \
287 src/net/UINetworkCustomer.h \
288 src/net/UIUpdateManager.h \
289 src/net/UIDownloader.h \
290 src/net/UIDownloaderAdditions.h \
291 src/net/UIDownloaderExtensionPack.h \
292 src/net/UIDownloaderUserManual.h \
293 src/medium/UIMediumEnumerator.h \
294 src/medium/UIMediumManager.h \
295 src/runtime/UIActionPoolRuntime.h \
296 src/runtime/UIConsoleEventHandler.h \
297 src/runtime/UIFrameBuffer.h \
298 src/runtime/UIIndicatorsPool.h \
299 src/runtime/UIKeyboardHandler.h \
300 src/runtime/UIMachine.h \
301 src/runtime/UIMachineLogic.h \
302 src/runtime/UIMachineWindow.h \
303 src/runtime/UIMachineView.h \
304 src/runtime/UIMouseHandler.h \
305 src/runtime/UIMultiScreenLayout.h \
306 src/runtime/UISession.h \
307 src/runtime/UIVMCloseDialog.h \
308 src/runtime/fullscreen/UIKeyboardHandlerFullscreen.h \
309 src/runtime/fullscreen/UIMachineLogicFullscreen.h \
310 src/runtime/fullscreen/UIMachineViewFullscreen.h \
311 src/runtime/fullscreen/UIMachineWindowFullscreen.h \
312 src/runtime/normal/UIKeyboardHandlerNormal.h \
313 src/runtime/normal/UIMachineLogicNormal.h \
314 src/runtime/normal/UIMachineViewNormal.h \
315 src/runtime/normal/UIMachineWindowNormal.h \
316 src/runtime/scale/UIKeyboardHandlerScale.h \
317 src/runtime/scale/UIMachineLogicScale.h \
318 src/runtime/scale/UIMachineViewScale.h \
319 src/runtime/scale/UIMachineWindowScale.h \
320 src/runtime/seamless/UIKeyboardHandlerSeamless.h \
321 src/runtime/seamless/UIMachineLogicSeamless.h \
322 src/runtime/seamless/UIMachineViewSeamless.h \
323 src/runtime/seamless/UIMachineWindowSeamless.h \
324 src/selector/UIActionPoolSelector.h \
325 src/selector/UIVMDesktop.h \
326 src/selector/UIVMItem.h \
327 src/selector/UIVirtualBoxEventHandler.h \
328 src/selector/UISelectorWindow.h \
329 src/selector/VBoxSnapshotsWgt.h \
330 src/selector/graphics/chooser/UIGChooser.h \
331 src/selector/graphics/chooser/UIGChooserModel.h \
332 src/selector/graphics/chooser/UIGChooserView.h \
333 src/selector/graphics/chooser/UIGChooserHandlerMouse.h \
334 src/selector/graphics/chooser/UIGChooserHandlerKeyboard.h \
335 src/selector/graphics/chooser/UIGChooserItem.h \
336 src/selector/graphics/chooser/UIGChooserItemGroup.h \
337 src/selector/graphics/chooser/UIGChooserItemMachine.h \
338 src/selector/graphics/details/UIGDetails.h \
339 src/selector/graphics/details/UIGDetailsModel.h \
340 src/selector/graphics/details/UIGDetailsView.h \
341 src/selector/graphics/details/UIGDetailsItem.h \
342 src/selector/graphics/details/UIGDetailsGroup.h \
343 src/selector/graphics/details/UIGDetailsSet.h \
344 src/selector/graphics/details/UIGDetailsElement.h \
345 src/selector/graphics/details/UIGDetailsElements.h \
346 src/selector/graphics/details/UIGMachinePreview.h \
347 src/settings/UISettingsDialog.h \
348 src/settings/UISettingsDialogSpecific.h \
349 src/settings/UISettingsPage.h \
350 src/settings/VBoxSettingsSelector.h \
351 src/settings/global/UIGlobalSettingsExtension.h \
352 src/settings/global/UIGlobalSettingsGeneral.h \
353 src/settings/global/UIGlobalSettingsInput.h \
354 src/settings/global/UIGlobalSettingsLanguage.h \
355 src/settings/global/UIGlobalSettingsDisplay.h \
356 src/settings/global/UIGlobalSettingsNetwork.h \
357 src/settings/global/UIGlobalSettingsNetworkDetailsNAT.h \
358 src/settings/global/UIGlobalSettingsNetworkDetailsHost.h \
359 src/settings/global/UIGlobalSettingsPortForwardingDlg.h \
360 src/settings/global/UIGlobalSettingsProxy.h \
361 src/settings/global/UIGlobalSettingsUpdate.h \
362 src/settings/machine/UIMachineSettingsAudio.h \
363 src/settings/machine/UIMachineSettingsDisplay.h \
364 src/settings/machine/UIMachineSettingsGeneral.h \
365 src/settings/machine/UIMachineSettingsNetwork.h \
366 src/settings/machine/UIMachineSettingsParallel.h \
367 src/settings/machine/UIMachineSettingsPortForwardingDlg.h \
368 src/settings/machine/UIMachineSettingsSF.h \
369 src/settings/machine/UIMachineSettingsSFDetails.h \
370 src/settings/machine/UIMachineSettingsSerial.h \
371 src/settings/machine/UIMachineSettingsStorage.h \
372 src/settings/machine/UIMachineSettingsSystem.h \
373 src/settings/machine/UIMachineSettingsUSB.h \
374 src/settings/machine/UIMachineSettingsUSBFilterDetails.h \
375 src/widgets/UIApplianceEditorWidget.h \
376 src/widgets/UIApplianceExportEditorWidget.h \
377 src/widgets/UIApplianceImportEditorWidget.h \
378 src/widgets/UIBar.h \
379 src/widgets/UIBootTable.h \
380 src/widgets/UIHostComboEditor.h \
381 src/widgets/UIHotKeyEditor.h \
382 src/widgets/UILineTextEdit.h \
383 src/widgets/UIPopupBox.h \
384 src/widgets/UIPopupPane.h \
385 src/widgets/UIPopupPaneTextPane.h \
386 src/widgets/UIPopupPaneButtonPane.h \
387 src/widgets/UIPopupStack.h \
388 src/widgets/UIPopupStackViewport.h \
389 src/widgets/UIPortForwardingTable.h \
390 src/widgets/UIProgressDialog.h \
391 src/widgets/UISpacerWidgets.h \
392 src/widgets/UISpecialControls.h \
393 src/widgets/VBoxFilePathSelectorWidget.h \
394 src/widgets/VBoxMediaComboBox.h \
395 src/widgets/UIMiniToolBar.h \
396 src/widgets/VBoxOSTypeSelectorButton.h \
397 src/widgets/UINameAndSystemEditor.h \
398 src/widgets/UIWarningPane.h \
399 src/widgets/UIFilmContainer.h \
400 src/widgets/graphics/UIGraphicsButton.h \
401 src/widgets/graphics/UIGraphicsRotatorButton.h \
402 src/widgets/graphics/UIGraphicsZoomButton.h \
403 src/widgets/graphics/UIGraphicsToolBar.h \
404 src/wizards/UIWizard.h \
405 src/wizards/UIWizardPage.h \
406 src/wizards/newvm/UIWizardNewVM.h \
407 src/wizards/newvm/UIWizardNewVMPageBasic1.h \
408 src/wizards/newvm/UIWizardNewVMPageBasic2.h \
409 src/wizards/newvm/UIWizardNewVMPageBasic3.h \
410 src/wizards/newvm/UIWizardNewVMPageExpert.h \
411 src/wizards/newvd/UIWizardNewVD.h \
412 src/wizards/newvd/UIWizardNewVDPageBasic1.h \
413 src/wizards/newvd/UIWizardNewVDPageBasic2.h \
414 src/wizards/newvd/UIWizardNewVDPageBasic3.h \
415 src/wizards/newvd/UIWizardNewVDPageExpert.h \
416 src/wizards/clonevm/UIWizardCloneVM.h \
417 src/wizards/clonevm/UIWizardCloneVMPageBasic1.h \
418 src/wizards/clonevm/UIWizardCloneVMPageBasic2.h \
419 src/wizards/clonevm/UIWizardCloneVMPageBasic3.h \
420 src/wizards/clonevm/UIWizardCloneVMPageExpert.h \
421 src/wizards/clonevd/UIWizardCloneVD.h \
422 src/wizards/clonevd/UIWizardCloneVDPageBasic1.h \
423 src/wizards/clonevd/UIWizardCloneVDPageBasic2.h \
424 src/wizards/clonevd/UIWizardCloneVDPageBasic3.h \
425 src/wizards/clonevd/UIWizardCloneVDPageBasic4.h \
426 src/wizards/clonevd/UIWizardCloneVDPageExpert.h \
427 src/wizards/exportappliance/UIWizardExportApp.h \
428 src/wizards/exportappliance/UIWizardExportAppPageBasic1.h \
429 src/wizards/exportappliance/UIWizardExportAppPageBasic2.h \
430 src/wizards/exportappliance/UIWizardExportAppPageBasic3.h \
431 src/wizards/exportappliance/UIWizardExportAppPageBasic4.h \
432 src/wizards/exportappliance/UIWizardExportAppPageExpert.h \
433 src/wizards/importappliance/UIWizardImportApp.h \
434 src/wizards/importappliance/UIWizardImportAppPageBasic1.h \
435 src/wizards/importappliance/UIWizardImportAppPageBasic2.h \
436 src/wizards/importappliance/UIWizardImportAppPageExpert.h \
437 src/wizards/firstrun/UIWizardFirstRun.h \
438 src/wizards/firstrun/UIWizardFirstRunPageBasic.h
439
440VirtualBox_QT_MOCHDRS.darwin += \
441 src/platform/darwin/UIWindowMenuManager.h
442
443# Sources containing local definitions of classes that use the Q_OBJECT macro.
444VirtualBox_QT_MOCSRCS = \
445 src/UIVMLogViewer.cpp \
446 src/extensions/QISplitter.cpp \
447 src/extensions/QIAdvancedToolBar.cpp \
448 src/globals/UIActionPool.cpp \
449 src/globals/UIExtraDataEventHandler.cpp \
450 src/globals/UIThreadPool.cpp \
451 src/medium/UIMediumEnumerator.cpp \
452 src/medium/UIMediumManager.cpp \
453 src/net/UINetworkReply.cpp \
454 src/net/UIUpdateManager.cpp \
455 src/runtime/UIActionPoolRuntime.cpp \
456 src/runtime/UIIndicatorsPool.cpp \
457 src/runtime/UIMachine.cpp \
458 src/runtime/UIMachineMenuBar.cpp \
459 src/selector/UIActionPoolSelector.cpp \
460 src/selector/UIVMDesktop.cpp \
461 src/settings/UISettingsDialogSpecific.cpp \
462 src/settings/machine/UIMachineSettingsStorage.cpp \
463 src/settings/machine/UIMachineSettingsUSB.cpp \
464 src/widgets/UIHotKeyEditor.cpp \
465 src/widgets/UIPortForwardingTable.cpp \
466 src/wizards/importappliance/UIWizardImportApp.cpp
467
468VirtualBox_QT_MOCSRCS.darwin += \
469 src/platform/darwin/UIWindowMenuManager.cpp
470VirtualBox_QT_MOCSRCS.win += \
471 src/extensions/QIFileDialog.cpp
472
473ifdef VBOX_WITH_XPCOM
474 VirtualBox_QT_MOCSRCS += \
475 src/globals/COMDefs.cpp
476endif
477
478VirtualBox_SOURCES = \
479 src/main.cpp \
480 src/UIMediumTypeChangeDialog.cpp \
481 src/VBoxAboutDlg.cpp \
482 src/VBoxGlobalSettings.cpp \
483 src/VBoxLicenseViewer.cpp \
484 src/VBoxSnapshotDetailsDlg.cpp \
485 src/VBoxTakeSnapshotDlg.cpp \
486 src/VBoxVMInformationDlg.cpp \
487 src/UIVMLogViewer.cpp \
488 src/converter/UIConverter.cpp \
489 src/converter/UIConverterBackendCOM.cpp \
490 src/converter/UIConverterBackendGlobal.cpp \
491 src/extensions/QIAdvancedSlider.cpp \
492 src/extensions/QIArrowButtonPress.cpp \
493 src/extensions/QIArrowButtonSwitch.cpp \
494 src/extensions/QIArrowSplitter.cpp \
495 src/extensions/QIDialog.cpp \
496 src/extensions/QIDialogButtonBox.cpp \
497 src/extensions/QIFileDialog.cpp \
498 src/extensions/QILabel.cpp \
499 src/extensions/QILabelSeparator.cpp \
500 src/extensions/QILineEdit.cpp \
501 src/extensions/QIListView.cpp \
502 src/extensions/QIMainDialog.cpp \
503 src/extensions/QIMessageBox.cpp \
504 src/extensions/QIProcess.cpp \
505 src/extensions/QIRichTextLabel.cpp \
506 src/extensions/QIRichToolButton.cpp \
507 src/extensions/QISplitter.cpp \
508 src/extensions/QIStateIndicator.cpp \
509 src/extensions/QIStatusBar.cpp \
510 src/extensions/QITableView.cpp \
511 src/extensions/QITextEdit.cpp \
512 src/extensions/QITreeView.cpp \
513 src/extensions/QITreeWidget.cpp \
514 src/extensions/QIWidgetValidator.cpp \
515 src/extensions/QIAdvancedToolBar.cpp \
516 src/extensions/graphics/QIGraphicsWidget.cpp \
517 src/globals/UIDefs.cpp \
518 src/globals/COMDefs.cpp \
519 src/globals/UIActionPool.cpp \
520 src/globals/UIAnimationFramework.cpp \
521 src/globals/UIExtraDataEventHandler.cpp \
522 src/globals/UIIconPool.cpp \
523 src/globals/UIImageTools.cpp \
524 src/globals/UIMainEventListener.cpp \
525 src/globals/UIMessageCenter.cpp \
526 src/globals/UIModalWindowManager.cpp \
527 src/globals/UIPopupCenter.cpp \
528 src/globals/UIShortcutPool.cpp \
529 src/globals/UIThreadPool.cpp \
530 src/globals/VBoxGlobal.cpp \
531 src/medium/UIMediumDefs.cpp \
532 src/medium/UIMedium.cpp \
533 src/medium/UIMediumEnumerator.cpp \
534 src/medium/UIMediumManager.cpp \
535 src/net/UINetworkManager.cpp \
536 src/net/UINetworkManagerDialog.cpp \
537 src/net/UINetworkManagerIndicator.cpp \
538 src/net/UINetworkRequest.cpp \
539 src/net/UINetworkRequestWidget.cpp \
540 src/net/UINetworkReply.cpp \
541 src/net/UINetworkCustomer.cpp \
542 src/net/UIDownloader.cpp \
543 src/net/UIDownloaderAdditions.cpp \
544 src/net/UIDownloaderExtensionPack.cpp \
545 src/net/UIDownloaderUserManual.cpp \
546 src/net/UIUpdateDefs.cpp \
547 src/net/UIUpdateManager.cpp \
548 src/runtime/UIActionPoolRuntime.cpp \
549 src/runtime/UIConsoleEventHandler.cpp \
550 src/runtime/UIFrameBuffer.cpp \
551 src/runtime/UIFrameBufferQImage.cpp \
552 src/runtime/UIIndicatorsPool.cpp \
553 src/runtime/UIKeyboardHandler.cpp \
554 src/runtime/UIMachine.cpp \
555 src/runtime/UIMachineLogic.cpp \
556 src/runtime/UIMachineMenuBar.cpp \
557 src/runtime/UIMachineView.cpp \
558 src/runtime/UIMachineWindow.cpp \
559 src/runtime/UIMouseHandler.cpp \
560 src/runtime/UIMultiScreenLayout.cpp \
561 src/runtime/UISession.cpp \
562 src/runtime/UIVMCloseDialog.cpp \
563 src/runtime/fullscreen/UIKeyboardHandlerFullscreen.cpp \
564 src/runtime/fullscreen/UIMachineLogicFullscreen.cpp \
565 src/runtime/fullscreen/UIMachineViewFullscreen.cpp \
566 src/runtime/fullscreen/UIMachineWindowFullscreen.cpp \
567 src/runtime/normal/UIKeyboardHandlerNormal.cpp \
568 src/runtime/normal/UIMachineLogicNormal.cpp \
569 src/runtime/normal/UIMachineViewNormal.cpp \
570 src/runtime/normal/UIMachineWindowNormal.cpp \
571 src/runtime/scale/UIKeyboardHandlerScale.cpp \
572 src/runtime/scale/UIMachineLogicScale.cpp \
573 src/runtime/scale/UIMachineViewScale.cpp \
574 src/runtime/scale/UIMachineWindowScale.cpp \
575 src/runtime/seamless/UIKeyboardHandlerSeamless.cpp \
576 src/runtime/seamless/UIMachineLogicSeamless.cpp \
577 src/runtime/seamless/UIMachineViewSeamless.cpp \
578 src/runtime/seamless/UIMachineWindowSeamless.cpp \
579 src/selector/UIActionPoolSelector.cpp \
580 src/selector/UIVMDesktop.cpp \
581 src/selector/UIVMItem.cpp \
582 src/selector/UIVirtualBoxEventHandler.cpp \
583 src/selector/UISelectorWindow.cpp \
584 src/selector/graphics/chooser/UIGChooser.cpp \
585 src/selector/graphics/chooser/UIGChooserModel.cpp \
586 src/selector/graphics/chooser/UIGChooserView.cpp \
587 src/selector/graphics/chooser/UIGChooserHandlerMouse.cpp \
588 src/selector/graphics/chooser/UIGChooserHandlerKeyboard.cpp \
589 src/selector/graphics/chooser/UIGChooserItem.cpp \
590 src/selector/graphics/chooser/UIGChooserItemGroup.cpp \
591 src/selector/graphics/chooser/UIGChooserItemMachine.cpp \
592 src/selector/graphics/details/UIGDetails.cpp \
593 src/selector/graphics/details/UIGDetailsModel.cpp \
594 src/selector/graphics/details/UIGDetailsView.cpp \
595 src/selector/graphics/details/UIGDetailsItem.cpp \
596 src/selector/graphics/details/UIGDetailsGroup.cpp \
597 src/selector/graphics/details/UIGDetailsSet.cpp \
598 src/selector/graphics/details/UIGDetailsElement.cpp \
599 src/selector/graphics/details/UIGDetailsElements.cpp \
600 src/selector/graphics/details/UIGMachinePreview.cpp \
601 src/selector/VBoxSnapshotsWgt.cpp \
602 src/settings/UISettingsDefs.cpp \
603 src/settings/UISettingsDialog.cpp \
604 src/settings/UISettingsDialogSpecific.cpp \
605 src/settings/UISettingsPage.cpp \
606 src/settings/VBoxSettingsSelector.cpp \
607 src/settings/global/UIGlobalSettingsExtension.cpp \
608 src/settings/global/UIGlobalSettingsGeneral.cpp \
609 src/settings/global/UIGlobalSettingsInput.cpp \
610 src/settings/global/UIGlobalSettingsLanguage.cpp \
611 src/settings/global/UIGlobalSettingsDisplay.cpp \
612 src/settings/global/UIGlobalSettingsNetwork.cpp \
613 src/settings/global/UIGlobalSettingsNetworkDetailsNAT.cpp \
614 src/settings/global/UIGlobalSettingsNetworkDetailsHost.cpp \
615 src/settings/global/UIGlobalSettingsPortForwardingDlg.cpp \
616 src/settings/global/UIGlobalSettingsProxy.cpp \
617 src/settings/global/UIGlobalSettingsUpdate.cpp \
618 src/settings/machine/UIMachineSettingsAudio.cpp \
619 src/settings/machine/UIMachineSettingsDisplay.cpp \
620 src/settings/machine/UIMachineSettingsGeneral.cpp \
621 src/settings/machine/UIMachineSettingsNetwork.cpp \
622 src/settings/machine/UIMachineSettingsParallel.cpp \
623 src/settings/machine/UIMachineSettingsPortForwardingDlg.cpp \
624 src/settings/machine/UIMachineSettingsSF.cpp \
625 src/settings/machine/UIMachineSettingsSFDetails.cpp \
626 src/settings/machine/UIMachineSettingsSerial.cpp \
627 src/settings/machine/UIMachineSettingsStorage.cpp \
628 src/settings/machine/UIMachineSettingsSystem.cpp \
629 src/settings/machine/UIMachineSettingsUSB.cpp \
630 src/settings/machine/UIMachineSettingsUSBFilterDetails.cpp \
631 src/widgets/UIApplianceEditorWidget.cpp \
632 src/widgets/UIApplianceExportEditorWidget.cpp \
633 src/widgets/UIApplianceImportEditorWidget.cpp \
634 src/widgets/UIBar.cpp \
635 src/widgets/UIBootTable.cpp \
636 src/widgets/UIHostComboEditor.cpp \
637 src/widgets/UIHotKeyEditor.cpp \
638 src/widgets/UILineTextEdit.cpp \
639 src/widgets/UIPopupBox.cpp \
640 src/widgets/UIPopupPane.cpp \
641 src/widgets/UIPopupPaneTextPane.cpp \
642 src/widgets/UIPopupPaneButtonPane.cpp \
643 src/widgets/UIPopupStack.cpp \
644 src/widgets/UIPopupStackViewport.cpp \
645 src/widgets/UIPortForwardingTable.cpp \
646 src/widgets/UIProgressDialog.cpp \
647 src/widgets/UISpecialControls.cpp \
648 src/widgets/UIToolBar.cpp \
649 src/widgets/VBoxFilePathSelectorWidget.cpp \
650 src/widgets/VBoxGuestRAMSlider.cpp \
651 src/widgets/VBoxMediaComboBox.cpp \
652 src/widgets/UIMiniToolBar.cpp \
653 src/widgets/VBoxOSTypeSelectorButton.cpp \
654 src/widgets/UINameAndSystemEditor.cpp \
655 src/widgets/UIWarningPane.cpp \
656 src/widgets/UIFilmContainer.cpp \
657 src/widgets/graphics/UIGraphicsButton.cpp \
658 src/widgets/graphics/UIGraphicsRotatorButton.cpp \
659 src/widgets/graphics/UIGraphicsZoomButton.cpp \
660 src/widgets/graphics/UIGraphicsToolBar.cpp \
661 src/wizards/UIWizard.cpp \
662 src/wizards/UIWizardPage.cpp \
663 src/wizards/newvm/UIWizardNewVM.cpp \
664 src/wizards/newvm/UIWizardNewVMPageBasic1.cpp \
665 src/wizards/newvm/UIWizardNewVMPageBasic2.cpp \
666 src/wizards/newvm/UIWizardNewVMPageBasic3.cpp \
667 src/wizards/newvm/UIWizardNewVMPageExpert.cpp \
668 src/wizards/newvd/UIWizardNewVD.cpp \
669 src/wizards/newvd/UIWizardNewVDPageBasic1.cpp \
670 src/wizards/newvd/UIWizardNewVDPageBasic2.cpp \
671 src/wizards/newvd/UIWizardNewVDPageBasic3.cpp \
672 src/wizards/newvd/UIWizardNewVDPageExpert.cpp \
673 src/wizards/clonevm/UIWizardCloneVM.cpp \
674 src/wizards/clonevm/UIWizardCloneVMPageBasic1.cpp \
675 src/wizards/clonevm/UIWizardCloneVMPageBasic2.cpp \
676 src/wizards/clonevm/UIWizardCloneVMPageBasic3.cpp \
677 src/wizards/clonevm/UIWizardCloneVMPageExpert.cpp \
678 src/wizards/clonevd/UIWizardCloneVD.cpp \
679 src/wizards/clonevd/UIWizardCloneVDPageBasic1.cpp \
680 src/wizards/clonevd/UIWizardCloneVDPageBasic2.cpp \
681 src/wizards/clonevd/UIWizardCloneVDPageBasic3.cpp \
682 src/wizards/clonevd/UIWizardCloneVDPageBasic4.cpp \
683 src/wizards/clonevd/UIWizardCloneVDPageExpert.cpp \
684 src/wizards/exportappliance/UIWizardExportApp.cpp \
685 src/wizards/exportappliance/UIWizardExportAppPageBasic1.cpp \
686 src/wizards/exportappliance/UIWizardExportAppPageBasic2.cpp \
687 src/wizards/exportappliance/UIWizardExportAppPageBasic3.cpp \
688 src/wizards/exportappliance/UIWizardExportAppPageBasic4.cpp \
689 src/wizards/exportappliance/UIWizardExportAppPageExpert.cpp \
690 src/wizards/importappliance/UIWizardImportApp.cpp \
691 src/wizards/importappliance/UIWizardImportAppPageBasic1.cpp \
692 src/wizards/importappliance/UIWizardImportAppPageBasic2.cpp \
693 src/wizards/importappliance/UIWizardImportAppPageExpert.cpp \
694 src/wizards/firstrun/UIWizardFirstRun.cpp \
695 src/wizards/firstrun/UIWizardFirstRunPageBasic.cpp
696
697VirtualBox_SOURCES.darwin += \
698 src/platform/darwin/UIAbstractDockIconPreview.cpp \
699 src/platform/darwin/UICocoaDockIconPreview.mm \
700 src/platform/darwin/UIWindowMenuManager.cpp \
701 src/runtime/UIFrameBufferQuartz2D.cpp
702
703if1of ($(KBUILD_TARGET), freebsd linux netbsd openbsd solaris) # X11
704 VirtualBox_SOURCES += \
705 src/platform/x11/UIDesktopServices_x11.cpp \
706 src/platform/x11/VBoxX11Helper.cpp \
707 src/platform/x11/XKeyboard-new.cpp
708endif
709
710VirtualBox_SOURCES.win += \
711 src/platform/win/VirtualBox.rc \
712 src/platform/win/UIDesktopServices_win.cpp \
713 src/platform/win/VBoxUtils-win.cpp
714
715VirtualBox_DEFS.darwin += VBOX_DARWIN_USE_NATIVE_CONTROLS
716VirtualBox_SOURCES.darwin += \
717 src/platform/darwin/CocoaEventHelper.mm \
718 src/platform/darwin/DarwinKeyboard.cpp \
719 src/platform/darwin/UICocoaApplication.mm \
720 src/platform/darwin/UICocoaSpecialControls.mm \
721 src/platform/darwin/UIDesktopServices_darwin.cpp \
722 src/platform/darwin/UIDesktopServices_darwin_cocoa.mm \
723 src/platform/darwin/VBoxUtils-darwin-cocoa.mm \
724 src/platform/darwin/VBoxUtils-darwin.cpp
725VirtualBox_QT_MOCHDRS.darwin += \
726 src/platform/darwin/UICocoaSpecialControls.h
727
728ifdef VBOX_WITH_ICHAT_THEATER
729 VirtualBox_SOURCES.darwin += \
730 src/platform/darwin/VBoxIChatTheaterWrapper.m
731endif
732
733if defined(VBOX_WITH_VIDEOHWACCEL) || defined(VBOX_GUI_USE_QGL)
734 VirtualBox_SOURCES += \
735 src/VBoxFBOverlay.cpp \
736 src/VBoxGLSupportInfo.cpp
737endif
738
739ifdef VBOX_WITH_DRAG_AND_DROP
740 VirtualBox_SOURCES += \
741 src/runtime/UIDnDHandler.cpp
742 VirtualBox_QT_MOCSRCS += \
743 src/runtime/UIDnDHandler.cpp
744endif
745
746# The Qt modules we're using.
747# (The include directory and lib/framework for each module will be added by the Qt4 unit.)
748VirtualBox_QT_MODULES = Core Gui Network
749if defined(VBOX_WITH_VIDEOHWACCEL) || defined(VBOX_GUI_USE_QGL)
750 VirtualBox_QT_MODULES += OpenGL
751endif
752
753# Pull in the ui files
754$(eval VirtualBox_SOURCES += $(FORMS))
755
756# Resource files with some OSE differences (VirtualBoxBrand.qrc is created further down).
757VirtualBox_SOURCES += VirtualBox1.qrc
758VirtualBox1.qrc_RCCFLAGS = -name BASIC1
759VirtualBox_SOURCES += VirtualBox2.qrc
760VirtualBox2.qrc_RCCFLAGS = -name BASIC2
761ifeq ($(KBUILD_TARGET),darwin)
762 VirtualBox_SOURCES += VirtualBoxMac.qrc
763 VirtualBoxMac.qrc_RCCFLAGS = -name MAC
764else
765 VirtualBox_SOURCES += VirtualBoxOther.qrc
766 VirtualBoxOther.qrc_RCCFLAGS = -name OTHER
767endif
768VirtualBox_SOURCES += $(VBOX_VIRTUALBOX4_OUT_DIR)/VirtualBoxBrand.qrc
769$(VBOX_VIRTUALBOX4_OUT_DIR)/VirtualBoxBrand.qrc_RCCFLAGS = -name BRAND
770if defined(VBOX_WITH_VIDEOHWACCEL) || defined(VBOX_GUI_USE_QGL)
771 VirtualBox_SOURCES += VirtualBoxShaders.qrc
772 VirtualBoxShaders.qrc_RCCFLAGS = -name SHADERS
773endif
774
775# Import the translation source from VBoxUI.pro and add the qt_xx_YY counterparts
776VirtualBox_QT_TRANSLATIONS := $(TRANSLATIONS) \
777 $(patsubst nls/VirtualBox_%.ts,nls/qt_%.ts, $(filter nls/VirtualBox_%.ts,$(TRANSLATIONS)))
778# Compress the translation units.
779VirtualBox_LRCFLAGS = -silent
780# Where to install the translations (a separate install target, VirtualBox-nls-inst is created).
781VirtualBox_QT_TRANSLATIONS_INST = $(INST_BIN)nls/
782
783
784## @todo how to detect what tool is used?
785## @todo GCC3 seems to lack -Wno-missing-base-class-initializer, so we use
786# more generic -Wno-extra
787# bird: What about $(if $(VBOX_GCC_Wno-missing-base-class-initializer),$(VBOX_GCC_Wno-missing-base-class-initializer),$(VBOX_GCC_Wno-extra))?
788ifdef VBOX_WITH_XPCOM
789 VirtualBox_src/globals/COMDefs.cpp_CXXFLAGS = $(VBOX_GCC_Wno-extra)
790endif
791
792
793#
794# Generate the COM wrappers.
795#
796includedep $(PATH_TARGET)/VirtualBoxComWrapperFiles.dep
797VirtualBox_BLDDIRS += $(VirtualBox_0_OUTDIR)/include
798VirtualBox_INTERMEDIATES += $(VirtualBox_0_OUTDIR)/include/COMWrappers
799VirtualBox_CLEAN += $(wildcard $(VirtualBox_0_OUTDIR)/include/*) $(PATH_TARGET)/VirtualBoxComWrapperFiles.dep
800VirtualBox_SOURCES += $(VirtualBox_0_OUTDIR)/include/COMWrappers.cpp
801
802## @todo kmk doesn't remake optional outputs when they are missing...
803$$(VirtualBox_0_OUTDIR)/include/COMWrappers \
804+ $(PATH_TARGET)/VirtualBoxComWrapperFiles.dep \
805+| $(if-expr defined(VirtualBox_VBOX_COMWRAPPERS) \
806, $(VirtualBox_VBOX_COMWRAPPERS) \
807, $$(VirtualBox_0_OUTDIR)/include/COMEnums.h \
808 $$(VirtualBox_0_OUTDIR)/include/COMWrappers.cpp \
809): \
810 $(VBOX_XIDL_FILE) \
811 $(VBOX_VIRTUALBOX4_SRC)/src/globals/COMWrappers.xsl \
812 $(VBOX_FILESPLIT) \
813 | $$(dir $$@)
814 $(call MSG_GENERATE,VirtualBox,$<,$@)
815 $(QUIET)$(RM) -f -- "$@" "$(PATH_TARGET)/VirtualBoxComWrapperFiles.dep"
816 $(QUIET)$(VBOX_XSLTPROC) -o $@ $(VBOX_VIRTUALBOX4_SRC)/src/globals/COMWrappers.xsl $<
817 $(QUIET)$(VBOX_FILESPLIT) $@ $(VirtualBox_0_OUTDIR)/include \
818 $(PATH_TARGET)/VirtualBoxComWrapperFiles.dep VirtualBox_VBOX_COMWRAPPERS
819 $(APPEND) "$@"
820
821# alias for generating the COM Wrappers file.
822testwrappers:: $$(VirtualBox_0_OUTDIR)/include/COMWrappers
823
824
825#
826# Generate qrc file with branded icons.
827#
828VirtualBox_BLDDIRS += $(VBOX_VIRTUALBOX4_OUT_DIR)
829VirtualBox_CLEAN += $(VBOX_VIRTUALBOX4_OUT_DIR)/VirtualBoxBrand.qrc
830$(VBOX_VIRTUALBOX4_OUT_DIR)/VirtualBoxBrand.qrc: \
831 $(VBOX_VIRTUALBOX4_SRC)/VirtualBoxBrand.qrc \
832 | $$(dir $$@)
833 $(call MSG_GENERATE,VirtualBox,$<,$@)
834 $(QUIET)$(SED) \
835 -e 's;@VBOX_ABOUT_PNG@;$(VBOX_BRAND_GUI_ABOUT_PNG);g' \
836 -e 's;@VBOX_ABOUT_16PX_PNG@;$(VBOX_BRAND_GUI_ABOUT_16PX_PNG);g' \
837 -e 's;@VBOX_VBOX_16PX_PNG@;$(VBOX_BRAND_GUI_VBOX_16PX_PNG);g' \
838 -e 's;@VBOX_VBOX_20PX_PNG@;$(VBOX_BRAND_GUI_VBOX_20PX_PNG);g' \
839 -e 's;@VBOX_VBOX_32PX_PNG@;$(VBOX_BRAND_GUI_VBOX_32PX_PNG);g' \
840 -e 's;@VBOX_VBOX_40PX_PNG@;$(VBOX_BRAND_GUI_VBOX_40PX_PNG);g' \
841 -e 's;@VBOX_VBOX_48PX_PNG@;$(VBOX_BRAND_GUI_VBOX_48PX_PNG);g' \
842 -e 's;@VBOX_VBOX_64PX_PNG@;$(VBOX_BRAND_GUI_VBOX_64PX_PNG);g' \
843 -e 's;@VBOX_CUBE_42PX_PNG@;$(VBOX_BRAND_GUI_CUBE_42PX_PNG);g' \
844 --output $@ \
845 $<
846
847
848#
849# Precompiled header - non-functional atm.
850#
851ifdef VBOX_WITH_PRECOMPILED_HEADERS
852VirtualBox_INCS <= $(VirtualBox_0_OUTDIR)/include
853VirtualBox_DEFS += VBOX_WITH_PRECOMPILED_HEADERS
854VirtualBox_CXXFLAGS += -Winvalid-pch -fpch-preprocess
855VirtualBox_INTERMEDIATES += $(VirtualBox_0_OUTDIR)/include/precomp.h.gch
856
857tstx: $$(VirtualBox_0_OUTDIR)/include/precomp.h.gch
858
859$$(VirtualBox_0_OUTDIR)/include/precomp.h.gch: \
860 $(PATH_SUB_CURRENT)/src/precomp.h \
861 $$(VirtualBox_0_OUTDIR)/include/COMWrappers.h \
862 $$(filter %.gen.h, $$(VirtualBox_INTERMEDIATES) ) \
863 $(VBOX_PATH_SDK)/bindings/xpcom/include/VirtualBox_XPCOM.h \
864 | $$(dir $$@)
865 time 'g++-4.0' \
866 '-c' \
867 '-g' \
868 $(if-expr "$(KBUILD_TYPE)" == "debug", , -O2 ) \
869 '-pipe' \
870 '-Wall' \
871 '-Wextra' \
872 '-Wno-missing-field-initializers' \
873 '-Wno-trigraphs' \
874 '-frtti' \
875 '-fno-exceptions' \
876 '-Wno-non-virtual-dtor' \
877 '-Wno-long-long' \
878 \
879 '-fshort-wchar' \
880 '-fno-strict-aliasing' \
881 '-fvisibility=hidden' \
882 '-DVBOX_HAVE_VISIBILITY_HIDDEN' \
883 '-DRT_USE_VISIBILITY_DEFAULT' \
884 '-fvisibility-inlines-hidden' \
885 '-Winvalid-pch' \
886 '-fpch-preprocess' \
887 \
888 '-F$(PATH_SDK_QT4)/Frameworks' \
889 '-mmacosx-version-min=10.5' \
890 '-isysroot' \
891 '/Developer/SDKs/MacOSX10.5.sdk' \
892 '-m32' \
893 \
894 $(foreach inc,$(VirtualBox_INCS),\$(NL)$(TAB)-I$(inc)) \
895 '-I$(PATH_ROOT)/include' \
896 '-I$(PATH_OUT)' \
897 '-DVBOX' \
898 '-DVBOX_WITH_DEBUGGER' \
899 '-DVBOX_WITH_64_BITS_GUESTS' \
900 $(if-expr "$(KBUILD_TYPE)" == "debug", '-DDEBUG' '-DDEBUG_bird' '-DDEBUG_USERNAME=bird' '-DVBOX_CHECK_STATE' ,) \
901 '-DRT_OS_DARWIN' \
902 '-D__DARWIN__' \
903 '-DRT_ARCH_X86' \
904 '-D__X86__' \
905 '-DIN_RING3' \
906 '-DQT_NO_DEBUG' \
907 '-DQT_THREAD_SUPPORT' \
908 '-DQT_SHARED' \
909 '-DHAVE_CONFIG_H' \
910 '-DHC_ARCH_BITS=32' \
911 '-DGC_ARCH_BITS=64' \
912 '-DVBOX_WITH_XPCOM' \
913 '-DVBOX_WITH_UPDATE_REQUEST' \
914 '-DVBOX_WITH_ALSA' \
915 '-DVBOX_WITH_PULSE' \
916 '-DVBOX_WITH_E1000' \
917 '-DVBOX_WITH_NETFLT' \
918 '-DVBOX_WITH_DEBUGGER_GUI' \
919 $(if-expr "$(KBUILD_TYPE)" != "release", '-DVBOX_WITH_DEBUGGER_GUI_MENU', ) \
920 '-DVBOX_WITH_VIDEOHWACCEL' \
921 '-DVBOX_GUI_USE_QGL' \
922 '-DVBOX_WITH_VIRTIO' \
923 '-DVBOX_WITH_PRECOMPILED_HEADERS' \
924 '-DVBOX_DARWIN_USE_NATIVE_CONTROLS' \
925 '-DQT_CORE_LIB' \
926 '-DQT_GUI_LIB' \
927 '-DQT_NETWORK_LIB' \
928 '-DQT_OPENGL_LIB' \
929 '-DMAC_OS_X_VERSION_MIN_REQUIRED=1050' \
930 '-DMAC_OS_X_VERSION_MAX_ALLOWED=1050' \
931 '-DVBOX_GUI_USE_QUARTZ2D' \
932 '-DVBOX_GUI_USE_QIMAGE' \
933 '-o' $@ $<
934endif
935
936ifeq ($(KBUILD_TARGET),win)
937#
938# On Windows we'll have to generate/edit part of the resource file.
939# The IDI_ICON1 name is Qt specific.
940#
941src/platform/win/VirtualBox.rc_INCS = $(VirtualBox_0_OUTDIR)
942src/platform/win/VirtualBox.rc_DEPS = $(VirtualBox_0_OUTDIR)/VirtualBox-icon.rc
943src/platform/win/VirtualBox.rc_CLEAN = $(VirtualBox_0_OUTDIR)/VirtualBox-icon.rc
944
945$$(VirtualBox_0_OUTDIR)/VirtualBox-icon.rc: $(MAKEFILE_CURRENT) $(VBOX_WINDOWS_ICON_FILE) | $$(dir $$@)
946 $(APPEND) -t $@ 'IDI_ICON1 ICON "$(subst /,\\,$(VBOX_WINDOWS_ICON_FILE))"'
947
948endif # win
949
950
951ifeq ($(KBUILD_TARGET),darwin)
952#
953# Create directories for each approved language or the application
954# menu won't be translated.
955#
956INSTALLS += VirtualBox.lproj
957VirtualBox.lproj_INST = $(INST_VIRTUALBOX)Contents/Resources/
958VirtualBox.lproj_MODE = 755
959VirtualBox.lproj_DIRS := $(addsuffix .lproj,$(VBOX_APPROVED_GUI_LANGUAGES))
960
961#
962# On OS X (darwin) we need to install icon resources and compulsory bundle contents.
963# The VirtualBoxVM.app helper is for launching VMs (fixes some issues with the dock).
964#
965INSTALLS += VirtualBox.app
966VirtualBox.app_INST = $(INST_VIRTUALBOX)Contents/
967VirtualBox.app_MODE = 644
968VirtualBox.app_SOURCES = \
969 src/platform/darwin/PkgInfo \
970 $(VirtualBox.app_0_OUTDIR)/Info.plist \
971 $(VBOX_MACOSX_ICON_FILE)=>Resources/virtualbox.icns \
972 $(VBOX_BRAND_GUI_VBOX_64PX_PNG)=>Resources/virtualbox.png \
973 $(PATH_ROOT)/src/VBox/Resources/darwin/virtualbox-vbox.icns=>Resources/virtualbox-vbox.icns \
974 $(PATH_ROOT)/src/VBox/Resources/darwin/virtualbox-vbox-extpack.icns=>Resources/virtualbox-vbox-extpack.icns \
975 $(PATH_ROOT)/src/VBox/Resources/darwin/virtualbox-ovf.icns=>Resources/virtualbox-ovf.icns \
976 $(PATH_ROOT)/src/VBox/Resources/darwin/virtualbox-ova.icns=>Resources/virtualbox-ova.icns \
977 $(PATH_ROOT)/src/VBox/Resources/darwin/virtualbox-vdi.icns=>Resources/virtualbox-vdi.icns \
978 $(PATH_ROOT)/src/VBox/Resources/darwin/virtualbox-vmdk.icns=>Resources/virtualbox-vmdk.icns \
979 $(PATH_ROOT)/src/VBox/Resources/darwin/virtualbox-vhd.icns=>Resources/virtualbox-vhd.icns \
980 $(PATH_ROOT)/src/VBox/Resources/darwin/virtualbox-hdd.icns=>Resources/virtualbox-hdd.icns
981
982$$(VirtualBox.app_0_OUTDIR)/Info.plist: $(PATH_SUB_CURRENT)/src/platform/darwin/Info.plist $(VBOX_VERSION_MK) | $$(@D)/
983 $(call MSG_GENERATE,VirtualBox.app,$<,$@)
984 $(QUIET)$(RM) -f $@
985 $(QUIET)$(SED) \
986 -e 's/@VBOX_VERSION_STRING@/$(VBOX_VERSION_STRING)/g' \
987 -e 's/@VBOX_VERSION_MAJOR@/$(VBOX_VERSION_MAJOR)/g' \
988 -e 's/@VBOX_VERSION_MINOR@/$(VBOX_VERSION_MINOR)/g' \
989 -e 's/@VBOX_VERSION_BUILD@/$(VBOX_VERSION_BUILD)/g' \
990 -e 's/@VBOX_VENDOR@/$(VBOX_VENDOR)/g' \
991 -e 's/@VBOX_PRODUCT@/$(VBOX_PRODUCT)/g' \
992 -e 's/@VBOX_C_YEAR@/$(VBOX_C_YEAR)/g' \
993 $< > $@
994
995INSTALLS += VirtualBoxVM.app
996VirtualBoxVM.app_INST = $(VirtualBox.app_INST)Resources/VirtualBoxVM.app/Contents/
997VirtualBoxVM.app_MODE = 644
998VirtualBoxVM.app_SOURCES = \
999 src/platform/darwin/VM-PkgInfo=>PkgInfo \
1000 $(VirtualBoxVM.app_0_OUTDIR)/VM-Info.plist=>Info.plist \
1001 $(foreach mysrc,$(VirtualBox.app_SOURCES),$(if-expr $(pos =>Resources/,$(mysrc)) > 0,$(mysrc),))
1002VirtualBoxVM.app_SYMLINKS = \
1003 MacOS=>../../../MacOS/
1004
1005$$(VirtualBoxVM.app_0_OUTDIR)/VM-Info.plist: $(PATH_SUB_CURRENT)/src/platform/darwin/VM-Info.plist $(VBOX_VERSION_MK) | $$(@D)/
1006 $(call MSG_GENERATE,VirtualBoxVM.app,$<,$@)
1007 $(QUIET)$(RM) -f $@
1008 $(QUIET)$(SED) \
1009 -e 's/@VBOX_VERSION_STRING@/$(VBOX_VERSION_STRING)/g' \
1010 -e 's/@VBOX_VERSION_MAJOR@/$(VBOX_VERSION_MAJOR)/g' \
1011 -e 's/@VBOX_VERSION_MINOR@/$(VBOX_VERSION_MINOR)/g' \
1012 -e 's/@VBOX_VERSION_BUILD@/$(VBOX_VERSION_BUILD)/g' \
1013 -e 's/@VBOX_VENDOR@/$(VBOX_VENDOR)/g' \
1014 -e 's/@VBOX_PRODUCT@/$(VBOX_PRODUCT)/g' \
1015 -e 's/@VBOX_C_YEAR@/$(VBOX_C_YEAR)/g' \
1016 --output $@ $<
1017
1018PROGRAMS += vmstarter
1019vmstarter_TEMPLATE = VBOXR3EXE
1020vmstarter_SOURCES = src/platform/darwin/vmstarter.mm
1021vmstarter_LDFLAGS += -framework AppKit
1022vmstarter_INST = $(INST_BIN)vmstarter
1023
1024INSTALLS += vmstarter.app
1025vmstarter.app_INST = $(VirtualBox.app_INST)Resources/vmstarter.app/Contents/
1026vmstarter.app_MODE = 644
1027vmstarter.app_SOURCES = \
1028 src/platform/darwin/vmstarter-PkgInfo=>PkgInfo \
1029 $(vmstarter.app_0_OUTDIR)/vmstarter-Info.plist=>Info.plist \
1030 $(foreach mysrc,$(VirtualBox.app_SOURCES),$(if-expr $(pos =>Resources/,$(mysrc)) > 0,$(mysrc),))
1031vmstarter.app_SYMLINKS = \
1032 MacOS=>../../../MacOS \
1033
1034$$(vmstarter.app_0_OUTDIR)/vmstarter-Info.plist: $(PATH_SUB_CURRENT)/src/platform/darwin/vmstarter-Info.plist $(VBOX_VERSION_MK) | $$(@D)/
1035 $(call MSG_GENERATE,vmstarter.app,$<,$@)
1036 $(QUIET)$(RM) -f $@
1037 $(QUIET)$(SED) \
1038 -e 's/@VBOX_VERSION_STRING@/$(VBOX_VERSION_STRING)/g' \
1039 -e 's/@VBOX_VERSION_MAJOR@/$(VBOX_VERSION_MAJOR)/g' \
1040 -e 's/@VBOX_VERSION_MINOR@/$(VBOX_VERSION_MINOR)/g' \
1041 -e 's/@VBOX_VERSION_BUILD@/$(VBOX_VERSION_BUILD)/g' \
1042 -e 's/@VBOX_VENDOR@/$(VBOX_VENDOR)/g' \
1043 -e 's/@VBOX_PRODUCT@/$(VBOX_PRODUCT)/g' \
1044 -e 's/@VBOX_C_YEAR@/$(VBOX_C_YEAR)/g' \
1045 --output $@ $<
1046endif # darwin
1047
1048#
1049# App for testing GL support
1050#
1051if defined(VBOX_WITH_VIDEOHWACCEL)
1052 if1of ($(KBUILD_TARGET), win linux freebsd)
1053 LIBRARIES += VBoxOGL2D
1054 VBoxOGL2D_TEMPLATE = VBOXR3STATIC
1055 VBoxOGL2D_USES = qt4
1056 VBoxOGL2D_SDKS = QT4
1057 VBoxOGL2D_DEFS = IN_RING3 QT_NO_DEBUG QT_THREAD_SUPPORT QT_SHARED HAVE_CONFIG_H $(ARCH_BITS_DEFS) VBOX_WITH_VIDEOHWACCEL VBOX_GUI_USE_QGL
1058 VBoxOGL2D_QT_MODULES += OpenGL
1059 VBoxOGL2D_SOURCES = \
1060 src/VBoxGLSupportInfo.cpp
1061 VBoxOGL2D_INCS = include
1062 endif
1063endif
1064
1065#
1066# Testcase for the darwin keyboard routines.
1067#
1068ifdef VBOX_WITH_TESTCASES
1069PROGRAMS.darwin += tstDarwinKeyboard
1070tstDarwinKeyboard_NAME = tstDarwinKeyboard
1071tstDarwinKeyboard_TEMPLATE = VBOXR3TSTEXE
1072tstDarwinKeyboard_DEFS.x86 = USE_HID_FOR_MODIFIERS
1073tstDarwinKeyboard_INCS = include
1074tstDarwinKeyboard_SOURCES = \
1075 src/platform/darwin/tstDarwinKeyboard.cpp \
1076 src/platform/darwin/DarwinKeyboard.cpp
1077tstDarwinKeyboard_SOURCES.amd64 = \
1078 src/platform/darwin/CocoaEventHelper.mm
1079tstDarwinKeyboard_LDFLAGS = -framework IOKit -framework Carbon -framework AppKit
1080tstDarwinKeyboard_LIBS = \
1081 $(LIB_RUNTIME)
1082endif
1083
1084
1085# Unset everything that was loaded from VBoxUI.pro.
1086TEMPLATE := $(SAVED_TEMPLATE)
1087SAVED_TEMPLATE :=
1088LANGUAGE :=
1089FORMS :=
1090TRANSLATIONS :=
1091IMAGES :=
1092
1093
1094# Commit the magic.
1095# (note: before custom rules that make usage of generated variables!).
1096include $(FILE_KBUILD_SUB_FOOTER)
1097
1098#
1099# Update all known NLS translation (.ts) files in the nls/ subdirectory.
1100#
1101# NOTE: This target is intended to be run only by the GUI maintainer shortly
1102# before a new product release. VirtualBox_xx_YY.ts is a template for new
1103# languages and should never be actually translated or installed.
1104#
1105# Use the checknls target for checking again common mistakes done by the
1106# translators.
1107#
1108# For Qt >= 4.6.0 it maybe necessary to add -I $(VBOX_GUI_INC_DIRS) to the
1109# lupdate call
1110#
1111#VirtualBox_QT_TRANSLATIONS = nls/VirtualBox_de.ts
1112checknls::
1113 # Check for missing :/ in image paths
1114 grep -i "src=[^:%]" $(filter-out nls/qt_%.ts,$(VirtualBox_QT_TRANSLATIONS))
1115
1116updatenls:: makeallnls nls/VirtualBox_en.ts
1117
1118makeallnls:: \
1119 $(foreach header,$(VBOX_GUI_INC_DIRS),$(wildcard $(header)/*.h)) \
1120 $(filter-out %.qrc,$(VirtualBox_SOURCES) $(VirtualBox_VBOX_EXTRA_NLS_SOURCES))
1121 $(call MSG_L1,lupdate all languages (nls/*.ts))
1122 $(QUIET)$(TOOL_QT4_LUPDATE) \
1123 $^ \
1124 -ts \
1125 $(filter-out nls/VirtualBox_en.ts,$(filter-out nls/qt_%.ts,$(VirtualBox_QT_TRANSLATIONS))) \
1126 nls/VirtualBox_xx_YY.ts
1127
1128# Create the English translation file. This is something special cause it will
1129# contain the plural forms only.
1130nls/VirtualBox_en.ts: \
1131 $(foreach header,$(VBOX_GUI_INC_DIRS),$(wildcard $(header)/*.h)) \
1132 $(filter-out %.qrc,$(VirtualBox_SOURCES) $(VirtualBox_VBOX_EXTRA_NLS_SOURCES))
1133 $(call MSG_L1,lupdate $@)
1134 $(QUIET)$(TOOL_QT4_LUPDATE) \
1135 $^ \
1136 -ts \
1137 $@
1138 $(QUIET)$(SED) -n -i -e \
1139 '/<context>/,/<\/context>/!p;/<context>/h;/<name>/H;/<message numerus="yes">/,/<\/message>/H;/<\/context>/{H;x;/<message/p}' \
1140 $@
1141
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