VirtualBox

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

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

2292: Remove license display from .deb:
License Viewer implemented:

  1. If the GUI/LicenseAgreed flag is not presented in the user's VirtualBox.xml configuration file extra-data (or this flag's value is not equal to LicenseX-Y.html file version X-Y) then license file LicenseX-Y.html will be displayed to the user.
  2. If the file in LicenseX-Y.html format (for example, License1-3.html) is not presented in RTPathAppDocs() directory then the error-box will be displayed and application will exit (this will force the user to respect the license in case of license file is not found due to user simple removed this file).
  3. If the user read the license (at least scrolls the license-view to the end) and agreed it then the license viewer will be closed and will never bother the user until another license file with higher license version appears in RTPathAppDocs() directory (for example, License1-4.html).

NOTE: Feature temporary disabled due to License1-3.html file is not defaultly generated to RTPathAppDocs() directory yet.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 17.1 KB
Line 
1# $Id: Makefile.kmk 4572 2007-09-06 13:47: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 as published by the Free Software Foundation,
13# in version 2 as it comes in the "COPYING" file of the VirtualBox OSE
14# distribution. VirtualBox OSE is distributed in the hope that it will
15# be useful, but WITHOUT ANY WARRANTY of any kind.
16
17# include qmake project file
18include VBoxUI.pro
19
20# Import QDesigner UI sources
21VirtualBox_QT_UISRCS := $(FORMS)
22# Import translation sources
23VirtualBox_QT_TRANSLATIONS := $(TRANSLATIONS)
24# Import images
25VirtualBox_QT_IMAGES := $(IMAGES)
26
27# reset things to avoid possible conflicts with kBuild
28TEMPLATE :=
29LANGUAGE :=
30FORMS :=
31TRANSLATIONS :=
32IMAGES :=
33
34DEPTH = ../../../..
35include $(PATH_KBUILD)/header.kmk
36
37PROGRAMS = VirtualBox
38DLLS.linux = VBoxKeyboard
39
40INSTALLS = VirtualBox.nls
41
42VBoxKeyboard_TEMPLATE = VBOXR3
43VBoxKeyboard_SOURCES = \
44 src/linux/keyboard.c
45
46VirtualBox_TEMPLATE = VBOXQTGUIEXE
47VirtualBox_SDKS.win = WINPSDK DXSDK
48VirtualBox_SDKS.linux = LIBSDL
49VirtualBox_SDKS.os2 = LIBSDL
50
51ifeq ($(BUILD_TARGET),darwin)
52# For the launch trick we need different inode numbers.
53VirtualBox_INST = $(INST_BIN)VirtualBox $(INST_BIN)VirtualBoxVM
54endif
55
56# Each nls/VirtualBox_xx_YY.ts file must have a qt_xx_YY.ts counterpart
57VirtualBox_QT_TRANSLATIONS_QT := \
58 $(patsubst nls/VirtualBox_%.ts,nls/qt_%.ts,\
59 $(filter nls/VirtualBox_%.ts,$(VirtualBox_QT_TRANSLATIONS)))
60
61# QDesigner UI sources are imported from VBoxUI.pro as VirtualBox_QT_UISRC
62
63# Headers containing definitions of classes that use the Q_OBJECT macro
64VirtualBox_QT_MOCHDRS = \
65 include/QIWidgetValidator.h \
66 include/QIHotKeyEdit.h \
67 include/QIStatusBar.h \
68 include/QIStateIndicator.h \
69 include/QIMessageBox.h \
70 include/QIRichLabel.h \
71 include/VBoxGlobalSettings.h \
72 include/VBoxUtils.h \
73 include/VBoxGlobal.h \
74 include/VBoxVMListBox.h \
75 include/VBoxMediaComboBox.h \
76 include/VBoxSelectorWnd.h \
77 include/VBoxConsoleWnd.h \
78 include/VBoxConsoleView.h \
79 include/VBoxProblemReporter.h \
80 include/VBoxDownloaderWgt.h
81
82# Sources containing local definitions of classes that use the Q_OBJECT macro
83VirtualBox_QT_MOCSRCS = src/VBoxSelectorWnd.cpp
84ifeq ($(BUILD_TARGET),linux)
85VirtualBox_QT_MOCSRCS += src/VBoxGlobal.cpp
86endif
87ifdef VBOX_WITH_XPCOM
88VirtualBox_QT_MOCSRCS += src/COMDefs.cpp
89endif
90
91# UI headers (ui.h) containing local definitions of classes that use the Q_OBJECT macro
92VirtualBox_QT_MOCUIHDRS = \
93 ui/VBoxVMSettingsDlg.ui.h \
94 ui/VBoxVMLogViewer.ui.h \
95 ui/VBoxSharedFoldersSettings.ui.h
96
97
98# All generated sources. Note: this list MUST be in sync with Qt source
99# generation rules defined somewhere below!
100VirtualBox_GENSRCS = \
101 $(foreach moc,$(notdir $(basename $(VirtualBox_QT_MOCHDRS))), $(PATH_VirtualBox)/moc/moc_$(moc).cpp) \
102 $(foreach ui,$(notdir $(basename $(VirtualBox_QT_UISRCS))), $(PATH_VirtualBox)/ui/$(ui).cpp $(PATH_VirtualBox)/moc/moc_$(ui).cpp) \
103 $(PATH_VirtualBox)/ui/vbox_image_collection.cpp
104
105# All generated headers. Note: this list MUST be in sync with Qt source
106# generation rules defined somewhere below!
107VirtualBox_GENHDRS = \
108 $(foreach mocui,$(notdir $(basename $(VirtualBox_QT_MOCUIHDRS))), $(PATH_VirtualBox)/moc/$(mocui).moc) \
109 $(foreach moc,$(notdir $(basename $(VirtualBox_QT_MOCSRCS))), $(PATH_VirtualBox)/moc/$(moc).moc) \
110 $(foreach ui,$(notdir $(basename $(VirtualBox_QT_UISRCS))), $(PATH_VirtualBox)/ui/$(ui).h)
111
112# All existing .ui.h files for known .ui sources
113VirtualBox_QT_UIHDRS = \
114 $(wildcard $(addsuffix .h,$(VirtualBox_QT_UISRCS)))
115
116# All header files
117VirtualBox_HEADERS = \
118 $(wildcard include/*.h) \
119 $(VirtualBox_GENHDRS) \
120 $(VirtualBox_QT_UIHDRS)
121
122
123VirtualBox_SOURCES = \
124 $(VirtualBox_GENSRCS) \
125 src/main.cpp \
126 src/COMDefs.cpp \
127 src/QIWidgetValidator.cpp \
128 src/QIHotKeyEdit.cpp \
129 src/QIStateIndicator.cpp \
130 src/QIStatusBar.cpp \
131 src/QIMessageBox.cpp \
132 src/QIRichLabel.cpp \
133 src/VBoxDefs.cpp \
134 src/VBoxGlobalSettings.cpp \
135 src/VBoxGlobal.cpp \
136 src/VBoxMediaComboBox.cpp \
137 src/VBoxProblemReporter.cpp \
138 src/VBoxSelectorWnd.cpp \
139 src/VBoxConsoleView.cpp \
140 src/VBoxConsoleWnd.cpp \
141 src/VBoxDownloaderWgt.cpp \
142 src/VBoxVMListBox.cpp \
143 src/VBoxFrameBuffer.cpp \
144 src/HappyHttp.cpp
145
146VirtualBox_SOURCES.win += \
147 src/win32/VirtualBox.rc
148
149VirtualBox_SOURCES.win += \
150 src/VBoxFBDDRAW.cpp
151
152VirtualBox_SOURCES.linux = \
153 src/linux/XKeyboard.cpp
154
155VirtualBox_SOURCES.darwin = \
156 src/darwin/DarwinKeyboard.cpp \
157 src/darwin/DarwinCursor.cpp \
158 src/darwin/VBoxAquaStyle.cpp \
159 src/darwin/VBoxUtils-darwin.cpp
160
161src/HappyHttp.cpp_CXXFLAGS.linux += -fexceptions -O2
162src/HappyHttp.cpp_CXXFLAGS.darwin += -fexceptions
163src/HappyHttp.cpp_CXXFLAGS.os2 += -fexceptions
164src/VBoxDownloaderWgt.cpp_CXXFLAGS.linux += -fexceptions
165src/VBoxDownloaderWgt.cpp_CXXFLAGS.darwin += -fexceptions
166src/VBoxDownloaderWgt.cpp_CXXFLAGS.os2 += -fexceptions
167
168## @todo how to detect what tool is used?
169## @todo GCC3 seems to lack -Wno-missing-base-class-initializer, so we use
170# more generic -Wno-extra
171ifdef VBOX_WITH_XPCOM
172src/COMDefs.cpp_CXXFLAGS = $(VBOX_GCC_Wno-extra)
173endif
174
175VirtualBox_DEFS = VBOX_GUI_SEPARATE_VM_PROCESS
176VirtualBox_DEFS.debug = VBOX_GUI_DEBUG VBOX_CHECK_STATE # QT_FATAL_ASSERT
177VirtualBox_DEFS.darwin = VBOX_GUI_USE_QIMAGE VBOX_WITHOUT_QHTTP
178VirtualBox_DEFS.linux = VBOX_GUI_USE_SDL
179VirtualBox_DEFS.win = VBOX_GUI_USE_QIMAGE UNICODE QT_DLL
180VirtualBox_DEFS.win.amd64 = VBOX_WITHOUT_QHTTP
181VirtualBox_DEFS.os2 = VBOX_GUI_USE_QIMAGE VBOX_GUI_USE_SDL QT_DLL
182#ifndef VBOX_OSE
183 VirtualBox_DEFS.darwin += VBOX_WITH_HACKED_QT
184#endif
185ifneq ($(BUILD_TYPE),release)
186 # non-release builds has some extra features.
187 VirtualBox_DEFS += VBOX_GUI_USE_REFRESH_TIMER
188 VirtualBox_DEFS.win += VBOX_GUI_USE_DDRAW
189 VirtualBox_DEFS.linux += VBOX_GUI_USE_QIMAGE
190endif
191ifdef VBOX_WITH_ALSA
192 VirtualBox_DEFS += VBOX_WITH_ALSA
193endif
194ifdef VBOX_OSE
195 VirtualBox_DEFS += VBOX_OSE
196endif
197ifdef VBOX_WITH_DEBUGGER_GUI
198 VirtualBox_DEFS += VBOX_WITH_DEBUGGER_GUI_MENU
199endif
200
201VirtualBox_INCS = \
202 ./include \
203 $(PATH_VirtualBox)/ui \
204 $(PATH_VirtualBox)/moc \
205 $(PATH_VirtualBox)/include \
206
207
208ifeq ($(BUILD_TYPE),release)
209 VirtualBox_LDFLAGS.win += /SUBSYSTEM:windows
210else
211 VirtualBox_LDFLAGS.linux+= -rdynamic # for backtrace_symbols()
212 ifeq ($(USERNAME),dmik)
213 VirtualBox_LDFLAGS.win += /SUBSYSTEM:windows
214 else
215 VirtualBox_LDFLAGS.win += /SUBSYSTEM:console
216 endif
217endif
218VirtualBox_LDFLAGS.darwin = -framework IOKit
219VirtualBox_LIBS.win = \
220 $(PATH_SDK_WINPSDK_LIB)/Htmlhelp.Lib \
221 $(PATH_SDK_DXSDK_LIB)/ddraw.lib \
222 $(PATH_SDK_DXSDK_LIB)/dxguid.lib
223VirtualBox_LIBS.linux = $(PATH_DLL)/VBoxKeyboard$(VBOX_SUFF_DLL)
224
225
226ifdef VBOX_WITH_DEBUGGER_GUI
227 ifeq ($(BUILD_TARGET),win)
228 VirtualBox_LIBS += $(PATH_LIB)/VBoxDbg$(VBOX_SUFF_LIB)
229 else
230 VirtualBox_LIBS += $(PATH_DLL)/VBoxDbg$(VBOX_SUFF_DLL)
231 endif
232endif
233
234WRAPPERSFILE = $(PATH_VirtualBox)/include/COMWrappers.h
235WRAPPERSINCFILE = include/COMDefs.h
236WRAPPERSTEMPLATE = include/COMWrappers.xsl
237XIDLFILE = ../../Main/idl/VirtualBox.xidl
238
239
240# generated files we need to clean manually
241OTHER_CLEAN = \
242 $(VirtualBox_GENSRCS) \
243 $(VirtualBox_GENHDRS) \
244 $(WRAPPERSFILE)
245
246
247#
248# On Mac OS X (darwin) we need to install icon resources and compusory bundle contents.
249#
250INSTALLS.darwin += VirtualBox.app
251VirtualBox.app_INST = $(INST_VIRTUALBOX)Contents/
252VirtualBox.app_MODE = 644
253VirtualBox.app_SOURCES = \
254 src/darwin/PkgInfo \
255 $(PATH_TARGET)/Info.plist \
256 images/VirtualBox.icns=>Resources/virtualbox.icns
257
258$(PATH_TARGET)/Info.plist: src/darwin/Info.plist $(VBOX_VERSION_MK) | $(call DIRDEP,$(PATH_TARGET))
259 $(call MSG_GENERATE,VirtualBox.app,$<,$@)
260 $(QUIET)$(RM) -f $@
261 $(QUIET)$(SED) \
262 -e 's/@VBOX_VERSION_STRING@/$(VBOX_VERSION_STRING)/g' \
263 -e 's/@VBOX_VERSION_MAJOR@/$(VBOX_VERSION_MAJOR)/g' \
264 -e 's/@VBOX_VERSION_MINOR@/$(VBOX_VERSION_MINOR)/g' \
265 -e 's/@VBOX_VERSION_BUILD@/$(VBOX_VERSION_BUILD)/g' \
266 $< > $@
267
268INSTALLS.darwin += VirtualBoxVM.app
269VirtualBoxVM.app_INST = $(VirtualBox.app_INST)Resources/VirtualBoxVM.app/Contents/
270VirtualBoxVM.app_MODE = 644
271VirtualBoxVM.app_SOURCES = \
272 src/darwin/VM-PkgInfo=>PkgInfo \
273 $(PATH_TARGET)/VM-Info.plist=>Info.plist \
274 images/VirtualBox.icns=>Resources/virtualbox.icns
275VirtualBoxVM.app_SYMLINKS = \
276 MacOS=>../../../MacOS/
277
278$(PATH_TARGET)/VM-Info.plist: src/darwin/VM-Info.plist $(VBOX_VERSION_MK) | $(call DIRDEP,$(PATH_TARGET))
279 $(call MSG_GENERATE,VirtualBoxVM.app,$<,$@)
280 $(QUIET)$(RM) -f $@
281 $(QUIET)$(SED) \
282 -e 's/@VBOX_VERSION_STRING@/$(VBOX_VERSION_STRING)/g' \
283 -e 's/@VBOX_VERSION_MAJOR@/$(VBOX_VERSION_MAJOR)/g' \
284 -e 's/@VBOX_VERSION_MINOR@/$(VBOX_VERSION_MINOR)/g' \
285 -e 's/@VBOX_VERSION_BUILD@/$(VBOX_VERSION_BUILD)/g' \
286 $< > $@
287
288#
289# Translation installation
290#
291
292VirtualBox.nls_INST = $(INST_BIN)nls/
293VirtualBox.nls_SOURCES = $(patsubst %.ts,$(PATH_VirtualBox)/nls/%.qm,$(notdir $(VirtualBox_QT_TRANSLATIONS)))
294VirtualBox.nls_SOURCES += $(patsubst %.ts,$(PATH_VirtualBox)/nls/%.qm,$(notdir $(VirtualBox_QT_TRANSLATIONS_QT)))
295VirtualBox.nls_MODE = 644
296
297
298#
299# Testcase for the darwin keyboard routines.
300#
301ifdef VBOX_WITH_TESTCASES
302PROGRAMS.darwin += tstDarwinKeyboard
303tstDarwinKeyboard_TEMPLATE = VBOXR3TSTEXE
304tstDarwinKeyboard_INCS = include
305tstDarwinKeyboard_SOURCES = \
306 src/darwin/tstDarwinKeyboard.cpp \
307 src/darwin/DarwinKeyboard.cpp
308tstDarwinKeyboard_LDFLAGS = -framework IOKit -framework Carbon
309tstDarwinKeyboard_LIBS = \
310 $(LIB_RUNTIME)
311endif
312
313
314
315# Commit the magic.
316# (note: before custom rules that make usage of generated variables!).
317include $(PATH_KBUILD)/footer.kmk
318
319
320
321#
322# Qt source file generation rules
323#
324
325## @todo move QT source generation macros to kBuild
326
327## Generate a rule to create a MOC source file from a header containing
328# classes that use the Q_OBJECT macro.
329# @param $mochdr header file with Q_OBJECT
330define def_qt_gen_src_moc
331
332$(eval mocsrc := $(PATH_$(target))/moc/moc_$(notdir $(basename $(mochdr))).cpp)
333
334$(target)_GENSRCS_REAL += $(mocsrc)
335
336$(mocsrc): $(mochdr)
337 $$(call MSG_TOOL,moc,$(target),$(mochdr),$$@)
338 $$(QUIET)$$(MKDIR) -p $$(@D)
339 $$(QUIET)$$(VBOX_MOC) $(mochdr) -o $$@
340
341endef
342
343## Generate a rule to create a MOC include file from a source containing
344# local classes that use the Q_OBJECT macro. This include is then included
345# by that source, so it must be generated before the source gets compiled.
346# @param $mocsrc source file with Q_OBJECT
347define def_qt_gen_inc_moc
348
349$(eval mocobj := $(PATH_$(target)_$(mocsrc))/$(notdir $(basename $(mocsrc)))$(VBOX_SUFF_OBJ))
350$(eval mocinc := $(PATH_$(target))/moc/$(notdir $(basename $(mocsrc))).moc)
351
352$(target)_GENHDRS_REAL += $(mocinc)
353
354$(mocobj): $(mocinc)
355
356.NOTPARALLEL: $(mocinc)
357$(mocinc): $(mocsrc)
358 $$(call MSG_TOOL,moc,$(target),$(mocsrc),$$@)
359 $$(QUIET)$$(MKDIR) -p $$(@D)
360 $$(QUIET)$$(VBOX_MOC) -i $(mocsrc) -o $$@
361
362endef
363
364## Generate a rule to create a MOC include file from a UI header (ui.h) containing
365# local classes that use the Q_OBJECT macro. This include is then included
366# by that header, so it must be generated before the UI source gets compiled.
367# @param $mocuihdr UI header file with Q_OBJECT
368define def_qt_gen_inc_mocuihdr
369
370$(eval uisrc := $(PATH_$(target))/ui/$(notdir $(basename $(basename $(mocuihdr)))).cpp)
371$(eval uiobj := $(PATH_$(target)_$$(uisrc))/$(notdir $(basename $$(uisrc)))$(VBOX_SUFF_OBJ))
372$(eval mocuiinc := $(PATH_$(target))/moc/$(notdir $(basename $(mocuihdr))).moc)
373
374$(target)_GENHDRS_REAL += $(mocuiinc)
375
376.NOTPARALLEL: $(mocuiinc)
377$(uisrc): $(mocuiinc)
378$(mocuiinc): $(mocuihdr)
379 $$(call MSG_TOOL,moc,$(target),$(mocuihdr),$$@)
380 $$(QUIET)$$(MKDIR) -p $$(@D)
381 $$(QUIET)$$(VBOX_MOC) -i $(mocuihdr) -o $$@
382
383endef
384
385## Generate a rule to create a header and source files from an UI
386# definition source (.ui).
387# @param $uifile UI definintion source file
388define def_qt_gen_src_ui
389
390$(eval uisrc := $(PATH_$(target))/ui/$(notdir $(basename $(uifile))).cpp)
391$(eval uihdr := $(PATH_$(target))/ui/$(notdir $(basename $(uifile))).h)
392$(eval mocsrc := $(PATH_$(target))/moc/moc_$(notdir $(basename $(uifile))).cpp)
393
394$(target)_GENSRCS_REAL += $(uisrc) $(mocsrc)
395$(target)_GENHDRS_REAL += $(uihdr)
396
397.NOTPARALLEL: $(uihdr)
398$(uihdr): $(uifile) | $$(call DIRDEP,$(dir $(uihdr)))
399 $$(call MSG_TOOL,uic,$(target),$(uifile),$$@)
400 $$(QUIET)$$(VBOX_UIC) $(uifile) -o $$@
401
402$(uisrc): $(uihdr) $(uifile) $(wildcard $(uifile).h) | $$(call DIRDEP,$(dir $(uisrc)))
403 $$(call MSG_TOOL,uic,$(target),$(uifile),$$@)
404 $$(QUIET)$$(VBOX_UIC) $(uifile) -i $(uihdr) -o $$@
405
406$(mocsrc): $(uihdr) | $$(call DIRDEP,$(dir $(mocsrc)))
407 $$(call MSG_TOOL,moc,$(target),$(uihdr),$$@)
408 $$(QUIET)$$(VBOX_MOC) $(uihdr) -o $$@
409
410endef
411
412## Generate a rule to create a .qm file from a NLS translation
413# source (.ts).
414# @param $tsfile Translation source file
415define def_qt_gen_nls
416
417$(eval qmfile := $(PATH_$(target))/nls/$(notdir $(basename $(tsfile))).qm)
418
419OTHER_CLEAN += $(qmfile)
420
421# Note that we use -nocompress in lrelease to avoid stripping comments and
422# other information from .qm files. If we don't do that, we get .qm files two
423# times smaller, but QTranslator::findMessage() will start searching for
424# translations in all existing contexts in case if it cannot find it in the
425# original context (which is of course not acceptable, no matter if it's a
426# special Qt "feature" or just a bug).
427
428$(qmfile): $(tsfile) | $$(call DIRDEP,$(dir $(qmfile)))
429 $$(call MSG_TOOLS,lrelease,$(target),$(tsfile),$$@)
430 $$(QUIET)$$(VBOX_LRELEASE) -nocompress $(tsfile) -qm $$@
431
432endef
433
434## Generate rules for generating the Qt source for a target.
435# @param $target Target name.
436define def_qt_gen_src
437
438# moc srcs from hdrs with Q_OBJECT
439$(foreach mochdr,$($(target)_QT_MOCHDRS),$(eval $(def_qt_gen_src_moc)))
440# moc includes from srcs with Q_OBJECT
441$(foreach mocsrc,$($(target)_QT_MOCSRCS),$(eval $(def_qt_gen_inc_moc)))
442# moc includes from UI headers with Q_OBJECT
443$(foreach mocuihdr,$($(target)_QT_MOCUIHDRS),$(eval $(def_qt_gen_inc_mocuihdr)))
444# UI sources
445$(foreach uifile,$($(target)_QT_UISRCS),$(eval $(def_qt_gen_src_ui)))
446# NLS files
447$(foreach tsfile,$($(target)_QT_TRANSLATIONS),$(eval $(def_qt_gen_nls)))
448$(foreach tsfile,$($(target)_QT_TRANSLATIONS_QT),$(eval $(def_qt_gen_nls)))
449# dirs
450$$(call DIRDEP,$(PATH_$(target))/ui/) \
451$$(call DIRDEP,$(PATH_$(target))/moc/) \
452$$(call DIRDEP,$(PATH_$(target))/nls/):
453 $$(call MSG_MKDIR,$$@)
454 $$(QUIET)$$(MKDIR) -p $$@
455
456endef
457
458# Generate Qt source rules.
459$(foreach target,VirtualBox,$(eval $(def_qt_gen_src)))
460
461
462# Generate COM Wrappers
463.NOTPARALLEL: $(WRAPPERSFILE) $(WRAPPERSINCFILE)
464
465$(WRAPPERSINCFILE): $(WRAPPERSFILE)
466
467$(WRAPPERSFILE): $(XIDLFILE) $(WRAPPERSTEMPLATE) | $(call DIRDEP,$(PATH_VirtualBox)/include/)
468 $(call MSG_TOOL,xsltproc,VirtualBox,$<,$@)
469 $(QUIET)$(VBOX_XSLTPROC) -o $@ $(WRAPPERSTEMPLATE) $<
470
471$(call DIRDEP,$(PATH_VirtualBox)/include/):
472 $(call MSG_MKDIR,$@)
473 $(QUIET)$(MKDIR) -p $@
474
475# this is actually necessary only for Win32 target with disabled dependencies
476define def_wrapper_deps
477$(src): $(WRAPPERSFILE) $(WRAPPERSINCFILE)
478endef
479
480$(foreach src,$(VirtualBox_SOURCES),$(eval $(def_wrapper_deps)))
481
482# static images imported from VBoxUI.pro as VirtualBox_QT_IMAGES
483
484$(PATH_VirtualBox)/ui/vbox_image_collection.txt: VBoxUI.pro $(VirtualBox_QT_IMAGES)
485 @echo " \
486 $(VirtualBox_QT_IMAGES) \
487 " > $@
488
489$(PATH_VirtualBox)/ui/vbox_image_collection.cpp: $(PATH_VirtualBox)/ui/vbox_image_collection.txt
490 $(call MSG_TOOL,uic,VirtualBox,$<,$@)
491 $(QUIET)$(VBOX_UIC) -o $@ -embed VBoxGUI -f $<
492
493VirtualBox_GENSRCS += $(PATH_VirtualBox)/ui/vbox_image_collection.cpp
494OTHER_CLEAN += $(PATH_VirtualBox)/ui/vbox_image_collection.txt
495
496
497#
498# Hand made dependencies go here.
499# Basically, here are dependencies for generated UI source files that
500# include generated headers in turn.
501#
502
503$(PATH_VirtualBox)/ui/VBoxDiskImageManagerDlg.cpp: \
504 $(PATH_VirtualBox)/ui/VBoxNewHDWzd.h
505
506# Make all generated UI sources dependent on all generated headers (since they
507# may include them). This is safer than indifidual dependencies above but
508# currently disabled, because will cause all UI sources to be rebuilt one a
509# single one changes.
510#$(patsubst %,$(PATH_VirtualBox)/ui/%.cpp,$(notdir $(basename $(VirtualBox_QT_UISRCS)))) : $(VirtualBox_GENHDRS)
511
512
513#
514# Custom targets
515#
516
517# Update all known NLS translation (.ts) files in the nls/ subdirectory.
518# NOTE: This target is intened to be run only by the GUI maintainer shortly
519# before a new product release. VirtualBox_xx_YY.ts is a template for new
520# languages and should never be actually translated or installed.
521updatenls: $(VirtualBox_SOURCES) $(VirtualBox_HEADERS)
522 $(call MSG_L1,lupdate all languages (nls/*.ts))
523 $(QUIET)$(VBOX_LUPDATE) $^ -ts $(VirtualBox_QT_TRANSLATIONS) nls/VirtualBox_xx_YY.ts
524
525
526#
527# Test targets
528#
529
530test:
531 @echo ====================
532 @echo $(VirtualBox_GENSRCS) | $(SED) -e "s/ /\n/g"
533 @echo --------------------
534 @echo $(VirtualBox_GENSRCS_REAL) | $(SED) -e "s/ /\n/g"
535 @echo ====================
536 @echo $(VirtualBox_GENHDRS) | $(SED) -e "s/ /\n/g"
537 @echo --------------------
538 @echo $(VirtualBox_GENHDRS_REAL) | $(SED) -e "s/ /\n/g"
539 @echo ====================
540
541test2:
542 @echo $(OTHER_CLEAN) | $(SED) -e "s/ /\n/g"
543
544test3:
545 @echo $(VirtualBox_HEADERS) | $(SED) -e "s/ /\n/g"
546
547testwrappers: $(WRAPPERSFILE)
548
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