VirtualBox

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

Last change on this file since 19948 was 19844, checked in by vboxsync, 15 years ago

HGSMI: post host VBVA commands to display; Video HW Accel: mechanism for passing/processing commands to framebuffer

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