VirtualBox

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

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

FE/Qt4: missed

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