VirtualBox

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

Last change on this file since 43010 was 43010, checked in by vboxsync, 12 years ago

*.kmk: Assume VBOX_WITH_COCOA_QT is always set.

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