1 | # $Id: Makefile.kmk 14092 2008-11-11 13:52:09Z vboxsync $
|
---|
2 | ## @file
|
---|
3 | # Makefile for the VirtualBox Qt3 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 |
|
---|
22 | SUB_DEPTH = ../../../..
|
---|
23 | include $(KBUILD_PATH)/subheader.kmk
|
---|
24 |
|
---|
25 | #
|
---|
26 | # Globals.
|
---|
27 | #
|
---|
28 | VBOX_PATH_VIRTUALBOX3_SRC := $(PATH_SUB_CURRENT)
|
---|
29 | VBOX_WITH_REGISTRATION := 1
|
---|
30 | VBOX_WITH_REGISTRATION_REQUEST := 1
|
---|
31 |
|
---|
32 |
|
---|
33 | #
|
---|
34 | # The targets.
|
---|
35 | #
|
---|
36 | ifdef VBOX_WITH_HARDENING
|
---|
37 | PROGRAMS += VirtualBox3Hardened
|
---|
38 | DLLS += VirtualBox
|
---|
39 | else
|
---|
40 | PROGRAMS += VirtualBox
|
---|
41 | endif
|
---|
42 | ifeq ($(filter-out freebsd linux openbsd netbsd solaris,$(KBUILD_TARGET)),) # X11
|
---|
43 | DLLS += VBoxKeyboard3
|
---|
44 | OTHERS += $(PATH_BIN)/vboxkeyboard3.tar.gz
|
---|
45 | endif
|
---|
46 | DLLS.os2 += VBoxHlp
|
---|
47 |
|
---|
48 |
|
---|
49 | ifeq ($(KBUILD_TARGET),os2)
|
---|
50 | #
|
---|
51 | # VBoxHlp - helper DLL for OS/2.
|
---|
52 | #
|
---|
53 | VBoxHlp_ASTOOL = NASM
|
---|
54 | VBoxHlp_ASFLAGS = -f obj
|
---|
55 | VBoxHlp_DEFS = IN_RING3 IN_VBOXHLP
|
---|
56 | VBoxHlp_CXXFLAGS = -fno-exceptions
|
---|
57 | VBoxHlp_LDFLAGS = -nostdlib -los2
|
---|
58 | VBoxHlp_LDFLAGS += -Zlinker option -Zlinker manyautodata
|
---|
59 | VBoxHlp_SOURCES = \
|
---|
60 | src/os2/VBoxHlp.asm \
|
---|
61 | src/os2/VBoxHlp.cpp
|
---|
62 |
|
---|
63 | #
|
---|
64 | # Hack for installing the qt.dll when building for OS/2.
|
---|
65 | #
|
---|
66 | ifneq ($(strip $(DLL_SDK_QT3_QT)),)
|
---|
67 | INSTALLS.os2 += qt.dll
|
---|
68 | qt.dll_INST = $(INST_BIN)
|
---|
69 | qt.dll_SOURCES += \
|
---|
70 | $(DLL_SDK_QT3_QT)=>$(not-dir $(DLL_SDK_QT3_QT))
|
---|
71 | endif
|
---|
72 | endif # OS/2
|
---|
73 |
|
---|
74 |
|
---|
75 | #
|
---|
76 | # VBoxKeyboard3 - keyboard library for X11.
|
---|
77 | #
|
---|
78 | VBoxKeyboard3_TEMPLATE = VBOXR3
|
---|
79 | VBoxKeyboard3_SOURCES = \
|
---|
80 | src/linux/keyboard-new.c
|
---|
81 | VBoxKeyboard3_TARSOURCES = \
|
---|
82 | $(VBoxKeyboard3_SOURCES) \
|
---|
83 | src/linux/COPYING.LIB \
|
---|
84 | src/linux/keyboard.h \
|
---|
85 | src/linux/keyboard-layouts.h \
|
---|
86 | src/linux/keyboard-list.h \
|
---|
87 | src/linux/keyboard-tables.h \
|
---|
88 | src/linux/keyboard-types.h \
|
---|
89 | src/linux/Makefile
|
---|
90 | VBoxKeyboard3_LIBS = X11
|
---|
91 | VBoxKeyboard3_LIBPATH = $(VBOX_LIBPATH_X11)
|
---|
92 |
|
---|
93 |
|
---|
94 | #
|
---|
95 | # vboxkeyboard3.tar.gz - the LGPLed keyboard library must always be
|
---|
96 | # redistributed with usable sources.
|
---|
97 | #
|
---|
98 | SOURCE_DIRECTORY = vboxkeyboard3
|
---|
99 | DIRECTORY_PREFIX = src/linux/
|
---|
100 |
|
---|
101 | $(PATH_TARGET)/$(SOURCE_DIRECTORY): | $$(dir $@)
|
---|
102 | $(LN_SYMLINK) $(abspath $(VBOX_PATH_VIRTUALBOX3_SRC))/$(DIRECTORY_PREFIX) $@
|
---|
103 |
|
---|
104 | $(PATH_BIN)/vboxkeyboard3.tar.gz: $(abspathex $(VBoxKeyboard3_TARSOURCES),$(PATH_SUB_CURRENT)) $(PATH_TARGET)/$(SOURCE_DIRECTORY)
|
---|
105 | $(call MSG_TOOL,tar/gzip,,$@)
|
---|
106 | $(QUIET)cd $(PATH_TARGET) \
|
---|
107 | && tar -cvhf - $(addprefix $(SOURCE_DIRECTORY)/,$(subst $(DIRECTORY_PREFIX),,$(VBoxKeyboard3_TARSOURCES))) \
|
---|
108 | | gzip - > $@
|
---|
109 |
|
---|
110 | OTHER_CLEAN += \
|
---|
111 | $(PATH_BIN)/vboxkeyboard3.tar.gz \
|
---|
112 | $(PATH_TARGET)/$(SOURCE_DIRECTORY)
|
---|
113 |
|
---|
114 |
|
---|
115 | #
|
---|
116 | # Hardened VirtualBox3.
|
---|
117 | #
|
---|
118 | VirtualBox3Hardened_TEMPLATE = VBOXR3HARDENEDEXE
|
---|
119 | VirtualBox3Hardened_SOURCES = src/hardenedmain.cpp
|
---|
120 | VirtualBox3Hardened_NAME = VirtualBox3
|
---|
121 | ifeq ($(KBUILD_TARGET),darwin) ## @todo use .darwin when ticket 36 has been fixed.
|
---|
122 | #VirtualBox3Hardened_INST.darwin = $(INST_BIN)VirtualBox3 $(INST_BIN)VirtualBoxVM3
|
---|
123 | VirtualBox3Hardened_INST = $(INST_BIN)VirtualBox3 $(INST_BIN)VirtualBoxVM3
|
---|
124 | endif
|
---|
125 |
|
---|
126 |
|
---|
127 | #
|
---|
128 | # Include Qt project file, we'll use FORMS, TRANSLATIONS and IMAGES
|
---|
129 | # in the VirtualBox(3) setup below.
|
---|
130 | #
|
---|
131 | SAVED_TEMPLATE := $(TEMPLATE)
|
---|
132 | include $(PATH_SUB_CURRENT)/VBoxUI.pro
|
---|
133 |
|
---|
134 |
|
---|
135 | # Import images from VBoxUI.pro and add some additional ones
|
---|
136 | # that differs between OSE and PEUL.
|
---|
137 | VirtualBox_QT_IMAGES := $(IMAGES)
|
---|
138 | ifdef VBOX_OSE
|
---|
139 | VirtualBox_QT_IMAGES += \
|
---|
140 | images/OSE/about.png \
|
---|
141 | images/OSE/about_tile.png \
|
---|
142 | images/OSE/about_16px.png \
|
---|
143 | images/OSE/VirtualBox_16px.png \
|
---|
144 | images/OSE/VirtualBox_20px.png \
|
---|
145 | images/OSE/VirtualBox_32px.png \
|
---|
146 | images/OSE/VirtualBox_40px.png \
|
---|
147 | images/OSE/VirtualBox_48px.png \
|
---|
148 | images/OSE/VirtualBox_64px.png \
|
---|
149 | images/OSE/VirtualBox_cube_42px.png
|
---|
150 | else
|
---|
151 | VirtualBox_QT_IMAGES += \
|
---|
152 | images/NonOSE/about.png \
|
---|
153 | images/NonOSE/about_16px.png \
|
---|
154 | images/NonOSE/VirtualBox_16px.png \
|
---|
155 | images/NonOSE/VirtualBox_20px.png \
|
---|
156 | images/NonOSE/VirtualBox_32px.png \
|
---|
157 | images/NonOSE/VirtualBox_40px.png \
|
---|
158 | images/NonOSE/VirtualBox_48px.png \
|
---|
159 | images/NonOSE/VirtualBox_64px.png \
|
---|
160 | images/NonOSE/VirtualBox_cube_42px.png
|
---|
161 | endif
|
---|
162 | VirtualBox_QT_IMAGES := $(abspathex $(VirtualBox_QT_IMAGES),$(PATH_SUB_CURRENT))
|
---|
163 |
|
---|
164 |
|
---|
165 |
|
---|
166 | #
|
---|
167 | # VirtualBox - The GUI program.
|
---|
168 | #
|
---|
169 | VirtualBox_TEMPLATE := $(if $(VBOX_WITH_HARDENING),VBOXQTGUI,VBOXQTGUIEXE)
|
---|
170 | VirtualBox_NAME = VirtualBox3
|
---|
171 | ifndef VBOX_WITH_HARDENING # For the launch trick we need different inode numbers.
|
---|
172 | ifeq ($(KBUILD_TARGET),darwin) ## @todo use .darwin when ticket 36 has been fixed.
|
---|
173 | #VirtualBox_INST.darwin = $(INST_BIN)VirtualBox3 $(INST_BIN)VirtualBoxVM3
|
---|
174 | VirtualBox_INST = $(INST_BIN)VirtualBox3 $(INST_BIN)VirtualBoxVM3
|
---|
175 | endif
|
---|
176 | endif
|
---|
177 | USES += qt3
|
---|
178 | VirtualBox_USES = qt3
|
---|
179 | VirtualBox_SDKS += QT3
|
---|
180 | VirtualBox_QTTOOL = QT3
|
---|
181 | VirtualBox_SDKS.win = WINPSDK DXSDK
|
---|
182 | #ifeq ($(filter-out freebsd linux netbsd openbsd os2 solaris,$(KBUILD_TARGET)),) - later
|
---|
183 | ifeq ($(filter-out freebsd linux netbsd openbsd os2,$(KBUILD_TARGET)),) # X11 + os2
|
---|
184 | VirtualBox_SDKS += LIBSDL
|
---|
185 | endif
|
---|
186 |
|
---|
187 | # For testing iChat Theater stuff change the sdk path (HACK ALERT)
|
---|
188 | ifdef VBOX_WITH_ICHAT_THEATER
|
---|
189 | VBOX_PATH_MACOSX_SDK = /Developer/SDKs/MacOSX10.5.sdk
|
---|
190 | endif
|
---|
191 |
|
---|
192 | # Import translation sources
|
---|
193 | VirtualBox_QT_TRANSLATIONS := $(TRANSLATIONS) \
|
---|
194 | $(patsubst nls/VirtualBox_%.ts,nls/qt_%.ts, $(filter nls/VirtualBox_%.ts,$(TRANSLATIONS)))
|
---|
195 | VirtualBox_LRCFLAGS = -nocompress
|
---|
196 | VirtualBox_QT_TRANSLATIONS_INST = $(INST_BIN)nls3/
|
---|
197 |
|
---|
198 | # QDesigner UI sources are imported from VBoxUI.pro.
|
---|
199 | ## @todo move down.
|
---|
200 | ifndef VBOX_WITH_REGISTRATION
|
---|
201 | FORMS := $(filter-out ui/VBoxRegistrationDlg.ui,$(FORMS))
|
---|
202 | endif
|
---|
203 | # OSE version is always necessary for lupdate/lrelease
|
---|
204 | FORMS += ui/VBoxAboutDlg.ui
|
---|
205 | $(eval VirtualBox_SOURCES += $(FORMS) )
|
---|
206 |
|
---|
207 | # Headers containing definitions of classes that use the Q_OBJECT macro
|
---|
208 | VirtualBox_QT_MOCHDRS = \
|
---|
209 | include/QIWidgetValidator.h \
|
---|
210 | include/QIHotKeyEdit.h \
|
---|
211 | include/QIStatusBar.h \
|
---|
212 | include/QIStateIndicator.h \
|
---|
213 | include/QIMessageBox.h \
|
---|
214 | include/QIRichLabel.h \
|
---|
215 | include/VBoxGlobalSettings.h \
|
---|
216 | include/VBoxUtils.h \
|
---|
217 | include/VBoxGlobal.h \
|
---|
218 | include/VBoxVMListBox.h \
|
---|
219 | include/VBoxMediaComboBox.h \
|
---|
220 | include/VBoxSelectorWnd.h \
|
---|
221 | include/VBoxConsoleWnd.h \
|
---|
222 | include/VBoxConsoleView.h \
|
---|
223 | include/VBoxProblemReporter.h \
|
---|
224 | include/VBoxDownloaderWgt.h \
|
---|
225 | include/VBoxNetworkFramework.h
|
---|
226 |
|
---|
227 | # Sources containing local definitions of classes that use the Q_OBJECT macro
|
---|
228 | VirtualBox_QT_MOCSRCS = src/VBoxSelectorWnd.cpp
|
---|
229 | ifeq ($(filter-out freebsd linux netbsd openbsd solaris,$(KBUILD_TARGET)),) # X11
|
---|
230 | VirtualBox_QT_MOCSRCS += src/VBoxGlobal.cpp
|
---|
231 | endif
|
---|
232 | ifdef VBOX_WITH_XPCOM
|
---|
233 | VirtualBox_QT_MOCSRCS += src/COMDefs.cpp
|
---|
234 | endif
|
---|
235 |
|
---|
236 | # UI headers (ui.h) containing local definitions of classes that use the Q_OBJECT macro
|
---|
237 | ## @todo move up
|
---|
238 | VirtualBox_QT_MOCSRCS += \
|
---|
239 | ui/VBoxVMSettingsDlg.ui.h \
|
---|
240 | ui/VBoxVMLogViewer.ui.h \
|
---|
241 | ui/VBoxSharedFoldersSettings.ui.h \
|
---|
242 | ui/VBoxHardDiskSettings.ui.h
|
---|
243 |
|
---|
244 | VirtualBox_SOURCES += \
|
---|
245 | src/main.cpp \
|
---|
246 | src/COMDefs.cpp \
|
---|
247 | src/QIWidgetValidator.cpp \
|
---|
248 | src/QIHotKeyEdit.cpp \
|
---|
249 | src/QIStateIndicator.cpp \
|
---|
250 | src/QIStatusBar.cpp \
|
---|
251 | src/QIMessageBox.cpp \
|
---|
252 | src/QIRichLabel.cpp \
|
---|
253 | src/VBoxDefs.cpp \
|
---|
254 | src/VBoxGlobalSettings.cpp \
|
---|
255 | src/VBoxGlobal.cpp \
|
---|
256 | src/VBoxMediaComboBox.cpp \
|
---|
257 | src/VBoxProblemReporter.cpp \
|
---|
258 | src/VBoxSelectorWnd.cpp \
|
---|
259 | src/VBoxConsoleView.cpp \
|
---|
260 | src/VBoxConsoleWnd.cpp \
|
---|
261 | src/VBoxDownloaderWgt.cpp \
|
---|
262 | src/VBoxVMListBox.cpp \
|
---|
263 | src/VBoxFrameBuffer.cpp \
|
---|
264 | src/HappyHttp.cpp \
|
---|
265 | src/VBoxNetworkFramework.cpp
|
---|
266 |
|
---|
267 | ifeq ($(filter-out freebsd linux netbsd openbsd solaris,$(KBUILD_TARGET)),) # X11
|
---|
268 | VirtualBox_SOURCES += \
|
---|
269 | src/linux/XKeyboard-new.cpp
|
---|
270 | endif
|
---|
271 |
|
---|
272 | VirtualBox_SOURCES.win += \
|
---|
273 | src/VBoxFBDDRAW.cpp \
|
---|
274 | $(PATH_VirtualBox)/VirtualBox.rc
|
---|
275 |
|
---|
276 | VirtualBox_SOURCES.darwin = \
|
---|
277 | src/darwin/DarwinKeyboard.cpp \
|
---|
278 | src/darwin/DarwinCursor.cpp \
|
---|
279 | src/darwin/VBoxAquaStyle.cpp \
|
---|
280 | src/darwin/VBoxUtils-darwin.cpp \
|
---|
281 | src/VBoxFBQuartz2D.cpp
|
---|
282 |
|
---|
283 | ifdef VBOX_WITH_ICHAT_THEATER
|
---|
284 | VirtualBox_SOURCES.darwin += \
|
---|
285 | src/darwin/VBoxIChatTheaterWrapper.m
|
---|
286 | endif
|
---|
287 |
|
---|
288 | ifndef VBOX_OSE
|
---|
289 | VirtualBox_SOURCES += src/VBoxAboutNonOSEDlg.cpp
|
---|
290 | VirtualBox_QT_MOCHDRS += include/VBoxAboutNonOSEDlg.h
|
---|
291 | endif
|
---|
292 |
|
---|
293 | VirtualBox_DEFS = VBOX_GUI_SEPARATE_VM_PROCESS
|
---|
294 | VirtualBox_DEFS.debug = VBOX_GUI_DEBUG VBOX_CHECK_STATE # QT_FATAL_ASSERT
|
---|
295 | VirtualBox_DEFS.darwin = VBOX_GUI_USE_QUARTZ2D VBOX_GUI_USE_QIMAGE VBOX_WITHOUT_QHTTP
|
---|
296 | VirtualBox_DEFS.freebsd = VBOX_GUI_USE_QIMAGE VBOX_GUI_USE_SDL
|
---|
297 | VirtualBox_DEFS.linux = VBOX_GUI_USE_QIMAGE #VBOX_GUI_USE_SDL
|
---|
298 | VirtualBox_DEFS.netbsd = VBOX_GUI_USE_QIMAGE VBOX_GUI_USE_SDL
|
---|
299 | VirtualBox_DEFS.openbsd = VBOX_GUI_USE_QIMAGE VBOX_GUI_USE_SDL
|
---|
300 | VirtualBox_DEFS.os2 = VBOX_GUI_USE_QIMAGE VBOX_GUI_USE_SDL QT_DLL
|
---|
301 | VirtualBox_DEFS.solaris = VBOX_GUI_USE_QIMAGE #VBOX_GUI_USE_SDL
|
---|
302 | VirtualBox_DEFS.win = VBOX_GUI_USE_QIMAGE UNICODE QT_DLL
|
---|
303 | VirtualBox_DEFS.win.amd64 = VBOX_WITHOUT_QHTTP
|
---|
304 | #ifndef VBOX_OSE
|
---|
305 | VirtualBox_DEFS.darwin += VBOX_WITH_HACKED_QT
|
---|
306 | #endif
|
---|
307 | ifdef VBOX_WITH_ICHAT_THEATER
|
---|
308 | VirtualBox_DEFS.darwin += VBOX_WITH_ICHAT_THEATER
|
---|
309 | endif
|
---|
310 | ifneq ($(KBUILD_TYPE),release)
|
---|
311 | # non-release builds has some extra features.
|
---|
312 | VirtualBox_DEFS.win += VBOX_GUI_USE_DDRAW
|
---|
313 | VirtualBox_DEFS.linux += VBOX_GUI_USE_QIMAGE
|
---|
314 | endif
|
---|
315 | ifdef VBOX_WITH_REGISTRATION
|
---|
316 | VirtualBox_DEFS += VBOX_WITH_REGISTRATION
|
---|
317 | endif
|
---|
318 | ifdef VBOX_WITH_REGISTRATION_REQUEST
|
---|
319 | VirtualBox_DEFS += VBOX_WITH_REGISTRATION_REQUEST
|
---|
320 | endif
|
---|
321 | ifdef VBOX_WITH_ALSA
|
---|
322 | VirtualBox_DEFS += VBOX_WITH_ALSA
|
---|
323 | endif
|
---|
324 | ifdef VBOX_WITH_PULSE
|
---|
325 | VirtualBox_DEFS += VBOX_WITH_PULSE
|
---|
326 | endif
|
---|
327 | ifdef VBOX_WITH_E1000
|
---|
328 | VirtualBox_DEFS += VBOX_WITH_E1000
|
---|
329 | endif
|
---|
330 | ifdef VBOX_WITH_DEBUGGER_GUI
|
---|
331 | VirtualBox_DEFS += VBOX_WITH_DEBUGGER_GUI_MENU
|
---|
332 | endif
|
---|
333 | ifdef VBOX_WITH_NETFLT
|
---|
334 | VirtualBox_DEFS += VBOX_WITH_NETFLT
|
---|
335 | endif
|
---|
336 |
|
---|
337 | VirtualBox_INCS = \
|
---|
338 | . \
|
---|
339 | ./include \
|
---|
340 | $(PATH_VirtualBox)/include
|
---|
341 |
|
---|
342 | ifeq ($(KBUILD_TYPE),release)
|
---|
343 | VirtualBox_LDFLAGS.win += /SUBSYSTEM:windows
|
---|
344 | else
|
---|
345 | VirtualBox_LDFLAGS.linux+= -rdynamic # for backtrace_symbols()
|
---|
346 | ifeq ($(USERNAME),dmik)
|
---|
347 | VirtualBox_LDFLAGS.win += /SUBSYSTEM:windows
|
---|
348 | else
|
---|
349 | VirtualBox_LDFLAGS.win += /SUBSYSTEM:console
|
---|
350 | endif
|
---|
351 | endif
|
---|
352 | VirtualBox_LDFLAGS.os2 = -Zlinker /PM:PM -Zno-fork
|
---|
353 | VirtualBox_LDFLAGS.darwin = \
|
---|
354 | -framework IOKit -framework Carbon -framework QuickTime \
|
---|
355 | $(if $(VBOX_WITH_HARDENING),-install_name $(VBOX_DYLD_EXECUTABLE_PATH)/VirtualBox3.dylib)
|
---|
356 | ifdef VBOX_WITH_ICHAT_THEATER
|
---|
357 | VirtualBox_LDFLAGS.darwin += -framework Foundation -framework AppKit -framework InstantMessage -framework QuartzCore
|
---|
358 | endif
|
---|
359 | VirtualBox_LIBS.win = \
|
---|
360 | $(PATH_SDK_WINPSDK_LIB)/Htmlhelp.Lib \
|
---|
361 | $(PATH_SDK_DXSDK_LIB)/ddraw.lib \
|
---|
362 | $(PATH_SDK_DXSDK_LIB)/dxguid.lib
|
---|
363 | VirtualBox_LIBS.os2 += $(PATH_DLL)/VBoxHlp$(VBOX_SUFF_DLL)
|
---|
364 | ifeq ($(filter-out freebsd linux netbsd openbsd solaris,$(KBUILD_TARGET)),) # X11
|
---|
365 | VirtualBox_LIBS += $(PATH_DLL)/VBoxKeyboard3$(VBOX_SUFF_DLL)
|
---|
366 | endif
|
---|
367 |
|
---|
368 |
|
---|
369 | ifdef VBOX_WITH_DEBUGGER_GUI ## @todo make this dynamically loadable and ship with release builds too.
|
---|
370 | ifeq ($(KBUILD_TARGET),win)
|
---|
371 | VirtualBox_LIBS += $(PATH_LIB)/VBoxDbg3$(VBOX_SUFF_LIB)
|
---|
372 | else
|
---|
373 | VirtualBox_LIBS += $(PATH_DLL)/VBoxDbg3$(VBOX_SUFF_DLL)
|
---|
374 | endif
|
---|
375 | endif
|
---|
376 |
|
---|
377 | # Some flag hacks (should go away).
|
---|
378 | ifneq ($(KBUILD_TARGET),win)
|
---|
379 | VirtualBox_src/HappyHttp.cpp_CXXFLAGS += -fexceptions
|
---|
380 | VirtualBox_src/VBoxDownloaderWgt.cpp_CXXFLAGS += -fexceptions
|
---|
381 | VirtualBox_src/VBoxNetworkFramework.cpp_CXXFLAGS += -fexceptions
|
---|
382 | endif
|
---|
383 | VirtualBox_src/HappyHttp.cpp_CXXFLAGS.linux += -O2
|
---|
384 |
|
---|
385 | ## @todo how to detect what tool is used?
|
---|
386 | ## @todo GCC3 seems to lack -Wno-missing-base-class-initializer, so we use more generic -Wno-extra
|
---|
387 | ## @todo r=bird: see VirtualBox4.
|
---|
388 | ifdef VBOX_WITH_XPCOM
|
---|
389 | VirtualBox_src/COMDefs.cpp_CXXFLAGS = $(VBOX_GCC_Wno-extra)
|
---|
390 | endif
|
---|
391 |
|
---|
392 | #
|
---|
393 | # static images imported from VBoxUI.pro as VirtualBox_QT_IMAGES
|
---|
394 | #
|
---|
395 | VirtualBox_BLDDIRS += $(PATH_VirtualBox)/ui
|
---|
396 | VirtualBox_SOURCES += $(PATH_VirtualBox)/ui/vbox_image_collection.cpp
|
---|
397 | VirtualBox_CLEAN += $(PATH_VirtualBox)/ui/vbox_image_collection.cpp $(PATH_VirtualBox)/ui/vbox_image_collection.txt
|
---|
398 |
|
---|
399 | $$(PATH_VirtualBox)/ui/vbox_image_collection.txt: $(PATH_SUB_CURRENT)/VBoxUI.pro $$(VirtualBox_QT_IMAGES) | $$(dir $$@)
|
---|
400 | $(RM) -f $@
|
---|
401 | $(APPEND) -v $@ VirtualBox_QT_IMAGES
|
---|
402 |
|
---|
403 | $$(PATH_VirtualBox)/ui/vbox_image_collection.cpp: $$(PATH_VirtualBox)/ui/vbox_image_collection.txt | $$(dir $$@)
|
---|
404 | $(call MSG_TOOL,uic,VirtualBox,$<,$@)
|
---|
405 | $(QUIET)$(VBOX_UIC) -o $@ -embed VBoxGUI -f $<
|
---|
406 |
|
---|
407 |
|
---|
408 | #
|
---|
409 | # Generate COM Wrappers
|
---|
410 | #
|
---|
411 | VirtualBox_BLDDIRS += $(PATH_VirtualBox)/include
|
---|
412 | VirtualBox_CLEAN += $(PATH_VirtualBox)/include/COMWrappers.h
|
---|
413 | VirtualBox_INTERMEDIATES += $(PATH_VirtualBox)/include/COMWrappers.h
|
---|
414 |
|
---|
415 | $$(PATH_VirtualBox)/include/COMWrappers.h: \
|
---|
416 | $(PATH_ROOT)/src/VBox/Main/idl/VirtualBox.xidl \
|
---|
417 | $(VBOX_PATH_VIRTUALBOX3_SRC)/include/COMWrappers.xsl \
|
---|
418 | | $$(dir $$@)
|
---|
419 | $(call MSG_GENERATE,VirtualBox,$<,$@)
|
---|
420 | $(QUIET)$(VBOX_XSLTPROC) -o $@ $(VBOX_PATH_VIRTUALBOX3_SRC)/include/COMWrappers.xsl $<
|
---|
421 |
|
---|
422 | # alias for generating the COM Wrappers file.
|
---|
423 | testwrappers:: $(PATH_VirtualBox)/include/COMWrappers.h
|
---|
424 |
|
---|
425 |
|
---|
426 | ifeq ($(KBUILD_TARGET),win)
|
---|
427 | #
|
---|
428 | # On Windows we'll have to generate/edit the resource file.
|
---|
429 | # The IDI_ICON1 name is Qt specific.
|
---|
430 | #
|
---|
431 | $$(PATH_VirtualBox)/VirtualBox.rc: $(PATH_SUB_CURRENT)/Makefile.kmk $(VBOX_WINDOWS_ICON_FILE) | $$(dir $$@)
|
---|
432 | $(RM) -f $@
|
---|
433 | $(APPEND) $@ 'IDI_ICON1 ICON "$(subst /,\\,$(VBOX_WINDOWS_ICON_FILE))"'
|
---|
434 | $(CAT) $@
|
---|
435 |
|
---|
436 | VirtualBox_CLEAN.win += $(PATH_VirtualBox)/VirtualBox.rc
|
---|
437 | endif # win
|
---|
438 |
|
---|
439 |
|
---|
440 | if "$(KBUILD_TARGET)" == "darwin" && !defined(VBOX_WITH_QT4GUI) # don't conflict the qt4 gui
|
---|
441 | #
|
---|
442 | # On Mac OS X (darwin) we need to install icon resources and compulsory bundle contents.
|
---|
443 | #
|
---|
444 | $(warning The qt3 gui will not work right on it own after we renamed it to *3..)
|
---|
445 | INSTALLS.darwin += VirtualBox3.app
|
---|
446 | VirtualBox3.app_INST = $(INST_VIRTUALBOX)Contents/
|
---|
447 | VirtualBox3.app_MODE = 644
|
---|
448 | VirtualBox3.app_SOURCES = \
|
---|
449 | src/darwin/PkgInfo \
|
---|
450 | $(PATH_VirtualBox3.app)/Info.plist \
|
---|
451 | $(VBOX_MACOSX_ICON_FILE)=>Resources/virtualbox.icns
|
---|
452 |
|
---|
453 | $$(PATH_VirtualBox3.app)/Info.plist: $(PATH_SUB_CURRENT)/src/darwin/Info.plist $(VBOX_VERSION_MK) | $$(dir $$@)
|
---|
454 | $(call MSG_GENERATE,VirtualBox3.app,$<,$@)
|
---|
455 | $(QUIET)$(RM) -f $@
|
---|
456 | $(QUIET)$(SED) \
|
---|
457 | -e 's/@VBOX_VERSION_STRING@/$(VBOX_VERSION_STRING)/g' \
|
---|
458 | -e 's/@VBOX_VERSION_MAJOR@/$(VBOX_VERSION_MAJOR)/g' \
|
---|
459 | -e 's/@VBOX_VERSION_MINOR@/$(VBOX_VERSION_MINOR)/g' \
|
---|
460 | -e 's/@VBOX_VERSION_BUILD@/$(VBOX_VERSION_BUILD)/g' \
|
---|
461 | $< > $@
|
---|
462 |
|
---|
463 | INSTALLS.darwin += VirtualBoxVM3.app
|
---|
464 | VirtualBoxVM3.app_INST = $(VirtualBox3.app_INST)Resources/VirtualBoxVM.app/Contents/
|
---|
465 | VirtualBoxVM3.app_MODE = 644
|
---|
466 | VirtualBoxVM3.app_SOURCES = \
|
---|
467 | src/darwin/VM-PkgInfo=>PkgInfo \
|
---|
468 | $(PATH_VirtualBoxVM3.app)/VM-Info.plist=>Info.plist \
|
---|
469 | $(VBOX_MACOSX_ICON_FILE)=>Resources/virtualbox.icns
|
---|
470 | VirtualBoxVM3.app_SYMLINKS = \
|
---|
471 | MacOS=>../../../MacOS/
|
---|
472 |
|
---|
473 | $$(PATH_VirtualBoxVM3.app)/VM-Info.plist: $(PATH_SUB_CURRENT)/src/darwin/VM-Info.plist $(VBOX_VERSION_MK) | $$(dir $$@)
|
---|
474 | $(call MSG_GENERATE,VirtualBoxVM3.app,$<,$@)
|
---|
475 | $(QUIET)$(RM) -f $@
|
---|
476 | $(QUIET)$(SED) \
|
---|
477 | -e 's/@VBOX_VERSION_STRING@/$(VBOX_VERSION_STRING)/g' \
|
---|
478 | -e 's/@VBOX_VERSION_MAJOR@/$(VBOX_VERSION_MAJOR)/g' \
|
---|
479 | -e 's/@VBOX_VERSION_MINOR@/$(VBOX_VERSION_MINOR)/g' \
|
---|
480 | -e 's/@VBOX_VERSION_BUILD@/$(VBOX_VERSION_BUILD)/g' \
|
---|
481 | --output $@ \
|
---|
482 | $<
|
---|
483 | endif # darwin && !qt4gui
|
---|
484 |
|
---|
485 |
|
---|
486 | ifdef VBOX_WITH_TESTCASES
|
---|
487 | #
|
---|
488 | # Testcase for the darwin keyboard routines.
|
---|
489 | #
|
---|
490 | PROGRAMS.darwin += tstDarwinKeyboard
|
---|
491 | tstDarwinKeyboard_TEMPLATE = VBOXR3TSTEXE
|
---|
492 | tstDarwinKeyboard_NAME = tstDarwinKeyboard3
|
---|
493 | tstDarwinKeyboard_INCS = include
|
---|
494 | tstDarwinKeyboard_SOURCES = \
|
---|
495 | src/darwin/tstDarwinKeyboard.cpp \
|
---|
496 | src/darwin/DarwinKeyboard.cpp
|
---|
497 | tstDarwinKeyboard_LDFLAGS = -framework IOKit -framework Carbon
|
---|
498 | tstDarwinKeyboard_LIBS = \
|
---|
499 | $(LIB_RUNTIME)
|
---|
500 | endif
|
---|
501 |
|
---|
502 |
|
---|
503 | #
|
---|
504 | # Restore / reset things to avoid possible conflicts with kBuild (VBoxUI.pro).
|
---|
505 | #
|
---|
506 | TEMPLATE := $(SAVED_TEMPLATE)
|
---|
507 | LANGUAGE :=
|
---|
508 | FORMS :=
|
---|
509 | TRANSLATIONS :=
|
---|
510 | IMAGES :=
|
---|
511 |
|
---|
512 |
|
---|
513 | # Commit the magic.
|
---|
514 | include $(KBUILD_PATH)/subfooter.kmk
|
---|
515 |
|
---|
516 |
|
---|
517 | #
|
---|
518 | # Update all known NLS translation (.ts) files in the nls/ subdirectory.
|
---|
519 | #
|
---|
520 | # NOTE: This target is intended to be run only by the GUI maintainer shortly
|
---|
521 | # before a new product release. VirtualBox_xx_YY.ts is a template for new
|
---|
522 | # languages and should never be actually translated or installed.
|
---|
523 | #
|
---|
524 | updatenls:: \
|
---|
525 | $(VirtualBox_SOURCES) \
|
---|
526 | $(wildcard include/*.h)
|
---|
527 | $(call MSG_L1,lupdate all languages (nls/*.ts))
|
---|
528 | $(QUIET)$(TOOL_QT3_LUPDATE) \
|
---|
529 | $^ \
|
---|
530 | -ts \
|
---|
531 | $(filter-out nls/qt_%.ts,$(VirtualBox_QT_TRANSLATIONS)) \
|
---|
532 | nls/VirtualBox_xx_YY.ts
|
---|
533 |
|
---|