1 | # $Id: Makefile.kmk 20501 2009-06-12 11:31:37Z 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 | endif
|
---|
192 |
|
---|
193 | VirtualBox_src/main.cpp_DEFS += VBOX_VERSION_STRING=\"$(VBOX_VERSION_STRING)\"
|
---|
194 | VirtualBox_src/main.cpp_DEPS += $(VBOX_VERSION_MK)
|
---|
195 |
|
---|
196 | VirtualBox_INCS = \
|
---|
197 | ./include \
|
---|
198 | $(PATH_VirtualBox)/include
|
---|
199 |
|
---|
200 | # Necessary for the hdd backend enumeration
|
---|
201 | VirtualBox_LIBS = $(LIB_DDU)
|
---|
202 |
|
---|
203 | ifeq ($(KBUILD_TYPE),release)
|
---|
204 | VirtualBox_LDFLAGS.win += /SUBSYSTEM:windows
|
---|
205 | else
|
---|
206 | VirtualBox_LDFLAGS.linux+= -rdynamic # for backtrace_symbols()
|
---|
207 | ifeq ($(USERNAME),dmik)
|
---|
208 | VirtualBox_LDFLAGS.win += /SUBSYSTEM:windows
|
---|
209 | else
|
---|
210 | VirtualBox_LDFLAGS.win += /SUBSYSTEM:console
|
---|
211 | endif
|
---|
212 | endif
|
---|
213 | # r=bird: what is -lz doing here? it belongs in LIBS.
|
---|
214 | VirtualBox_LDFLAGS.darwin = -lz \
|
---|
215 | -framework IOKit -framework AppKit -framework ApplicationServices -framework Foundation -framework Carbon \
|
---|
216 | $(if $(VBOX_WITH_HARDENING),-install_name $(VBOX_DYLD_EXECUTABLE_PATH)/VirtualBox.dylib)
|
---|
217 | VirtualBox_LDFLAGS.darwin.x86 = -framework QuickTime
|
---|
218 | ifdef VBOX_WITH_ICHAT_THEATER
|
---|
219 | VirtualBox_LDFLAGS.darwin += -framework InstantMessage -framework QuartzCore
|
---|
220 | endif
|
---|
221 | VirtualBox_LIBS.win = \
|
---|
222 | $(PATH_SDK_WINPSDK_LIB)/Htmlhelp.Lib \
|
---|
223 | $(PATH_SDK_DXSDK_LIB)/ddraw.lib \
|
---|
224 | $(PATH_SDK_DXSDK_LIB)/dxguid.lib
|
---|
225 | ifeq ($(filter-out freebsd linux netbsd openbsd solaris,$(KBUILD_TARGET)),) # X11
|
---|
226 | VirtualBox_LIBS += $(PATH_DLL)/VBoxKeyboard$(VBOX_SUFF_DLL)
|
---|
227 | endif
|
---|
228 |
|
---|
229 | ifdef VBOX_WITH_VIDEOHWACCEL
|
---|
230 | VirtualBox_LIBS.win += $(PATH_SDK_WINPSDK_LIB)/Opengl32.lib
|
---|
231 | endif
|
---|
232 |
|
---|
233 | # Headers containing definitions of classes that use the Q_OBJECT macro.
|
---|
234 | VirtualBox_QT_MOCHDRS = \
|
---|
235 | include/QIHttp.h \
|
---|
236 | include/QIWidgetValidator.h \
|
---|
237 | include/QIHotKeyEdit.h \
|
---|
238 | include/QIStatusBar.h \
|
---|
239 | include/QIStateIndicator.h \
|
---|
240 | include/QIMessageBox.h \
|
---|
241 | include/QILabel.h \
|
---|
242 | include/QILabel_p.h \
|
---|
243 | include/QILabelSeparator.h \
|
---|
244 | include/QIAbstractWizard.h \
|
---|
245 | include/QIListView.h \
|
---|
246 | include/QITreeWidget.h \
|
---|
247 | include/QIMainDialog.h \
|
---|
248 | include/QIHelpButton.h \
|
---|
249 | include/QIDialog.h \
|
---|
250 | include/QIFileDialog.h \
|
---|
251 | include/VBoxFilePathSelectorWidget.h \
|
---|
252 | include/VBoxOSTypeSelectorButton.h \
|
---|
253 | include/VBoxOSTypeSelectorWidget.h \
|
---|
254 | include/VBoxLineTextEdit.h \
|
---|
255 | include/VBoxUtils.h \
|
---|
256 | include/VBoxGlobalSettings.h \
|
---|
257 | include/VBoxGlobal.h \
|
---|
258 | include/VBoxVMListView.h \
|
---|
259 | include/VBoxMediaComboBox.h \
|
---|
260 | include/VBoxSelectorWnd.h \
|
---|
261 | include/VBoxConsoleWnd.h \
|
---|
262 | include/VBoxConsoleView.h \
|
---|
263 | include/VBoxMiniToolBar.h \
|
---|
264 | include/VBoxProblemReporter.h \
|
---|
265 | include/VBoxProgressDialog.h \
|
---|
266 | include/VBoxDownloaderWgt.h \
|
---|
267 | include/VBoxAboutDlg.h \
|
---|
268 | include/VBoxCloseVMDlg.h \
|
---|
269 | include/VBoxNewVMWzd.h \
|
---|
270 | include/VBoxNewHDWzd.h \
|
---|
271 | include/VBoxVMFirstRunWzd.h \
|
---|
272 | include/VBoxRegistrationDlg.h \
|
---|
273 | include/VBoxUpdateDlg.h \
|
---|
274 | include/VBoxSnapshotDetailsDlg.h \
|
---|
275 | include/VBoxVMInformationDlg.h \
|
---|
276 | include/VBoxTakeSnapshotDlg.h \
|
---|
277 | include/VBoxSnapshotsWgt.h \
|
---|
278 | include/VBoxVMLogViewer.h \
|
---|
279 | include/VBoxMediaManagerDlg.h \
|
---|
280 | include/VBoxSettingsUtils.h \
|
---|
281 | include/VBoxVMSettingsGeneral.h \
|
---|
282 | include/VBoxVMSettingsSystem.h \
|
---|
283 | include/VBoxVMSettingsDisplay.h \
|
---|
284 | include/VBoxVMSettingsHD.h \
|
---|
285 | include/VBoxVMSettingsCD.h \
|
---|
286 | include/VBoxVMSettingsFD.h \
|
---|
287 | include/VBoxVMSettingsAudio.h \
|
---|
288 | include/VBoxVMSettingsNetwork.h \
|
---|
289 | include/VBoxVMSettingsNetworkDetails.h \
|
---|
290 | include/VBoxVMSettingsSerial.h \
|
---|
291 | include/VBoxVMSettingsParallel.h \
|
---|
292 | include/VBoxVMSettingsUSB.h \
|
---|
293 | include/VBoxVMSettingsUSBFilterDetails.h \
|
---|
294 | include/VBoxVMSettingsSF.h \
|
---|
295 | include/VBoxVMSettingsSFDetails.h \
|
---|
296 | include/VBoxGLSettingsGeneral.h \
|
---|
297 | include/VBoxGLSettingsInput.h \
|
---|
298 | include/VBoxGLSettingsUpdate.h \
|
---|
299 | include/VBoxGLSettingsLanguage.h \
|
---|
300 | include/VBoxGLSettingsNetwork.h \
|
---|
301 | include/VBoxGLSettingsNetworkDetails.h \
|
---|
302 | include/VBoxSettingsDialog.h \
|
---|
303 | include/VBoxSettingsDialogSpecific.h \
|
---|
304 | include/VBoxSettingsPage.h \
|
---|
305 | include/VBoxSettingsSelector.h \
|
---|
306 | include/VBoxApplianceEditorWgt.h \
|
---|
307 | include/VBoxImportApplianceWgt.h \
|
---|
308 | include/VBoxImportApplianceWzd.h \
|
---|
309 | include/VBoxExportApplianceWgt.h \
|
---|
310 | include/VBoxExportApplianceWzd.h
|
---|
311 |
|
---|
312 | # Sources containing local definitions of classes that use the Q_OBJECT macro.
|
---|
313 | VirtualBox_QT_MOCSRCS = \
|
---|
314 | src/QIMessageBox.cpp \
|
---|
315 | src/VBoxSelectorWnd.cpp \
|
---|
316 | src/VBoxConsoleWnd.cpp \
|
---|
317 | src/VBoxMediaManagerDlg.cpp
|
---|
318 | ifdef VBOX_WITH_XPCOM
|
---|
319 | VirtualBox_QT_MOCSRCS += \
|
---|
320 | src/COMDefs.cpp
|
---|
321 | endif
|
---|
322 | ifeq ($(KBUILD_TARGET),win)
|
---|
323 | VirtualBox_QT_MOCSRCS += \
|
---|
324 | src/QIFileDialog.cpp
|
---|
325 | endif
|
---|
326 |
|
---|
327 | VirtualBox_SOURCES = \
|
---|
328 | src/main.cpp \
|
---|
329 | src/COMDefs.cpp \
|
---|
330 | src/QIWidgetValidator.cpp \
|
---|
331 | src/QIHotKeyEdit.cpp \
|
---|
332 | src/QIStateIndicator.cpp \
|
---|
333 | src/QIStatusBar.cpp \
|
---|
334 | src/QIMessageBox.cpp \
|
---|
335 | src/QILabel.cpp \
|
---|
336 | src/QILabelSeparator.cpp \
|
---|
337 | src/QIAbstractWizard.cpp \
|
---|
338 | src/QIDialog.cpp \
|
---|
339 | src/QIFileDialog.cpp \
|
---|
340 | src/QIDialogButtonBox.cpp \
|
---|
341 | src/QIListView.cpp \
|
---|
342 | src/QITreeWidget.cpp \
|
---|
343 | src/QIMainDialog.cpp \
|
---|
344 | src/QILineEdit.cpp \
|
---|
345 | src/QIHelpButton.cpp \
|
---|
346 | src/VBoxFilePathSelectorWidget.cpp \
|
---|
347 | src/VBoxOSTypeSelectorButton.cpp \
|
---|
348 | src/VBoxOSTypeSelectorWidget.cpp \
|
---|
349 | src/VBoxLineTextEdit.cpp \
|
---|
350 | src/VBoxDefs.cpp \
|
---|
351 | src/VBoxGlobalSettings.cpp \
|
---|
352 | src/VBoxGlobal.cpp \
|
---|
353 | src/VBoxMediaComboBox.cpp \
|
---|
354 | src/VBoxProblemReporter.cpp \
|
---|
355 | src/VBoxProgressDialog.cpp \
|
---|
356 | src/VBoxHelpActions.cpp \
|
---|
357 | src/VBoxSelectorWnd.cpp \
|
---|
358 | src/VBoxConsoleView.cpp \
|
---|
359 | src/VBoxConsoleWnd.cpp \
|
---|
360 | src/VBoxMiniToolBar.cpp \
|
---|
361 | src/VBoxDownloaderWgt.cpp \
|
---|
362 | src/VBoxVMListView.cpp \
|
---|
363 | src/VBoxFrameBuffer.cpp \
|
---|
364 | src/VBoxAboutDlg.cpp \
|
---|
365 | src/VBoxCloseVMDlg.cpp \
|
---|
366 | src/VBoxNewVMWzd.cpp \
|
---|
367 | src/VBoxNewHDWzd.cpp \
|
---|
368 | src/VBoxVMFirstRunWzd.cpp \
|
---|
369 | src/VBoxRegistrationDlg.cpp \
|
---|
370 | src/VBoxUpdateDlg.cpp \
|
---|
371 | src/VBoxSnapshotDetailsDlg.cpp \
|
---|
372 | src/VBoxVMInformationDlg.cpp \
|
---|
373 | src/VBoxTakeSnapshotDlg.cpp \
|
---|
374 | src/VBoxSnapshotsWgt.cpp \
|
---|
375 | src/VBoxVMLogViewer.cpp \
|
---|
376 | src/VBoxVMSettingsGeneral.cpp \
|
---|
377 | src/VBoxVMSettingsSystem.cpp \
|
---|
378 | src/VBoxVMSettingsDisplay.cpp \
|
---|
379 | src/VBoxVMSettingsHD.cpp \
|
---|
380 | src/VBoxVMSettingsCD.cpp \
|
---|
381 | src/VBoxVMSettingsFD.cpp \
|
---|
382 | src/VBoxVMSettingsAudio.cpp \
|
---|
383 | src/VBoxVMSettingsNetwork.cpp \
|
---|
384 | src/VBoxVMSettingsNetworkDetails.cpp \
|
---|
385 | src/VBoxVMSettingsSerial.cpp \
|
---|
386 | src/VBoxVMSettingsParallel.cpp \
|
---|
387 | src/VBoxVMSettingsUSB.cpp \
|
---|
388 | src/VBoxVMSettingsUSBFilterDetails.cpp \
|
---|
389 | src/VBoxVMSettingsSF.cpp \
|
---|
390 | src/VBoxVMSettingsSFDetails.cpp \
|
---|
391 | src/VBoxGLSettingsGeneral.cpp \
|
---|
392 | src/VBoxGLSettingsInput.cpp \
|
---|
393 | src/VBoxGLSettingsUpdate.cpp \
|
---|
394 | src/VBoxGLSettingsLanguage.cpp \
|
---|
395 | src/VBoxGLSettingsNetwork.cpp \
|
---|
396 | src/VBoxGLSettingsNetworkDetails.cpp \
|
---|
397 | src/VBoxSettingsDialog.cpp \
|
---|
398 | src/VBoxSettingsDialogSpecific.cpp \
|
---|
399 | src/VBoxSettingsSelector.cpp \
|
---|
400 | src/VBoxMediaManagerDlg.cpp \
|
---|
401 | src/VBoxMedium.cpp \
|
---|
402 | src/VBoxApplianceEditorWgt.cpp \
|
---|
403 | src/VBoxImportApplianceWgt.cpp \
|
---|
404 | src/VBoxImportApplianceWzd.cpp \
|
---|
405 | src/VBoxExportApplianceWgt.cpp \
|
---|
406 | src/VBoxExportApplianceWzd.cpp
|
---|
407 |
|
---|
408 | ifeq ($(filter-out freebsd linux netbsd openbsd solaris,$(KBUILD_TARGET)),) # X11
|
---|
409 | ifndef VBOX_OSE
|
---|
410 | VirtualBox_QT_MOCHDRS += \
|
---|
411 | include/VBoxLicenseViewer.h
|
---|
412 | VirtualBox_SOURCES += \
|
---|
413 | src/VBoxLicenseViewer.cpp
|
---|
414 | else
|
---|
415 | VirtualBox_VBOX_EXTRA_NLS_SOURCES += \
|
---|
416 | include/VBoxLicenseViewer.h \
|
---|
417 | src/VBoxLicenseViewer.cpp
|
---|
418 | endif
|
---|
419 | VirtualBox_SOURCES += \
|
---|
420 | src/X11/XKeyboard-new.cpp \
|
---|
421 | src/VBoxX11Helper.cpp
|
---|
422 | else
|
---|
423 | VirtualBox_VBOX_EXTRA_NLS_SOURCES += \
|
---|
424 | include/VBoxLicenseViewer.h \
|
---|
425 | src/VBoxLicenseViewer.cpp
|
---|
426 | endif
|
---|
427 |
|
---|
428 | VirtualBox_SOURCES.win += \
|
---|
429 | src/VBoxFBDDRAW.cpp \
|
---|
430 | src/win/VirtualBox.rc
|
---|
431 |
|
---|
432 | VirtualBox_SOURCES.darwin = \
|
---|
433 | src/darwin/DarwinKeyboard.cpp \
|
---|
434 | src/darwin/VBoxUtils-darwin.cpp \
|
---|
435 | src/darwin/VBoxDockIconPreview.cpp \
|
---|
436 | src/VBoxFBQuartz2D.cpp
|
---|
437 |
|
---|
438 | ifdef VBOX_WITH_ICHAT_THEATER
|
---|
439 | VirtualBox_SOURCES.darwin += \
|
---|
440 | src/darwin/VBoxIChatTheaterWrapper.m
|
---|
441 | endif
|
---|
442 |
|
---|
443 | ifdef VBOX_WITH_COCOA_QT
|
---|
444 | VirtualBox_SOURCES.darwin += \
|
---|
445 | src/darwin/VBoxCocoaApplication.m \
|
---|
446 | src/darwin/VBoxUtils-darwin-cocoa.m \
|
---|
447 | src/darwin/VBoxDockIconPreview-cocoa.m
|
---|
448 | else
|
---|
449 | VirtualBox_SOURCES.darwin += \
|
---|
450 | src/darwin/VBoxUtils-darwin-carbon.cpp
|
---|
451 | endif
|
---|
452 |
|
---|
453 | ifdef VBOX_WITH_VIDEOHWACCEL
|
---|
454 | VirtualBox_SOURCES += \
|
---|
455 | src/VBoxFBQGL.cpp
|
---|
456 | endif
|
---|
457 | # The Qt modules we're using.
|
---|
458 | # (The include directory and lib/framework for each module will be added by the Qt4 unit.)
|
---|
459 | VirtualBox_QT_MODULES = Core Gui Network
|
---|
460 |
|
---|
461 | ifdef VBOX_WITH_VIDEOHWACCEL
|
---|
462 | VirtualBox_QT_MODULES += OpenGL
|
---|
463 | endif
|
---|
464 |
|
---|
465 | # Import QDesigner UI sources and translations from VBoxUI.pro.
|
---|
466 | ifndef VBOX_WITH_REGISTRATION
|
---|
467 | FORMS := $(filter-out ui/VBoxRegistrationDlg.ui,$(FORMS))
|
---|
468 | endif
|
---|
469 | $(eval VirtualBox_SOURCES += $(FORMS))
|
---|
470 |
|
---|
471 | # Resource files with some OSE differences (VirtualBoxBrand.qrc is created further down).
|
---|
472 | VirtualBox_SOURCES += VirtualBox.qrc
|
---|
473 | VirtualBox_SOURCES += $(VBOX_VIRTUALBOX4_OUT_DIR)/VirtualBoxBrand.qrc
|
---|
474 | $(VBOX_VIRTUALBOX4_OUT_DIR)/VirtualBoxBrand.qrc_RCCFLAGS = -name BRAND
|
---|
475 |
|
---|
476 | # Import the translation source from VBoxUI.pro and add the qt_xx_YY counterparts
|
---|
477 | VirtualBox_QT_TRANSLATIONS := $(TRANSLATIONS) \
|
---|
478 | $(patsubst nls/VirtualBox_%.ts,nls/qt_%.ts, $(filter nls/VirtualBox_%.ts,$(TRANSLATIONS)))
|
---|
479 | # Compress the translation units.
|
---|
480 | VirtualBox_LRCFLAGS = -silent
|
---|
481 | # Where to install the translations (a separate install target, VirtualBox-nls-inst is created).
|
---|
482 | VirtualBox_QT_TRANSLATIONS_INST = $(INST_BIN)nls/
|
---|
483 |
|
---|
484 |
|
---|
485 | ## @todo how to detect what tool is used?
|
---|
486 | ## @todo GCC3 seems to lack -Wno-missing-base-class-initializer, so we use
|
---|
487 | # more generic -Wno-extra
|
---|
488 | # bird: What about $(if $(VBOX_GCC_Wno-missing-base-class-initializer),$(VBOX_GCC_Wno-missing-base-class-initializer),$(VBOX_GCC_Wno-extra))?
|
---|
489 | ifdef VBOX_WITH_XPCOM
|
---|
490 | VirtualBox_src/COMDefs.cpp_CXXFLAGS = $(VBOX_GCC_Wno-extra)
|
---|
491 | endif
|
---|
492 |
|
---|
493 |
|
---|
494 | #
|
---|
495 | # Generate the COM wrappers.
|
---|
496 | #
|
---|
497 | VirtualBox_BLDDIRS += $(PATH_VirtualBox)/include
|
---|
498 | VirtualBox_INTERMEDIATES += $(PATH_VirtualBox)/include/COMWrappers.h
|
---|
499 | VirtualBox_CLEAN += $(PATH_VirtualBox)/include/COMWrappers.h
|
---|
500 |
|
---|
501 | $$(PATH_VirtualBox)/include/COMWrappers.h: \
|
---|
502 | $(VBOX_XIDL_FILE) \
|
---|
503 | $(VBOX_VIRTUALBOX4_SRC)/include/COMWrappers.xsl \
|
---|
504 | | $$(dir $$@)
|
---|
505 | $(call MSG_GENERATE,VirtualBox,$<,$@)
|
---|
506 | $(QUIET)$(VBOX_XSLTPROC) -o $@ $(VBOX_VIRTUALBOX4_SRC)/include/COMWrappers.xsl $<
|
---|
507 |
|
---|
508 | # alias for generating the COM Wrappers file.
|
---|
509 | testwrappers:: $$(PATH_VirtualBox)/include/COMWrappers.h
|
---|
510 |
|
---|
511 |
|
---|
512 | #
|
---|
513 | # Generate qrc file with branded icons.
|
---|
514 | #
|
---|
515 | VirtualBox_BLDDIRS += $(VBOX_VIRTUALBOX4_OUT_DIR)
|
---|
516 | VirtualBox_CLEAN += $(VBOX_VIRTUALBOX4_OUT_DIR)/VirtualBoxBrand.qrc
|
---|
517 | if "$(KBUILD_HOST)" == "win" ## @todo remove when kBuild ticket #52 has been fixed and deployed.
|
---|
518 | VBOX_DRIVE_HACK := $(firstword $(subst :, ,$(PATH_ROOT))):
|
---|
519 | else
|
---|
520 | VBOX_DRIVE_HACK :=
|
---|
521 | endif
|
---|
522 | $(VBOX_VIRTUALBOX4_OUT_DIR)/VirtualBoxBrand.qrc: \
|
---|
523 | $(VBOX_VIRTUALBOX4_SRC)/VirtualBoxBrand.qrc \
|
---|
524 | | $$(dir $$@)
|
---|
525 | $(call MSG_GENERATE,VirtualBox,$<,$@)
|
---|
526 | $(QUIET)$(SED) \
|
---|
527 | -e 's;@VBOX_ABOUT_PNG@;$(subst $(VBOX_DRIVE_HACK),,$(VBOX_BRAND_GUI_ABOUT_PNG));g' \
|
---|
528 | -e 's;@VBOX_ABOUT_16PX_PNG@;$(subst $(VBOX_DRIVE_HACK),,$(VBOX_BRAND_GUI_ABOUT_16PX_PNG));g' \
|
---|
529 | -e 's;@VBOX_VBOX_16PX_PNG@;$(subst $(VBOX_DRIVE_HACK),,$(VBOX_BRAND_GUI_VBOX_16PX_PNG));g' \
|
---|
530 | -e 's;@VBOX_VBOX_20PX_PNG@;$(subst $(VBOX_DRIVE_HACK),,$(VBOX_BRAND_GUI_VBOX_20PX_PNG));g' \
|
---|
531 | -e 's;@VBOX_VBOX_32PX_PNG@;$(subst $(VBOX_DRIVE_HACK),,$(VBOX_BRAND_GUI_VBOX_32PX_PNG));g' \
|
---|
532 | -e 's;@VBOX_VBOX_40PX_PNG@;$(subst $(VBOX_DRIVE_HACK),,$(VBOX_BRAND_GUI_VBOX_40PX_PNG));g' \
|
---|
533 | -e 's;@VBOX_VBOX_48PX_PNG@;$(subst $(VBOX_DRIVE_HACK),,$(VBOX_BRAND_GUI_VBOX_48PX_PNG));g' \
|
---|
534 | -e 's;@VBOX_VBOX_64PX_PNG@;$(subst $(VBOX_DRIVE_HACK),,$(VBOX_BRAND_GUI_VBOX_64PX_PNG));g' \
|
---|
535 | -e 's;@VBOX_CUBE_42PX_PNG@;$(subst $(VBOX_DRIVE_HACK),,$(VBOX_BRAND_GUI_CUBE_42PX_PNG));g' \
|
---|
536 | --output $@ \
|
---|
537 | $<
|
---|
538 |
|
---|
539 |
|
---|
540 | ifeq ($(KBUILD_TARGET),win)
|
---|
541 | #
|
---|
542 | # On Windows we'll have to generate/edit part of the resource file.
|
---|
543 | # The IDI_ICON1 name is Qt specific.
|
---|
544 | #
|
---|
545 | src/win/VirtualBox.rc_INCS = $(PATH_VirtualBox)
|
---|
546 | src/win/VirtualBox.rc_DEPS = $(PATH_VirtualBox)/VirtualBox-icon.rc
|
---|
547 | src/win/VirtualBox.rc_CLEAN = $(PATH_VirtualBox)/VirtualBox-icon.rc
|
---|
548 |
|
---|
549 | $$(PATH_VirtualBox)/VirtualBox-icon.rc: $(MAKEFILE_CURRENT) $(VBOX_WINDOWS_ICON_FILE) | $$(dir $$@)
|
---|
550 | $(APPEND) -t $@ 'IDI_ICON1 ICON "$(subst /,\\,$(VBOX_WINDOWS_ICON_FILE))"'
|
---|
551 |
|
---|
552 | endif # win
|
---|
553 |
|
---|
554 |
|
---|
555 | ifeq ($(KBUILD_TARGET),darwin)
|
---|
556 | #
|
---|
557 | # Create directories for each approved language or the application
|
---|
558 | # menu won't be translated.
|
---|
559 | #
|
---|
560 | INSTALLS += VirtualBox.lproj
|
---|
561 | VirtualBox.lproj_INST = $(INST_VIRTUALBOX)Contents/Resources/
|
---|
562 | VirtualBox.lproj_MODE = 755
|
---|
563 | VirtualBox.lproj_DIRS := $(addsuffix .lproj,$(VBOX_APPROVED_GUI_LANGUAGES_ALL))
|
---|
564 |
|
---|
565 | #
|
---|
566 | # On OS X (darwin) we need to install icon resources and compulsory bundle contents.
|
---|
567 | # The VirtualBoxVM.app helper is for launching VMs (fixes some issues with the dock).
|
---|
568 | #
|
---|
569 | INSTALLS += VirtualBox.app
|
---|
570 | VirtualBox.app_INST = $(INST_VIRTUALBOX)Contents/
|
---|
571 | VirtualBox.app_MODE = 644
|
---|
572 | VirtualBox.app_SOURCES = \
|
---|
573 | src/darwin/PkgInfo \
|
---|
574 | $(PATH_VirtualBox.app)/Info.plist \
|
---|
575 | $(VBOX_MACOSX_ICON_FILE)=>Resources/virtualbox.icns
|
---|
576 |
|
---|
577 | $$(PATH_VirtualBox.app)/Info.plist: $(PATH_SUB_CURRENT)/src/darwin/Info.plist $(VBOX_VERSION_MK) | $$(@D)/
|
---|
578 | $(call MSG_GENERATE,VirtualBox.app,$<,$@)
|
---|
579 | $(QUIET)$(RM) -f $@
|
---|
580 | $(QUIET)$(SED) \
|
---|
581 | -e 's/@VBOX_VERSION_STRING@/$(VBOX_VERSION_STRING)/g' \
|
---|
582 | -e 's/@VBOX_VERSION_MAJOR@/$(VBOX_VERSION_MAJOR)/g' \
|
---|
583 | -e 's/@VBOX_VERSION_MINOR@/$(VBOX_VERSION_MINOR)/g' \
|
---|
584 | -e 's/@VBOX_VERSION_BUILD@/$(VBOX_VERSION_BUILD)/g' \
|
---|
585 | $< > $@
|
---|
586 |
|
---|
587 | INSTALLS += VirtualBoxVM.app
|
---|
588 | VirtualBoxVM.app_INST = $(VirtualBox.app_INST)Resources/VirtualBoxVM.app/Contents/
|
---|
589 | VirtualBoxVM.app_MODE = 644
|
---|
590 | VirtualBoxVM.app_SOURCES = \
|
---|
591 | src/darwin/VM-PkgInfo=>PkgInfo \
|
---|
592 | $(PATH_VirtualBoxVM.app)/VM-Info.plist=>Info.plist
|
---|
593 | VirtualBoxVM.app_SYMLINKS = \
|
---|
594 | MacOS=>../../../MacOS/ \
|
---|
595 | Resources=>../../../Resources/
|
---|
596 |
|
---|
597 | $$(PATH_VirtualBoxVM.app)/VM-Info.plist: $(PATH_SUB_CURRENT)/src/darwin/VM-Info.plist $(VBOX_VERSION_MK) | $$(@D)/
|
---|
598 | $(call MSG_GENERATE,VirtualBoxVM.app,$<,$@)
|
---|
599 | $(QUIET)$(RM) -f $@
|
---|
600 | $(QUIET)$(SED) \
|
---|
601 | -e 's/@VBOX_VERSION_STRING@/$(VBOX_VERSION_STRING)/g' \
|
---|
602 | -e 's/@VBOX_VERSION_MAJOR@/$(VBOX_VERSION_MAJOR)/g' \
|
---|
603 | -e 's/@VBOX_VERSION_MINOR@/$(VBOX_VERSION_MINOR)/g' \
|
---|
604 | -e 's/@VBOX_VERSION_BUILD@/$(VBOX_VERSION_BUILD)/g' \
|
---|
605 | --output $@ $<
|
---|
606 | endif # darwin
|
---|
607 |
|
---|
608 |
|
---|
609 | #
|
---|
610 | # Testcase for the darwin keyboard routines.
|
---|
611 | #
|
---|
612 | ifdef VBOX_WITH_TESTCASES
|
---|
613 | PROGRAMS.darwin += tstDarwinKeyboard
|
---|
614 | tstDarwinKeyboard_NAME = tstDarwinKeyboard
|
---|
615 | tstDarwinKeyboard_TEMPLATE = VBOXR3TSTEXE
|
---|
616 | tstDarwinKeyboard_DEFS.x86 = USE_HID_FOR_MODIFIERS
|
---|
617 | tstDarwinKeyboard_INCS = include
|
---|
618 | tstDarwinKeyboard_SOURCES = \
|
---|
619 | src/darwin/tstDarwinKeyboard.cpp \
|
---|
620 | src/darwin/DarwinKeyboard.cpp
|
---|
621 | tstDarwinKeyboard_SOURCES.amd64 = \
|
---|
622 | src/darwin/VBoxCocoaApplication.m
|
---|
623 | tstDarwinKeyboard_LDFLAGS = -framework IOKit -framework Carbon -framework AppKit
|
---|
624 | tstDarwinKeyboard_LIBS = \
|
---|
625 | $(LIB_RUNTIME)
|
---|
626 | endif
|
---|
627 |
|
---|
628 |
|
---|
629 | # Unset everything that was loaded from VBoxUI.pro.
|
---|
630 | TEMPLATE := $(SAVED_TEMPLATE)
|
---|
631 | SAVED_TEMPLATE :=
|
---|
632 | LANGUAGE :=
|
---|
633 | FORMS :=
|
---|
634 | TRANSLATIONS :=
|
---|
635 | IMAGES :=
|
---|
636 |
|
---|
637 |
|
---|
638 | # Commit the magic.
|
---|
639 | # (note: before custom rules that make usage of generated variables!).
|
---|
640 | include $(KBUILD_PATH)/subfooter.kmk
|
---|
641 |
|
---|
642 | #
|
---|
643 | # Update all known NLS translation (.ts) files in the nls/ subdirectory.
|
---|
644 | #
|
---|
645 | # NOTE: This target is intended to be run only by the GUI maintainer shortly
|
---|
646 | # before a new product release. VirtualBox_xx_YY.ts is a template for new
|
---|
647 | # languages and should never be actually translated or installed.
|
---|
648 | #
|
---|
649 | updatenls:: \
|
---|
650 | $(filter-out %.qrc,$(VirtualBox_SOURCES) $(VirtualBox_VBOX_EXTRA_NLS_SOURCES)) \
|
---|
651 | $(wildcard include/*.h)
|
---|
652 | $(call MSG_L1,lupdate all languages (nls/*.ts))
|
---|
653 | $(QUIET)$(TOOL_QT4_LUPDATE) \
|
---|
654 | $^ \
|
---|
655 | -ts \
|
---|
656 | $(filter-out nls/qt_%.ts,$(VirtualBox_QT_TRANSLATIONS)) \
|
---|
657 | nls/VirtualBox_xx_YY.ts
|
---|
658 |
|
---|