1 | # $Id: Makefile.kmk 22434 2009-08-25 14:26:49Z vboxsync $
|
---|
2 | ## @file
|
---|
3 | # Makefile for the VirtualBox Qt GUI.
|
---|
4 | #
|
---|
5 |
|
---|
6 | #
|
---|
7 | # Copyright (C) 2006-2007 Sun Microsystems, Inc.
|
---|
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 | # Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
|
---|
18 | # Clara, CA 95054 USA or visit http://www.sun.com if you need
|
---|
19 | # additional information or have any questions.
|
---|
20 | #
|
---|
21 |
|
---|
22 | SUB_DEPTH = ../../../..
|
---|
23 | include $(KBUILD_PATH)/subheader.kmk
|
---|
24 |
|
---|
25 | #
|
---|
26 | # Globals.
|
---|
27 | #
|
---|
28 | VBOX_VIRTUALBOX4_SRC := $(PATH_SUB_CURRENT)
|
---|
29 | VBOX_VIRTUALBOX4_OUT_DIR := $(PATH_TARGET)/VirtualBox/misc
|
---|
30 |
|
---|
31 | VBOX_WITH_REGISTRATION := 1
|
---|
32 |
|
---|
33 | # Ask the user to register at Sun. If this setting is disabled the user can
|
---|
34 | # still register using the menu if desired.
|
---|
35 | VBOX_WITH_REGISTRATION_REQUEST := 1
|
---|
36 |
|
---|
37 | # Show the update notifier dialog during startup. If this setting is disabled
|
---|
38 | # the user can still update using the menu if desired.
|
---|
39 | VBOX_WITH_UPDATE_REQUEST := 1
|
---|
40 |
|
---|
41 |
|
---|
42 | #
|
---|
43 | # The targets.
|
---|
44 | #
|
---|
45 | ifdef VBOX_WITH_HARDENING
|
---|
46 | PROGRAMS += VirtualBoxHardened
|
---|
47 | DLLS += VirtualBox
|
---|
48 | else
|
---|
49 | PROGRAMS += VirtualBox
|
---|
50 | endif
|
---|
51 |
|
---|
52 | ifeq ($(filter-out freebsd linux openbsd netbsd solaris,$(KBUILD_TARGET)),) # X11
|
---|
53 | DLLS += VBoxKeyboard
|
---|
54 | ## @todo convert to install target.
|
---|
55 | OTHERS += $(PATH_BIN)/vboxkeyboard.tar.gz
|
---|
56 | CLEAN += $(PATH_BIN)/vboxkeyboard.tar.gz
|
---|
57 | endif
|
---|
58 | INSTALLS += VirtualBox.nls
|
---|
59 |
|
---|
60 |
|
---|
61 | #
|
---|
62 | # Include the language lists.
|
---|
63 | #
|
---|
64 | include $(PATH_SUB_CURRENT)/nls/ApprovedLanguages.kmk
|
---|
65 |
|
---|
66 |
|
---|
67 | #
|
---|
68 | # VBoxKeyboard - keyboard library for X11.
|
---|
69 | #
|
---|
70 | VBoxKeyboard_TEMPLATE = VBOXR3
|
---|
71 | VBoxKeyboard_SOURCES = \
|
---|
72 | src/X11/keyboard-new.c
|
---|
73 | VBoxKeyboard_LIBS = X11
|
---|
74 | VBoxKeyboard_LIBPATH = $(VBOX_LIBPATH_X11)
|
---|
75 |
|
---|
76 |
|
---|
77 | #
|
---|
78 | # vboxkeyboard.tar.gz - the LGPLed keyboard library must always be
|
---|
79 | # redistributed with usable sources.
|
---|
80 | #
|
---|
81 | # This rule will link create a temporary symlink to src/X11/ and tar
|
---|
82 | # up the selected files into a tarball that is installed into the
|
---|
83 | # bin directory (probably belongs in /usr/shared/somewhere really,
|
---|
84 | # but wtf, it's not like we're even trying to be FHS compliant).
|
---|
85 | #
|
---|
86 | ## @todo this should be tar'ed down into the output directory and installed using an install target.
|
---|
87 | $(PATH_BIN)/vboxkeyboard.tar.gz: $(abspathex \
|
---|
88 | $(VBoxKeyboard_SOURCES) \
|
---|
89 | src/X11/COPYING.LIB \
|
---|
90 | src/X11/keyboard.h \
|
---|
91 | src/X11/keyboard-layouts.h \
|
---|
92 | src/X11/keyboard-list.h \
|
---|
93 | src/X11/keyboard-tables.h \
|
---|
94 | src/X11/keyboard-types.h \
|
---|
95 | src/X11/Makefile \
|
---|
96 | ,$(PATH_SUB_CURRENT)) | $(PATH_TARGET)/VBoxKeyboard/
|
---|
97 | $(call MSG_TOOL,tar/gzip,,$@)
|
---|
98 | $(QUIET2)$(RM) -f $(PATH_TARGET)/VBoxKeyboard/vboxkeyboard $@
|
---|
99 | $(QUIET)$(LN_SYMLINK) $(VBOX_VIRTUALBOX4_SRC)/src/X11/ $(PATH_TARGET)/VBoxKeyboard/vboxkeyboard
|
---|
100 | $(QUIET)cd $(PATH_TARGET)/VBoxKeyboard \
|
---|
101 | && tar -chvf - $(addprefix vboxkeyboard/,$(notdir $^)) \
|
---|
102 | | gzip - > $@
|
---|
103 | $(QUIET2)$(RM) -f $(PATH_TARGET)/VBoxKeyboard/vboxkeyboard
|
---|
104 |
|
---|
105 | OTHER_CLEAN += \
|
---|
106 | $(PATH_BIN)/vboxkeyboard.tar.gz
|
---|
107 |
|
---|
108 |
|
---|
109 | #
|
---|
110 | # Hardened VirtualBox.
|
---|
111 | #
|
---|
112 | VirtualBoxHardened_TEMPLATE = VBOXR3HARDENEDEXE
|
---|
113 | VirtualBoxHardened_SOURCES = src/hardenedmain.cpp
|
---|
114 | VirtualBoxHardened_NAME = VirtualBox
|
---|
115 | ifeq ($(KBUILD_TARGET),darwin) ## @todo use .darwin when ticket 36 has been fixed.
|
---|
116 | #VirtualBoxHardened_INST.darwin = $(INST_BIN)VirtualBox $(INST_BIN)VirtualBoxVM
|
---|
117 | VirtualBoxHardened_INST = $(INST_BIN)VirtualBox $(INST_BIN)VirtualBoxVM
|
---|
118 | endif
|
---|
119 |
|
---|
120 |
|
---|
121 | #
|
---|
122 | # Include Qt project file, we'll use FORMS and TRANSLATIONS in
|
---|
123 | # the VirtualBox setup below.
|
---|
124 | #
|
---|
125 | SAVED_TEMPLATE := $(TEMPLATE)
|
---|
126 | include $(PATH_SUB_CURRENT)/VBoxUI.pro
|
---|
127 |
|
---|
128 |
|
---|
129 | #
|
---|
130 | # VirtualBox - The GUI program.
|
---|
131 | #
|
---|
132 | USES += qt4
|
---|
133 | VirtualBox_TEMPLATE := $(if $(VBOX_WITH_HARDENING),VBOXQT4GUI,VBOXQT4GUIEXE)
|
---|
134 | VirtualBox_NAME = VirtualBox
|
---|
135 | ifndef VBOX_WITH_HARDENING # For the launch trick we need different inode numbers.
|
---|
136 | ifeq ($(KBUILD_TARGET),darwin) ## @todo use .darwin when ticket 36 has been fixed.
|
---|
137 | #VirtualBox_INST.darwin = $(INST_BIN)VirtualBox $(INST_BIN)VirtualBoxVM
|
---|
138 | VirtualBox_INST = $(INST_BIN)VirtualBox $(INST_BIN)VirtualBoxVM
|
---|
139 | endif
|
---|
140 | endif
|
---|
141 | VirtualBox_SDKS.win = WINPSDK DXSDK
|
---|
142 | ifeq ($(filter-out freebsd linux netbsd openbsd os2,$(KBUILD_TARGET)),) # X11 + os2 ## @todo solaris
|
---|
143 | VirtualBox_SDKS += LIBSDL
|
---|
144 | endif
|
---|
145 |
|
---|
146 | ifdef VBOX_WITH_ICHAT_THEATER
|
---|
147 | # For testing iChat Theater stuff change the sdk path (HACK ALERT!)
|
---|
148 | VBOX_PATH_MACOSX_SDK = /Developer/SDKs/MacOSX10.5.sdk
|
---|
149 | endif
|
---|
150 |
|
---|
151 | VirtualBox_DEFS = VBOX_GUI_SEPARATE_VM_PROCESS
|
---|
152 | VirtualBox_DEFS.debug = VBOX_CHECK_STATE # QT_FATAL_ASSERT
|
---|
153 | VirtualBox_DEFS.darwin = VBOX_GUI_USE_QUARTZ2D VBOX_GUI_USE_QIMAGE VBOX_WITHOUT_QHTTP
|
---|
154 | ifndef VBOX_WITH_COCOA_QT
|
---|
155 | VirtualBox_DEFS.darwin.x86= USE_HID_FOR_MODIFIERS
|
---|
156 | endif
|
---|
157 | VirtualBox_DEFS.freebsd = VBOX_GUI_USE_QIMAGE VBOX_GUI_USE_SDL
|
---|
158 | VirtualBox_DEFS.linux = VBOX_GUI_USE_QIMAGE VBOX_GUI_USE_SDL
|
---|
159 | VirtualBox_DEFS.netbsd = VBOX_GUI_USE_QIMAGE VBOX_GUI_USE_SDL
|
---|
160 | VirtualBox_DEFS.openbsd = VBOX_GUI_USE_QIMAGE VBOX_GUI_USE_SDL
|
---|
161 | VirtualBox_DEFS.solaris = VBOX_GUI_USE_QIMAGE #VBOX_GUI_USE_SDL
|
---|
162 | VirtualBox_DEFS.win = VBOX_GUI_USE_QIMAGE UNICODE QT_DLL
|
---|
163 | VirtualBox_DEFS.win.amd64 = VBOX_WITHOUT_QHTTP
|
---|
164 | ## @todo VBOX_WITH_HACKED_QT doesn't apply to Qt4, so why is this still here?
|
---|
165 | VirtualBox_DEFS.darwin.x86 += VBOX_WITH_HACKED_QT
|
---|
166 | ifdef VBOX_WITH_ICHAT_THEATER
|
---|
167 | VirtualBox_DEFS.darwin += VBOX_WITH_ICHAT_THEATER
|
---|
168 | endif
|
---|
169 | ifneq ($(KBUILD_TYPE),release)
|
---|
170 | # non-release builds has some extra features.
|
---|
171 | VirtualBox_DEFS.win += VBOX_GUI_USE_DDRAW
|
---|
172 | endif
|
---|
173 | VirtualBox_DEFS += \
|
---|
174 | $(if $(VBOX_WITH_REGISTRATION),VBOX_WITH_REGISTRATION) \
|
---|
175 | $(if $(VBOX_WITH_REGISTRATION_REQUEST),VBOX_WITH_REGISTRATION_REQUEST) \
|
---|
176 | $(if $(VBOX_WITH_UPDATE_REQUEST),VBOX_WITH_UPDATE_REQUEST) \
|
---|
177 | $(if $(VBOX_WITH_ALSA),VBOX_WITH_ALSA) \
|
---|
178 | $(if $(VBOX_WITH_PULSE),VBOX_WITH_PULSE) \
|
---|
179 | $(if $(VBOX_WITH_SOLARIS_OSS),VBOX_WITH_SOLARIS_OSS) \
|
---|
180 | $(if $(VBOX_WITH_E1000),VBOX_WITH_E1000) \
|
---|
181 | $(if $(VBOX_WITH_NETFLT)$(eq $(KBUILD_TARGET),freebsd),VBOX_WITH_NETFLT)
|
---|
182 | ifdef VBOX_WITH_DEBUGGER_GUI
|
---|
183 | VirtualBox_DEFS += VBOX_WITH_DEBUGGER_GUI
|
---|
184 | if "$(KBUILD_TYPE)" != "release"
|
---|
185 | VirtualBox_DEFS += VBOX_WITH_DEBUGGER_GUI_MENU
|
---|
186 | endif
|
---|
187 | endif
|
---|
188 | ifdef VBOX_WITH_VIDEOHWACCEL
|
---|
189 | VirtualBox_DEFS += VBOX_WITH_VIDEOHWACCEL \
|
---|
190 | VBOX_GUI_USE_QGL
|
---|
191 | else ifdef VBOX_GUI_USE_QGL
|
---|
192 | VirtualBox_DEFS += VBOX_GUI_USE_QGL
|
---|
193 | endif
|
---|
194 |
|
---|
195 | VirtualBox_src/main.cpp_DEFS += VBOX_VERSION_STRING=\"$(VBOX_VERSION_STRING)\"
|
---|
196 | VirtualBox_src/main.cpp_DEPS += $(VBOX_VERSION_MK)
|
---|
197 |
|
---|
198 | ifdef VBOX_BLEEDING_EDGE
|
---|
199 | VirtualBox_src/VBoxConsoleWnd.cpp_DEFS += \
|
---|
200 | VBOX_VERSION_STRING=\"$(VBOX_VERSION_STRING)\" \
|
---|
201 | VBOX_SVN_REV=\"$(VBOX_SVN_REV)\" \
|
---|
202 | VBOX_BLEEDING_EDGE=\"$(VBOX_BLEEDING_EDGE)\"
|
---|
203 | VirtualBox_src/VBoxSelectorWnd.cpp_DEFS += \
|
---|
204 | VBOX_VERSION_STRING=\"$(VBOX_VERSION_STRING)\" \
|
---|
205 | VBOX_SVN_REV=\"$(VBOX_SVN_REV)\" \
|
---|
206 | VBOX_BLEEDING_EDGE=\"$(VBOX_BLEEDING_EDGE)\"
|
---|
207 | VirtualBox_src/VBoxAboutDlg.cpp_DEFS += \
|
---|
208 | VBOX_BLEEDING_EDGE=\"$(VBOX_BLEEDING_EDGE)\"
|
---|
209 | VirtualBox_src/main.cpp_DEFS += \
|
---|
210 | VBOX_BLEEDING_EDGE=\"$(VBOX_BLEEDING_EDGE)\"
|
---|
211 | VirtualBox_src/VBoxConsoleWnd.cpp_DEPS += $(VBOX_VERSION_MK) $(VBOX_SVN_REV_KMK)
|
---|
212 | VirtualBox_src/VBoxSelectorWnd.cpp_DEPS += $(VBOX_VERSION_MK) $(VBOX_SVN_REV_KMK)
|
---|
213 | endif
|
---|
214 |
|
---|
215 | VirtualBox_INCS = \
|
---|
216 | ./include \
|
---|
217 | $(PATH_VirtualBox)/include
|
---|
218 |
|
---|
219 | # Necessary for the hdd backend enumeration
|
---|
220 | VirtualBox_LIBS = $(LIB_DDU)
|
---|
221 |
|
---|
222 | ifdef VBOX_WITH_VIDEOHWACCEL
|
---|
223 | # Necessary for save state support
|
---|
224 | VirtualBox_LIBS += $(LIB_VMM)
|
---|
225 | endif
|
---|
226 | ifeq ($(KBUILD_TYPE),release)
|
---|
227 | VirtualBox_LDFLAGS.win += /SUBSYSTEM:windows
|
---|
228 | else
|
---|
229 | VirtualBox_LDFLAGS.linux+= -rdynamic # for backtrace_symbols()
|
---|
230 | ifeq ($(USERNAME),dmik)
|
---|
231 | VirtualBox_LDFLAGS.win += /SUBSYSTEM:windows
|
---|
232 | else
|
---|
233 | VirtualBox_LDFLAGS.win += /SUBSYSTEM:console
|
---|
234 | endif
|
---|
235 | endif
|
---|
236 | # r=bird: what is -lz doing here? it belongs in LIBS.
|
---|
237 | VirtualBox_LDFLAGS.darwin = -lz \
|
---|
238 | -framework IOKit -framework AppKit -framework ApplicationServices -framework Foundation -framework Carbon \
|
---|
239 | $(if $(VBOX_WITH_HARDENING),-install_name $(VBOX_DYLD_EXECUTABLE_PATH)/VirtualBox.dylib)
|
---|
240 | VirtualBox_LDFLAGS.darwin.x86 = -framework QuickTime
|
---|
241 | ifdef VBOX_WITH_ICHAT_THEATER
|
---|
242 | VirtualBox_LDFLAGS.darwin += -framework InstantMessage -framework QuartzCore
|
---|
243 | endif
|
---|
244 | VirtualBox_LIBS.win = \
|
---|
245 | $(PATH_SDK_WINPSDK_LIB)/Htmlhelp.Lib \
|
---|
246 | $(PATH_SDK_DXSDK_LIB)/ddraw.lib \
|
---|
247 | $(PATH_SDK_DXSDK_LIB)/dxguid.lib
|
---|
248 | ifeq ($(filter-out freebsd linux netbsd openbsd solaris,$(KBUILD_TARGET)),) # X11
|
---|
249 | VirtualBox_LIBS += $(PATH_DLL)/VBoxKeyboard$(VBOX_SUFF_DLL)
|
---|
250 | endif
|
---|
251 |
|
---|
252 | if defined(VBOX_WITH_VIDEOHWACCEL) || defined(VBOX_GUI_USE_QGL)
|
---|
253 | VirtualBox_LIBS.win += $(PATH_SDK_WINPSDK_LIB)/Opengl32.lib
|
---|
254 | VirtualBox_LIBS.solaris += GL
|
---|
255 | endif
|
---|
256 |
|
---|
257 | # Headers containing definitions of classes that use the Q_OBJECT macro.
|
---|
258 | VirtualBox_QT_MOCHDRS = \
|
---|
259 | include/QIHttp.h \
|
---|
260 | include/QIWidgetValidator.h \
|
---|
261 | include/QIHotKeyEdit.h \
|
---|
262 | include/QIStatusBar.h \
|
---|
263 | include/QIStateIndicator.h \
|
---|
264 | include/QIMessageBox.h \
|
---|
265 | include/QILabel.h \
|
---|
266 | include/QILabel_p.h \
|
---|
267 | include/QILabelSeparator.h \
|
---|
268 | include/QIAbstractWizard.h \
|
---|
269 | include/QIListView.h \
|
---|
270 | include/QITreeWidget.h \
|
---|
271 | include/QIMainDialog.h \
|
---|
272 | include/QIHelpButton.h \
|
---|
273 | include/QIDialog.h \
|
---|
274 | include/QIFileDialog.h \
|
---|
275 | include/QIAdvancedSlider.h \
|
---|
276 | include/VBoxFilePathSelectorWidget.h \
|
---|
277 | include/VBoxOSTypeSelectorButton.h \
|
---|
278 | include/VBoxOSTypeSelectorWidget.h \
|
---|
279 | include/VBoxLineTextEdit.h \
|
---|
280 | include/VBoxUtils.h \
|
---|
281 | include/VBoxGlobalSettings.h \
|
---|
282 | include/VBoxGlobal.h \
|
---|
283 | include/VBoxVMListView.h \
|
---|
284 | include/VBoxMediaComboBox.h \
|
---|
285 | include/VBoxSelectorWnd.h \
|
---|
286 | include/VBoxConsoleWnd.h \
|
---|
287 | include/VBoxConsoleView.h \
|
---|
288 | include/VBoxMiniToolBar.h \
|
---|
289 | include/VBoxProblemReporter.h \
|
---|
290 | include/VBoxProgressDialog.h \
|
---|
291 | include/VBoxDownloaderWgt.h \
|
---|
292 | include/VBoxAboutDlg.h \
|
---|
293 | include/VBoxCloseVMDlg.h \
|
---|
294 | include/VBoxNewVMWzd.h \
|
---|
295 | include/VBoxNewHDWzd.h \
|
---|
296 | include/VBoxVMFirstRunWzd.h \
|
---|
297 | include/VBoxRegistrationDlg.h \
|
---|
298 | include/VBoxUpdateDlg.h \
|
---|
299 | include/VBoxSnapshotDetailsDlg.h \
|
---|
300 | include/VBoxVMInformationDlg.h \
|
---|
301 | include/VBoxTakeSnapshotDlg.h \
|
---|
302 | include/VBoxSnapshotsWgt.h \
|
---|
303 | include/VBoxVMLogViewer.h \
|
---|
304 | include/VBoxMediaManagerDlg.h \
|
---|
305 | include/VBoxSettingsUtils.h \
|
---|
306 | include/VBoxVMSettingsGeneral.h \
|
---|
307 | include/VBoxVMSettingsSystem.h \
|
---|
308 | include/VBoxVMSettingsDisplay.h \
|
---|
309 | include/VBoxVMSettingsHD.h \
|
---|
310 | include/VBoxVMSettingsCD.h \
|
---|
311 | include/VBoxVMSettingsFD.h \
|
---|
312 | include/VBoxVMSettingsAudio.h \
|
---|
313 | include/VBoxVMSettingsNetwork.h \
|
---|
314 | include/VBoxVMSettingsNetworkDetails.h \
|
---|
315 | include/VBoxVMSettingsSerial.h \
|
---|
316 | include/VBoxVMSettingsParallel.h \
|
---|
317 | include/VBoxVMSettingsUSB.h \
|
---|
318 | include/VBoxVMSettingsUSBFilterDetails.h \
|
---|
319 | include/VBoxVMSettingsSF.h \
|
---|
320 | include/VBoxVMSettingsSFDetails.h \
|
---|
321 | include/VBoxGLSettingsGeneral.h \
|
---|
322 | include/VBoxGLSettingsInput.h \
|
---|
323 | include/VBoxGLSettingsUpdate.h \
|
---|
324 | include/VBoxGLSettingsLanguage.h \
|
---|
325 | include/VBoxGLSettingsNetwork.h \
|
---|
326 | include/VBoxGLSettingsNetworkDetails.h \
|
---|
327 | include/VBoxSettingsDialog.h \
|
---|
328 | include/VBoxSettingsDialogSpecific.h \
|
---|
329 | include/VBoxSettingsPage.h \
|
---|
330 | include/VBoxSettingsSelector.h \
|
---|
331 | include/VBoxApplianceEditorWgt.h \
|
---|
332 | include/VBoxImportApplianceWgt.h \
|
---|
333 | include/VBoxImportApplianceWzd.h \
|
---|
334 | include/VBoxExportApplianceWgt.h \
|
---|
335 | include/VBoxExportApplianceWzd.h
|
---|
336 |
|
---|
337 | # Sources containing local definitions of classes that use the Q_OBJECT macro.
|
---|
338 | VirtualBox_QT_MOCSRCS = \
|
---|
339 | src/QIMessageBox.cpp \
|
---|
340 | src/VBoxSelectorWnd.cpp \
|
---|
341 | src/VBoxConsoleWnd.cpp \
|
---|
342 | src/VBoxMediaManagerDlg.cpp
|
---|
343 | ifdef VBOX_WITH_XPCOM
|
---|
344 | VirtualBox_QT_MOCSRCS += \
|
---|
345 | src/COMDefs.cpp
|
---|
346 | endif
|
---|
347 | ifeq ($(KBUILD_TARGET),win)
|
---|
348 | VirtualBox_QT_MOCSRCS += \
|
---|
349 | src/QIFileDialog.cpp
|
---|
350 | endif
|
---|
351 |
|
---|
352 | VirtualBox_SOURCES = \
|
---|
353 | src/main.cpp \
|
---|
354 | src/COMDefs.cpp \
|
---|
355 | src/QIWidgetValidator.cpp \
|
---|
356 | src/QIHotKeyEdit.cpp \
|
---|
357 | src/QIStateIndicator.cpp \
|
---|
358 | src/QIStatusBar.cpp \
|
---|
359 | src/QIMessageBox.cpp \
|
---|
360 | src/QILabel.cpp \
|
---|
361 | src/QILabelSeparator.cpp \
|
---|
362 | src/QIAbstractWizard.cpp \
|
---|
363 | src/QIDialog.cpp \
|
---|
364 | src/QIFileDialog.cpp \
|
---|
365 | src/QIAdvancedSlider.cpp \
|
---|
366 | src/QIDialogButtonBox.cpp \
|
---|
367 | src/QIListView.cpp \
|
---|
368 | src/QITreeWidget.cpp \
|
---|
369 | src/QIMainDialog.cpp \
|
---|
370 | src/QILineEdit.cpp \
|
---|
371 | src/QIHelpButton.cpp \
|
---|
372 | src/VBoxGuestRAMSlider.cpp \
|
---|
373 | src/VBoxFilePathSelectorWidget.cpp \
|
---|
374 | src/VBoxOSTypeSelectorButton.cpp \
|
---|
375 | src/VBoxOSTypeSelectorWidget.cpp \
|
---|
376 | src/VBoxLineTextEdit.cpp \
|
---|
377 | src/VBoxDefs.cpp \
|
---|
378 | src/VBoxGlobalSettings.cpp \
|
---|
379 | src/VBoxGlobal.cpp \
|
---|
380 | src/VBoxMediaComboBox.cpp \
|
---|
381 | src/VBoxProblemReporter.cpp \
|
---|
382 | src/VBoxProgressDialog.cpp \
|
---|
383 | src/VBoxHelpActions.cpp \
|
---|
384 | src/VBoxSelectorWnd.cpp \
|
---|
385 | src/VBoxConsoleView.cpp \
|
---|
386 | src/VBoxConsoleWnd.cpp \
|
---|
387 | src/VBoxMiniToolBar.cpp \
|
---|
388 | src/VBoxDownloaderWgt.cpp \
|
---|
389 | src/VBoxVMListView.cpp \
|
---|
390 | src/VBoxFrameBuffer.cpp \
|
---|
391 | src/VBoxAboutDlg.cpp \
|
---|
392 | src/VBoxCloseVMDlg.cpp \
|
---|
393 | src/VBoxNewVMWzd.cpp \
|
---|
394 | src/VBoxNewHDWzd.cpp \
|
---|
395 | src/VBoxVMFirstRunWzd.cpp \
|
---|
396 | src/VBoxRegistrationDlg.cpp \
|
---|
397 | src/VBoxUpdateDlg.cpp \
|
---|
398 | src/VBoxSnapshotDetailsDlg.cpp \
|
---|
399 | src/VBoxVMInformationDlg.cpp \
|
---|
400 | src/VBoxTakeSnapshotDlg.cpp \
|
---|
401 | src/VBoxSnapshotsWgt.cpp \
|
---|
402 | src/VBoxVMLogViewer.cpp \
|
---|
403 | src/VBoxVMSettingsGeneral.cpp \
|
---|
404 | src/VBoxVMSettingsSystem.cpp \
|
---|
405 | src/VBoxVMSettingsDisplay.cpp \
|
---|
406 | src/VBoxVMSettingsHD.cpp \
|
---|
407 | src/VBoxVMSettingsCD.cpp \
|
---|
408 | src/VBoxVMSettingsFD.cpp \
|
---|
409 | src/VBoxVMSettingsAudio.cpp \
|
---|
410 | src/VBoxVMSettingsNetwork.cpp \
|
---|
411 | src/VBoxVMSettingsNetworkDetails.cpp \
|
---|
412 | src/VBoxVMSettingsSerial.cpp \
|
---|
413 | src/VBoxVMSettingsParallel.cpp \
|
---|
414 | src/VBoxVMSettingsUSB.cpp \
|
---|
415 | src/VBoxVMSettingsUSBFilterDetails.cpp \
|
---|
416 | src/VBoxVMSettingsSF.cpp \
|
---|
417 | src/VBoxVMSettingsSFDetails.cpp \
|
---|
418 | src/VBoxGLSettingsGeneral.cpp \
|
---|
419 | src/VBoxGLSettingsInput.cpp \
|
---|
420 | src/VBoxGLSettingsUpdate.cpp \
|
---|
421 | src/VBoxGLSettingsLanguage.cpp \
|
---|
422 | src/VBoxGLSettingsNetwork.cpp \
|
---|
423 | src/VBoxGLSettingsNetworkDetails.cpp \
|
---|
424 | src/VBoxSettingsDialog.cpp \
|
---|
425 | src/VBoxSettingsDialogSpecific.cpp \
|
---|
426 | src/VBoxSettingsSelector.cpp \
|
---|
427 | src/VBoxMediaManagerDlg.cpp \
|
---|
428 | src/VBoxMedium.cpp \
|
---|
429 | src/VBoxApplianceEditorWgt.cpp \
|
---|
430 | src/VBoxImportApplianceWgt.cpp \
|
---|
431 | src/VBoxImportApplianceWzd.cpp \
|
---|
432 | src/VBoxExportApplianceWgt.cpp \
|
---|
433 | src/VBoxExportApplianceWzd.cpp
|
---|
434 |
|
---|
435 | ifeq ($(filter-out freebsd linux netbsd openbsd solaris,$(KBUILD_TARGET)),) # X11
|
---|
436 | ifndef VBOX_OSE
|
---|
437 | VirtualBox_QT_MOCHDRS += \
|
---|
438 | include/VBoxLicenseViewer.h
|
---|
439 | VirtualBox_SOURCES += \
|
---|
440 | src/VBoxLicenseViewer.cpp
|
---|
441 | else
|
---|
442 | VirtualBox_VBOX_EXTRA_NLS_SOURCES += \
|
---|
443 | include/VBoxLicenseViewer.h \
|
---|
444 | src/VBoxLicenseViewer.cpp
|
---|
445 | endif
|
---|
446 | VirtualBox_SOURCES += \
|
---|
447 | src/X11/XKeyboard-new.cpp \
|
---|
448 | src/VBoxX11Helper.cpp
|
---|
449 | else
|
---|
450 | VirtualBox_VBOX_EXTRA_NLS_SOURCES += \
|
---|
451 | include/VBoxLicenseViewer.h \
|
---|
452 | src/VBoxLicenseViewer.cpp
|
---|
453 | endif
|
---|
454 |
|
---|
455 | VirtualBox_SOURCES.win += \
|
---|
456 | src/VBoxFBDDRAW.cpp \
|
---|
457 | src/win/VirtualBox.rc
|
---|
458 |
|
---|
459 | VirtualBox_SOURCES.darwin = \
|
---|
460 | src/darwin/DarwinKeyboard.cpp \
|
---|
461 | src/darwin/VBoxUtils-darwin.cpp \
|
---|
462 | src/darwin/VBoxDockIconPreview.cpp \
|
---|
463 | src/VBoxFBQuartz2D.cpp
|
---|
464 |
|
---|
465 | ifdef VBOX_WITH_ICHAT_THEATER
|
---|
466 | VirtualBox_SOURCES.darwin += \
|
---|
467 | src/darwin/VBoxIChatTheaterWrapper.m
|
---|
468 | endif
|
---|
469 |
|
---|
470 | ifdef VBOX_WITH_COCOA_QT
|
---|
471 | VirtualBox_SOURCES.darwin += \
|
---|
472 | src/darwin/VBoxCocoaApplication.m \
|
---|
473 | src/darwin/VBoxUtils-darwin-cocoa.m \
|
---|
474 | src/darwin/VBoxDockIconPreview-cocoa.m
|
---|
475 | else
|
---|
476 | VirtualBox_SOURCES.darwin += \
|
---|
477 | src/darwin/VBoxUtils-darwin-carbon.cpp
|
---|
478 | endif
|
---|
479 |
|
---|
480 | if defined(VBOX_WITH_VIDEOHWACCEL) || defined(VBOX_GUI_USE_QGL)
|
---|
481 | VirtualBox_SOURCES += \
|
---|
482 | src/VBoxFBQGL.cpp
|
---|
483 | endif
|
---|
484 | # The Qt modules we're using.
|
---|
485 | # (The include directory and lib/framework for each module will be added by the Qt4 unit.)
|
---|
486 | VirtualBox_QT_MODULES = Core Gui Network
|
---|
487 |
|
---|
488 | if defined(VBOX_WITH_VIDEOHWACCEL) || defined(VBOX_GUI_USE_QGL)
|
---|
489 | VirtualBox_QT_MODULES += OpenGL
|
---|
490 | endif
|
---|
491 |
|
---|
492 | # Import QDesigner UI sources and translations from VBoxUI.pro.
|
---|
493 | ifndef VBOX_WITH_REGISTRATION
|
---|
494 | FORMS := $(filter-out ui/VBoxRegistrationDlg.ui,$(FORMS))
|
---|
495 | endif
|
---|
496 | $(eval VirtualBox_SOURCES += $(FORMS))
|
---|
497 |
|
---|
498 | # Resource files with some OSE differences (VirtualBoxBrand.qrc is created further down).
|
---|
499 | VirtualBox_SOURCES += VirtualBox.qrc
|
---|
500 | VirtualBox_SOURCES += $(VBOX_VIRTUALBOX4_OUT_DIR)/VirtualBoxBrand.qrc
|
---|
501 | $(VBOX_VIRTUALBOX4_OUT_DIR)/VirtualBoxBrand.qrc_RCCFLAGS = -name BRAND
|
---|
502 | if defined(VBOX_WITH_VIDEOHWACCEL) || defined(VBOX_GUI_USE_QGL)
|
---|
503 | VirtualBox_SOURCES += VirtualBoxShaders.qrc
|
---|
504 | VirtualBoxShaders.qrc_RCCFLAGS = -name SHADERS
|
---|
505 | endif
|
---|
506 |
|
---|
507 | # Import the translation source from VBoxUI.pro and add the qt_xx_YY counterparts
|
---|
508 | VirtualBox_QT_TRANSLATIONS := $(TRANSLATIONS) \
|
---|
509 | $(patsubst nls/VirtualBox_%.ts,nls/qt_%.ts, $(filter nls/VirtualBox_%.ts,$(TRANSLATIONS)))
|
---|
510 | # Compress the translation units.
|
---|
511 | VirtualBox_LRCFLAGS = -silent
|
---|
512 | # Where to install the translations (a separate install target, VirtualBox-nls-inst is created).
|
---|
513 | VirtualBox_QT_TRANSLATIONS_INST = $(INST_BIN)nls/
|
---|
514 |
|
---|
515 |
|
---|
516 | ## @todo how to detect what tool is used?
|
---|
517 | ## @todo GCC3 seems to lack -Wno-missing-base-class-initializer, so we use
|
---|
518 | # more generic -Wno-extra
|
---|
519 | # bird: What about $(if $(VBOX_GCC_Wno-missing-base-class-initializer),$(VBOX_GCC_Wno-missing-base-class-initializer),$(VBOX_GCC_Wno-extra))?
|
---|
520 | ifdef VBOX_WITH_XPCOM
|
---|
521 | VirtualBox_src/COMDefs.cpp_CXXFLAGS = $(VBOX_GCC_Wno-extra)
|
---|
522 | endif
|
---|
523 |
|
---|
524 |
|
---|
525 | #
|
---|
526 | # Generate the COM wrappers.
|
---|
527 | #
|
---|
528 | VirtualBox_BLDDIRS += $(PATH_VirtualBox)/include
|
---|
529 | VirtualBox_INTERMEDIATES += $(PATH_VirtualBox)/include/COMWrappers.h
|
---|
530 | VirtualBox_CLEAN += $(PATH_VirtualBox)/include/COMWrappers.h
|
---|
531 |
|
---|
532 | $$(PATH_VirtualBox)/include/COMWrappers.h: \
|
---|
533 | $(VBOX_XIDL_FILE) \
|
---|
534 | $(VBOX_VIRTUALBOX4_SRC)/include/COMWrappers.xsl \
|
---|
535 | | $$(dir $$@)
|
---|
536 | $(call MSG_GENERATE,VirtualBox,$<,$@)
|
---|
537 | $(QUIET)$(VBOX_XSLTPROC) -o $@ $(VBOX_VIRTUALBOX4_SRC)/include/COMWrappers.xsl $<
|
---|
538 |
|
---|
539 | # alias for generating the COM Wrappers file.
|
---|
540 | testwrappers:: $$(PATH_VirtualBox)/include/COMWrappers.h
|
---|
541 |
|
---|
542 |
|
---|
543 | #
|
---|
544 | # Generate qrc file with branded icons.
|
---|
545 | #
|
---|
546 | VirtualBox_BLDDIRS += $(VBOX_VIRTUALBOX4_OUT_DIR)
|
---|
547 | VirtualBox_CLEAN += $(VBOX_VIRTUALBOX4_OUT_DIR)/VirtualBoxBrand.qrc
|
---|
548 | if "$(KBUILD_HOST)" == "win" ## @todo remove when kBuild ticket #52 has been fixed and deployed.
|
---|
549 | VBOX_DRIVE_HACK := $(firstword $(subst :, ,$(PATH_ROOT))):
|
---|
550 | else
|
---|
551 | VBOX_DRIVE_HACK :=
|
---|
552 | endif
|
---|
553 | $(VBOX_VIRTUALBOX4_OUT_DIR)/VirtualBoxBrand.qrc: \
|
---|
554 | $(VBOX_VIRTUALBOX4_SRC)/VirtualBoxBrand.qrc \
|
---|
555 | | $$(dir $$@)
|
---|
556 | $(call MSG_GENERATE,VirtualBox,$<,$@)
|
---|
557 | $(QUIET)$(SED) \
|
---|
558 | -e 's;@VBOX_ABOUT_PNG@;$(subst $(VBOX_DRIVE_HACK),,$(VBOX_BRAND_GUI_ABOUT_PNG));g' \
|
---|
559 | -e 's;@VBOX_ABOUT_16PX_PNG@;$(subst $(VBOX_DRIVE_HACK),,$(VBOX_BRAND_GUI_ABOUT_16PX_PNG));g' \
|
---|
560 | -e 's;@VBOX_VBOX_16PX_PNG@;$(subst $(VBOX_DRIVE_HACK),,$(VBOX_BRAND_GUI_VBOX_16PX_PNG));g' \
|
---|
561 | -e 's;@VBOX_VBOX_20PX_PNG@;$(subst $(VBOX_DRIVE_HACK),,$(VBOX_BRAND_GUI_VBOX_20PX_PNG));g' \
|
---|
562 | -e 's;@VBOX_VBOX_32PX_PNG@;$(subst $(VBOX_DRIVE_HACK),,$(VBOX_BRAND_GUI_VBOX_32PX_PNG));g' \
|
---|
563 | -e 's;@VBOX_VBOX_40PX_PNG@;$(subst $(VBOX_DRIVE_HACK),,$(VBOX_BRAND_GUI_VBOX_40PX_PNG));g' \
|
---|
564 | -e 's;@VBOX_VBOX_48PX_PNG@;$(subst $(VBOX_DRIVE_HACK),,$(VBOX_BRAND_GUI_VBOX_48PX_PNG));g' \
|
---|
565 | -e 's;@VBOX_VBOX_64PX_PNG@;$(subst $(VBOX_DRIVE_HACK),,$(VBOX_BRAND_GUI_VBOX_64PX_PNG));g' \
|
---|
566 | -e 's;@VBOX_CUBE_42PX_PNG@;$(subst $(VBOX_DRIVE_HACK),,$(VBOX_BRAND_GUI_CUBE_42PX_PNG));g' \
|
---|
567 | --output $@ \
|
---|
568 | $<
|
---|
569 |
|
---|
570 |
|
---|
571 | ifeq ($(KBUILD_TARGET),win)
|
---|
572 | #
|
---|
573 | # On Windows we'll have to generate/edit part of the resource file.
|
---|
574 | # The IDI_ICON1 name is Qt specific.
|
---|
575 | #
|
---|
576 | src/win/VirtualBox.rc_INCS = $(PATH_VirtualBox)
|
---|
577 | src/win/VirtualBox.rc_DEPS = $(PATH_VirtualBox)/VirtualBox-icon.rc
|
---|
578 | src/win/VirtualBox.rc_CLEAN = $(PATH_VirtualBox)/VirtualBox-icon.rc
|
---|
579 |
|
---|
580 | $$(PATH_VirtualBox)/VirtualBox-icon.rc: $(MAKEFILE_CURRENT) $(VBOX_WINDOWS_ICON_FILE) | $$(dir $$@)
|
---|
581 | $(APPEND) -t $@ 'IDI_ICON1 ICON "$(subst /,\\,$(VBOX_WINDOWS_ICON_FILE))"'
|
---|
582 |
|
---|
583 | endif # win
|
---|
584 |
|
---|
585 |
|
---|
586 | ifeq ($(KBUILD_TARGET),darwin)
|
---|
587 | #
|
---|
588 | # Create directories for each approved language or the application
|
---|
589 | # menu won't be translated.
|
---|
590 | #
|
---|
591 | INSTALLS += VirtualBox.lproj
|
---|
592 | VirtualBox.lproj_INST = $(INST_VIRTUALBOX)Contents/Resources/
|
---|
593 | VirtualBox.lproj_MODE = 755
|
---|
594 | VirtualBox.lproj_DIRS := $(addsuffix .lproj,$(VBOX_APPROVED_GUI_LANGUAGES_ALL))
|
---|
595 |
|
---|
596 | #
|
---|
597 | # On OS X (darwin) we need to install icon resources and compulsory bundle contents.
|
---|
598 | # The VirtualBoxVM.app helper is for launching VMs (fixes some issues with the dock).
|
---|
599 | #
|
---|
600 | INSTALLS += VirtualBox.app
|
---|
601 | VirtualBox.app_INST = $(INST_VIRTUALBOX)Contents/
|
---|
602 | VirtualBox.app_MODE = 644
|
---|
603 | VirtualBox.app_SOURCES = \
|
---|
604 | src/darwin/PkgInfo \
|
---|
605 | $(PATH_VirtualBox.app)/Info.plist \
|
---|
606 | $(VBOX_MACOSX_ICON_FILE)=>Resources/virtualbox.icns
|
---|
607 |
|
---|
608 | $$(PATH_VirtualBox.app)/Info.plist: $(PATH_SUB_CURRENT)/src/darwin/Info.plist $(VBOX_VERSION_MK) | $$(@D)/
|
---|
609 | $(call MSG_GENERATE,VirtualBox.app,$<,$@)
|
---|
610 | $(QUIET)$(RM) -f $@
|
---|
611 | $(QUIET)$(SED) \
|
---|
612 | -e 's/@VBOX_VERSION_STRING@/$(VBOX_VERSION_STRING)/g' \
|
---|
613 | -e 's/@VBOX_VERSION_MAJOR@/$(VBOX_VERSION_MAJOR)/g' \
|
---|
614 | -e 's/@VBOX_VERSION_MINOR@/$(VBOX_VERSION_MINOR)/g' \
|
---|
615 | -e 's/@VBOX_VERSION_BUILD@/$(VBOX_VERSION_BUILD)/g' \
|
---|
616 | $< > $@
|
---|
617 |
|
---|
618 | INSTALLS += VirtualBoxVM.app
|
---|
619 | VirtualBoxVM.app_INST = $(VirtualBox.app_INST)Resources/VirtualBoxVM.app/Contents/
|
---|
620 | VirtualBoxVM.app_MODE = 644
|
---|
621 | VirtualBoxVM.app_SOURCES = \
|
---|
622 | src/darwin/VM-PkgInfo=>PkgInfo \
|
---|
623 | $(PATH_VirtualBoxVM.app)/VM-Info.plist=>Info.plist
|
---|
624 | VirtualBoxVM.app_SYMLINKS = \
|
---|
625 | MacOS=>../../../MacOS/ \
|
---|
626 | Resources=>../../../Resources/
|
---|
627 |
|
---|
628 | $$(PATH_VirtualBoxVM.app)/VM-Info.plist: $(PATH_SUB_CURRENT)/src/darwin/VM-Info.plist $(VBOX_VERSION_MK) | $$(@D)/
|
---|
629 | $(call MSG_GENERATE,VirtualBoxVM.app,$<,$@)
|
---|
630 | $(QUIET)$(RM) -f $@
|
---|
631 | $(QUIET)$(SED) \
|
---|
632 | -e 's/@VBOX_VERSION_STRING@/$(VBOX_VERSION_STRING)/g' \
|
---|
633 | -e 's/@VBOX_VERSION_MAJOR@/$(VBOX_VERSION_MAJOR)/g' \
|
---|
634 | -e 's/@VBOX_VERSION_MINOR@/$(VBOX_VERSION_MINOR)/g' \
|
---|
635 | -e 's/@VBOX_VERSION_BUILD@/$(VBOX_VERSION_BUILD)/g' \
|
---|
636 | --output $@ $<
|
---|
637 | endif # darwin
|
---|
638 |
|
---|
639 |
|
---|
640 | #
|
---|
641 | # Testcase for the darwin keyboard routines.
|
---|
642 | #
|
---|
643 | ifdef VBOX_WITH_TESTCASES
|
---|
644 | PROGRAMS.darwin += tstDarwinKeyboard
|
---|
645 | tstDarwinKeyboard_NAME = tstDarwinKeyboard
|
---|
646 | tstDarwinKeyboard_TEMPLATE = VBOXR3TSTEXE
|
---|
647 | tstDarwinKeyboard_DEFS.x86 = USE_HID_FOR_MODIFIERS
|
---|
648 | tstDarwinKeyboard_INCS = include
|
---|
649 | tstDarwinKeyboard_SOURCES = \
|
---|
650 | src/darwin/tstDarwinKeyboard.cpp \
|
---|
651 | src/darwin/DarwinKeyboard.cpp
|
---|
652 | tstDarwinKeyboard_SOURCES.amd64 = \
|
---|
653 | src/darwin/VBoxCocoaApplication.m
|
---|
654 | tstDarwinKeyboard_LDFLAGS = -framework IOKit -framework Carbon -framework AppKit
|
---|
655 | tstDarwinKeyboard_LIBS = \
|
---|
656 | $(LIB_RUNTIME)
|
---|
657 | endif
|
---|
658 |
|
---|
659 |
|
---|
660 | # Unset everything that was loaded from VBoxUI.pro.
|
---|
661 | TEMPLATE := $(SAVED_TEMPLATE)
|
---|
662 | SAVED_TEMPLATE :=
|
---|
663 | LANGUAGE :=
|
---|
664 | FORMS :=
|
---|
665 | TRANSLATIONS :=
|
---|
666 | IMAGES :=
|
---|
667 |
|
---|
668 |
|
---|
669 | # Commit the magic.
|
---|
670 | # (note: before custom rules that make usage of generated variables!).
|
---|
671 | include $(KBUILD_PATH)/subfooter.kmk
|
---|
672 |
|
---|
673 | #
|
---|
674 | # Update all known NLS translation (.ts) files in the nls/ subdirectory.
|
---|
675 | #
|
---|
676 | # NOTE: This target is intended to be run only by the GUI maintainer shortly
|
---|
677 | # before a new product release. VirtualBox_xx_YY.ts is a template for new
|
---|
678 | # languages and should never be actually translated or installed.
|
---|
679 | #
|
---|
680 | updatenls:: \
|
---|
681 | $(filter-out %.qrc,$(VirtualBox_SOURCES) $(VirtualBox_VBOX_EXTRA_NLS_SOURCES)) \
|
---|
682 | $(wildcard include/*.h)
|
---|
683 | $(call MSG_L1,lupdate all languages (nls/*.ts))
|
---|
684 | $(QUIET)$(TOOL_QT4_LUPDATE) \
|
---|
685 | $^ \
|
---|
686 | -ts \
|
---|
687 | $(filter-out nls/qt_%.ts,$(VirtualBox_QT_TRANSLATIONS)) \
|
---|
688 | nls/VirtualBox_xx_YY.ts
|
---|
689 |
|
---|