VirtualBox

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

Last change on this file since 37264 was 37200, checked in by vboxsync, 14 years ago

API+Frontends: Generic network attachment driver support which obsoletes the special case for VDE. Big API cleanup in the same area. Adapt all frontends to these changes (full implementation in VBoxManage, minimum implementation in GUI).

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 34.2 KB
Line 
1# $Id: Makefile.kmk 37200 2011-05-24 15:34:06Z vboxsync $
2## @file
3# Makefile for the VirtualBox Qt GUI.
4#
5
6#
7# Copyright (C) 2006-2011 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# VBOX_WITH_REGISTRATION := 1
28
29# Ask the user to register at Sun. If this setting is disabled the user can
30# still register using the menu if desired.
31# VBOX_WITH_REGISTRATION_REQUEST := 1
32
33# For now this should be disabled in any case
34ifdef VBOX_WITH_REGISTRATION
35 VBOX_WITH_REGISTRATION=
36endif
37ifdef VBOX_WITH_REGISTRATION_REQUEST
38 VBOX_WITH_REGISTRATION_REQUEST=
39endif
40
41# Show the update notifier dialog during startup. If this setting is disabled
42# the user can still update using the menu if desired.
43ifndef VBOX_OSE
44VBOX_WITH_UPDATE_REQUEST := 1
45endif
46
47#
48# The targets.
49#
50ifdef VBOX_WITH_HARDENING
51PROGRAMS += VirtualBoxHardened
52DLLS += VirtualBox
53else
54PROGRAMS += VirtualBox
55endif
56
57INSTALLS += VirtualBox.nls
58
59
60#
61# Include the language lists.
62#
63include $(PATH_SUB_CURRENT)/nls/ApprovedLanguages.kmk
64
65
66#
67# Hardened VirtualBox.
68#
69VirtualBoxHardened_TEMPLATE = VBOXR3HARDENEDEXE
70VirtualBoxHardened_SOURCES = src/hardenedmain.cpp
71VirtualBoxHardened_NAME = VirtualBox
72VirtualBoxHardened_INST.darwin = $(INST_BIN)VirtualBox $(INST_BIN)VirtualBoxVM
73
74
75#
76# Include Qt project file, we'll use FORMS and TRANSLATIONS in
77# the VirtualBox setup below.
78#
79SAVED_TEMPLATE := $(TEMPLATE)
80include $(PATH_SUB_CURRENT)/VBoxUI.pro
81
82
83#
84# VirtualBox - The GUI program.
85#
86USES += qt4
87VirtualBox_TEMPLATE := $(if $(VBOX_WITH_HARDENING),VBOXQT4GUI,VBOXQT4GUIEXE)
88VirtualBox_NAME = VirtualBox
89ifndef VBOX_WITH_HARDENING # For the launch trick we need different inode numbers.
90 VirtualBox_INST.darwin = $(INST_BIN)VirtualBox $(INST_BIN)VirtualBoxVM
91endif
92VirtualBox_SDKS.win = WINPSDK DXSDK
93if1of ($(KBUILD_TARGET), freebsd linux netbsd openbsd os2) # X11 + os2 ## @todo solaris
94 VirtualBox_SDKS += LIBSDL
95endif
96
97ifdef VBOX_WITH_ICHAT_THEATER
98 # For testing iChat Theater stuff change the sdk path (HACK ALERT!)
99 VBOX_PATH_MACOSX_SDK = /Developer/SDKs/MacOSX10.5.sdk
100endif
101
102VirtualBox_DEFS =
103VirtualBox_DEFS.debug = VBOX_CHECK_STATE # QT_FATAL_ASSERT
104VirtualBox_DEFS.darwin = VBOX_GUI_USE_QUARTZ2D VBOX_GUI_USE_QIMAGE
105ifndef VBOX_WITH_COCOA_QT
106VirtualBox_DEFS.darwin.x86= USE_HID_FOR_MODIFIERS
107endif
108VirtualBox_DEFS.freebsd = VBOX_GUI_USE_QIMAGE VBOX_GUI_USE_SDL
109VirtualBox_DEFS.linux = VBOX_GUI_USE_QIMAGE VBOX_GUI_USE_SDL
110VirtualBox_DEFS.netbsd = VBOX_GUI_USE_QIMAGE VBOX_GUI_USE_SDL
111VirtualBox_DEFS.openbsd = VBOX_GUI_USE_QIMAGE VBOX_GUI_USE_SDL
112VirtualBox_DEFS.solaris = VBOX_GUI_USE_QIMAGE #VBOX_GUI_USE_SDL
113VirtualBox_DEFS.win = VBOX_GUI_USE_QIMAGE UNICODE QT_DLL
114ifdef VBOX_WITH_ICHAT_THEATER
115 VirtualBox_DEFS.darwin += VBOX_WITH_ICHAT_THEATER
116endif
117ifneq ($(KBUILD_TYPE),release)
118 # non-release builds has some extra features.
119 VirtualBox_DEFS.win += VBOX_GUI_USE_DDRAW
120endif
121VirtualBox_DEFS += \
122 $(if $(VBOX_WITH_REGISTRATION),VBOX_WITH_REGISTRATION) \
123 $(if $(VBOX_WITH_REGISTRATION_REQUEST),VBOX_WITH_REGISTRATION_REQUEST) \
124 $(if $(VBOX_WITH_UPDATE_REQUEST),VBOX_WITH_UPDATE_REQUEST) \
125 $(if $(VBOX_WITH_ALSA),VBOX_WITH_ALSA) \
126 $(if $(VBOX_WITH_PULSE),VBOX_WITH_PULSE) \
127 $(if $(VBOX_WITH_SOLARIS_OSS),VBOX_WITH_SOLARIS_OSS) \
128 $(if $(VBOX_WITH_E1000),VBOX_WITH_E1000) \
129 $(if $(VBOX_WITH_NETFLT)$(eq $(KBUILD_TARGET),freebsd),VBOX_WITH_NETFLT) \
130 $(if $(VBOX_WITH_VDE),VBOX_WITH_VDE) \
131 $(if $(VBOX_WITH_UDPTUNNEL),VBOX_WITH_UDPTUNNEL) \
132 $(if $(VBOX_WITH_EHCI),VBOX_WITH_EHCI) \
133 $(if $(VBOX_GUI_WITH_PIDFILE),VBOX_GUI_WITH_PIDFILE) \
134 $(if $(VBOX_GUI_WITH_KEYS_RESET_HANDLER),VBOX_GUI_WITH_KEYS_RESET_HANDLER) \
135 $(if $(VBOX_GUI_WITH_CUSTOMIZATIONS1),VBOX_GUI_WITH_CUSTOMIZATIONS1)
136ifdef VBOX_WITH_DEBUGGER_GUI
137 VirtualBox_DEFS += VBOX_WITH_DEBUGGER_GUI
138 if "$(KBUILD_TYPE)" != "release"
139 VirtualBox_DEFS += VBOX_WITH_DEBUGGER_GUI_MENU
140 endif
141endif
142ifdef VBOX_WITH_VIDEOHWACCEL
143 VirtualBox_DEFS += VBOX_WITH_VIDEOHWACCEL \
144 VBOX_GUI_USE_QGL
145else ifdef VBOX_GUI_USE_QGL
146 VirtualBox_DEFS += VBOX_GUI_USE_QGL
147endif
148ifdef VBOX_WITH_VIRTIO
149 VirtualBox_DEFS += VBOX_WITH_VIRTIO
150endif
151ifdef VBOX_WITH_WDDM
152 VirtualBox_DEFS += VBOX_WITH_WDDM
153endif
154ifdef VBOX_WITH_CRHGSMI
155 VirtualBox_DEFS += VBOX_WITH_CRHGSMI
156endif
157ifdef VBOX_BLEEDING_EDGE
158VirtualBox_src/selector/VBoxSelectorWnd.cpp_DEFS += \
159 VBOX_BLEEDING_EDGE=\"$(VBOX_BLEEDING_EDGE)\"
160VirtualBox_src/runtime/UIMachineWindow.cpp_DEFS += \
161 VBOX_BLEEDING_EDGE=\"$(VBOX_BLEEDING_EDGE)\"
162VirtualBox_src/VBoxAboutDlg.cpp_DEFS += \
163 VBOX_BLEEDING_EDGE=\"$(VBOX_BLEEDING_EDGE)\"
164VirtualBox_src/main.cpp_DEFS += \
165 VBOX_BLEEDING_EDGE=\"$(VBOX_BLEEDING_EDGE)\"
166endif
167
168
169VBOX_GUI_INC_DIRS = \
170 ./src \
171 ./src/globals \
172 ./src/platform \
173 ./src/platform/x11 \
174 ./src/platform/darwin \
175 ./src/platform/win \
176 ./src/extensions \
177 ./src/settings \
178 ./src/settings/global \
179 ./src/settings/machine \
180 ./src/wizards/newvm \
181 ./src/wizards/newhd \
182 ./src/wizards/firstrun \
183 ./src/wizards/exportappliance \
184 ./src/wizards/importappliance \
185 ./src/widgets \
186 ./src/selector \
187 ./src/runtime \
188 ./src/runtime/fullscreen \
189 ./src/runtime/normal \
190 ./src/runtime/scale \
191 ./src/runtime/seamless
192
193ifdef VBOX_WITH_REGISTRATION
194 VBOX_GUI_INC_DIRS += \
195 ./src/wizards/registration
196endif
197
198VirtualBox_INCS = \
199 $(VBOX_GUI_INC_DIRS) \
200 $(VirtualBox_0_OUTDIR)/include
201
202# Necessary for the hdd backend enumeration
203VirtualBox_LIBS = $(LIB_DDU)
204
205# This library is required for multi-monitor support
206VirtualBox_LIBS.linux += Xinerama
207VirtualBox_LIBS.solaris += Xinerama
208VirtualBox_LIBS.freebsd += Xinerama
209
210ifneq ($(KBUILD_TARGET),win)
211VirtualBox_CXXFLAGS += -Wno-switch
212endif
213
214ifdef VBOX_WITH_VIDEOHWACCEL
215# Necessary for save state support
216VirtualBox_LIBS += $(LIB_VMM)
217endif
218ifeq ($(KBUILD_TYPE),release)
219 VirtualBox_LDFLAGS.win += /SUBSYSTEM:windows
220else
221 VirtualBox_LDFLAGS.linux+= -rdynamic # for backtrace_symbols()
222 ifeq ($(USERNAME),dmik)
223 VirtualBox_LDFLAGS.win += /SUBSYSTEM:windows
224 else
225 VirtualBox_LDFLAGS.win += /SUBSYSTEM:console
226 endif
227endif
228
229if defined(VBOX_WITH_VIDEOHWACCEL) || defined(VBOX_GUI_USE_QGL)
230 VirtualBox_LDFLAGS.win += /DelayLoad:QtOpenGLVBox4.dll /DelayLoad:OPENGL32.dll
231endif
232
233VirtualBox_LDFLAGS.darwin = \
234 -framework AppKit -framework Carbon \
235 $(if $(VBOX_WITH_HARDENING),-install_name $(VBOX_DYLD_EXECUTABLE_PATH)/VirtualBox.dylib)
236ifdef VBOX_WITH_ICHAT_THEATER
237 VirtualBox_LDFLAGS.darwin += -framework InstantMessage -framework QuartzCore
238endif
239if defined(VBOX_WITH_VIDEOHWACCEL) || defined(VBOX_GUI_USE_QGL)
240 VirtualBox_LDFLAGS.darwin += -framework OpenGL
241endif
242
243VirtualBox_LIBS.win = \
244 $(PATH_SDK_WINPSDK_LIB)/Htmlhelp.Lib \
245 $(PATH_SDK_DXSDK_LIB)/ddraw.lib \
246 $(PATH_SDK_DXSDK_LIB)/dxguid.lib
247if1of ($(KBUILD_TARGET), freebsd linux netbsd openbsd solaris) # X11
248 VirtualBox_LIBS += $(PATH_DLL)/VBoxKeyboard$(VBOX_SUFF_DLL)
249endif
250
251if defined(VBOX_WITH_VIDEOHWACCEL) || defined(VBOX_GUI_USE_QGL)
252 VirtualBox_LIBS.win += $(PATH_SDK_WINPSDK_LIB)/Opengl32.lib
253 VirtualBox_LIBS.solaris += GL
254 VirtualBox_LIBS.linux += GL
255 VirtualBox_LIBS.freebsd += GL
256endif
257
258# Headers containing definitions of classes that use the Q_OBJECT macro.
259VirtualBox_QT_MOCHDRS = \
260 src/VBoxAboutDlg.h \
261 src/VBoxGlobalSettings.h \
262 src/VBoxMediaManagerDlg.h \
263 src/VBoxSnapshotDetailsDlg.h \
264 src/VBoxTakeSnapshotDlg.h \
265 src/VBoxUpdateDlg.h \
266 src/VBoxVMInformationDlg.h \
267 src/VBoxVMLogViewer.h \
268 src/VBoxLicenseViewer.h \
269 src/globals/VBoxGlobal.h \
270 src/globals/VBoxProblemReporter.h \
271 src/globals/VBoxUtils.h \
272 src/globals/UIMainEventListener.h \
273 src/globals/UIExtraDataEventHandler.h \
274 src/extensions/QIAdvancedSlider.h \
275 src/extensions/QIArrowButtonPress.h \
276 src/extensions/QIArrowButtonSwitch.h \
277 src/extensions/QIArrowSplitter.h \
278 src/extensions/QIDialog.h \
279 src/extensions/QIFileDialog.h \
280 src/extensions/QIHttp.h \
281 src/extensions/QILabel.h \
282 src/extensions/QILabelSeparator.h \
283 src/extensions/QIListView.h \
284 src/extensions/QIMainDialog.h \
285 src/extensions/QIMessageBox.h \
286 src/extensions/QIRichToolButton.h \
287 src/extensions/QISplitter.h \
288 src/extensions/QIStateIndicator.h \
289 src/extensions/QIStatusBar.h \
290 src/extensions/QITabWidget.h \
291 src/extensions/QIToolButton.h \
292 src/extensions/QITableView.h \
293 src/extensions/QITreeView.h \
294 src/extensions/QITreeWidget.h \
295 src/extensions/QIWidgetValidator.h \
296 src/extensions/QIWizard.h \
297 src/settings/UISettingsDialog.h \
298 src/settings/UISettingsDialogSpecific.h \
299 src/settings/UISettingsPage.h \
300 src/settings/VBoxSettingsSelector.h \
301 src/settings/global/UIGlobalSettingsGeneral.h \
302 src/settings/global/UIGlobalSettingsInput.h \
303 src/settings/global/UIGlobalSettingsUpdate.h \
304 src/settings/global/UIGlobalSettingsLanguage.h \
305 src/settings/global/UIGlobalSettingsNetwork.h \
306 src/settings/global/UIGlobalSettingsNetworkDetails.h \
307 src/settings/global/UIGlobalSettingsExtension.h \
308 src/settings/machine/UIMachineSettingsGeneral.h \
309 src/settings/machine/UIMachineSettingsSystem.h \
310 src/settings/machine/UIMachineSettingsDisplay.h \
311 src/settings/machine/UIMachineSettingsStorage.h \
312 src/settings/machine/UIMachineSettingsAudio.h \
313 src/settings/machine/UIMachineSettingsNetwork.h \
314 src/settings/machine/UIMachineSettingsPortForwardingDlg.h \
315 src/settings/machine/UIMachineSettingsSerial.h \
316 src/settings/machine/UIMachineSettingsParallel.h \
317 src/settings/machine/UIMachineSettingsUSB.h \
318 src/settings/machine/UIMachineSettingsUSBFilterDetails.h \
319 src/settings/machine/UIMachineSettingsSF.h \
320 src/settings/machine/UIMachineSettingsSFDetails.h \
321 src/wizards/newvm/UINewVMWzd.h \
322 src/wizards/newhd/UINewHDWzd.h \
323 src/wizards/firstrun/UIFirstRunWzd.h \
324 src/wizards/exportappliance/UIExportApplianceWzd.h \
325 src/wizards/importappliance/UIImportApplianceWzd.h \
326 src/widgets/UIBar.h \
327 src/widgets/UIBootTable.h \
328 src/widgets/UIDownloader.h \
329 src/widgets/UIDownloaderAdditions.h \
330 src/widgets/UIDownloaderUserManual.h \
331 src/widgets/UIHotKeyEditor.h \
332 src/widgets/UIPopupBox.h \
333 src/widgets/UIProgressDialog.h \
334 src/widgets/UISpacerWidgets.h \
335 src/widgets/UISpecialControls.h \
336 src/widgets/VBoxApplianceEditorWgt.h \
337 src/widgets/VBoxExportApplianceWgt.h \
338 src/widgets/VBoxFilePathSelectorWidget.h \
339 src/widgets/VBoxImportApplianceWgt.h \
340 src/widgets/VBoxLineTextEdit.h \
341 src/widgets/VBoxMediaComboBox.h \
342 src/widgets/VBoxMiniToolBar.h \
343 src/widgets/VBoxOSTypeSelectorButton.h \
344 src/widgets/VBoxOSTypeSelectorWidget.h \
345 src/widgets/VBoxWarningPane.h \
346 src/selector/UIVMDesktop.h \
347 src/selector/UIVMListView.h \
348 src/selector/UIVMPreviewWindow.h \
349 src/selector/UIVMItem.h \
350 src/selector/UIVirtualBoxEventHandler.h \
351 src/selector/VBoxSelectorWnd.h \
352 src/selector/VBoxSnapshotsWgt.h \
353 src/runtime/UIActionsPool.h \
354 src/runtime/UIConsoleEventHandler.h \
355 src/runtime/UIIndicatorsPool.h \
356 src/runtime/UIKeyboardHandler.h \
357 src/runtime/UIMachine.h \
358 src/runtime/UIMachineLogic.h \
359 src/runtime/UIMachineView.h \
360 src/runtime/UIMouseHandler.h \
361 src/runtime/UIMultiScreenLayout.h \
362 src/runtime/UISession.h \
363 src/runtime/UIVMCloseDialog.h \
364 src/runtime/fullscreen/UIKeyboardHandlerFullscreen.h \
365 src/runtime/fullscreen/UIMachineLogicFullscreen.h \
366 src/runtime/fullscreen/UIMachineViewFullscreen.h \
367 src/runtime/fullscreen/UIMachineWindowFullscreen.h \
368 src/runtime/normal/UIKeyboardHandlerNormal.h \
369 src/runtime/normal/UIMachineLogicNormal.h \
370 src/runtime/normal/UIMachineViewNormal.h \
371 src/runtime/normal/UIMachineWindowNormal.h \
372 src/runtime/scale/UIKeyboardHandlerScale.h \
373 src/runtime/scale/UIMachineLogicScale.h \
374 src/runtime/scale/UIMachineViewScale.h \
375 src/runtime/scale/UIMachineWindowScale.h \
376 src/runtime/seamless/UIKeyboardHandlerSeamless.h \
377 src/runtime/seamless/UIMachineLogicSeamless.h \
378 src/runtime/seamless/UIMachineViewSeamless.h \
379 src/runtime/seamless/UIMachineWindowSeamless.h
380
381VirtualBox_QT_MOCHDRS.darwin += \
382 src/platform/darwin/UIWindowMenuManager.h
383
384# Sources containing local definitions of classes that use the Q_OBJECT macro.
385VirtualBox_QT_MOCSRCS = \
386 src/VBoxMediaManagerDlg.cpp \
387 src/globals/UIExtraDataEventHandler.cpp \
388 src/extensions/QISplitter.cpp \
389 src/selector/UIVMDesktop.cpp \
390 src/settings/UISettingsDialogSpecific.cpp \
391 src/settings/machine/UIMachineSettingsStorage.cpp \
392 src/settings/machine/UIMachineSettingsPortForwardingDlg.cpp \
393 src/runtime/UIActionsPool.cpp \
394 src/runtime/UIIndicatorsPool.cpp \
395 src/runtime/UIMachine.cpp \
396 src/runtime/UIMachineMenuBar.cpp
397
398VirtualBox_QT_MOCSRCS.darwin += \
399 src/platform/darwin/UIWindowMenuManager.cpp
400VirtualBox_QT_MOCSRCS.win += \
401 src/extensions/QIFileDialog.cpp
402
403ifdef VBOX_WITH_REGISTRATION
404 VirtualBox_QT_MOCHDRS += \
405 src/wizards/registration/UIRegistrationWzd.h
406endif
407
408ifdef VBOX_WITH_XPCOM
409 VirtualBox_QT_MOCSRCS += \
410 src/globals/COMDefs.cpp
411endif
412
413ifdef VBOX_WITH_REGISTRATION
414 VirtualBox_QT_MOCSRCS += \
415 src/wizards/registration/UIRegistrationWzd.cpp
416endif
417
418VirtualBox_SOURCES = \
419 src/main.cpp \
420 src/VBoxAboutDlg.cpp \
421 src/VBoxGlobalSettings.cpp \
422 src/VBoxHelpActions.cpp \
423 src/VBoxMediaManagerDlg.cpp \
424 src/VBoxMedium.cpp \
425 src/VBoxSnapshotDetailsDlg.cpp \
426 src/VBoxTakeSnapshotDlg.cpp \
427 src/VBoxUpdateDlg.cpp \
428 src/VBoxVMInformationDlg.cpp \
429 src/VBoxVMLogViewer.cpp \
430 src/VBoxLicenseViewer.cpp \
431 src/globals/COMDefs.cpp \
432 src/globals/VBoxDefs.cpp \
433 src/globals/VBoxGlobal.cpp \
434 src/globals/VBoxProblemReporter.cpp \
435 src/globals/UIIconPool.cpp \
436 src/globals/UIMainEventListener.cpp \
437 src/globals/UIExtraDataEventHandler.cpp \
438 src/globals/UIImageTools.cpp \
439 src/extensions/QIAdvancedSlider.cpp \
440 src/extensions/QIArrowButtonPress.cpp \
441 src/extensions/QIArrowButtonSwitch.cpp \
442 src/extensions/QIArrowSplitter.cpp \
443 src/extensions/QIDialog.cpp \
444 src/extensions/QIDialogButtonBox.cpp \
445 src/extensions/QIFileDialog.cpp \
446 src/extensions/QILabel.cpp \
447 src/extensions/QILabelSeparator.cpp \
448 src/extensions/QILineEdit.cpp \
449 src/extensions/QIListView.cpp \
450 src/extensions/QIMainDialog.cpp \
451 src/extensions/QIMessageBox.cpp \
452 src/extensions/QIRichToolButton.cpp \
453 src/extensions/QISplitter.cpp \
454 src/extensions/QIStateIndicator.cpp \
455 src/extensions/QIStatusBar.cpp \
456 src/extensions/QITableView.cpp \
457 src/extensions/QITreeView.cpp \
458 src/extensions/QITreeWidget.cpp \
459 src/extensions/QIWidgetValidator.cpp \
460 src/extensions/QIWizard.cpp \
461 src/settings/UISettingsDefs.cpp \
462 src/settings/UISettingsDialog.cpp \
463 src/settings/UISettingsDialogSpecific.cpp \
464 src/settings/UISettingsPage.cpp \
465 src/settings/VBoxSettingsSelector.cpp \
466 src/settings/global/UIGlobalSettingsGeneral.cpp \
467 src/settings/global/UIGlobalSettingsInput.cpp \
468 src/settings/global/UIGlobalSettingsUpdate.cpp \
469 src/settings/global/UIGlobalSettingsLanguage.cpp \
470 src/settings/global/UIGlobalSettingsNetwork.cpp \
471 src/settings/global/UIGlobalSettingsNetworkDetails.cpp \
472 src/settings/global/UIGlobalSettingsExtension.cpp \
473 src/settings/machine/UIMachineSettingsGeneral.cpp \
474 src/settings/machine/UIMachineSettingsSystem.cpp \
475 src/settings/machine/UIMachineSettingsDisplay.cpp \
476 src/settings/machine/UIMachineSettingsStorage.cpp \
477 src/settings/machine/UIMachineSettingsAudio.cpp \
478 src/settings/machine/UIMachineSettingsNetwork.cpp \
479 src/settings/machine/UIMachineSettingsPortForwardingDlg.cpp \
480 src/settings/machine/UIMachineSettingsSerial.cpp \
481 src/settings/machine/UIMachineSettingsParallel.cpp \
482 src/settings/machine/UIMachineSettingsUSB.cpp \
483 src/settings/machine/UIMachineSettingsUSBFilterDetails.cpp \
484 src/settings/machine/UIMachineSettingsSF.cpp \
485 src/settings/machine/UIMachineSettingsSFDetails.cpp \
486 src/wizards/newvm/UINewVMWzd.cpp \
487 src/wizards/newhd/UINewHDWzd.cpp \
488 src/wizards/firstrun/UIFirstRunWzd.cpp \
489 src/wizards/exportappliance/UIExportApplianceWzd.cpp \
490 src/wizards/importappliance/UIImportApplianceWzd.cpp \
491 src/widgets/UIBar.cpp \
492 src/widgets/UIBootTable.cpp \
493 src/widgets/UIDownloader.cpp \
494 src/widgets/UIDownloaderAdditions.cpp \
495 src/widgets/UIDownloaderUserManual.cpp \
496 src/widgets/UIHotKeyEditor.cpp \
497 src/widgets/UIPopupBox.cpp \
498 src/widgets/UIProgressDialog.cpp \
499 src/widgets/UISpecialControls.cpp \
500 src/widgets/UIToolBar.cpp \
501 src/widgets/VBoxApplianceEditorWgt.cpp \
502 src/widgets/VBoxExportApplianceWgt.cpp \
503 src/widgets/VBoxFilePathSelectorWidget.cpp \
504 src/widgets/VBoxGuestRAMSlider.cpp \
505 src/widgets/VBoxImportApplianceWgt.cpp \
506 src/widgets/VBoxLineTextEdit.cpp \
507 src/widgets/VBoxMediaComboBox.cpp \
508 src/widgets/VBoxMiniToolBar.cpp \
509 src/widgets/VBoxOSTypeSelectorButton.cpp \
510 src/widgets/VBoxOSTypeSelectorWidget.cpp \
511 src/widgets/VBoxWarningPane.cpp \
512 src/selector/UISelectorShortcuts.cpp \
513 src/selector/UIVMDesktop.cpp \
514 src/selector/UIVMItem.cpp \
515 src/selector/UIVMListView.cpp \
516 src/selector/UIVMPreviewWindow.cpp \
517 src/selector/UIVirtualBoxEventHandler.cpp \
518 src/selector/VBoxSelectorWnd.cpp \
519 src/selector/VBoxSnapshotsWgt.cpp \
520 src/runtime/UIActionsPool.cpp \
521 src/runtime/UIConsoleEventHandler.cpp \
522 src/runtime/UIFrameBuffer.cpp \
523 src/runtime/UIFrameBufferQGL.cpp \
524 src/runtime/UIFrameBufferQImage.cpp \
525 src/runtime/UIFrameBufferSDL.cpp \
526 src/runtime/UIIndicatorsPool.cpp \
527 src/runtime/UIKeyboardHandler.cpp \
528 src/runtime/UIMachine.cpp \
529 src/runtime/UIMachineLogic.cpp \
530 src/runtime/UIMachineMenuBar.cpp \
531 src/runtime/UIMachineShortcuts.cpp \
532 src/runtime/UIMachineView.cpp \
533 src/runtime/UIMachineWindow.cpp \
534 src/runtime/UIMouseHandler.cpp \
535 src/runtime/UIMultiScreenLayout.cpp \
536 src/runtime/UISession.cpp \
537 src/runtime/UIVMCloseDialog.cpp \
538 src/runtime/fullscreen/UIKeyboardHandlerFullscreen.cpp \
539 src/runtime/fullscreen/UIMachineLogicFullscreen.cpp \
540 src/runtime/fullscreen/UIMachineViewFullscreen.cpp \
541 src/runtime/fullscreen/UIMachineWindowFullscreen.cpp \
542 src/runtime/normal/UIKeyboardHandlerNormal.cpp \
543 src/runtime/normal/UIMachineLogicNormal.cpp \
544 src/runtime/normal/UIMachineViewNormal.cpp \
545 src/runtime/normal/UIMachineWindowNormal.cpp \
546 src/runtime/scale/UIKeyboardHandlerScale.cpp \
547 src/runtime/scale/UIMachineLogicScale.cpp \
548 src/runtime/scale/UIMachineViewScale.cpp \
549 src/runtime/scale/UIMachineWindowScale.cpp \
550 src/runtime/seamless/UIKeyboardHandlerSeamless.cpp \
551 src/runtime/seamless/UIMachineLogicSeamless.cpp \
552 src/runtime/seamless/UIMachineViewSeamless.cpp \
553 src/runtime/seamless/UIMachineWindowSeamless.cpp
554
555VirtualBox_SOURCES.win += \
556 src/runtime/UIFrameBufferDirectDraw.cpp
557VirtualBox_SOURCES.darwin += \
558 src/runtime/UIFrameBufferQuartz2D.cpp \
559 src/platform/darwin/UIAbstractDockIconPreview.cpp \
560 src/platform/darwin/UIWindowMenuManager.cpp \
561 src/platform/darwin/UICocoaDockIconPreview.mm
562
563if1of ($(KBUILD_TARGET), freebsd linux netbsd openbsd solaris) # X11
564 VirtualBox_SOURCES += \
565 src/platform/x11/XKeyboard-new.cpp \
566 src/platform/x11/VBoxX11Helper.cpp \
567 src/platform/x11/UIDesktopServices_x11.cpp
568endif
569
570ifdef VBOX_WITH_REGISTRATION
571 VirtualBox_SOURCES += \
572 src/wizards/registration/UIRegistrationWzd.cpp
573endif
574
575VirtualBox_SOURCES.win += \
576 src/platform/win/VirtualBox.rc \
577 src/platform/win/UIDesktopServices_win.cpp \
578 src/platform/win/VBoxUtils-win.cpp
579
580VirtualBox_DEFS.darwin += VBOX_DARWIN_USE_NATIVE_CONTROLS
581VirtualBox_SOURCES.darwin += \
582 src/platform/darwin/DarwinKeyboard.cpp \
583 src/platform/darwin/CocoaEventHelper.mm \
584 src/platform/darwin/UICocoaApplication.mm \
585 src/platform/darwin/VBoxUtils-darwin-cocoa.mm \
586 src/platform/darwin/VBoxUtils-darwin.cpp \
587 src/platform/darwin/UICocoaSpecialControls.mm \
588 src/platform/darwin/UIDesktopServices_darwin.cpp \
589 src/platform/darwin/UIDesktopServices_darwin_cocoa.mm
590VirtualBox_QT_MOCHDRS.darwin += \
591 src/platform/darwin/UICocoaSpecialControls.h
592
593ifdef VBOX_WITH_ICHAT_THEATER
594 VirtualBox_SOURCES.darwin += \
595 src/platform/darwin/VBoxIChatTheaterWrapper.m
596endif
597
598ifdef VBOX_GUI_WITH_SYSTRAY
599 VirtualBox_DEFS += VBOX_GUI_WITH_SYSTRAY
600 VirtualBox_QT_MOCHDRS += \
601 src/selector/VBoxTrayIcon.h
602 VirtualBox_SOURCES += \
603 src/selector/VBoxTrayIcon.cpp
604endif
605
606if defined(VBOX_WITH_VIDEOHWACCEL) || defined(VBOX_GUI_USE_QGL)
607 VirtualBox_SOURCES += \
608 src/VBoxFBQGL.cpp \
609 src/VBoxFBOverlay.cpp \
610 src/VBoxGLSupportInfo.cpp
611endif
612# The Qt modules we're using.
613# (The include directory and lib/framework for each module will be added by the Qt4 unit.)
614VirtualBox_QT_MODULES = Core Gui Network
615
616if defined(VBOX_WITH_VIDEOHWACCEL) || defined(VBOX_GUI_USE_QGL)
617 VirtualBox_QT_MODULES += OpenGL
618endif
619
620# Import QDesigner UI sources and translations from VBoxUI.pro.
621ifndef VBOX_WITH_REGISTRATION
622 FORMS := $(filter-out src/wizards/registration/UIRegistrationWzdPage1.ui,$(FORMS))
623endif
624$(eval VirtualBox_SOURCES += $(FORMS))
625
626# Resource files with some OSE differences (VirtualBoxBrand.qrc is created further down).
627VirtualBox_SOURCES += VirtualBox1.qrc
628VirtualBox1.qrc_RCCFLAGS = -name BASIC1
629VirtualBox_SOURCES += VirtualBox2.qrc
630VirtualBox2.qrc_RCCFLAGS = -name BASIC2
631ifeq ($(KBUILD_TARGET),darwin)
632 VirtualBox_SOURCES += VirtualBoxMac.qrc
633 VirtualBoxMac.qrc_RCCFLAGS = -name MAC
634else
635 VirtualBox_SOURCES += VirtualBoxOther.qrc
636 VirtualBoxOther.qrc_RCCFLAGS = -name OTHER
637endif
638VirtualBox_SOURCES += $(VBOX_VIRTUALBOX4_OUT_DIR)/VirtualBoxBrand.qrc
639$(VBOX_VIRTUALBOX4_OUT_DIR)/VirtualBoxBrand.qrc_RCCFLAGS = -name BRAND
640if defined(VBOX_WITH_VIDEOHWACCEL) || defined(VBOX_GUI_USE_QGL)
641 VirtualBox_SOURCES += VirtualBoxShaders.qrc
642 VirtualBoxShaders.qrc_RCCFLAGS = -name SHADERS
643endif
644
645# Import the translation source from VBoxUI.pro and add the qt_xx_YY counterparts
646VirtualBox_QT_TRANSLATIONS := $(TRANSLATIONS) \
647 $(patsubst nls/VirtualBox_%.ts,nls/qt_%.ts, $(filter nls/VirtualBox_%.ts,$(TRANSLATIONS)))
648# Compress the translation units.
649VirtualBox_LRCFLAGS = -silent
650# Where to install the translations (a separate install target, VirtualBox-nls-inst is created).
651VirtualBox_QT_TRANSLATIONS_INST = $(INST_BIN)nls/
652
653
654## @todo how to detect what tool is used?
655## @todo GCC3 seems to lack -Wno-missing-base-class-initializer, so we use
656# more generic -Wno-extra
657# bird: What about $(if $(VBOX_GCC_Wno-missing-base-class-initializer),$(VBOX_GCC_Wno-missing-base-class-initializer),$(VBOX_GCC_Wno-extra))?
658ifdef VBOX_WITH_XPCOM
659 VirtualBox_src/globals/COMDefs.cpp_CXXFLAGS = $(VBOX_GCC_Wno-extra)
660endif
661
662
663#
664# Generate the COM wrappers.
665#
666## @todo This needs some cleaning up perhaps...
667## @todo kBuild: Non-existing +| targets should be tried remade or what?
668VirtualBox_BLDDIRS += $(VirtualBox_0_OUTDIR)/include
669VirtualBox_INTERMEDIATES += $(VirtualBox_0_OUTDIR)/include/COMWrappers.h
670VirtualBox_CLEAN += \
671 $(VirtualBox_0_OUTDIR)/include/COMWrappers \
672 $(VirtualBox_0_OUTDIR)/include/COMWrappers.tmp \
673 $(VirtualBox_0_OUTDIR)/include/COMWrappers.h \
674 $(VirtualBox_0_OUTDIR)/include/COMWrappers.cpp
675VirtualBox_SOURCES += $(VirtualBox_0_OUTDIR)/include/COMWrappers.cpp
676
677$$(VirtualBox_0_OUTDIR)/include/COMWrappers \
678+| $$(VirtualBox_0_OUTDIR)/include/COMWrappers.h \
679+| $$(VirtualBox_0_OUTDIR)/include/COMWrappers.cpp: \
680 $(VBOX_XIDL_FILE) \
681 $(VBOX_VIRTUALBOX4_SRC)/src/globals/COMWrappers.xsl \
682 | $$(dir $$@)
683 $(call MSG_GENERATE,VirtualBox,$<,$@)
684 $(QUIET)$(RM) -f $@ [email protected] [email protected] [email protected]
685 $(QUIET)$(VBOX_XSLTPROC) -o $@ $(VBOX_VIRTUALBOX4_SRC)/src/globals/COMWrappers.xsl $<
686
687 $(QUIET)$(SED) -e '1,/\/\/ wrapper definitions/ !d' \
688 --output [email protected] $@
689 $(QUIET)$(CP) --changed [email protected] [email protected]
690
691 $(QUIET)$(APPEND) -t -n [email protected] \
692 '/*' \
693 ' * DO NOT EDIT! This is a generated file, see COMWrappers.h for details.' \
694 ' */' \
695 '' \
696 '#include "VBoxGlobal.h"' \
697 ''
698 $(QUIET)$(SED) -e '/\/\/ wrapper definitions/,9999999 !d' \
699 -e 's/^inline //' \
700 --append [email protected] $@
701 $(QUIET)$(CP) --changed [email protected] [email protected]
702 $(QUIET)$(RM) -f [email protected]
703
704
705# alias for generating the COM Wrappers file.
706testwrappers:: $$(VirtualBox_0_OUTDIR)/include/COMWrappers.h
707
708
709#
710# Generate qrc file with branded icons.
711#
712VirtualBox_BLDDIRS += $(VBOX_VIRTUALBOX4_OUT_DIR)
713VirtualBox_CLEAN += $(VBOX_VIRTUALBOX4_OUT_DIR)/VirtualBoxBrand.qrc
714$(VBOX_VIRTUALBOX4_OUT_DIR)/VirtualBoxBrand.qrc: \
715 $(VBOX_VIRTUALBOX4_SRC)/VirtualBoxBrand.qrc \
716 | $$(dir $$@)
717 $(call MSG_GENERATE,VirtualBox,$<,$@)
718 $(QUIET)$(SED) \
719 -e 's;@VBOX_ABOUT_PNG@;$(VBOX_BRAND_GUI_ABOUT_PNG);g' \
720 -e 's;@VBOX_ABOUT_16PX_PNG@;$(VBOX_BRAND_GUI_ABOUT_16PX_PNG);g' \
721 -e 's;@VBOX_VBOX_16PX_PNG@;$(VBOX_BRAND_GUI_VBOX_16PX_PNG);g' \
722 -e 's;@VBOX_VBOX_20PX_PNG@;$(VBOX_BRAND_GUI_VBOX_20PX_PNG);g' \
723 -e 's;@VBOX_VBOX_32PX_PNG@;$(VBOX_BRAND_GUI_VBOX_32PX_PNG);g' \
724 -e 's;@VBOX_VBOX_40PX_PNG@;$(VBOX_BRAND_GUI_VBOX_40PX_PNG);g' \
725 -e 's;@VBOX_VBOX_48PX_PNG@;$(VBOX_BRAND_GUI_VBOX_48PX_PNG);g' \
726 -e 's;@VBOX_VBOX_64PX_PNG@;$(VBOX_BRAND_GUI_VBOX_64PX_PNG);g' \
727 -e 's;@VBOX_CUBE_42PX_PNG@;$(VBOX_BRAND_GUI_CUBE_42PX_PNG);g' \
728 --output $@ \
729 $<
730
731
732#
733# Precompiled header - non-functional atm.
734#
735ifdef VBOX_WITH_PRECOMPILED_HEADERS
736VirtualBox_INCS <= $(VirtualBox_0_OUTDIR)/include
737VirtualBox_DEFS += VBOX_WITH_PRECOMPILED_HEADERS
738VirtualBox_CXXFLAGS += -Winvalid-pch -fpch-preprocess
739VirtualBox_INTERMEDIATES += $(VirtualBox_0_OUTDIR)/include/precomp.h.gch
740
741tstx: $$(VirtualBox_0_OUTDIR)/include/precomp.h.gch
742
743$$(VirtualBox_0_OUTDIR)/include/precomp.h.gch: \
744 $(PATH_SUB_CURRENT)/src/precomp.h \
745 $$(VirtualBox_0_OUTDIR)/include/COMWrappers.h \
746 $$(filter %.gen.h, $$(VirtualBox_INTERMEDIATES) ) \
747 $(VBOX_PATH_SDK)/bindings/xpcom/include/VirtualBox_XPCOM.h \
748 | $$(dir $$@)
749 time 'g++-4.0' \
750 '-c' \
751 '-g' \
752 $(if-expr "$(KBUILD_TYPE)" == "debug", , -O2 ) \
753 '-pipe' \
754 '-Wall' \
755 '-Wextra' \
756 '-Wno-missing-field-initializers' \
757 '-Wno-trigraphs' \
758 '-frtti' \
759 '-fno-exceptions' \
760 '-Wno-non-virtual-dtor' \
761 '-Wno-long-long' \
762 \
763 '-fshort-wchar' \
764 '-fno-strict-aliasing' \
765 '-fvisibility=hidden' \
766 '-DVBOX_HAVE_VISIBILITY_HIDDEN' \
767 '-DRT_USE_VISIBILITY_DEFAULT' \
768 '-fvisibility-inlines-hidden' \
769 '-Winvalid-pch' \
770 '-fpch-preprocess' \
771 \
772 '-F$(PATH_SDK_QT4)/Frameworks' \
773 '-mmacosx-version-min=10.5' \
774 '-isysroot' \
775 '/Developer/SDKs/MacOSX10.5.sdk' \
776 '-m32' \
777 \
778 $(foreach inc,$(VirtualBox_INCS),\$(NL)$(TAB)-I$(inc)) \
779 '-I$(PATH_ROOT)/include' \
780 '-I$(PATH_OUT)' \
781 '-DVBOX' \
782 '-DVBOX_WITH_DEBUGGER' \
783 '-DVBOX_WITH_64_BITS_GUESTS' \
784 $(if-expr "$(KBUILD_TYPE)" == "debug", '-DDEBUG' '-DDEBUG_bird' '-DDEBUG_USERNAME=bird' '-DVBOX_CHECK_STATE' ,) \
785 '-DRT_OS_DARWIN' \
786 '-D__DARWIN__' \
787 '-DRT_ARCH_X86' \
788 '-D__X86__' \
789 '-DIN_RING3' \
790 '-DQT_NO_DEBUG' \
791 '-DQT_THREAD_SUPPORT' \
792 '-DQT_SHARED' \
793 '-DHAVE_CONFIG_H' \
794 '-DHC_ARCH_BITS=32' \
795 '-DGC_ARCH_BITS=64' \
796 '-DVBOX_WITH_XPCOM' \
797 '-DVBOX_WITH_REGISTRATION' \
798 '-DVBOX_WITH_REGISTRATION_REQUEST' \
799 '-DVBOX_WITH_UPDATE_REQUEST' \
800 '-DVBOX_WITH_ALSA' \
801 '-DVBOX_WITH_PULSE' \
802 '-DVBOX_WITH_E1000' \
803 '-DVBOX_WITH_NETFLT' \
804 '-DVBOX_WITH_DEBUGGER_GUI' \
805 $(if-expr "$(KBUILD_TYPE)" != "release", '-DVBOX_WITH_DEBUGGER_GUI_MENU', ) \
806 '-DVBOX_WITH_VIDEOHWACCEL' \
807 '-DVBOX_GUI_USE_QGL' \
808 '-DVBOX_WITH_VIRTIO' \
809 '-DVBOX_WITH_PRECOMPILED_HEADERS' \
810 '-DVBOX_DARWIN_USE_NATIVE_CONTROLS' \
811 '-DQT_CORE_LIB' \
812 '-DQT_GUI_LIB' \
813 '-DQT_NETWORK_LIB' \
814 '-DQT_OPENGL_LIB' \
815 '-DMAC_OS_X_VERSION_MIN_REQUIRED=1050' \
816 '-DMAC_OS_X_VERSION_MAX_ALLOWED=1050' \
817 '-DVBOX_GUI_USE_QUARTZ2D' \
818 '-DVBOX_GUI_USE_QIMAGE' \
819 '-o' $@ $<
820endif
821
822ifeq ($(KBUILD_TARGET),win)
823#
824# On Windows we'll have to generate/edit part of the resource file.
825# The IDI_ICON1 name is Qt specific.
826#
827src/platform/win/VirtualBox.rc_INCS = $(VirtualBox_0_OUTDIR)
828src/platform/win/VirtualBox.rc_DEPS = $(VirtualBox_0_OUTDIR)/VirtualBox-icon.rc
829src/platform/win/VirtualBox.rc_CLEAN = $(VirtualBox_0_OUTDIR)/VirtualBox-icon.rc
830
831$$(VirtualBox_0_OUTDIR)/VirtualBox-icon.rc: $(MAKEFILE_CURRENT) $(VBOX_WINDOWS_ICON_FILE) | $$(dir $$@)
832 $(APPEND) -t $@ 'IDI_ICON1 ICON "$(subst /,\\,$(VBOX_WINDOWS_ICON_FILE))"'
833
834endif # win
835
836
837ifeq ($(KBUILD_TARGET),darwin)
838#
839# Create directories for each approved language or the application
840# menu won't be translated.
841#
842INSTALLS += VirtualBox.lproj
843VirtualBox.lproj_INST = $(INST_VIRTUALBOX)Contents/Resources/
844VirtualBox.lproj_MODE = 755
845VirtualBox.lproj_DIRS := $(addsuffix .lproj,$(VBOX_APPROVED_GUI_LANGUAGES))
846
847#
848# On OS X (darwin) we need to install icon resources and compulsory bundle contents.
849# The VirtualBoxVM.app helper is for launching VMs (fixes some issues with the dock).
850#
851INSTALLS += VirtualBox.app
852VirtualBox.app_INST = $(INST_VIRTUALBOX)Contents/
853VirtualBox.app_MODE = 644
854VirtualBox.app_SOURCES = \
855 src/platform/darwin/PkgInfo \
856 $(VirtualBox.app_0_OUTDIR)/Info.plist \
857 $(VBOX_MACOSX_ICON_FILE)=>Resources/virtualbox.icns \
858 $(VBOX_BRAND_GUI_VBOX_64PX_PNG)=>Resources/virtualbox.png \
859 $(PATH_ROOT)/src/VBox/Resources/darwin/virtualbox-vbox.icns=>Resources/virtualbox-vbox.icns \
860 $(PATH_ROOT)/src/VBox/Resources/darwin/virtualbox-vbox-extpack.icns=>Resources/virtualbox-vbox-extpack.icns \
861 $(PATH_ROOT)/src/VBox/Resources/darwin/virtualbox-ovf.icns=>Resources/virtualbox-ovf.icns \
862 $(PATH_ROOT)/src/VBox/Resources/darwin/virtualbox-ova.icns=>Resources/virtualbox-ova.icns
863
864$$(VirtualBox.app_0_OUTDIR)/Info.plist: $(PATH_SUB_CURRENT)/src/platform/darwin/Info.plist $(VBOX_VERSION_MK) | $$(@D)/
865 $(call MSG_GENERATE,VirtualBox.app,$<,$@)
866 $(QUIET)$(RM) -f $@
867 $(QUIET)$(SED) \
868 -e 's/@VBOX_VERSION_STRING@/$(VBOX_VERSION_STRING)/g' \
869 -e 's/@VBOX_VERSION_MAJOR@/$(VBOX_VERSION_MAJOR)/g' \
870 -e 's/@VBOX_VERSION_MINOR@/$(VBOX_VERSION_MINOR)/g' \
871 -e 's/@VBOX_VERSION_BUILD@/$(VBOX_VERSION_BUILD)/g' \
872 -e 's/@VBOX_VENDOR@/$(VBOX_VENDOR)/g' \
873 -e 's/@VBOX_PRODUCT@/$(VBOX_PRODUCT)/g' \
874 -e 's/@VBOX_C_YEAR@/$(VBOX_C_YEAR)/g' \
875 $< > $@
876
877INSTALLS += VirtualBoxVM.app
878VirtualBoxVM.app_INST = $(VirtualBox.app_INST)Resources/VirtualBoxVM.app/Contents/
879VirtualBoxVM.app_MODE = 644
880VirtualBoxVM.app_SOURCES = \
881 src/platform/darwin/VM-PkgInfo=>PkgInfo \
882 $(VirtualBoxVM.app_0_OUTDIR)/VM-Info.plist=>Info.plist
883VirtualBoxVM.app_SYMLINKS = \
884 MacOS=>../../../MacOS/ \
885 Resources=>../../../Resources/
886
887$$(VirtualBoxVM.app_0_OUTDIR)/VM-Info.plist: $(PATH_SUB_CURRENT)/src/platform/darwin/VM-Info.plist $(VBOX_VERSION_MK) | $$(@D)/
888 $(call MSG_GENERATE,VirtualBoxVM.app,$<,$@)
889 $(QUIET)$(RM) -f $@
890 $(QUIET)$(SED) \
891 -e 's/@VBOX_VERSION_STRING@/$(VBOX_VERSION_STRING)/g' \
892 -e 's/@VBOX_VERSION_MAJOR@/$(VBOX_VERSION_MAJOR)/g' \
893 -e 's/@VBOX_VERSION_MINOR@/$(VBOX_VERSION_MINOR)/g' \
894 -e 's/@VBOX_VERSION_BUILD@/$(VBOX_VERSION_BUILD)/g' \
895 -e 's/@VBOX_VENDOR@/$(VBOX_VENDOR)/g' \
896 -e 's/@VBOX_PRODUCT@/$(VBOX_PRODUCT)/g' \
897 -e 's/@VBOX_C_YEAR@/$(VBOX_C_YEAR)/g' \
898 --output $@ $<
899
900PROGRAMS += vmstarter
901vmstarter_TEMPLATE = VBOXR3EXE
902vmstarter_SOURCES = src/platform/darwin/vmstarter.mm
903vmstarter_LDFLAGS += -framework AppKit
904vmstarter_INST = $(INST_BIN)vmstarter
905
906INSTALLS += vmstarter.app
907vmstarter.app_INST = $(VirtualBox.app_INST)Resources/vmstarter.app/Contents
908vmstarter.app_MODE = 644
909vmstarter.app_SOURCES = \
910 src/platform/darwin/vmstarter-PkgInfo=>PkgInfo \
911 $(vmstarter.app_0_OUTDIR)/vmstarter-Info.plist=>Info.plist
912vmstarter.app_SYMLINKS = \
913 MacOS=>../../../MacOS \
914 Resources=>../../../Resources
915
916$$(vmstarter.app_0_OUTDIR)/vmstarter-Info.plist: $(PATH_SUB_CURRENT)/src/platform/darwin/vmstarter-Info.plist $(VBOX_VERSION_MK) | $$(@D)/
917 $(call MSG_GENERATE,vmstarter.app,$<,$@)
918 $(QUIET)$(RM) -f $@
919 $(QUIET)$(SED) \
920 -e 's/@VBOX_VERSION_STRING@/$(VBOX_VERSION_STRING)/g' \
921 -e 's/@VBOX_VERSION_MAJOR@/$(VBOX_VERSION_MAJOR)/g' \
922 -e 's/@VBOX_VERSION_MINOR@/$(VBOX_VERSION_MINOR)/g' \
923 -e 's/@VBOX_VERSION_BUILD@/$(VBOX_VERSION_BUILD)/g' \
924 -e 's/@VBOX_VENDOR@/$(VBOX_VENDOR)/g' \
925 -e 's/@VBOX_PRODUCT@/$(VBOX_PRODUCT)/g' \
926 -e 's/@VBOX_C_YEAR@/$(VBOX_C_YEAR)/g' \
927 --output $@ $<
928endif # darwin
929
930#
931# App for testing GL support
932#
933if defined(VBOX_WITH_VIDEOHWACCEL)
934 if1of ($(KBUILD_TARGET), win linux freebsd)
935 LIBRARIES += VBoxOGL2D
936 VBoxOGL2D_TEMPLATE = VBOXR3STATIC
937 VBoxOGL2D_USES = qt4
938 VBoxOGL2D_SDKS = QT4
939 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
940 VBoxOGL2D_QT_MODULES += OpenGL
941 VBoxOGL2D_SOURCES = \
942 src/VBoxGLSupportInfo.cpp
943 VBoxOGL2D_INCS = include
944 endif
945endif
946
947#
948# Testcase for the darwin keyboard routines.
949#
950ifdef VBOX_WITH_TESTCASES
951PROGRAMS.darwin += tstDarwinKeyboard
952tstDarwinKeyboard_NAME = tstDarwinKeyboard
953tstDarwinKeyboard_TEMPLATE = VBOXR3TSTEXE
954tstDarwinKeyboard_DEFS.x86 = USE_HID_FOR_MODIFIERS
955tstDarwinKeyboard_INCS = include
956tstDarwinKeyboard_SOURCES = \
957 src/platform/darwin/tstDarwinKeyboard.cpp \
958 src/platform/darwin/DarwinKeyboard.cpp
959tstDarwinKeyboard_SOURCES.amd64 = \
960 src/platform/darwin/CocoaEventHelper.mm
961tstDarwinKeyboard_LDFLAGS = -framework IOKit -framework Carbon -framework AppKit
962tstDarwinKeyboard_LIBS = \
963 $(LIB_RUNTIME)
964endif
965
966
967# Unset everything that was loaded from VBoxUI.pro.
968TEMPLATE := $(SAVED_TEMPLATE)
969SAVED_TEMPLATE :=
970LANGUAGE :=
971FORMS :=
972TRANSLATIONS :=
973IMAGES :=
974
975
976# Commit the magic.
977# (note: before custom rules that make usage of generated variables!).
978include $(KBUILD_PATH)/subfooter.kmk
979
980#
981# Update all known NLS translation (.ts) files in the nls/ subdirectory.
982#
983# NOTE: This target is intended to be run only by the GUI maintainer shortly
984# before a new product release. VirtualBox_xx_YY.ts is a template for new
985# languages and should never be actually translated or installed.
986#
987# For Qt >= 4.6.0 it maybe necessary to add -I $(VBOX_GUI_INC_DIRS) to the
988# lupdate call
989#
990#VirtualBox_QT_TRANSLATIONS = nls/VirtualBox_de.ts
991updatenls:: makeallnls nls/VirtualBox_en.ts
992
993makeallnls:: \
994 $(foreach header,$(VBOX_GUI_INC_DIRS),$(wildcard $(header)/*.h)) \
995 $(filter-out %.qrc,$(VirtualBox_SOURCES) $(VirtualBox_VBOX_EXTRA_NLS_SOURCES))
996 $(call MSG_L1,lupdate all languages (nls/*.ts))
997 $(QUIET)$(TOOL_QT4_LUPDATE) \
998 $^ \
999 -ts \
1000 $(filter-out nls/VirtualBox_en.ts,$(filter-out nls/qt_%.ts,$(VirtualBox_QT_TRANSLATIONS))) \
1001 nls/VirtualBox_xx_YY.ts
1002
1003# Create the English translation file. This is something special cause it will
1004# contain the plural forms only.
1005nls/VirtualBox_en.ts: \
1006 $(foreach header,$(VBOX_GUI_INC_DIRS),$(wildcard $(header)/*.h)) \
1007 $(filter-out %.qrc,$(VirtualBox_SOURCES) $(VirtualBox_VBOX_EXTRA_NLS_SOURCES))
1008 $(call MSG_L1,lupdate $@)
1009 $(QUIET)$(TOOL_QT4_LUPDATE) \
1010 $^ \
1011 -ts \
1012 $@
1013 $(QUIET)$(SED) -n -i -e \
1014 '/<context>/,/<\/context>/!p;/<context>/h;/<name>/H;/<message numerus="yes">/,/<\/message>/H;/<\/context>/{H;x;/<message/p}' \
1015 $@
1016
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