VirtualBox

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

Last change on this file since 7722 was 7669, checked in by vboxsync, 17 years ago

VBoxTakeSnapshotDlg ported qt3=>qt4.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 30.6 KB
Line 
1# $Id: Makefile.kmk 7669 2008-03-31 15:57:16Z vboxsync $
2## @file
3# Makefile for the VirtualBox Qt GUI.
4#
5
6#
7# Copyright (C) 2006-2007 innotek GmbH
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
18# include qmake project file
19include VBoxUI.pro
20
21# Import QDesigner UI sources
22VirtualBox_QT_UISRCS3 := $(FORMS)
23# Import translation sources
24VirtualBox_QT_TRANSLATIONS := $(TRANSLATIONS)
25
26# reset things to avoid possible conflicts with kBuild
27TEMPLATE :=
28LANGUAGE :=
29FORMS :=
30TRANSLATIONS :=
31IMAGES :=
32
33VBOX_WITH_REGISTRATION := 1
34VBOX_WITH_REGISTRATION_REQUEST := 1
35
36DEPTH = ../../../..
37include $(PATH_KBUILD)/header.kmk
38
39# Disable the debugger for now, this is another story.
40VBOX_WITH_DEBUGGER_GUI :=
41DEFS := $(filter-out VBOX_WITH_DEBUGGER_GUI,$(DEFS))
42
43#
44# Handmade configuration of qt4 - very annoying, this needs to
45# be cleaned up properly later some time (not important now).
46#
47ifndef VBOX_PATH_QT4
48 if1of ($(USERNAME), bird)
49 # gentoo (64-bit)
50 VBOX_PATH_QT4 ?= /usr
51 VBOX_PATH_QT4_BIN ?= /usr/bin
52 VBOX_PATH_QT4_INCLUDE ?= /usr/include/qt4
53 VBOX_PATH_QT4_LIB ?= /usr/lib/qt4
54 VBOX_PATH_QT4_LIB64 ?= /usr/lib/qt4
55 VBOX_PATH_QT4_SHARE ?= /usr/share/qt4
56 endif
57endif
58VBOX_PATH_QT4 ?= /usr
59VBOX_PATH_QT4_BIN ?= $(VBOX_PATH_QT4)/bin
60VBOX_PATH_QT4_INCLUDE ?= $(VBOX_PATH_QT4)/include
61VBOX_PATH_QT4_LIB ?= $(VBOX_PATH_QT4)/lib
62VBOX_PATH_QT4_LIB64 ?= $(VBOX_PATH_QT4)/lib64
63VBOX_PATH_QT4_SHARE ?= $(VBOX_PATH_QT4)
64
65VBOX_MODULE_QT4 = QtCore QtGui QtNetwork Qt3Support
66VBOX_DEFS_QT4 = QT_CORE_LIB QT_GUI_LIB QT_NETWORK_LIB QT_QT3SUPPORT_LIB
67
68ifeq ($(BUILD_TARGET),darwin)
69 VBOX_MODULE_QT4 += QtSql QtXml
70 VBOX_DEFS_QT4 = QT_SQL_LIB QT_XML_LIB
71 VBOX_INCS_QT4 = $(foreach mod, $(VBOX_MODULE_QT4), $(join $(join /Library/Frameworks/, $(mod)), .framework/Headers))
72 VBOX_LIBS_QT4 =
73else
74 VBOX_INCS_QT4 = \
75 $(VBOX_PATH_QT4_SHARE)/mkspecs/linux-g++ \
76 $(addprefix $(VBOX_PATH_QT4_INCLUDE)/, $(VBOX_MODULE_QT4) Qt) \
77 $(VBOX_PATH_QT4_INCLUDE)
78 VBOX_LIBS_QT4 = $(VBOX_MODULE_QT4)
79endif
80
81# Warn about all what you know about porting qt3->qt4.
82# Disable this if you like to see something on your screen.
83#VBOX_DEFS_QT4 += QT3_SUPPORT_WARNINGS
84# Some default defs
85VBOX_DEFS_QT4 += QT3_SUPPORT QT_SHARED HAVE_CONFIG_H QT_NO_DEBUG
86
87VBOX_UIC3 ?= $(VBOX_PATH_QT4_BIN)/uic3
88VBOX_UIC4 ?= $(VBOX_PATH_QT4_BIN)/uic
89VBOX_MOC4 ?= $(VBOX_PATH_QT4_BIN)/moc
90VBOX_RCC4 ?= $(VBOX_PATH_QT4_BIN)/rcc
91VBOX_LUPDATE4 ?= $(VBOX_PATH_QT4_BIN)/lupdate
92VBOX_LRELEASE4 ?= $(VBOX_PATH_QT4_BIN)/lrelease
93
94# Template copy from the qt3 stuff. Appended a "4" on the
95# relevant places.
96
97#
98# Template for building Qt GUI executables.
99#
100
101TEMPLATE_VBOXQT4GUIEXE = VBox Qt4 GUI Executable
102TEMPLATE_VBOXQT4GUIEXE_DEFS = IN_RING3 QT_NO_DEBUG QT_THREAD_SUPPORT $(ARCH_BITS_DEFS) $(VBOX_DEFS_QT4)
103TEMPLATE_VBOXQT4GUIEXE_INCS = \
104 $(VBOX_PATH_SDK)/include \
105 $(VBOX_INCS_QT4)
106
107ifeq ($(BUILD_TARGET),win)
108 # drag in library configuration (we need QMAKE_PRL_DEFINES)
109 ifneq ($(LIB_QT_PRL),)
110 include $(LIB_QT_PRL)
111 endif
112 TEMPLATE_VBOXQT4GUIEXE_TOOL = $(VBOX_VCC_TOOL)
113 TEMPLATE_VBOXQT4GUIEXE_DEFS += \
114 _WIN32_WINNT=0x0500 UNICODE _UNICODE \
115 QT_DLL _CRT_SECURE_NO_DEPRECATE \
116 $(QMAKE_PRL_DEFINES)
117 ## @todo VCC70 flags?
118 ifdef VBOX_USE_VCC80
119 TEMPLATE_VBOXQT4GUIEXE_CXXFLAGS = \
120 -nologo -Zm200 -W3 -MD -Zi -EHsc -Zc:wchar_t-
121 TEMPLATE_VBOXQT4GUIEXE_CXXFLAGS.debug = -RTCsu
122 else
123 TEMPLATE_VBOXQT4GUIEXE_CXXFLAGS = \
124 -nologo -Zm200 -W3 -MD -Zi -GX
125 TEMPLATE_VBOXQT4GUIEXE_CXXFLAGS.debug = -GZ
126 endif
127 TEMPLATE_VBOXQT4GUIEXE_INCS += \
128 $(PATH_TOOL_$(VBOX_VCC_TOOL)_ATLMFC_INC)
129 TEMPLATE_VBOXQT4GUIEXE_LDFLAGS = \
130 /NOD /NOLOGO /INCREMENTAL:NO /MAPINFO:EXPORTS /DEBUG \
131 /DELAYLOAD:oleaut32.dll
132 TEMPLATE_VBOXQT4GUIEXE_SDKS = WINPSDK
133 TEMPLATE_VBOXQT4GUIEXE_LIBS = \
134 $(LIB_QT) \
135 $(LIB_QTMAIN) \
136 $(LIB_RUNTIME) \
137 $(PATH_TOOL_$(VBOX_VCC_TOOL)_LIB)/msvcprt.lib \
138 $(PATH_TOOL_$(VBOX_VCC_TOOL)_LIB)/msvcrt.lib \
139 $(PATH_TOOL_$(VBOX_VCC_TOOL)_LIB)/oldnames.lib \
140 $(PATH_TOOL_$(VBOX_VCC_TOOL)_LIB)/delayimp.lib \
141 $(PATH_TOOL_$(VBOX_VCC_TOOL)_ATLMFC_LIB)/atls.lib
142 TEMPLATE_VBOXQT4GUIEXE_POST_CMDS = $(VBOX_SIGN_IMAGE_CMDS)
143
144else # the gcc guys:
145 TEMPLATE_VBOXQT4GUIEXE_TOOL = $(VBOX_GCC_TOOL)
146 TEMPLATE_VBOXQT4GUIEXE_DEFS.linux = _REENTRANT
147
148 TEMPLATE_VBOXQT4GUIEXE_DEFS.solaris = _REENTRANT
149
150 TEMPLATE_VBOXQT4GUIEXE_INCS += \
151 $(LIB_SDL_INC)
152 TEMPLATE_VBOXQT4GUIEXE_CXXFLAGS = \
153 -pipe -Wall -W -frtti -fno-exceptions -Wno-non-virtual-dtor \
154 -Wno-long-long -fshort-wchar -fno-strict-aliasing \
155 $(VBOX_GCC_fvisibility-hidden) $(VBOX_GCC_fvisibility-inlines-hidden)
156 TEMPLATE_VBOXQT4GUIEXE_CXXFLAGS.x86 = -m32
157 TEMPLATE_VBOXQT4GUIEXE_CXXFLAGS.amd64 = -m64
158 TEMPLATE_VBOXQT4GUIEXE_CXXFLAGS.linux = -pthread
159 TEMPLATE_VBOXQT4GUIEXE_LDFLAGS.x86 = -m32
160 TEMPLATE_VBOXQT4GUIEXE_LDFLAGS.amd64 = -m64
161 TEMPLATE_VBOXQT4GUIEXE_LIBS = \
162 $(VBOX_LIBS_QT4) \
163 $(LIB_SDL) \
164 $(LIB_RUNTIME) \
165 $(LIB_REM) \
166 $(LIB_VMM)
167
168 ifeq ($(BUILD_TARGET_ARCH),amd64)
169 TEMPLATE_VBOXQT4GUIEXE_LIBPATH = \
170 $(VBOX_PATH_QT4_LIB64) $(VBOX_PATH_QT4_LIB)
171 else
172 TEMPLATE_VBOXQT4GUIEXE_LIBPATH = \
173 $(VBOX_PATH_QT4_LIB)
174 endif
175
176 ifeq ($(BUILD_TARGET),linux)
177 TEMPLATE_VBOXQT4GUIEXE_LDFLAGS += $(VBOX_LD_as_needed)
178 else ifeq ($(BUILD_TARGET),darwin)
179 TEMPLATE_VBOXQT4GUIEXE_LDFLAGS += $(foreach mod, $(VBOX_MODULE_QT4), -framework $(mod)) \
180 -framework Carbon -framework QuickTime -bind_at_load
181 TEMPLATE_VBOXQT4GUIEXE_LIBS +=
182 TEMPLATE_VBOXQT4GUIEXE_LIBPATH +=
183 else ifeq ($(BUILD_TARGET),os2)
184 # drag in library configuration (we need QMAKE_PRL_DEFINES)
185 ifneq ($(LIB_QT_PRL),)
186 include $(LIB_QT_PRL)
187 endif
188 TEMPLATE_VBOXQT4GUIEXE_DEFS += $(QMAKE_PRL_DEFINES)
189 TEMPLATE_VBOXQT4GUIEXE_LIBS +=
190 TEMPLATE_VBOXQT4GUIEXE_LIBPATH +=
191 else
192 TEMPLATE_VBOXQT4GUIEXE_INCS += \
193 $(VBOX_XCURSOR_INCS)
194 TEMPLATE_VBOXQT4GUIEXE_LIBS += \
195 $(VBOX_XCURSOR_LIBS) \
196 Xext \
197 X11 \
198 m \
199 $(LIB_PTHREAD)
200 TEMPLATE_VBOXQT4GUIEXE_LIBPATH += \
201 $(VBOX_LIBPATH_X11)
202 ifeq ($(BUILD_TARGET),freebsd)
203 TEMPLATE_VBOXQT4GUIEXE_INCS += \
204 /usr/include \
205 /usr/X11R6/include \
206 /usr/local/include
207 endif
208 ifeq ($(BUILD_TARGET),solaris)
209 TEMPLATE_VBOXQT4GUIEXE_LDFLAGS += '-R$$(VBOX_ORIGIN):$$(VBOX_ORIGIN)/qtgcc/lib'
210 TEMPLATE_VBOXQT4GUIEXE_LIBS += \
211 rt socket nsl
212 endif
213 endif
214
215endif
216
217# Add COM/XPCOM stuff
218TEMPLATE_VBOXQT4GUIEXE_LIBS += \
219 $(PATH_LIB)/VBoxCOM$(VBOX_SUFF_LIB)
220ifdef VBOX_WITH_XPCOM
221 ## @todo may be worth creating the VBOX_XPCOM SDK def
222 TEMPLATE_VBOXQT4GUIEXE_DEFS += VBOX_WITH_XPCOM
223 TEMPLATE_VBOXQT4GUIEXE_INCS += \
224 $(VBOX_XPCOM_INCS)
225 TEMPLATE_VBOXQT4GUIEXE_LIBS += \
226 $(LIB_XPCOM)
227endif
228
229#
230# Template for building Qt GUI components.
231#
232TEMPLATE_VBOXQT4GUI = VBox Qt GUI Components
233TEMPLATE_VBOXQT4GUI_EXTENDS = VBOXQTGUIEXE
234TEMPLATE_VBOXQT4GUI_LIBS = $(filter-out $(QTMAIN),$(TEMPLATE_VBOXQT4GUIEXE_LIBS))
235ifeq ($(BUILD_TARGET),darwin)
236 TEMPLATE_VBOXQT4GUI_LDFLAGS = $(filter-out -framework Carbon -framework QuickTime -bind_at_load,$(TEMPLATE_VBOXQT4GUIEXE_LDFLAGS))
237endif
238ifeq ($(filter-out solaris.x86 %.amd64,$(BUILD_TARGET).$(BUILD_TARGET_ARCH)),)
239 ifneq ($(BUILD_TARGET),win)
240 TEMPLATE_VBOXQT4GUI_DEFS = PIC $(TEMPLATE_VBOXQT4GUIEXE_DEFS)
241 TEMPLATE_VBOXQT4GUI_CFLAGS = -fPIC $(TEMPLATE_VBOXQT4GUIEXE_CFLAGS)
242 TEMPLATE_VBOXQT4GUI_CXXFLAGS = -fPIC $(TEMPLATE_VBOXQT4GUIEXE_CXXFLAGS)
243 TEMPLATE_VBOXQT4GUI_LDFLAGS = -fPIC $(TEMPLATE_VBOXQT4GUIEXE_LDFLAGS)
244 endif
245endif
246
247
248#
249# exclude inappropriate UI content
250#
251ifndef VBOX_WITH_REGISTRATION
252VirtualBox_QT_UISRCS3 := $(filter-out ui/VBoxRegistrationDlg.ui,$(VirtualBox_QT_UISRCS3))
253endif
254
255
256#
257# filter ported UI content
258#
259VirtualBox_QT_UISRCS3 := $(filter-out ui/VBoxAboutDlg.ui,$(VirtualBox_QT_UISRCS3))
260VirtualBox_QT_UISRCS4 += ui/VBoxAboutDlg.ui
261
262VirtualBox_QT_UISRCS3 := $(filter-out ui/VBoxCloseVMDlg.ui,$(VirtualBox_QT_UISRCS3))
263VirtualBox_QT_UISRCS4 += ui/VBoxCloseVMDlg.ui
264
265VirtualBox_QT_UISRCS3 := $(filter-out ui/VBoxNewVMWzd.ui,$(VirtualBox_QT_UISRCS3))
266VirtualBox_QT_UISRCS4 += ui/VBoxNewVMWzd.ui
267
268VirtualBox_QT_UISRCS3 := $(filter-out ui/VBoxNewHDWzd.ui,$(VirtualBox_QT_UISRCS3))
269VirtualBox_QT_UISRCS4 += ui/VBoxNewHDWzd.ui
270
271VirtualBox_QT_UISRCS3 := $(filter-out ui/VBoxVMFirstRunWzd.ui,$(VirtualBox_QT_UISRCS3))
272VirtualBox_QT_UISRCS4 += ui/VBoxVMFirstRunWzd.ui
273
274VirtualBox_QT_UISRCS3 := $(filter-out ui/VBoxRegistrationDlg.ui,$(VirtualBox_QT_UISRCS3))
275VirtualBox_QT_UISRCS4 += ui/VBoxRegistrationDlg.ui
276
277VirtualBox_QT_UISRCS3 := $(filter-out ui/VBoxSharedFoldersSettings.ui,$(VirtualBox_QT_UISRCS3))
278VirtualBox_QT_UISRCS4 += ui/VBoxSharedFoldersSettings.ui
279
280VirtualBox_QT_UISRCS3 := $(filter-out ui/VBoxSnapshotDetailsDlg.ui,$(VirtualBox_QT_UISRCS3))
281VirtualBox_QT_UISRCS4 += ui/VBoxSnapshotDetailsDlg.ui
282
283VirtualBox_QT_UISRCS3 := $(filter-out ui/VBoxVMInformationDlg.ui,$(VirtualBox_QT_UISRCS3))
284VirtualBox_QT_UISRCS4 += ui/VBoxVMInformationDlg.ui
285
286VirtualBox_QT_UISRCS3 := $(filter-out ui/VBoxTakeSnapshotDlg.ui,$(VirtualBox_QT_UISRCS3))
287VirtualBox_QT_UISRCS4 += ui/VBoxTakeSnapshotDlg.ui
288
289
290#
291# The targets.
292#
293PROGRAMS = VirtualBox
294ifeq ($(filter-out freebsd linux openbsd netbsd solaris,$(BUILD_TARGET)),) # X11
295DLLS = VBoxKeyboard
296OTHERS = $(PATH_BIN)/vboxkeyboard.tar.gz
297endif
298INSTALLS = VirtualBox.nls
299
300ifeq ($(BUILD_TARGET),os2)
301 DLLS += VBoxHlp
302 ifneq ($(strip $(VBOX_DLL_QT)),)
303 INSTALLS += qt.dll
304 qt.dll_INST = $(INST_BIN)
305 qt.dll_SOURCES += \
306 $(VBOX_DLL_QT)=>$(not-dir $(VBOX_DLL_QT))
307 endif
308endif
309
310
311#
312# VBoxHlp - helper DLL for OS/2.
313#
314VBoxHlp_ASTOOL = NASM
315VBoxHlp_ASFLAGS = -f obj
316VBoxHlp_DEFS = IN_RING3 IN_VBOXHLP
317VBoxHlp_CXXFLAGS = -fno-exceptions
318VBoxHlp_LDFLAGS = -nostdlib -los2
319VBoxHlp_LDFLAGS += -Zlinker option -Zlinker manyautodata
320VBoxHlp_SOURCES = \
321 src/os2/VBoxHlp.asm \
322 src/os2/VBoxHlp.cpp
323
324
325#
326# VBoxKeyboard - keyboard library for X11.
327#
328VBoxKeyboard_TEMPLATE = VBOXR3
329VBoxKeyboard_SOURCES = \
330 src/linux/keyboard-new.c
331VBoxKeyboard_TARSOURCES = \
332 $(VBoxKeyboard_SOURCES) \
333 src/linux/COPYING.LIB \
334 src/linux/keyboard.h \
335 src/linux/keyboard-layouts.h \
336 src/linux/keyboard-list.h \
337 src/linux/keyboard-tables.h \
338 src/linux/Makefile
339VBoxKeyboard_LIBS = X11
340VBoxKeyboard_LIBPATH = $(VBOX_LIBPATH_X11)
341
342
343#
344# vboxkeyboard.tar.gz - the LGPLed keyboard library must always be
345# redistributed with usable sources.
346#
347SOURCE_DIRECTORY = vboxkeyboard
348DIRECTORY_PREFIX = src/linux/
349
350$(PATH_TARGET)/$(SOURCE_DIRECTORY):
351 $(MKDIR) -p $(@D)
352 $(LN_SYMLINK) $(abspath $(PATH_CURRENT))/$(DIRECTORY_PREFIX) $@
353
354$(PATH_BIN)/vboxkeyboard.tar.gz: $(VBoxKeyboard_TARSOURCES) $(PATH_TARGET)/$(SOURCE_DIRECTORY)
355 $(call MSG_TOOL,tar/gzip,,$@)
356 $(QUIET)cd $(PATH_TARGET) && tar -chf - $(addprefix $(SOURCE_DIRECTORY)/,$(subst $(DIRECTORY_PREFIX),,$(VBoxKeyboard_TARSOURCES))) | gzip - > $@
357
358
359#
360# VirtualBox - The GUI program.
361#
362VirtualBox_TEMPLATE = VBOXQT4GUIEXE
363VirtualBox_NAME = VirtualBox4
364VirtualBox_SDKS.win = WINPSDK DXSDK
365#ifeq ($(filter-out freebsd linux netbsd openbsd os2 solaris,$(BUILD_TARGET)),) - later
366ifeq ($(filter-out freebsd linux netbsd openbsd os2,$(BUILD_TARGET)),) # X11 + os2
367VirtualBox_SDKS += LIBSDL
368endif
369
370ifeq ($(BUILD_TARGET),darwin)
371# For the launch trick we need different inode numbers.
372VirtualBox_INST = $(INST_BIN)VirtualBox4 $(INST_BIN)VirtualBoxVM4
373
374 # For testing iChat Theater stuff change
375 # the sdk path
376 ifdef VBOX_WITH_ICHAT_THEATER
377 VBOX_PATH_MACOSX_SDK = /Developer/SDKs/MacOSX10.5.sdk
378 endif
379
380endif
381
382ifndef VBOX_OSE
383ifeq ($(filter-out freebsd linux netbsd openbsd solaris,$(BUILD_TARGET)),) # linux only, yea, right.
384# Note: I'm doing this right here because the GUI will _not_ run
385# without that file which might be annoying for developers!
386$(VBOX_LICENSE_BIN): $(VBOX_LICENSE_SRC)
387 $(call MSG_GENERATE,,$@)
388 $(QUIET)$(CP) $< $@
389
390$(PATH_BIN)/VirtualBox: $(VBOX_LICENSE_BIN)
391endif
392endif
393
394# Each nls/VirtualBox_xx_YY.ts file must have a qt_xx_YY.ts counterpart
395VirtualBox_QT_TRANSLATIONS_QT := \
396 $(patsubst nls/VirtualBox_%.ts,nls/qt_%.ts,\
397 $(filter nls/VirtualBox_%.ts,$(VirtualBox_QT_TRANSLATIONS)))
398
399# QDesigner UI sources are imported from VBoxUI.pro as VirtualBox_QT_UISRC
400
401# Headers containing definitions of classes that use the Q_OBJECT macro
402VirtualBox_QT_MOCHDRS = \
403 include/QIWidgetValidator.h \
404 include/QIHotKeyEdit.h \
405 include/QIStatusBar.h \
406 include/QIStateIndicator.h \
407 include/QIMessageBox.h \
408 include/QIRichLabel.h \
409 include/QIAbstractWizard.h \
410 include/QIAbstractDialog.h \
411 include/VBoxGlobalSettings.h \
412 include/VBoxUtils.h \
413 include/VBoxGlobal.h \
414 include/VBoxVMListBox.h \
415 include/VBoxMediaComboBox.h \
416 include/VBoxSelectorWnd.h \
417 include/VBoxConsoleWnd.h \
418 include/VBoxConsoleView.h \
419 include/VBoxProblemReporter.h \
420 include/VBoxDownloaderWgt.h \
421 include/VBoxNetworkFramework.h \
422 include/VBoxAboutDlg.h \
423 include/VBoxCloseVMDlg.h \
424 include/VBoxNewVMWzd.h \
425 include/VBoxNewHDWzd.h \
426 include/VBoxVMFirstRunWzd.h \
427 include/VBoxRegistrationDlg.h \
428 include/VBoxSharedFoldersSettings.h \
429 include/VBoxSnapshotDetailsDlg.h \
430 include/VBoxVMInformationDlg.h \
431 include/VBoxTakeSnapshotDlg.h
432
433# Sources containing local definitions of classes that use the Q_OBJECT macro
434VirtualBox_QT_MOCSRCS = src/VBoxSelectorWnd.cpp
435ifeq ($(filter-out freebsd linux netbsd openbsd solaris,$(BUILD_TARGET)),) # X11
436VirtualBox_QT_MOCSRCS += src/VBoxGlobal.cpp
437endif
438ifdef VBOX_WITH_XPCOM
439VirtualBox_QT_MOCSRCS += src/COMDefs.cpp
440endif
441
442# UI headers (ui.h) containing local definitions of classes that use the Q_OBJECT macro
443VirtualBox_QT_MOCUIHDRS = \
444 ui/VBoxVMSettingsDlg.ui.h \
445 ui/VBoxVMLogViewer.ui.h
446
447
448# All generated sources. Note: this list MUST be in sync with Qt source
449# generation rules defined somewhere below!
450VirtualBox_GENSRCS = \
451 $(foreach moc,$(notdir $(basename $(VirtualBox_QT_MOCHDRS))), $(PATH_VirtualBox)/moc/moc_$(moc).cpp) \
452 $(foreach ui,$(notdir $(basename $(VirtualBox_QT_UISRCS3))), $(PATH_VirtualBox)/ui/$(ui).cpp $(PATH_VirtualBox)/moc/moc_$(ui).cpp) \
453 $(PATH_VirtualBox)/ui/vbox_image_collection.cpp
454
455# All generated headers. Note: this list MUST be in sync with Qt source
456# generation rules defined somewhere below!
457VirtualBox_GENHDRS = \
458 $(foreach mocui,$(notdir $(basename $(VirtualBox_QT_MOCUIHDRS))), $(PATH_VirtualBox)/moc/$(mocui).moc) \
459 $(foreach moc,$(notdir $(basename $(VirtualBox_QT_MOCSRCS))), $(PATH_VirtualBox)/moc/$(moc).moc) \
460 $(foreach ui,$(notdir $(basename $(VirtualBox_QT_UISRCS3))), $(PATH_VirtualBox)/ui/$(ui).h) \
461 $(foreach ui,$(notdir $(basename $(VirtualBox_QT_UISRCS4))), $(PATH_VirtualBox)/ui/$(ui).gen.h)
462
463# All existing .ui.h files for known .ui sources
464VirtualBox_QT_UIHDRS = \
465 $(wildcard $(addsuffix .h,$(VirtualBox_QT_UISRCS3)))
466
467# All header files
468VirtualBox_HEADERS = \
469 $(wildcard include/*.h) \
470 $(VirtualBox_GENHDRS) \
471 $(VirtualBox_QT_UIHDRS)
472
473
474VirtualBox_SOURCES = \
475 $(VirtualBox_GENSRCS) \
476 src/main.cpp \
477 src/COMDefs.cpp \
478 src/QIWidgetValidator.cpp \
479 src/QIHotKeyEdit.cpp \
480 src/QIStateIndicator.cpp \
481 src/QIStatusBar.cpp \
482 src/QIMessageBox.cpp \
483 src/QIRichLabel.cpp \
484 src/QIAbstractWizard.cpp \
485 src/QIAbstractDialog.cpp \
486 src/VBoxDefs.cpp \
487 src/VBoxGlobalSettings.cpp \
488 src/VBoxGlobal.cpp \
489 src/VBoxMediaComboBox.cpp \
490 src/VBoxProblemReporter.cpp \
491 src/VBoxSelectorWnd.cpp \
492 src/VBoxConsoleView.cpp \
493 src/VBoxConsoleWnd.cpp \
494 src/VBoxDownloaderWgt.cpp \
495 src/VBoxVMListBox.cpp \
496 src/VBoxFrameBuffer.cpp \
497 src/HappyHttp.cpp \
498 src/VBoxNetworkFramework.cpp \
499 src/VBoxAboutDlg.cpp \
500 src/VBoxCloseVMDlg.cpp \
501 src/VBoxNewVMWzd.cpp \
502 src/VBoxNewHDWzd.cpp \
503 src/VBoxVMFirstRunWzd.cpp \
504 src/VBoxRegistrationDlg.cpp \
505 src/VBoxSharedFoldersSettings.cpp \
506 src/VBoxSnapshotDetailsDlg.cpp \
507 src/VBoxVMInformationDlg.cpp \
508 src/VBoxTakeSnapshotDlg.cpp
509
510ifeq ($(filter-out freebsd linux netbsd openbsd solaris,$(BUILD_TARGET)),) # X11
511VirtualBox_SOURCES += \
512 src/linux/XKeyboard-new.cpp
513endif
514
515VirtualBox_SOURCES.win += \
516 src/win32/VirtualBox.rc
517
518VirtualBox_SOURCES.win += \
519 src/VBoxFBDDRAW.cpp
520
521VirtualBox_SOURCES.darwin = \
522 src/darwin/DarwinKeyboard.cpp \
523 src/darwin/DarwinCursor.cpp \
524 src/darwin/VBoxUtils-darwin.cpp \
525 src/VBoxFBQuartz2D.cpp
526# src/darwin/VBoxAquaStyle.cpp \
527
528ifdef VBOX_WITH_ICHAT_THEATER
529 VirtualBox_SOURCES.darwin += \
530 src/darwin/VBoxIChatTheaterWrapper.m
531endif
532
533ifneq ($(BUILD_TARGET),win)
534src/HappyHttp.cpp_CXXFLAGS += -fexceptions
535src/VBoxDownloaderWgt.cpp_CXXFLAGS += -fexceptions
536src/VBoxNetworkFramework.cpp_CXXFLAGS += -fexceptions
537endif
538src/HappyHttp.cpp_CXXFLAGS.linux += -O2
539
540## @todo how to detect what tool is used?
541## @todo GCC3 seems to lack -Wno-missing-base-class-initializer, so we use
542# more generic -Wno-extra
543ifdef VBOX_WITH_XPCOM
544src/COMDefs.cpp_CXXFLAGS = $(VBOX_GCC_Wno-extra)
545endif
546
547VirtualBox_DEFS = VBOX_GUI_SEPARATE_VM_PROCESS
548VirtualBox_DEFS.debug = VBOX_GUI_DEBUG VBOX_CHECK_STATE # QT_FATAL_ASSERT
549VirtualBox_DEFS.darwin = VBOX_GUI_USE_QUARTZ2D VBOX_GUI_USE_QIMAGE VBOX_WITHOUT_QHTTP
550VirtualBox_DEFS.freebsd = VBOX_GUI_USE_QIMAGE VBOX_GUI_USE_SDL
551VirtualBox_DEFS.linux = VBOX_GUI_USE_SDL
552VirtualBox_DEFS.netbsd = VBOX_GUI_USE_QIMAGE VBOX_GUI_USE_SDL
553VirtualBox_DEFS.openbsd = VBOX_GUI_USE_QIMAGE VBOX_GUI_USE_SDL
554VirtualBox_DEFS.os2 = VBOX_GUI_USE_QIMAGE VBOX_GUI_USE_SDL QT_DLL
555VirtualBox_DEFS.solaris = VBOX_GUI_USE_QIMAGE #VBOX_GUI_USE_SDL
556VirtualBox_DEFS.win = VBOX_GUI_USE_QIMAGE UNICODE QT_DLL
557VirtualBox_DEFS.win.amd64 = VBOX_WITHOUT_QHTTP
558#ifndef VBOX_OSE
559 VirtualBox_DEFS.darwin += VBOX_WITH_HACKED_QT
560#endif
561ifdef VBOX_WITH_ICHAT_THEATER
562 VirtualBox_DEFS.darwin += VBOX_WITH_ICHAT_THEATER
563endif
564ifneq ($(BUILD_TYPE),release)
565 # non-release builds has some extra features.
566 VirtualBox_DEFS.win += VBOX_GUI_USE_DDRAW
567 VirtualBox_DEFS.linux += VBOX_GUI_USE_QIMAGE
568endif
569ifdef VBOX_WITH_REGISTRATION
570 VirtualBox_DEFS += VBOX_WITH_REGISTRATION
571endif
572ifdef VBOX_WITH_REGISTRATION_REQUEST
573 VirtualBox_DEFS += VBOX_WITH_REGISTRATION_REQUEST
574endif
575ifdef VBOX_WITH_ALSA
576 VirtualBox_DEFS += VBOX_WITH_ALSA
577endif
578ifdef VBOX_WITH_PULSE
579 VirtualBox_DEFS += VBOX_WITH_PULSE
580endif
581ifdef VBOX_OSE
582 VirtualBox_DEFS += VBOX_OSE
583endif
584ifdef VBOX_WITH_DEBUGGER_GUI
585 VirtualBox_DEFS += VBOX_WITH_DEBUGGER_GUI_MENU
586endif
587
588VirtualBox_INCS = \
589 ./include \
590 $(PATH_VirtualBox)/ui \
591 $(PATH_VirtualBox)/moc \
592 $(PATH_VirtualBox)/include \
593
594
595ifeq ($(BUILD_TYPE),release)
596 VirtualBox_LDFLAGS.win += /SUBSYSTEM:windows
597else
598 VirtualBox_LDFLAGS.linux+= -rdynamic # for backtrace_symbols()
599 ifeq ($(USERNAME),dmik)
600 VirtualBox_LDFLAGS.win += /SUBSYSTEM:windows
601 else
602 VirtualBox_LDFLAGS.win += /SUBSYSTEM:console
603 endif
604endif
605VirtualBox_LDFLAGS.os2 = -Zlinker /PM:PM -Zno-fork
606VirtualBox_LDFLAGS.darwin = -framework IOKit -framework AppKit -framework ApplicationServices -framework Foundation -lz
607ifdef VBOX_WITH_ICHAT_THEATER
608 VirtualBox_LDFLAGS.darwin += -framework InstantMessage -framework QuartzCore
609endif
610VirtualBox_LIBS.win = \
611 $(PATH_SDK_WINPSDK_LIB)/Htmlhelp.Lib \
612 $(PATH_SDK_DXSDK_LIB)/ddraw.lib \
613 $(PATH_SDK_DXSDK_LIB)/dxguid.lib
614VirtualBox_LIBS.os2 += $(PATH_DLL)/VBoxHlp$(VBOX_SUFF_DLL)
615ifeq ($(filter-out freebsd linux netbsd openbsd solaris,$(BUILD_TARGET)),) # X11
616VirtualBox_LIBS += $(PATH_DLL)/VBoxKeyboard$(VBOX_SUFF_DLL)
617endif
618
619
620ifdef VBOX_WITH_DEBUGGER_GUI ## @todo make this dynamically loadable and ship with release builds too.
621 ifeq ($(BUILD_TARGET),win)
622 VirtualBox_LIBS += $(PATH_LIB)/VBoxDbg$(VBOX_SUFF_LIB)
623 else
624 VirtualBox_LIBS += $(PATH_DLL)/VBoxDbg$(VBOX_SUFF_DLL)
625 endif
626endif
627
628WRAPPERSFILE = $(PATH_VirtualBox)/include/COMWrappers.h
629WRAPPERSINCFILE = include/COMDefs.h
630WRAPPERSTEMPLATE = include/COMWrappers.xsl
631XIDLFILE = ../../Main/idl/VirtualBox.xidl
632
633
634# generated files we need to clean manually
635OTHER_CLEAN = \
636 $(VirtualBox_GENSRCS) \
637 $(VirtualBox_GENHDRS) \
638 $(WRAPPERSFILE) \
639 $(PATH_BIN)/vboxkeyboard.tar.gz
640
641
642#
643# On Mac OS X (darwin) we need to install icon resources and compusory bundle contents.
644#
645INSTALLS.darwin += VirtualBox.app
646VirtualBox.app_INST = $(INST_VIRTUALBOX)Contents/
647VirtualBox.app_MODE = 644
648VirtualBox.app_SOURCES = \
649 src/darwin/PkgInfo \
650 $(PATH_TARGET)/Info.plist \
651 images/VirtualBox.icns=>Resources/virtualbox.icns
652
653$(PATH_TARGET)/Info.plist: src/darwin/Info.plist $(VBOX_VERSION_MK) | $(call DIRDEP,$(PATH_TARGET))
654 $(call MSG_GENERATE,VirtualBox.app,$<,$@)
655 $(QUIET)$(RM) -f $@
656 $(QUIET)$(SED) \
657 -e 's/@VBOX_VERSION_STRING@/$(VBOX_VERSION_STRING)/g' \
658 -e 's/@VBOX_VERSION_MAJOR@/$(VBOX_VERSION_MAJOR)/g' \
659 -e 's/@VBOX_VERSION_MINOR@/$(VBOX_VERSION_MINOR)/g' \
660 -e 's/@VBOX_VERSION_BUILD@/$(VBOX_VERSION_BUILD)/g' \
661 $< > $@
662
663INSTALLS.darwin += VirtualBoxVM.app
664VirtualBoxVM.app_INST = $(VirtualBox.app_INST)Resources/VirtualBoxVM.app/Contents/
665VirtualBoxVM.app_MODE = 644
666VirtualBoxVM.app_SOURCES = \
667 src/darwin/VM-PkgInfo=>PkgInfo \
668 $(PATH_TARGET)/VM-Info.plist=>Info.plist \
669 images/VirtualBox.icns=>Resources/virtualbox.icns
670VirtualBoxVM.app_SYMLINKS = \
671 MacOS=>../../../MacOS/
672
673$(PATH_TARGET)/VM-Info.plist: src/darwin/VM-Info.plist $(VBOX_VERSION_MK) | $(call DIRDEP,$(PATH_TARGET))
674 $(call MSG_GENERATE,VirtualBoxVM.app,$<,$@)
675 $(QUIET)$(RM) -f $@
676 $(QUIET)$(SED) \
677 -e 's/@VBOX_VERSION_STRING@/$(VBOX_VERSION_STRING)/g' \
678 -e 's/@VBOX_VERSION_MAJOR@/$(VBOX_VERSION_MAJOR)/g' \
679 -e 's/@VBOX_VERSION_MINOR@/$(VBOX_VERSION_MINOR)/g' \
680 -e 's/@VBOX_VERSION_BUILD@/$(VBOX_VERSION_BUILD)/g' \
681 --output $@ $<
682
683#
684# Translation installation
685#
686VirtualBox.nls_INST = $(INST_BIN)nls/
687VirtualBox.nls_SOURCES = $(patsubst %.ts,$(PATH_VirtualBox)/nls/%.qm,$(notdir $(VirtualBox_QT_TRANSLATIONS)))
688VirtualBox.nls_SOURCES += $(patsubst %.ts,$(PATH_VirtualBox)/nls/%.qm,$(notdir $(VirtualBox_QT_TRANSLATIONS_QT)))
689VirtualBox.nls_MODE = 644
690
691
692#
693# Testcase for the darwin keyboard routines.
694#
695ifdef VBOX_WITH_TESTCASES
696PROGRAMS.darwin += tstDarwinKeyboard
697tstDarwinKeyboard_TEMPLATE = VBOXR3TSTEXE
698tstDarwinKeyboard_INCS = include
699tstDarwinKeyboard_SOURCES = \
700 src/darwin/tstDarwinKeyboard.cpp \
701 src/darwin/DarwinKeyboard.cpp
702tstDarwinKeyboard_LDFLAGS = -framework IOKit -framework Carbon
703tstDarwinKeyboard_LIBS = \
704 $(LIB_RUNTIME)
705endif
706
707
708
709# Commit the magic.
710# (note: before custom rules that make usage of generated variables!).
711include $(PATH_KBUILD)/footer.kmk
712
713
714
715#
716# Qt source file generation rules
717#
718
719## @todo move QT source generation macros to kBuild
720
721## Generate a rule to create a MOC source file from a header containing
722# classes that use the Q_OBJECT macro.
723# @param $mochdr header file with Q_OBJECT
724define def_qt_gen_src_moc
725
726$(eval mocsrc := $(PATH_$(target))/moc/moc_$(notdir $(basename $(mochdr))).cpp)
727
728$(target)_GENSRCS_REAL += $(mocsrc)
729
730$(mocsrc): $(mochdr)
731 $$(call MSG_TOOL,moc,$(target),$(mochdr),$$@)
732 $$(QUIET)$$(MKDIR) -p $$(@D)
733 $$(QUIET)$$(VBOX_MOC4) \
734 $(addprefix -D,$($(target)_DEFS)) \
735 $(addprefix -I,$($(target)_INCS)) \
736 $(mochdr) -o $$@
737
738endef
739
740## Generate a rule to create a MOC include file from a source containing
741# local classes that use the Q_OBJECT macro. This include is then included
742# by that source, so it must be generated before the source gets compiled.
743# @param $mocsrc source file with Q_OBJECT
744define def_qt_gen_inc_moc
745
746$(eval mocobj := $(PATH_$(target)_$(mocsrc))/$(notdir $(basename $(mocsrc)))$(VBOX_SUFF_OBJ))
747$(eval mocinc := $(PATH_$(target))/moc/$(notdir $(basename $(mocsrc))).moc)
748
749$(target)_GENHDRS_REAL += $(mocinc)
750
751$(mocobj): $(mocinc)
752
753.NOTPARALLEL: $(mocinc)
754$(mocinc): $(mocsrc)
755 $$(call MSG_TOOL,moc,$(target),$(mocsrc),$$@)
756 $$(QUIET)$$(MKDIR) -p $$(@D)
757 $$(QUIET)$$(VBOX_MOC4) \
758 $(addprefix -D,$($(target)_DEFS)) \
759 $(addprefix -I,$($(target)_INCS)) \
760 -i $(mocsrc) -o $$@
761
762endef
763
764## Generate a rule to create a MOC include file from a UI header (ui.h) containing
765# local classes that use the Q_OBJECT macro. This include is then included
766# by that header, so it must be generated before the UI source gets compiled.
767# @param $mocuihdr UI header file with Q_OBJECT
768define def_qt_gen_inc_mocuihdr
769
770$(eval uisrc := $(PATH_$(target))/ui/$(notdir $(basename $(basename $(mocuihdr)))).cpp)
771$(eval uiobj := $(PATH_$(target)_$$(uisrc))/$(notdir $(basename $$(uisrc)))$(VBOX_SUFF_OBJ))
772$(eval mocuiinc := $(PATH_$(target))/moc/$(notdir $(basename $(mocuihdr))).moc)
773
774$(target)_GENHDRS_REAL += $(mocuiinc)
775
776.NOTPARALLEL: $(mocuiinc)
777$(uisrc): $(mocuiinc)
778$(mocuiinc): $(mocuihdr)
779 $$(call MSG_TOOL,moc,$(target),$(mocuihdr),$$@)
780 $$(QUIET)$$(MKDIR) -p $$(@D)
781 $$(QUIET)$$(VBOX_MOC4) \
782 $(addprefix -D,$($(target)_DEFS)) \
783 $(addprefix -I,$($(target)_INCS)) \
784 -i $(mocuihdr) -o $$@
785
786endef
787
788## Generate a rule to create a header and source files from an UI3
789# definition source (.ui).
790# @param $uifile UI definintion source file
791define def_qt_gen_src_ui3
792
793$(eval uisrc := $(PATH_$(target))/ui/$(notdir $(basename $(uifile))).cpp)
794$(eval uihdr := $(PATH_$(target))/ui/$(notdir $(basename $(uifile))).h)
795$(eval mocsrc := $(PATH_$(target))/moc/moc_$(notdir $(basename $(uifile))).cpp)
796
797$(target)_GENSRCS_REAL += $(uisrc) $(mocsrc)
798$(target)_GENHDRS_REAL += $(uihdr)
799
800.NOTPARALLEL: $(uihdr)
801$(uihdr): $(uifile) | $$(call DIRDEP,$(dir $(uihdr)))
802 $$(call MSG_TOOL,uic,$(target),$(uifile),$$@)
803 $$(QUIET)$$(VBOX_UIC3) $(uifile) -o $$@
804
805$(uisrc): $(uihdr) $(uifile) $(wildcard $(uifile).h) | $$(call DIRDEP,$(dir $(uisrc)))
806 $$(call MSG_TOOL,uic,$(target),$(uifile),$$@)
807 $$(QUIET)$$(VBOX_UIC3) -impl $(uihdr) $(uifile) -o $$@
808
809#$$(QUIET)$$(VBOX_UIC3) $(uifile) -i $(uihdr) -o $$@
810
811$(mocsrc): $(uihdr) | $$(call DIRDEP,$(dir $(mocsrc)))
812 $$(call MSG_TOOL,moc,$(target),$(uihdr),$$@)
813 $$(QUIET)$$(VBOX_MOC4) \
814 $(addprefix -D,$($(target)_DEFS)) \
815 $(addprefix -I,$($(target)_INCS)) \
816 $(uihdr) -o $$@
817
818endef
819
820## Generate a rule to create a header file from an UI4
821# definition source (.ui).
822# @param $uifile UI definintion source file
823define def_qt_gen_src_ui4
824
825$(eval uihdr := $(PATH_$(target))/ui/$(notdir $(basename $(uifile))).gen.h)
826
827$(target)_GENHDRS_REAL += $(uihdr)
828
829.NOTPARALLEL: $(uihdr)
830$(uihdr): $(uifile) | $$(call DIRDEP,$(dir $(uihdr)))
831 $$(call MSG_TOOL,uic,$(target),$(uifile),$$@)
832 $$(QUIET)$$(VBOX_UIC4) $(uifile) -o $$@
833
834# we assume that the generated header is at least included by
835# the normal header with the same name
836include/$(notdir $(basename $(uifile))).h: $(uihdr)
837
838endef
839
840## Generate a rule to create a .qm file from a NLS translation
841# source (.ts).
842# @param $tsfile Translation source file
843define def_qt_gen_nls
844
845$(eval qmfile := $(PATH_$(target))/nls/$(notdir $(basename $(tsfile))).qm)
846
847OTHER_CLEAN += $(qmfile)
848
849# Note that we use -nocompress in lrelease to avoid stripping comments and
850# other information from .qm files. If we don't do that, we get .qm files two
851# times smaller, but QTranslator::findMessage() will start searching for
852# translations in all existing contexts in case if it cannot find it in the
853# original context (which is of course not acceptable, no matter if it's a
854# special Qt "feature" or just a bug).
855
856$(qmfile): $(tsfile) | $$(call DIRDEP,$(dir $(qmfile)))
857 $$(call MSG_TOOLS,lrelease,$(target),$(tsfile),$$@)
858 $$(QUIET)$$(VBOX_LRELEASE4) -nocompress $(tsfile) -qm $$@
859
860endef
861
862## Generate rules for generating the Qt source for a target.
863# @param $target Target name.
864define def_qt_gen_src
865
866# moc srcs from hdrs with Q_OBJECT
867$(foreach mochdr,$($(target)_QT_MOCHDRS),$(eval $(def_qt_gen_src_moc)))
868# moc includes from srcs with Q_OBJECT
869$(foreach mocsrc,$($(target)_QT_MOCSRCS),$(eval $(def_qt_gen_inc_moc)))
870# moc includes from UI headers with Q_OBJECT
871$(foreach mocuihdr,$($(target)_QT_MOCUIHDRS),$(eval $(def_qt_gen_inc_mocuihdr)))
872# UI3 sources
873$(foreach uifile,$($(target)_QT_UISRCS3),$(eval $(def_qt_gen_src_ui3)))
874# UI4 sources
875$(foreach uifile,$($(target)_QT_UISRCS4),$(eval $(def_qt_gen_src_ui4)))
876# NLS files
877$(foreach tsfile,$($(target)_QT_TRANSLATIONS),$(eval $(def_qt_gen_nls)))
878$(foreach tsfile,$($(target)_QT_TRANSLATIONS_QT),$(eval $(def_qt_gen_nls)))
879# dirs
880$$(call DIRDEP,$(PATH_$(target))/ui/) \
881$$(call DIRDEP,$(PATH_$(target))/moc/) \
882$$(call DIRDEP,$(PATH_$(target))/nls/):
883 $$(call MSG_MKDIR,$$@)
884 $$(QUIET)$$(MKDIR) -p $$@
885
886endef
887
888# Generate Qt source rules.
889$(foreach target,VirtualBox,$(eval $(def_qt_gen_src)))
890
891
892# Generate COM Wrappers
893.NOTPARALLEL: $(WRAPPERSFILE) $(WRAPPERSINCFILE)
894
895$(WRAPPERSINCFILE): $(WRAPPERSFILE)
896
897$(WRAPPERSFILE): $(XIDLFILE) $(WRAPPERSTEMPLATE) | $(call DIRDEP,$(PATH_VirtualBox)/include/)
898 $(call MSG_TOOL,xsltproc,VirtualBox,$<,$@)
899 $(QUIET)$(VBOX_XSLTPROC) -o $@ $(WRAPPERSTEMPLATE) $<
900
901$(call DIRDEP,$(PATH_VirtualBox)/include/):
902 $(call MSG_MKDIR,$@)
903 $(QUIET)$(MKDIR) -p $@
904
905# this is actually necessary only for Win32 target with disabled dependencies
906define def_wrapper_deps
907$(src): $(WRAPPERSFILE) $(WRAPPERSINCFILE)
908endef
909
910$(foreach src,$(VirtualBox_SOURCES),$(eval $(def_wrapper_deps)))
911
912# grep the images out of the resource file for dependency tracking
913VirtualBox_QT_IMAGES = $(shell $(SED) '/images/!d;{s/^.*\(images\/.*\)<.*$$/\1/}' VirtualBox.qrc)
914
915$(PATH_VirtualBox)/ui/vbox_image_collection.cpp: VirtualBox.qrc $(VirtualBox_QT_IMAGES)
916 $(call MSG_TOOL,rcc,VirtualBox,$<,$@)
917 $(QUIET)$(VBOX_RCC4) -o $@ $<
918
919VirtualBox_GENSRCS += $(PATH_VirtualBox)/ui/vbox_image_collection.cpp
920
921#
922# Hand made dependencies go here.
923# Basically, here are dependencies for generated UI source files that
924# include generated headers in turn.
925#
926
927# Make all generated UI sources dependent on all generated headers (since they
928# may include them). This is safer than indifidual dependencies above but
929# currently disabled, because will cause all UI sources to be rebuilt one a
930# single one changes.
931#$(patsubst %,$(PATH_VirtualBox)/ui/%.cpp,$(notdir $(basename $(VirtualBox_QT_UISRCS3)))) : $(VirtualBox_GENHDRS)
932
933
934#
935# Custom targets
936#
937
938# Update all known NLS translation (.ts) files in the nls/ subdirectory.
939# NOTE: This target is intened to be run only by the GUI maintainer shortly
940# before a new product release. VirtualBox_xx_YY.ts is a template for new
941# languages and should never be actually translated or installed.
942updatenls: $(VirtualBox_SOURCES) $(VirtualBox_HEADERS)
943 $(call MSG_L1,lupdate all languages (nls/*.ts))
944 $(QUIET)$(VBOX_LUPDATE4) $^ -ts $(VirtualBox_QT_TRANSLATIONS) nls/VirtualBox_xx_YY.ts
945
946
947#
948# Test targets
949#
950
951test:
952 @echo ====================
953 @echo $(VirtualBox_GENSRCS) | $(SED) -e "s/ /\n/g"
954 @echo --------------------
955 @echo $(VirtualBox_GENSRCS_REAL) | $(SED) -e "s/ /\n/g"
956 @echo ====================
957 @echo $(VirtualBox_GENHDRS) | $(SED) -e "s/ /\n/g"
958 @echo --------------------
959 @echo $(VirtualBox_GENHDRS_REAL) | $(SED) -e "s/ /\n/g"
960 @echo ====================
961
962test2:
963 @echo $(OTHER_CLEAN) | $(SED) -e "s/ /\n/g"
964
965test3:
966 @echo $(VirtualBox_HEADERS) | $(SED) -e "s/ /\n/g"
967
968testwrappers: $(WRAPPERSFILE)
969
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