VirtualBox

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

Last change on this file since 7767 was 7727, checked in by vboxsync, 17 years ago

VBoxSnapshotsWgt ported qt3=>qt4.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 30.8 KB
Line 
1# $Id: Makefile.kmk 7727 2008-04-03 15:18:22Z 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
289VirtualBox_QT_UISRCS3 := $(filter-out ui/VBoxSnapshotsWgt.ui,$(VirtualBox_QT_UISRCS3))
290VirtualBox_QT_UISRCS4 += ui/VBoxSnapshotsWgt.ui
291
292#
293# The targets.
294#
295PROGRAMS = VirtualBox
296ifeq ($(filter-out freebsd linux openbsd netbsd solaris,$(BUILD_TARGET)),) # X11
297DLLS = VBoxKeyboard
298OTHERS = $(PATH_BIN)/vboxkeyboard.tar.gz
299endif
300INSTALLS = VirtualBox.nls
301
302ifeq ($(BUILD_TARGET),os2)
303 DLLS += VBoxHlp
304 ifneq ($(strip $(VBOX_DLL_QT)),)
305 INSTALLS += qt.dll
306 qt.dll_INST = $(INST_BIN)
307 qt.dll_SOURCES += \
308 $(VBOX_DLL_QT)=>$(not-dir $(VBOX_DLL_QT))
309 endif
310endif
311
312
313#
314# VBoxHlp - helper DLL for OS/2.
315#
316VBoxHlp_ASTOOL = NASM
317VBoxHlp_ASFLAGS = -f obj
318VBoxHlp_DEFS = IN_RING3 IN_VBOXHLP
319VBoxHlp_CXXFLAGS = -fno-exceptions
320VBoxHlp_LDFLAGS = -nostdlib -los2
321VBoxHlp_LDFLAGS += -Zlinker option -Zlinker manyautodata
322VBoxHlp_SOURCES = \
323 src/os2/VBoxHlp.asm \
324 src/os2/VBoxHlp.cpp
325
326
327#
328# VBoxKeyboard - keyboard library for X11.
329#
330VBoxKeyboard_TEMPLATE = VBOXR3
331VBoxKeyboard_SOURCES = \
332 src/linux/keyboard-new.c
333VBoxKeyboard_TARSOURCES = \
334 $(VBoxKeyboard_SOURCES) \
335 src/linux/COPYING.LIB \
336 src/linux/keyboard.h \
337 src/linux/keyboard-layouts.h \
338 src/linux/keyboard-list.h \
339 src/linux/keyboard-tables.h \
340 src/linux/Makefile
341VBoxKeyboard_LIBS = X11
342VBoxKeyboard_LIBPATH = $(VBOX_LIBPATH_X11)
343
344
345#
346# vboxkeyboard.tar.gz - the LGPLed keyboard library must always be
347# redistributed with usable sources.
348#
349SOURCE_DIRECTORY = vboxkeyboard
350DIRECTORY_PREFIX = src/linux/
351
352$(PATH_TARGET)/$(SOURCE_DIRECTORY):
353 $(MKDIR) -p $(@D)
354 $(LN_SYMLINK) $(abspath $(PATH_CURRENT))/$(DIRECTORY_PREFIX) $@
355
356$(PATH_BIN)/vboxkeyboard.tar.gz: $(VBoxKeyboard_TARSOURCES) $(PATH_TARGET)/$(SOURCE_DIRECTORY)
357 $(call MSG_TOOL,tar/gzip,,$@)
358 $(QUIET)cd $(PATH_TARGET) && tar -chf - $(addprefix $(SOURCE_DIRECTORY)/,$(subst $(DIRECTORY_PREFIX),,$(VBoxKeyboard_TARSOURCES))) | gzip - > $@
359
360
361#
362# VirtualBox - The GUI program.
363#
364VirtualBox_TEMPLATE = VBOXQT4GUIEXE
365VirtualBox_NAME = VirtualBox4
366VirtualBox_SDKS.win = WINPSDK DXSDK
367#ifeq ($(filter-out freebsd linux netbsd openbsd os2 solaris,$(BUILD_TARGET)),) - later
368ifeq ($(filter-out freebsd linux netbsd openbsd os2,$(BUILD_TARGET)),) # X11 + os2
369VirtualBox_SDKS += LIBSDL
370endif
371
372ifeq ($(BUILD_TARGET),darwin)
373# For the launch trick we need different inode numbers.
374VirtualBox_INST = $(INST_BIN)VirtualBox4 $(INST_BIN)VirtualBoxVM4
375
376 # For testing iChat Theater stuff change
377 # the sdk path
378 ifdef VBOX_WITH_ICHAT_THEATER
379 VBOX_PATH_MACOSX_SDK = /Developer/SDKs/MacOSX10.5.sdk
380 endif
381
382endif
383
384ifndef VBOX_OSE
385ifeq ($(filter-out freebsd linux netbsd openbsd solaris,$(BUILD_TARGET)),) # linux only, yea, right.
386# Note: I'm doing this right here because the GUI will _not_ run
387# without that file which might be annoying for developers!
388$(VBOX_LICENSE_BIN): $(VBOX_LICENSE_SRC)
389 $(call MSG_GENERATE,,$@)
390 $(QUIET)$(CP) $< $@
391
392$(PATH_BIN)/VirtualBox: $(VBOX_LICENSE_BIN)
393endif
394endif
395
396# Each nls/VirtualBox_xx_YY.ts file must have a qt_xx_YY.ts counterpart
397VirtualBox_QT_TRANSLATIONS_QT := \
398 $(patsubst nls/VirtualBox_%.ts,nls/qt_%.ts,\
399 $(filter nls/VirtualBox_%.ts,$(VirtualBox_QT_TRANSLATIONS)))
400
401# QDesigner UI sources are imported from VBoxUI.pro as VirtualBox_QT_UISRC
402
403# Headers containing definitions of classes that use the Q_OBJECT macro
404VirtualBox_QT_MOCHDRS = \
405 include/QIWidgetValidator.h \
406 include/QIHotKeyEdit.h \
407 include/QIStatusBar.h \
408 include/QIStateIndicator.h \
409 include/QIMessageBox.h \
410 include/QIRichLabel.h \
411 include/QIAbstractWizard.h \
412 include/QIAbstractDialog.h \
413 include/VBoxGlobalSettings.h \
414 include/VBoxUtils.h \
415 include/VBoxGlobal.h \
416 include/VBoxVMListBox.h \
417 include/VBoxMediaComboBox.h \
418 include/VBoxSelectorWnd.h \
419 include/VBoxConsoleWnd.h \
420 include/VBoxConsoleView.h \
421 include/VBoxProblemReporter.h \
422 include/VBoxDownloaderWgt.h \
423 include/VBoxNetworkFramework.h \
424 include/VBoxAboutDlg.h \
425 include/VBoxCloseVMDlg.h \
426 include/VBoxNewVMWzd.h \
427 include/VBoxNewHDWzd.h \
428 include/VBoxVMFirstRunWzd.h \
429 include/VBoxRegistrationDlg.h \
430 include/VBoxSharedFoldersSettings.h \
431 include/VBoxSnapshotDetailsDlg.h \
432 include/VBoxVMInformationDlg.h \
433 include/VBoxTakeSnapshotDlg.h \
434 include/VBoxSnapshotsWgt.h
435
436# Sources containing local definitions of classes that use the Q_OBJECT macro
437VirtualBox_QT_MOCSRCS = src/VBoxSelectorWnd.cpp
438ifeq ($(filter-out freebsd linux netbsd openbsd solaris,$(BUILD_TARGET)),) # X11
439VirtualBox_QT_MOCSRCS += src/VBoxGlobal.cpp
440endif
441ifdef VBOX_WITH_XPCOM
442VirtualBox_QT_MOCSRCS += src/COMDefs.cpp
443endif
444
445# UI headers (ui.h) containing local definitions of classes that use the Q_OBJECT macro
446VirtualBox_QT_MOCUIHDRS = \
447 ui/VBoxVMSettingsDlg.ui.h \
448 ui/VBoxVMLogViewer.ui.h
449
450
451# All generated sources. Note: this list MUST be in sync with Qt source
452# generation rules defined somewhere below!
453VirtualBox_GENSRCS = \
454 $(foreach moc,$(notdir $(basename $(VirtualBox_QT_MOCHDRS))), $(PATH_VirtualBox)/moc/moc_$(moc).cpp) \
455 $(foreach ui,$(notdir $(basename $(VirtualBox_QT_UISRCS3))), $(PATH_VirtualBox)/ui/$(ui).cpp $(PATH_VirtualBox)/moc/moc_$(ui).cpp) \
456 $(PATH_VirtualBox)/ui/vbox_image_collection.cpp
457
458# All generated headers. Note: this list MUST be in sync with Qt source
459# generation rules defined somewhere below!
460VirtualBox_GENHDRS = \
461 $(foreach mocui,$(notdir $(basename $(VirtualBox_QT_MOCUIHDRS))), $(PATH_VirtualBox)/moc/$(mocui).moc) \
462 $(foreach moc,$(notdir $(basename $(VirtualBox_QT_MOCSRCS))), $(PATH_VirtualBox)/moc/$(moc).moc) \
463 $(foreach ui,$(notdir $(basename $(VirtualBox_QT_UISRCS3))), $(PATH_VirtualBox)/ui/$(ui).h) \
464 $(foreach ui,$(notdir $(basename $(VirtualBox_QT_UISRCS4))), $(PATH_VirtualBox)/ui/$(ui).gen.h)
465
466# All existing .ui.h files for known .ui sources
467VirtualBox_QT_UIHDRS = \
468 $(wildcard $(addsuffix .h,$(VirtualBox_QT_UISRCS3)))
469
470# All header files
471VirtualBox_HEADERS = \
472 $(wildcard include/*.h) \
473 $(VirtualBox_GENHDRS) \
474 $(VirtualBox_QT_UIHDRS)
475
476
477VirtualBox_SOURCES = \
478 $(VirtualBox_GENSRCS) \
479 src/main.cpp \
480 src/COMDefs.cpp \
481 src/QIWidgetValidator.cpp \
482 src/QIHotKeyEdit.cpp \
483 src/QIStateIndicator.cpp \
484 src/QIStatusBar.cpp \
485 src/QIMessageBox.cpp \
486 src/QIRichLabel.cpp \
487 src/QIAbstractWizard.cpp \
488 src/QIAbstractDialog.cpp \
489 src/VBoxDefs.cpp \
490 src/VBoxGlobalSettings.cpp \
491 src/VBoxGlobal.cpp \
492 src/VBoxMediaComboBox.cpp \
493 src/VBoxProblemReporter.cpp \
494 src/VBoxSelectorWnd.cpp \
495 src/VBoxConsoleView.cpp \
496 src/VBoxConsoleWnd.cpp \
497 src/VBoxDownloaderWgt.cpp \
498 src/VBoxVMListBox.cpp \
499 src/VBoxFrameBuffer.cpp \
500 src/HappyHttp.cpp \
501 src/VBoxNetworkFramework.cpp \
502 src/VBoxAboutDlg.cpp \
503 src/VBoxCloseVMDlg.cpp \
504 src/VBoxNewVMWzd.cpp \
505 src/VBoxNewHDWzd.cpp \
506 src/VBoxVMFirstRunWzd.cpp \
507 src/VBoxRegistrationDlg.cpp \
508 src/VBoxSharedFoldersSettings.cpp \
509 src/VBoxSnapshotDetailsDlg.cpp \
510 src/VBoxVMInformationDlg.cpp \
511 src/VBoxTakeSnapshotDlg.cpp \
512 src/VBoxSnapshotsWgt.cpp
513
514ifeq ($(filter-out freebsd linux netbsd openbsd solaris,$(BUILD_TARGET)),) # X11
515VirtualBox_SOURCES += \
516 src/linux/XKeyboard-new.cpp
517endif
518
519VirtualBox_SOURCES.win += \
520 src/win32/VirtualBox.rc
521
522VirtualBox_SOURCES.win += \
523 src/VBoxFBDDRAW.cpp
524
525VirtualBox_SOURCES.darwin = \
526 src/darwin/DarwinKeyboard.cpp \
527 src/darwin/DarwinCursor.cpp \
528 src/darwin/VBoxUtils-darwin.cpp \
529 src/VBoxFBQuartz2D.cpp
530# src/darwin/VBoxAquaStyle.cpp \
531
532ifdef VBOX_WITH_ICHAT_THEATER
533 VirtualBox_SOURCES.darwin += \
534 src/darwin/VBoxIChatTheaterWrapper.m
535endif
536
537ifneq ($(BUILD_TARGET),win)
538src/HappyHttp.cpp_CXXFLAGS += -fexceptions
539src/VBoxDownloaderWgt.cpp_CXXFLAGS += -fexceptions
540src/VBoxNetworkFramework.cpp_CXXFLAGS += -fexceptions
541endif
542src/HappyHttp.cpp_CXXFLAGS.linux += -O2
543
544## @todo how to detect what tool is used?
545## @todo GCC3 seems to lack -Wno-missing-base-class-initializer, so we use
546# more generic -Wno-extra
547ifdef VBOX_WITH_XPCOM
548src/COMDefs.cpp_CXXFLAGS = $(VBOX_GCC_Wno-extra)
549endif
550
551VirtualBox_DEFS = VBOX_GUI_SEPARATE_VM_PROCESS
552VirtualBox_DEFS.debug = VBOX_GUI_DEBUG VBOX_CHECK_STATE # QT_FATAL_ASSERT
553VirtualBox_DEFS.darwin = VBOX_GUI_USE_QUARTZ2D VBOX_GUI_USE_QIMAGE VBOX_WITHOUT_QHTTP
554VirtualBox_DEFS.freebsd = VBOX_GUI_USE_QIMAGE VBOX_GUI_USE_SDL
555VirtualBox_DEFS.linux = VBOX_GUI_USE_SDL
556VirtualBox_DEFS.netbsd = VBOX_GUI_USE_QIMAGE VBOX_GUI_USE_SDL
557VirtualBox_DEFS.openbsd = VBOX_GUI_USE_QIMAGE VBOX_GUI_USE_SDL
558VirtualBox_DEFS.os2 = VBOX_GUI_USE_QIMAGE VBOX_GUI_USE_SDL QT_DLL
559VirtualBox_DEFS.solaris = VBOX_GUI_USE_QIMAGE #VBOX_GUI_USE_SDL
560VirtualBox_DEFS.win = VBOX_GUI_USE_QIMAGE UNICODE QT_DLL
561VirtualBox_DEFS.win.amd64 = VBOX_WITHOUT_QHTTP
562#ifndef VBOX_OSE
563 VirtualBox_DEFS.darwin += VBOX_WITH_HACKED_QT
564#endif
565ifdef VBOX_WITH_ICHAT_THEATER
566 VirtualBox_DEFS.darwin += VBOX_WITH_ICHAT_THEATER
567endif
568ifneq ($(BUILD_TYPE),release)
569 # non-release builds has some extra features.
570 VirtualBox_DEFS.win += VBOX_GUI_USE_DDRAW
571 VirtualBox_DEFS.linux += VBOX_GUI_USE_QIMAGE
572endif
573ifdef VBOX_WITH_REGISTRATION
574 VirtualBox_DEFS += VBOX_WITH_REGISTRATION
575endif
576ifdef VBOX_WITH_REGISTRATION_REQUEST
577 VirtualBox_DEFS += VBOX_WITH_REGISTRATION_REQUEST
578endif
579ifdef VBOX_WITH_ALSA
580 VirtualBox_DEFS += VBOX_WITH_ALSA
581endif
582ifdef VBOX_WITH_PULSE
583 VirtualBox_DEFS += VBOX_WITH_PULSE
584endif
585ifdef VBOX_OSE
586 VirtualBox_DEFS += VBOX_OSE
587endif
588ifdef VBOX_WITH_DEBUGGER_GUI
589 VirtualBox_DEFS += VBOX_WITH_DEBUGGER_GUI_MENU
590endif
591
592VirtualBox_INCS = \
593 ./include \
594 $(PATH_VirtualBox)/ui \
595 $(PATH_VirtualBox)/moc \
596 $(PATH_VirtualBox)/include \
597
598
599ifeq ($(BUILD_TYPE),release)
600 VirtualBox_LDFLAGS.win += /SUBSYSTEM:windows
601else
602 VirtualBox_LDFLAGS.linux+= -rdynamic # for backtrace_symbols()
603 ifeq ($(USERNAME),dmik)
604 VirtualBox_LDFLAGS.win += /SUBSYSTEM:windows
605 else
606 VirtualBox_LDFLAGS.win += /SUBSYSTEM:console
607 endif
608endif
609VirtualBox_LDFLAGS.os2 = -Zlinker /PM:PM -Zno-fork
610VirtualBox_LDFLAGS.darwin = -framework IOKit -framework AppKit -framework ApplicationServices -framework Foundation -lz
611ifdef VBOX_WITH_ICHAT_THEATER
612 VirtualBox_LDFLAGS.darwin += -framework InstantMessage -framework QuartzCore
613endif
614VirtualBox_LIBS.win = \
615 $(PATH_SDK_WINPSDK_LIB)/Htmlhelp.Lib \
616 $(PATH_SDK_DXSDK_LIB)/ddraw.lib \
617 $(PATH_SDK_DXSDK_LIB)/dxguid.lib
618VirtualBox_LIBS.os2 += $(PATH_DLL)/VBoxHlp$(VBOX_SUFF_DLL)
619ifeq ($(filter-out freebsd linux netbsd openbsd solaris,$(BUILD_TARGET)),) # X11
620VirtualBox_LIBS += $(PATH_DLL)/VBoxKeyboard$(VBOX_SUFF_DLL)
621endif
622
623
624ifdef VBOX_WITH_DEBUGGER_GUI ## @todo make this dynamically loadable and ship with release builds too.
625 ifeq ($(BUILD_TARGET),win)
626 VirtualBox_LIBS += $(PATH_LIB)/VBoxDbg$(VBOX_SUFF_LIB)
627 else
628 VirtualBox_LIBS += $(PATH_DLL)/VBoxDbg$(VBOX_SUFF_DLL)
629 endif
630endif
631
632WRAPPERSFILE = $(PATH_VirtualBox)/include/COMWrappers.h
633WRAPPERSINCFILE = include/COMDefs.h
634WRAPPERSTEMPLATE = include/COMWrappers.xsl
635XIDLFILE = ../../Main/idl/VirtualBox.xidl
636
637
638# generated files we need to clean manually
639OTHER_CLEAN = \
640 $(VirtualBox_GENSRCS) \
641 $(VirtualBox_GENHDRS) \
642 $(WRAPPERSFILE) \
643 $(PATH_BIN)/vboxkeyboard.tar.gz
644
645
646#
647# On Mac OS X (darwin) we need to install icon resources and compusory bundle contents.
648#
649INSTALLS.darwin += VirtualBox.app
650VirtualBox.app_INST = $(INST_VIRTUALBOX)Contents/
651VirtualBox.app_MODE = 644
652VirtualBox.app_SOURCES = \
653 src/darwin/PkgInfo \
654 $(PATH_TARGET)/Info.plist \
655 images/VirtualBox.icns=>Resources/virtualbox.icns
656
657$(PATH_TARGET)/Info.plist: src/darwin/Info.plist $(VBOX_VERSION_MK) | $(call DIRDEP,$(PATH_TARGET))
658 $(call MSG_GENERATE,VirtualBox.app,$<,$@)
659 $(QUIET)$(RM) -f $@
660 $(QUIET)$(SED) \
661 -e 's/@VBOX_VERSION_STRING@/$(VBOX_VERSION_STRING)/g' \
662 -e 's/@VBOX_VERSION_MAJOR@/$(VBOX_VERSION_MAJOR)/g' \
663 -e 's/@VBOX_VERSION_MINOR@/$(VBOX_VERSION_MINOR)/g' \
664 -e 's/@VBOX_VERSION_BUILD@/$(VBOX_VERSION_BUILD)/g' \
665 $< > $@
666
667INSTALLS.darwin += VirtualBoxVM.app
668VirtualBoxVM.app_INST = $(VirtualBox.app_INST)Resources/VirtualBoxVM.app/Contents/
669VirtualBoxVM.app_MODE = 644
670VirtualBoxVM.app_SOURCES = \
671 src/darwin/VM-PkgInfo=>PkgInfo \
672 $(PATH_TARGET)/VM-Info.plist=>Info.plist \
673 images/VirtualBox.icns=>Resources/virtualbox.icns
674VirtualBoxVM.app_SYMLINKS = \
675 MacOS=>../../../MacOS/
676
677$(PATH_TARGET)/VM-Info.plist: src/darwin/VM-Info.plist $(VBOX_VERSION_MK) | $(call DIRDEP,$(PATH_TARGET))
678 $(call MSG_GENERATE,VirtualBoxVM.app,$<,$@)
679 $(QUIET)$(RM) -f $@
680 $(QUIET)$(SED) \
681 -e 's/@VBOX_VERSION_STRING@/$(VBOX_VERSION_STRING)/g' \
682 -e 's/@VBOX_VERSION_MAJOR@/$(VBOX_VERSION_MAJOR)/g' \
683 -e 's/@VBOX_VERSION_MINOR@/$(VBOX_VERSION_MINOR)/g' \
684 -e 's/@VBOX_VERSION_BUILD@/$(VBOX_VERSION_BUILD)/g' \
685 --output $@ $<
686
687#
688# Translation installation
689#
690VirtualBox.nls_INST = $(INST_BIN)nls/
691VirtualBox.nls_SOURCES = $(patsubst %.ts,$(PATH_VirtualBox)/nls/%.qm,$(notdir $(VirtualBox_QT_TRANSLATIONS)))
692VirtualBox.nls_SOURCES += $(patsubst %.ts,$(PATH_VirtualBox)/nls/%.qm,$(notdir $(VirtualBox_QT_TRANSLATIONS_QT)))
693VirtualBox.nls_MODE = 644
694
695
696#
697# Testcase for the darwin keyboard routines.
698#
699ifdef VBOX_WITH_TESTCASES
700PROGRAMS.darwin += tstDarwinKeyboard
701tstDarwinKeyboard_TEMPLATE = VBOXR3TSTEXE
702tstDarwinKeyboard_INCS = include
703tstDarwinKeyboard_SOURCES = \
704 src/darwin/tstDarwinKeyboard.cpp \
705 src/darwin/DarwinKeyboard.cpp
706tstDarwinKeyboard_LDFLAGS = -framework IOKit -framework Carbon
707tstDarwinKeyboard_LIBS = \
708 $(LIB_RUNTIME)
709endif
710
711
712
713# Commit the magic.
714# (note: before custom rules that make usage of generated variables!).
715include $(PATH_KBUILD)/footer.kmk
716
717
718
719#
720# Qt source file generation rules
721#
722
723## @todo move QT source generation macros to kBuild
724
725## Generate a rule to create a MOC source file from a header containing
726# classes that use the Q_OBJECT macro.
727# @param $mochdr header file with Q_OBJECT
728define def_qt_gen_src_moc
729
730$(eval mocsrc := $(PATH_$(target))/moc/moc_$(notdir $(basename $(mochdr))).cpp)
731
732$(target)_GENSRCS_REAL += $(mocsrc)
733
734$(mocsrc): $(mochdr)
735 $$(call MSG_TOOL,moc,$(target),$(mochdr),$$@)
736 $$(QUIET)$$(MKDIR) -p $$(@D)
737 $$(QUIET)$$(VBOX_MOC4) \
738 $(addprefix -D,$($(target)_DEFS)) \
739 $(addprefix -I,$($(target)_INCS)) \
740 $(mochdr) -o $$@
741
742endef
743
744## Generate a rule to create a MOC include file from a source containing
745# local classes that use the Q_OBJECT macro. This include is then included
746# by that source, so it must be generated before the source gets compiled.
747# @param $mocsrc source file with Q_OBJECT
748define def_qt_gen_inc_moc
749
750$(eval mocobj := $(PATH_$(target)_$(mocsrc))/$(notdir $(basename $(mocsrc)))$(VBOX_SUFF_OBJ))
751$(eval mocinc := $(PATH_$(target))/moc/$(notdir $(basename $(mocsrc))).moc)
752
753$(target)_GENHDRS_REAL += $(mocinc)
754
755$(mocobj): $(mocinc)
756
757.NOTPARALLEL: $(mocinc)
758$(mocinc): $(mocsrc)
759 $$(call MSG_TOOL,moc,$(target),$(mocsrc),$$@)
760 $$(QUIET)$$(MKDIR) -p $$(@D)
761 $$(QUIET)$$(VBOX_MOC4) \
762 $(addprefix -D,$($(target)_DEFS)) \
763 $(addprefix -I,$($(target)_INCS)) \
764 -i $(mocsrc) -o $$@
765
766endef
767
768## Generate a rule to create a MOC include file from a UI header (ui.h) containing
769# local classes that use the Q_OBJECT macro. This include is then included
770# by that header, so it must be generated before the UI source gets compiled.
771# @param $mocuihdr UI header file with Q_OBJECT
772define def_qt_gen_inc_mocuihdr
773
774$(eval uisrc := $(PATH_$(target))/ui/$(notdir $(basename $(basename $(mocuihdr)))).cpp)
775$(eval uiobj := $(PATH_$(target)_$$(uisrc))/$(notdir $(basename $$(uisrc)))$(VBOX_SUFF_OBJ))
776$(eval mocuiinc := $(PATH_$(target))/moc/$(notdir $(basename $(mocuihdr))).moc)
777
778$(target)_GENHDRS_REAL += $(mocuiinc)
779
780.NOTPARALLEL: $(mocuiinc)
781$(uisrc): $(mocuiinc)
782$(mocuiinc): $(mocuihdr)
783 $$(call MSG_TOOL,moc,$(target),$(mocuihdr),$$@)
784 $$(QUIET)$$(MKDIR) -p $$(@D)
785 $$(QUIET)$$(VBOX_MOC4) \
786 $(addprefix -D,$($(target)_DEFS)) \
787 $(addprefix -I,$($(target)_INCS)) \
788 -i $(mocuihdr) -o $$@
789
790endef
791
792## Generate a rule to create a header and source files from an UI3
793# definition source (.ui).
794# @param $uifile UI definintion source file
795define def_qt_gen_src_ui3
796
797$(eval uisrc := $(PATH_$(target))/ui/$(notdir $(basename $(uifile))).cpp)
798$(eval uihdr := $(PATH_$(target))/ui/$(notdir $(basename $(uifile))).h)
799$(eval mocsrc := $(PATH_$(target))/moc/moc_$(notdir $(basename $(uifile))).cpp)
800
801$(target)_GENSRCS_REAL += $(uisrc) $(mocsrc)
802$(target)_GENHDRS_REAL += $(uihdr)
803
804.NOTPARALLEL: $(uihdr)
805$(uihdr): $(uifile) | $$(call DIRDEP,$(dir $(uihdr)))
806 $$(call MSG_TOOL,uic,$(target),$(uifile),$$@)
807 $$(QUIET)$$(VBOX_UIC3) $(uifile) -o $$@
808
809$(uisrc): $(uihdr) $(uifile) $(wildcard $(uifile).h) | $$(call DIRDEP,$(dir $(uisrc)))
810 $$(call MSG_TOOL,uic,$(target),$(uifile),$$@)
811 $$(QUIET)$$(VBOX_UIC3) -impl $(uihdr) $(uifile) -o $$@
812
813#$$(QUIET)$$(VBOX_UIC3) $(uifile) -i $(uihdr) -o $$@
814
815$(mocsrc): $(uihdr) | $$(call DIRDEP,$(dir $(mocsrc)))
816 $$(call MSG_TOOL,moc,$(target),$(uihdr),$$@)
817 $$(QUIET)$$(VBOX_MOC4) \
818 $(addprefix -D,$($(target)_DEFS)) \
819 $(addprefix -I,$($(target)_INCS)) \
820 $(uihdr) -o $$@
821
822endef
823
824## Generate a rule to create a header file from an UI4
825# definition source (.ui).
826# @param $uifile UI definintion source file
827define def_qt_gen_src_ui4
828
829$(eval uihdr := $(PATH_$(target))/ui/$(notdir $(basename $(uifile))).gen.h)
830
831$(target)_GENHDRS_REAL += $(uihdr)
832
833.NOTPARALLEL: $(uihdr)
834$(uihdr): $(uifile) | $$(call DIRDEP,$(dir $(uihdr)))
835 $$(call MSG_TOOL,uic,$(target),$(uifile),$$@)
836 $$(QUIET)$$(VBOX_UIC4) $(uifile) -o $$@
837
838# we assume that the generated header is at least included by
839# the normal header with the same name
840include/$(notdir $(basename $(uifile))).h: $(uihdr)
841
842endef
843
844## Generate a rule to create a .qm file from a NLS translation
845# source (.ts).
846# @param $tsfile Translation source file
847define def_qt_gen_nls
848
849$(eval qmfile := $(PATH_$(target))/nls/$(notdir $(basename $(tsfile))).qm)
850
851OTHER_CLEAN += $(qmfile)
852
853# Note that we use -nocompress in lrelease to avoid stripping comments and
854# other information from .qm files. If we don't do that, we get .qm files two
855# times smaller, but QTranslator::findMessage() will start searching for
856# translations in all existing contexts in case if it cannot find it in the
857# original context (which is of course not acceptable, no matter if it's a
858# special Qt "feature" or just a bug).
859
860$(qmfile): $(tsfile) | $$(call DIRDEP,$(dir $(qmfile)))
861 $$(call MSG_TOOLS,lrelease,$(target),$(tsfile),$$@)
862 $$(QUIET)$$(VBOX_LRELEASE4) -nocompress $(tsfile) -qm $$@
863
864endef
865
866## Generate rules for generating the Qt source for a target.
867# @param $target Target name.
868define def_qt_gen_src
869
870# moc srcs from hdrs with Q_OBJECT
871$(foreach mochdr,$($(target)_QT_MOCHDRS),$(eval $(def_qt_gen_src_moc)))
872# moc includes from srcs with Q_OBJECT
873$(foreach mocsrc,$($(target)_QT_MOCSRCS),$(eval $(def_qt_gen_inc_moc)))
874# moc includes from UI headers with Q_OBJECT
875$(foreach mocuihdr,$($(target)_QT_MOCUIHDRS),$(eval $(def_qt_gen_inc_mocuihdr)))
876# UI3 sources
877$(foreach uifile,$($(target)_QT_UISRCS3),$(eval $(def_qt_gen_src_ui3)))
878# UI4 sources
879$(foreach uifile,$($(target)_QT_UISRCS4),$(eval $(def_qt_gen_src_ui4)))
880# NLS files
881$(foreach tsfile,$($(target)_QT_TRANSLATIONS),$(eval $(def_qt_gen_nls)))
882$(foreach tsfile,$($(target)_QT_TRANSLATIONS_QT),$(eval $(def_qt_gen_nls)))
883# dirs
884$$(call DIRDEP,$(PATH_$(target))/ui/) \
885$$(call DIRDEP,$(PATH_$(target))/moc/) \
886$$(call DIRDEP,$(PATH_$(target))/nls/):
887 $$(call MSG_MKDIR,$$@)
888 $$(QUIET)$$(MKDIR) -p $$@
889
890endef
891
892# Generate Qt source rules.
893$(foreach target,VirtualBox,$(eval $(def_qt_gen_src)))
894
895
896# Generate COM Wrappers
897.NOTPARALLEL: $(WRAPPERSFILE) $(WRAPPERSINCFILE)
898
899$(WRAPPERSINCFILE): $(WRAPPERSFILE)
900
901$(WRAPPERSFILE): $(XIDLFILE) $(WRAPPERSTEMPLATE) | $(call DIRDEP,$(PATH_VirtualBox)/include/)
902 $(call MSG_TOOL,xsltproc,VirtualBox,$<,$@)
903 $(QUIET)$(VBOX_XSLTPROC) -o $@ $(WRAPPERSTEMPLATE) $<
904
905$(call DIRDEP,$(PATH_VirtualBox)/include/):
906 $(call MSG_MKDIR,$@)
907 $(QUIET)$(MKDIR) -p $@
908
909# this is actually necessary only for Win32 target with disabled dependencies
910define def_wrapper_deps
911$(src): $(WRAPPERSFILE) $(WRAPPERSINCFILE)
912endef
913
914$(foreach src,$(VirtualBox_SOURCES),$(eval $(def_wrapper_deps)))
915
916# grep the images out of the resource file for dependency tracking
917VirtualBox_QT_IMAGES = $(shell $(SED) '/images/!d;{s/^.*\(images\/.*\)<.*$$/\1/}' VirtualBox.qrc)
918
919$(PATH_VirtualBox)/ui/vbox_image_collection.cpp: VirtualBox.qrc $(VirtualBox_QT_IMAGES)
920 $(call MSG_TOOL,rcc,VirtualBox,$<,$@)
921 $(QUIET)$(VBOX_RCC4) -o $@ $<
922
923VirtualBox_GENSRCS += $(PATH_VirtualBox)/ui/vbox_image_collection.cpp
924
925#
926# Hand made dependencies go here.
927# Basically, here are dependencies for generated UI source files that
928# include generated headers in turn.
929#
930
931# Make all generated UI sources dependent on all generated headers (since they
932# may include them). This is safer than indifidual dependencies above but
933# currently disabled, because will cause all UI sources to be rebuilt one a
934# single one changes.
935#$(patsubst %,$(PATH_VirtualBox)/ui/%.cpp,$(notdir $(basename $(VirtualBox_QT_UISRCS3)))) : $(VirtualBox_GENHDRS)
936
937
938#
939# Custom targets
940#
941
942# Update all known NLS translation (.ts) files in the nls/ subdirectory.
943# NOTE: This target is intened to be run only by the GUI maintainer shortly
944# before a new product release. VirtualBox_xx_YY.ts is a template for new
945# languages and should never be actually translated or installed.
946updatenls: $(VirtualBox_SOURCES) $(VirtualBox_HEADERS)
947 $(call MSG_L1,lupdate all languages (nls/*.ts))
948 $(QUIET)$(VBOX_LUPDATE4) $^ -ts $(VirtualBox_QT_TRANSLATIONS) nls/VirtualBox_xx_YY.ts
949
950
951#
952# Test targets
953#
954
955test:
956 @echo ====================
957 @echo $(VirtualBox_GENSRCS) | $(SED) -e "s/ /\n/g"
958 @echo --------------------
959 @echo $(VirtualBox_GENSRCS_REAL) | $(SED) -e "s/ /\n/g"
960 @echo ====================
961 @echo $(VirtualBox_GENHDRS) | $(SED) -e "s/ /\n/g"
962 @echo --------------------
963 @echo $(VirtualBox_GENHDRS_REAL) | $(SED) -e "s/ /\n/g"
964 @echo ====================
965
966test2:
967 @echo $(OTHER_CLEAN) | $(SED) -e "s/ /\n/g"
968
969test3:
970 @echo $(VirtualBox_HEADERS) | $(SED) -e "s/ /\n/g"
971
972testwrappers: $(WRAPPERSFILE)
973
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