VirtualBox

source: vbox/trunk/src/VBox/Frontends/VirtualBox4/Makefile.kmk@ 12475

Last change on this file since 12475 was 12475, checked in by vboxsync, 16 years ago

consolidate DEFS

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

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette