1 | # $Id: Makefile.kmk 12259 2008-09-09 03:03:47Z 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 |
|
---|
30 | VBOX_WITH_REGISTRATION := 1
|
---|
31 |
|
---|
32 | # Ask the user to register at Sun. If this setting is disabled the user can
|
---|
33 | # still register using the menu if desired.
|
---|
34 | VBOX_WITH_REGISTRATION_REQUEST := 1
|
---|
35 |
|
---|
36 | # Show the update notifier dialog during startup. If this setting is disabled
|
---|
37 | # the user can still update using the menu if desired.
|
---|
38 | VBOX_WITH_UPDATE_REQUEST := 1
|
---|
39 |
|
---|
40 |
|
---|
41 | #
|
---|
42 | # The targets.
|
---|
43 | #
|
---|
44 | ifdef VBOX_WITH_HARDENING
|
---|
45 | PROGRAMS += VirtualBox4Hardened
|
---|
46 | DLLS += VirtualBox4
|
---|
47 | else
|
---|
48 | PROGRAMS += VirtualBox4
|
---|
49 | endif
|
---|
50 |
|
---|
51 | ifeq ($(filter-out freebsd linux openbsd netbsd solaris,$(KBUILD_TARGET)),) # X11
|
---|
52 | DLLS += VBoxKeyboard
|
---|
53 | ## @todo convert to install target.
|
---|
54 | OTHERS += $(PATH_BIN)/vboxkeyboard.tar.gz
|
---|
55 | CLEAN += $(PATH_BIN)/vboxkeyboard.tar.gz
|
---|
56 | endif
|
---|
57 | INSTALLS += VirtualBox4.nls
|
---|
58 |
|
---|
59 |
|
---|
60 | #
|
---|
61 | # VBoxKeyboard - keyboard library for X11.
|
---|
62 | #
|
---|
63 | VBoxKeyboard_TEMPLATE = VBOXR3
|
---|
64 | VBoxKeyboard_SOURCES = \
|
---|
65 | src/linux/keyboard-new.c
|
---|
66 | VBoxKeyboard_LIBS = X11
|
---|
67 | VBoxKeyboard_LIBPATH = $(VBOX_LIBPATH_X11)
|
---|
68 |
|
---|
69 |
|
---|
70 | #
|
---|
71 | # vboxkeyboard.tar.gz - the LGPLed keyboard library must always be
|
---|
72 | # redistributed with usable sources.
|
---|
73 | #
|
---|
74 | # This rule will link create a temporary symlink to src/linux/ and tar
|
---|
75 | # up the selected files into a tarball that is installed into the
|
---|
76 | # bin directory (probably belongs in /usr/shared/somewhere really,
|
---|
77 | # but wtf, it's not like we're even trying to be FHS compliant).
|
---|
78 | #
|
---|
79 | ## @todo this should be tar'ed down into the output directory and installed using an install target.
|
---|
80 | $(PATH_BIN)/vboxkeyboard.tar.gz: \
|
---|
81 | $(VBoxKeyboard_SOURCES) \
|
---|
82 | src/linux/COPYING.LIB \
|
---|
83 | src/linux/keyboard.h \
|
---|
84 | src/linux/keyboard-layouts.h \
|
---|
85 | src/linux/keyboard-list.h \
|
---|
86 | src/linux/keyboard-tables.h \
|
---|
87 | src/linux/keyboard-types.h \
|
---|
88 | src/linux/Makefile
|
---|
89 | $(call MSG_TOOL,tar/gzip,,$@)
|
---|
90 | $(QUIET2)$(RM) -f $(PATH_TARGET)/vboxkeyboard $@
|
---|
91 | $(QUIET)$(LN_SYMLINK) $(VBOX_VIRTUALBOX4_SRC)/src/linux/ $(PATH_TARGET)/vboxkeyboard
|
---|
92 | $(QUIET)cd $(PATH_TARGET) \
|
---|
93 | && tar -chvf - $(addprefix vboxkeyboard/,$(notdir $^)) \
|
---|
94 | | gzip - > $@
|
---|
95 | $(QUIET2)$(RM) -f $(PATH_TARGET)/vboxkeyboard
|
---|
96 |
|
---|
97 | OTHER_CLEAN += \
|
---|
98 | $(PATH_BIN)/vboxkeyboard.tar.gz
|
---|
99 |
|
---|
100 |
|
---|
101 | #
|
---|
102 | # Hardened VirtualBox4.
|
---|
103 | #
|
---|
104 | VirtualBox4Hardened_TEMPLATE = VBOXR3HARDENEDEXE
|
---|
105 | VirtualBox4Hardened_SOURCES = src/hardenedmain.cpp
|
---|
106 | VirtualBox4Hardened_NAME = VirtualBox
|
---|
107 | ifeq ($(KBUILD_TARGET),darwin) ## @todo use .darwin when ticket 36 has been fixed.
|
---|
108 | #VirtualBox4Hardened_INST.darwin = $(INST_BIN)VirtualBox $(INST_BIN)VirtualBoxVM
|
---|
109 | VirtualBox4Hardened_INST = $(INST_BIN)VirtualBox $(INST_BIN)VirtualBoxVM
|
---|
110 | endif
|
---|
111 |
|
---|
112 |
|
---|
113 | #
|
---|
114 | # Include Qt project file, we'll use FORMS and TRANSLATIONS in
|
---|
115 | # the VirtualBox4 setup below.
|
---|
116 | #
|
---|
117 | SAVED_TEMPLATE := $(TEMPLATE)
|
---|
118 | include $(PATH_SUB_CURRENT)/VBoxUI.pro
|
---|
119 |
|
---|
120 |
|
---|
121 | #
|
---|
122 | # VirtualBox4 - The GUI program.
|
---|
123 | #
|
---|
124 | USES += qt4
|
---|
125 | VirtualBox4_TEMPLATE := $(if $(VBOX_WITH_HARDENING),VBOXQT4GUI,VBOXQT4GUIEXE)
|
---|
126 | VirtualBox4_NAME = VirtualBox
|
---|
127 | ifndef VBOX_WITH_HARDENING # For the launch trick we need different inode numbers.
|
---|
128 | ifeq ($(KBUILD_TARGET),darwin) ## @todo use .darwin when ticket 36 has been fixed.
|
---|
129 | #VirtualBox4_INST.darwin = $(INST_BIN)VirtualBox $(INST_BIN)VirtualBoxVM
|
---|
130 | VirtualBox4_INST = $(INST_BIN)VirtualBox $(INST_BIN)VirtualBoxVM
|
---|
131 | endif
|
---|
132 | endif
|
---|
133 | VirtualBox4_SDKS.win = WINPSDK DXSDK
|
---|
134 | ifeq ($(filter-out freebsd linux netbsd openbsd os2,$(KBUILD_TARGET)),) # X11 + os2 ## @todo solaris
|
---|
135 | VirtualBox4_SDKS += LIBSDL
|
---|
136 | endif
|
---|
137 |
|
---|
138 | ifdef VBOX_WITH_ICHAT_THEATER
|
---|
139 | # For testing iChat Theater stuff change the sdk path (HACK ALERT!)
|
---|
140 | VBOX_PATH_MACOSX_SDK = /Developer/SDKs/MacOSX10.5.sdk
|
---|
141 | endif
|
---|
142 |
|
---|
143 | VirtualBox4_DEFS = VBOX_GUI_SEPARATE_VM_PROCESS
|
---|
144 | VirtualBox4_DEFS.debug = VBOX_GUI_DEBUG VBOX_CHECK_STATE # QT_FATAL_ASSERT
|
---|
145 | VirtualBox4_DEFS.darwin = VBOX_GUI_USE_QUARTZ2D VBOX_GUI_USE_QIMAGE VBOX_WITHOUT_QHTTP
|
---|
146 | VirtualBox4_DEFS.freebsd = VBOX_GUI_USE_QIMAGE VBOX_GUI_USE_SDL
|
---|
147 | VirtualBox4_DEFS.linux = VBOX_GUI_USE_QIMAGE VBOX_GUI_USE_SDL
|
---|
148 | VirtualBox4_DEFS.netbsd = VBOX_GUI_USE_QIMAGE VBOX_GUI_USE_SDL
|
---|
149 | VirtualBox4_DEFS.openbsd = VBOX_GUI_USE_QIMAGE VBOX_GUI_USE_SDL
|
---|
150 | VirtualBox4_DEFS.solaris = VBOX_GUI_USE_QIMAGE #VBOX_GUI_USE_SDL
|
---|
151 | VirtualBox4_DEFS.win = VBOX_GUI_USE_QIMAGE UNICODE QT_DLL
|
---|
152 | VirtualBox4_DEFS.win.amd64 = VBOX_WITHOUT_QHTTP
|
---|
153 | #ifndef VBOX_OSE
|
---|
154 | ## @todo VBOX_WITH_HACKED_QT doesn't apply to Qt4, so why is this still here?
|
---|
155 | VirtualBox4_DEFS.darwin += VBOX_WITH_HACKED_QT
|
---|
156 | #endif
|
---|
157 | ifdef VBOX_WITH_ICHAT_THEATER
|
---|
158 | VirtualBox4_DEFS.darwin += VBOX_WITH_ICHAT_THEATER
|
---|
159 | endif
|
---|
160 | ifneq ($(KBUILD_TYPE),release)
|
---|
161 | # non-release builds has some extra features.
|
---|
162 | VirtualBox4_DEFS.win += VBOX_GUI_USE_DDRAW
|
---|
163 | endif
|
---|
164 | ifdef VBOX_WITH_REGISTRATION
|
---|
165 | VirtualBox4_DEFS += VBOX_WITH_REGISTRATION
|
---|
166 | endif
|
---|
167 | ifdef VBOX_WITH_REGISTRATION_REQUEST
|
---|
168 | VirtualBox4_DEFS += VBOX_WITH_REGISTRATION_REQUEST
|
---|
169 | endif
|
---|
170 | ifdef VBOX_WITH_UPDATE_REQUEST
|
---|
171 | VirtualBox4_DEFS += VBOX_WITH_UPDATE_REQUEST
|
---|
172 | endif
|
---|
173 | ifdef VBOX_WITH_ALSA
|
---|
174 | VirtualBox4_DEFS += VBOX_WITH_ALSA
|
---|
175 | endif
|
---|
176 | ifdef VBOX_WITH_PULSE
|
---|
177 | VirtualBox4_DEFS += VBOX_WITH_PULSE
|
---|
178 | endif
|
---|
179 | ifdef VBOX_WITH_E1000
|
---|
180 | VirtualBox4_DEFS += VBOX_WITH_E1000
|
---|
181 | endif
|
---|
182 | ifdef VBOX_OSE
|
---|
183 | VirtualBox4_DEFS += VBOX_OSE
|
---|
184 | endif
|
---|
185 | ifdef VBOX_WITH_DEBUGGER_GUI
|
---|
186 | VirtualBox4_DEFS += VBOX_WITH_DEBUGGER_GUI_MENU
|
---|
187 | endif
|
---|
188 | ifdef VBOX_WITH_NETFLT
|
---|
189 | VirtualBox4_DEFS += VBOX_WITH_NETFLT
|
---|
190 | endif
|
---|
191 |
|
---|
192 | VirtualBox4_INCS = \
|
---|
193 | ./include \
|
---|
194 | $(PATH_VirtualBox4)/include
|
---|
195 |
|
---|
196 | ifeq ($(KBUILD_TYPE),release)
|
---|
197 | VirtualBox4_LDFLAGS.win += /SUBSYSTEM:windows
|
---|
198 | else
|
---|
199 | VirtualBox4_LDFLAGS.linux+= -rdynamic # for backtrace_symbols()
|
---|
200 | ifeq ($(USERNAME),dmik)
|
---|
201 | VirtualBox4_LDFLAGS.win += /SUBSYSTEM:windows
|
---|
202 | else
|
---|
203 | VirtualBox4_LDFLAGS.win += /SUBSYSTEM:console
|
---|
204 | endif
|
---|
205 | endif
|
---|
206 | # r=bird: what is -lz doing here? it belongs in LIBS.
|
---|
207 | VirtualBox4_LDFLAGS.darwin = -lz \
|
---|
208 | -framework IOKit -framework AppKit -framework ApplicationServices -framework Foundation -framework Carbon -framework QuickTime \
|
---|
209 | $(if $(VBOX_WITH_HARDENING),-install_name $(VBOX_DYLD_EXECUTABLE_PATH)/VirtualBox.dylib)
|
---|
210 | ifdef VBOX_WITH_ICHAT_THEATER
|
---|
211 | VirtualBox4_LDFLAGS.darwin += -framework InstantMessage -framework QuartzCore
|
---|
212 | endif
|
---|
213 | VirtualBox4_LIBS.win = \
|
---|
214 | $(PATH_SDK_WINPSDK_LIB)/Htmlhelp.Lib \
|
---|
215 | $(PATH_SDK_DXSDK_LIB)/ddraw.lib \
|
---|
216 | $(PATH_SDK_DXSDK_LIB)/dxguid.lib
|
---|
217 | ifeq ($(filter-out freebsd linux netbsd openbsd solaris,$(KBUILD_TARGET)),) # X11
|
---|
218 | VirtualBox4_LIBS += $(PATH_DLL)/VBoxKeyboard$(VBOX_SUFF_DLL)
|
---|
219 | endif
|
---|
220 |
|
---|
221 | if "$(USER)" == "bird"
|
---|
222 | ifdef VBOX_WITH_DEBUGGER_GUI ## @todo make this dynamically loadable and ship with release builds too.
|
---|
223 | ifeq ($(KBUILD_TARGET),win)
|
---|
224 | VirtualBox4_LIBS += $(PATH_LIB)/VBoxDbg$(VBOX_SUFF_LIB)
|
---|
225 | else
|
---|
226 | VirtualBox4_LIBS += $(PATH_DLL)/VBoxDbg$(VBOX_SUFF_DLL)
|
---|
227 | endif
|
---|
228 | endif
|
---|
229 | endif
|
---|
230 |
|
---|
231 |
|
---|
232 | # Headers containing definitions of classes that use the Q_OBJECT macro.
|
---|
233 | VirtualBox4_QT_MOCHDRS = \
|
---|
234 | include/QIWidgetValidator.h \
|
---|
235 | include/QIHotKeyEdit.h \
|
---|
236 | include/QIStatusBar.h \
|
---|
237 | include/QIStateIndicator.h \
|
---|
238 | include/QIMessageBox.h \
|
---|
239 | include/QILabel.h \
|
---|
240 | include/QILabel_p.h \
|
---|
241 | include/QILabelSeparator.h \
|
---|
242 | include/QIAbstractWizard.h \
|
---|
243 | include/QIListView.h \
|
---|
244 | include/QITreeWidget.h \
|
---|
245 | include/QIMainDialog.h \
|
---|
246 | include/QIHelpButton.h \
|
---|
247 | include/QIDialog.h \
|
---|
248 | include/VBoxFilePathSelectorWidget.h \
|
---|
249 | include/VBoxUtils.h \
|
---|
250 | include/VBoxGlobalSettings.h \
|
---|
251 | include/VBoxGlobal.h \
|
---|
252 | include/VBoxVMListView.h \
|
---|
253 | include/VBoxMediaComboBox.h \
|
---|
254 | include/VBoxSelectorWnd.h \
|
---|
255 | include/VBoxConsoleWnd.h \
|
---|
256 | include/VBoxConsoleView.h \
|
---|
257 | include/VBoxProblemReporter.h \
|
---|
258 | include/VBoxDownloaderWgt.h \
|
---|
259 | include/VBoxNetworkFramework.h \
|
---|
260 | include/VBoxAboutDlg.h \
|
---|
261 | include/VBoxCloseVMDlg.h \
|
---|
262 | include/VBoxNewVMWzd.h \
|
---|
263 | include/VBoxNewHDWzd.h \
|
---|
264 | include/VBoxVMFirstRunWzd.h \
|
---|
265 | include/VBoxRegistrationDlg.h \
|
---|
266 | include/VBoxUpdateDlg.h \
|
---|
267 | include/VBoxSnapshotDetailsDlg.h \
|
---|
268 | include/VBoxVMInformationDlg.h \
|
---|
269 | include/VBoxTakeSnapshotDlg.h \
|
---|
270 | include/VBoxSnapshotsWgt.h \
|
---|
271 | include/VBoxVMLogViewer.h \
|
---|
272 | include/VBoxDiskImageManagerDlg.h \
|
---|
273 | include/VBoxSettingsUtils.h \
|
---|
274 | include/VBoxVMSettingsGeneral.h \
|
---|
275 | include/VBoxVMSettingsHD.h \
|
---|
276 | include/VBoxVMSettingsCD.h \
|
---|
277 | include/VBoxVMSettingsFD.h \
|
---|
278 | include/VBoxVMSettingsAudio.h \
|
---|
279 | include/VBoxVMSettingsNetwork.h \
|
---|
280 | include/VBoxVMSettingsSerial.h \
|
---|
281 | include/VBoxVMSettingsParallel.h \
|
---|
282 | include/VBoxVMSettingsUSB.h \
|
---|
283 | include/VBoxVMSettingsUSBFilterDetails.h \
|
---|
284 | include/VBoxVMSettingsSF.h \
|
---|
285 | include/VBoxVMSettingsSFDetails.h \
|
---|
286 | include/VBoxVMSettingsVRDP.h \
|
---|
287 | include/VBoxGLSettingsGeneral.h \
|
---|
288 | include/VBoxGLSettingsInput.h \
|
---|
289 | include/VBoxGLSettingsUpdate.h \
|
---|
290 | include/VBoxGLSettingsLanguage.h \
|
---|
291 | include/VBoxSettingsDialog.h \
|
---|
292 | include/VBoxSettingsDialogSpecific.h \
|
---|
293 | include/VBoxSettingsPage.h \
|
---|
294 | include/VBoxSettingsSelector.h
|
---|
295 |
|
---|
296 | # Sources containing local definitions of classes that use the Q_OBJECT macro.
|
---|
297 | VirtualBox4_QT_MOCSRCS = \
|
---|
298 | src/VBoxSelectorWnd.cpp \
|
---|
299 | src/VBoxDiskImageManagerDlg.cpp
|
---|
300 | ifdef VBOX_WITH_XPCOM
|
---|
301 | VirtualBox4_QT_MOCSRCS += \
|
---|
302 | src/COMDefs.cpp
|
---|
303 | endif
|
---|
304 |
|
---|
305 | VirtualBox4_SOURCES = \
|
---|
306 | src/main.cpp \
|
---|
307 | src/COMDefs.cpp \
|
---|
308 | src/QIWidgetValidator.cpp \
|
---|
309 | src/QIHotKeyEdit.cpp \
|
---|
310 | src/QIStateIndicator.cpp \
|
---|
311 | src/QIStatusBar.cpp \
|
---|
312 | src/QIMessageBox.cpp \
|
---|
313 | src/QILabel.cpp \
|
---|
314 | src/QILabelSeparator.cpp \
|
---|
315 | src/QIAbstractWizard.cpp \
|
---|
316 | src/QIDialog.cpp \
|
---|
317 | src/QIDialogButtonBox.cpp \
|
---|
318 | src/QIListView.cpp \
|
---|
319 | src/QITreeWidget.cpp \
|
---|
320 | src/QIMainDialog.cpp \
|
---|
321 | src/QILineEdit.cpp \
|
---|
322 | src/QIHelpButton.cpp \
|
---|
323 | src/VBoxFilePathSelectorWidget.cpp \
|
---|
324 | src/VBoxDefs.cpp \
|
---|
325 | src/VBoxGlobalSettings.cpp \
|
---|
326 | src/VBoxGlobal.cpp \
|
---|
327 | src/VBoxMediaComboBox.cpp \
|
---|
328 | src/VBoxProblemReporter.cpp \
|
---|
329 | src/VBoxSelectorWnd.cpp \
|
---|
330 | src/VBoxConsoleView.cpp \
|
---|
331 | src/VBoxConsoleWnd.cpp \
|
---|
332 | src/VBoxDownloaderWgt.cpp \
|
---|
333 | src/VBoxVMListView.cpp \
|
---|
334 | src/VBoxFrameBuffer.cpp \
|
---|
335 | src/HappyHttp.cpp \
|
---|
336 | src/VBoxNetworkFramework.cpp \
|
---|
337 | src/VBoxAboutDlg.cpp \
|
---|
338 | src/VBoxCloseVMDlg.cpp \
|
---|
339 | src/VBoxNewVMWzd.cpp \
|
---|
340 | src/VBoxNewHDWzd.cpp \
|
---|
341 | src/VBoxVMFirstRunWzd.cpp \
|
---|
342 | src/VBoxRegistrationDlg.cpp \
|
---|
343 | src/VBoxUpdateDlg.cpp \
|
---|
344 | src/VBoxSnapshotDetailsDlg.cpp \
|
---|
345 | src/VBoxVMInformationDlg.cpp \
|
---|
346 | src/VBoxTakeSnapshotDlg.cpp \
|
---|
347 | src/VBoxSnapshotsWgt.cpp \
|
---|
348 | src/VBoxVMLogViewer.cpp \
|
---|
349 | src/VBoxDiskImageManagerDlg.cpp \
|
---|
350 | src/VBoxVMSettingsGeneral.cpp \
|
---|
351 | src/VBoxVMSettingsHD.cpp \
|
---|
352 | src/VBoxVMSettingsCD.cpp \
|
---|
353 | src/VBoxVMSettingsFD.cpp \
|
---|
354 | src/VBoxVMSettingsAudio.cpp \
|
---|
355 | src/VBoxVMSettingsNetwork.cpp \
|
---|
356 | src/VBoxVMSettingsSerial.cpp \
|
---|
357 | src/VBoxVMSettingsParallel.cpp \
|
---|
358 | src/VBoxVMSettingsUSB.cpp \
|
---|
359 | src/VBoxVMSettingsUSBFilterDetails.cpp \
|
---|
360 | src/VBoxVMSettingsSF.cpp \
|
---|
361 | src/VBoxVMSettingsSFDetails.cpp \
|
---|
362 | src/VBoxVMSettingsVRDP.cpp \
|
---|
363 | src/VBoxGLSettingsGeneral.cpp \
|
---|
364 | src/VBoxGLSettingsInput.cpp \
|
---|
365 | src/VBoxGLSettingsUpdate.cpp \
|
---|
366 | src/VBoxGLSettingsLanguage.cpp \
|
---|
367 | src/VBoxSettingsDialog.cpp \
|
---|
368 | src/VBoxSettingsDialogSpecific.cpp \
|
---|
369 | src/VBoxSettingsSelector.cpp
|
---|
370 |
|
---|
371 | ifeq ($(filter-out freebsd linux netbsd openbsd solaris,$(KBUILD_TARGET)),) # X11
|
---|
372 | ifndef VBOX_OSE
|
---|
373 | VirtualBox4_QT_MOCHDRS += \
|
---|
374 | include/VBoxLicenseViewer.h
|
---|
375 | VirtualBox4_SOURCES += \
|
---|
376 | src/VBoxLicenseViewer.cpp
|
---|
377 | else
|
---|
378 | VirtualBox4_VBOX_EXTRA_NLS_SOURCES += \
|
---|
379 | include/VBoxLicenseViewer.h \
|
---|
380 | src/VBoxLicenseViewer.cpp
|
---|
381 | endif
|
---|
382 | VirtualBox4_SOURCES += \
|
---|
383 | src/linux/XKeyboard-new.cpp \
|
---|
384 | src/VBoxX11Helper.cpp
|
---|
385 | else
|
---|
386 | VirtualBox4_VBOX_EXTRA_NLS_SOURCES += \
|
---|
387 | include/VBoxLicenseViewer.h \
|
---|
388 | src/VBoxLicenseViewer.cpp
|
---|
389 | endif
|
---|
390 |
|
---|
391 | VirtualBox4_SOURCES.win += \
|
---|
392 | src/VBoxFBDDRAW.cpp \
|
---|
393 | $(PATH_VirtualBox4)/VirtualBox4.rc
|
---|
394 |
|
---|
395 | VirtualBox4_SOURCES.darwin = \
|
---|
396 | src/darwin/DarwinKeyboard.cpp \
|
---|
397 | src/darwin/VBoxUtils-darwin.cpp \
|
---|
398 | src/VBoxFBQuartz2D.cpp
|
---|
399 | # src/darwin/VBoxAquaStyle.cpp
|
---|
400 |
|
---|
401 | ifdef VBOX_WITH_ICHAT_THEATER
|
---|
402 | VirtualBox4_SOURCES.darwin += \
|
---|
403 | src/darwin/VBoxIChatTheaterWrapper.m
|
---|
404 | endif
|
---|
405 |
|
---|
406 | # The Qt modules we're using.
|
---|
407 | # (The include directory and lib/framework for each module will be added by the Qt4 unit.)
|
---|
408 | VirtualBox4_QT_MODULES = Core Gui
|
---|
409 |
|
---|
410 | # Import QDesigner UI sources and translations from VBoxUI.pro.
|
---|
411 | # Note that the OSE about dialog is always required by lupdate/lrelease.
|
---|
412 | ifndef VBOX_WITH_REGISTRATION
|
---|
413 | FORMS := $(filter-out ui/VBoxRegistrationDlg.ui,$(FORMS))
|
---|
414 | endif
|
---|
415 | VirtualBox4_SOURCES := \
|
---|
416 | $(VirtualBox4_SOURCES) \
|
---|
417 | $(FORMS) \
|
---|
418 | ui/VBoxAboutDlg.ui
|
---|
419 |
|
---|
420 | # Resource files with some OSE differences.
|
---|
421 | VirtualBox4_SOURCES += VirtualBox.qrc
|
---|
422 | ifdef VBOX_OSE
|
---|
423 | VirtualBox4_SOURCES += VirtualBox_OSE.qrc
|
---|
424 | else
|
---|
425 | VirtualBox4_SOURCES += VirtualBox_NonOSE.qrc
|
---|
426 | VirtualBox4_SOURCES += src/VBoxAboutNonOSEDlg.cpp
|
---|
427 | VirtualBox4_QT_MOCHDRS += include/VBoxAboutNonOSEDlg.h
|
---|
428 | endif
|
---|
429 | VirtualBox_OSE.qrc_RCCFLAGS = -name OSE
|
---|
430 | VirtualBox_NonOSE.qrc_RCCFLAGS = -name NonOSE
|
---|
431 |
|
---|
432 |
|
---|
433 | # Import the translation source from VBoxUI.pro and add the qt_xx_YY counterparts
|
---|
434 | VirtualBox4_QT_TRANSLATIONS := $(TRANSLATIONS) \
|
---|
435 | $(patsubst nls/VirtualBox_%.ts,nls/qt_%.ts, $(filter nls/VirtualBox_%.ts,$(TRANSLATIONS)))
|
---|
436 | # Compress the translation units.
|
---|
437 | VirtualBox4_LRCFLAGS = -compress
|
---|
438 | # Where to install the translations (a separate install target, VirtualBox4-nls-inst is created).
|
---|
439 | VirtualBox4_QT_TRANSLATIONS_INST = $(INST_BIN)nls/
|
---|
440 |
|
---|
441 |
|
---|
442 |
|
---|
443 | # Some flag hacks (should go away).
|
---|
444 | ifneq ($(KBUILD_TARGET),win)
|
---|
445 | src/HappyHttp.cpp_CXXFLAGS += -fexceptions
|
---|
446 | src/VBoxDownloaderWgt.cpp_CXXFLAGS += -fexceptions
|
---|
447 | src/VBoxNetworkFramework.cpp_CXXFLAGS += -fexceptions
|
---|
448 | endif
|
---|
449 | src/HappyHttp.cpp_CXXFLAGS.linux += -O2
|
---|
450 |
|
---|
451 | ## @todo how to detect what tool is used?
|
---|
452 | ## @todo GCC3 seems to lack -Wno-missing-base-class-initializer, so we use
|
---|
453 | # more generic -Wno-extra
|
---|
454 | # bird: What about $(if $(VBOX_GCC_Wno-missing-base-class-initializer),$(VBOX_GCC_Wno-missing-base-class-initializer),$(VBOX_GCC_Wno-extra))?
|
---|
455 | ifdef VBOX_WITH_XPCOM
|
---|
456 | src/COMDefs.cpp_CXXFLAGS = $(VBOX_GCC_Wno-extra)
|
---|
457 | endif
|
---|
458 |
|
---|
459 |
|
---|
460 | #
|
---|
461 | # Generate the COM wrappers.
|
---|
462 | #
|
---|
463 | VirtualBox4_BLDDIRS += $(PATH_VirtualBox4)/include
|
---|
464 | VirtualBox4_INTERMEDIATES += $(PATH_VirtualBox4)/include/COMWrappers.h
|
---|
465 | VirtualBox4_CLEAN += $(PATH_VirtualBox4)/include/COMWrappers.h
|
---|
466 |
|
---|
467 | $$(PATH_VirtualBox4)/include/COMWrappers.h: \
|
---|
468 | $(PATH_ROOT)/src/VBox/Main/idl/VirtualBox.xidl \
|
---|
469 | $(VBOX_VIRTUALBOX4_SRC)/include/COMWrappers.xsl \
|
---|
470 | | $$(dir $$@)
|
---|
471 | $(call MSG_GENERATE,VirtualBox4,$<,$@)
|
---|
472 | $(QUIET)$(VBOX_XSLTPROC) -o $@ $(VBOX_VIRTUALBOX4_SRC)/include/COMWrappers.xsl $<
|
---|
473 |
|
---|
474 | # alias for generating the COM Wrappers file.
|
---|
475 | testwrappers:: $(VBOX_WRAPPERS_FILE4)
|
---|
476 |
|
---|
477 |
|
---|
478 | ifeq ($(KBUILD_TARGET),win)
|
---|
479 | #
|
---|
480 | # On Windows we'll have to generate/edit the resource file.
|
---|
481 | # The IDI_ICON1 name is Qt specific.
|
---|
482 | #
|
---|
483 | $$(PATH_VirtualBox4)/VirtualBox4.rc: $(PATH_SUB_CURRENT)/Makefile.kmk $(VBOX_WINDOWS_ICON_FILE) | $$(dir $$@)
|
---|
484 | $(RM) -f $@
|
---|
485 | $(APPEND) $@ 'IDI_ICON1 ICON "$(subst /,\\,$(VBOX_WINDOWS_ICON_FILE))"'
|
---|
486 |
|
---|
487 | VirtualBox4_CLEAN.win += $$(PATH_VirtualBox4)/VirtualBox4.rc
|
---|
488 | endif # win
|
---|
489 |
|
---|
490 |
|
---|
491 | ifeq ($(KBUILD_TYPE),darwin)
|
---|
492 | #
|
---|
493 | # On OS X (darwin) we need to install icon resources and compulsory bundle contents.
|
---|
494 | # The VirtualBoxVM.app helper is for launching VMs (fixes some issues with the dock).
|
---|
495 | #
|
---|
496 | INSTALLS += VirtualBox4.app
|
---|
497 | VirtualBox4.app_INST = $(INST_VIRTUALBOX)Contents/
|
---|
498 | VirtualBox4.app_MODE = 644
|
---|
499 | VirtualBox4.app_SOURCES = \
|
---|
500 | src/darwin/PkgInfo \
|
---|
501 | $(PATH_VirtualBox4.app)/Info.plist \
|
---|
502 | $(VBOX_MACOSX_ICON_FILE)=>Resources/virtualbox.icns
|
---|
503 |
|
---|
504 | $$(PATH_VirtualBox4.app)/Info.plist: $(PATH_SUB_CURRENT)/src/darwin/Info.plist $(VBOX_VERSION_MK) | $$(@D)/
|
---|
505 | $(call MSG_GENERATE,VirtualBox4.app,$<,$@)
|
---|
506 | $(QUIET)$(RM) -f $@
|
---|
507 | $(QUIET)$(SED) \
|
---|
508 | -e 's/@VBOX_VERSION_STRING@/$(VBOX_VERSION_STRING)/g' \
|
---|
509 | -e 's/@VBOX_VERSION_MAJOR@/$(VBOX_VERSION_MAJOR)/g' \
|
---|
510 | -e 's/@VBOX_VERSION_MINOR@/$(VBOX_VERSION_MINOR)/g' \
|
---|
511 | -e 's/@VBOX_VERSION_BUILD@/$(VBOX_VERSION_BUILD)/g' \
|
---|
512 | $< > $@
|
---|
513 |
|
---|
514 | INSTALLS += VirtualBoxVM.app
|
---|
515 | VirtualBox4VM.app_INST = $(VirtualBox4.app_INST)Resources/VirtualBoxVM.app/Contents/
|
---|
516 | VirtualBox4VM.app_MODE = 644
|
---|
517 | VirtualBox4VM.app_SOURCES = \
|
---|
518 | src/darwin/VM-PkgInfo=>PkgInfo \
|
---|
519 | $(PATH_VirtualBox4VM.app)/VM-Info.plist=>Info.plist \
|
---|
520 | $(VBOX_MACOSX_ICON_FILE)=>Resources/virtualbox.icns
|
---|
521 | VirtualBox4VM.app_SYMLINKS = \
|
---|
522 | MacOS=>../../../MacOS/
|
---|
523 |
|
---|
524 | $$(PATH_VirtualBox4VM.app)/VM-Info.plist: $(PATH_SUB_CURRENT)/src/darwin/VM-Info.plist $(VBOX_VERSION_MK) | $$(@D)/
|
---|
525 | $(call MSG_GENERATE,VirtualBox4VM.app,$<,$@)
|
---|
526 | $(QUIET)$(RM) -f $@
|
---|
527 | $(QUIET)$(SED) \
|
---|
528 | -e 's/@VBOX_VERSION_STRING@/$(VBOX_VERSION_STRING)/g' \
|
---|
529 | -e 's/@VBOX_VERSION_MAJOR@/$(VBOX_VERSION_MAJOR)/g' \
|
---|
530 | -e 's/@VBOX_VERSION_MINOR@/$(VBOX_VERSION_MINOR)/g' \
|
---|
531 | -e 's/@VBOX_VERSION_BUILD@/$(VBOX_VERSION_BUILD)/g' \
|
---|
532 | --output $@ $<
|
---|
533 | endif # darwin
|
---|
534 |
|
---|
535 |
|
---|
536 | #
|
---|
537 | # Testcase for the darwin keyboard routines.
|
---|
538 | #
|
---|
539 | ifdef VBOX_WITH_TESTCASES
|
---|
540 | PROGRAMS.darwin += tstDarwinKeyboard4
|
---|
541 | tstDarwinKeyboard4_NAME = tstDarwinKeyboard
|
---|
542 | tstDarwinKeyboard4_TEMPLATE = VBOXR3TSTEXE
|
---|
543 | tstDarwinKeyboard4_INCS = include
|
---|
544 | tstDarwinKeyboard4_SOURCES = \
|
---|
545 | src/darwin/tstDarwinKeyboard.cpp \
|
---|
546 | src/darwin/DarwinKeyboard.cpp
|
---|
547 | tstDarwinKeyboard4_LDFLAGS = -framework IOKit -framework Carbon
|
---|
548 | tstDarwinKeyboard4_LIBS = \
|
---|
549 | $(LIB_RUNTIME)
|
---|
550 | endif
|
---|
551 |
|
---|
552 |
|
---|
553 | #
|
---|
554 | # Install the license file. Belongs in the root makefile really.
|
---|
555 | #
|
---|
556 | # Note: I'm doing this right here because the GUI will _not_ run
|
---|
557 | # without that file which might be annoying for developers!
|
---|
558 | #
|
---|
559 | ifndef VBOX_OSE
|
---|
560 | ifeq ($(filter-out freebsd linux netbsd openbsd solaris,$(KBUILD_TARGET)),)
|
---|
561 | $(VBOX_LICENSE_BIN): $(VBOX_LICENSE_SRC)
|
---|
562 | $(call MSG_GENERATE,,$@)
|
---|
563 | $(QUIET)$(CP) $< $@
|
---|
564 |
|
---|
565 | $(PATH_BIN)/VirtualBox: $(VBOX_LICENSE_BIN)
|
---|
566 | endif
|
---|
567 | endif
|
---|
568 |
|
---|
569 |
|
---|
570 |
|
---|
571 | # Unset everything that was loaded from VBoxUI.pro.
|
---|
572 | TEMPLATE := $(SAVED_TEMPLATE)
|
---|
573 | SAVED_TEMPLATE :=
|
---|
574 | LANGUAGE :=
|
---|
575 | FORMS :=
|
---|
576 | TRANSLATIONS :=
|
---|
577 | IMAGES :=
|
---|
578 |
|
---|
579 |
|
---|
580 | # Commit the magic.
|
---|
581 | # (note: before custom rules that make usage of generated variables!).
|
---|
582 | include $(KBUILD_PATH)/subfooter.kmk
|
---|
583 |
|
---|
584 |
|
---|
585 | #
|
---|
586 | # Update all known NLS translation (.ts) files in the nls/ subdirectory.
|
---|
587 | #
|
---|
588 | # NOTE: This target is intended to be run only by the GUI maintainer shortly
|
---|
589 | # before a new product release. VirtualBox_xx_YY.ts is a template for new
|
---|
590 | # languages and should never be actually translated or installed.
|
---|
591 | #
|
---|
592 | updatenls:: \
|
---|
593 | $(filter-out %.qrc,$(VirtualBox4_SOURCES) $(VirtualBox4_VBOX_EXTRA_NLS_SOURCES)) \
|
---|
594 | $(wildcard include/*.h)
|
---|
595 | $(call MSG_L1,lupdate all languages (nls/*.ts))
|
---|
596 | $(QUIET)$(TOOL_QT4_LUPDATE) \
|
---|
597 | $^ \
|
---|
598 | -ts \
|
---|
599 | $(filter-out nls/qt_%.ts,$(VirtualBox4_QT_TRANSLATIONS)) \
|
---|
600 | nls/VirtualBox_xx_YY.ts
|
---|