1 | # $Id: Makefile.kmk 13547 2008-10-23 22:17:58Z 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 $(VBOX_DLL_QT)),)
|
---|
67 | INSTALLS.os2 += qt.dll
|
---|
68 | qt.dll_INST = $(INST_BIN)
|
---|
69 | qt.dll_SOURCES += \
|
---|
70 | $(VBOX_DLL_QT)=>$(not-dir $(VBOX_DLL_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_OSE
|
---|
331 | VirtualBox_DEFS += VBOX_OSE
|
---|
332 | endif
|
---|
333 | ifdef VBOX_WITH_DEBUGGER_GUI
|
---|
334 | VirtualBox_DEFS += VBOX_WITH_DEBUGGER_GUI_MENU
|
---|
335 | endif
|
---|
336 | ifdef VBOX_WITH_NETFLT
|
---|
337 | VirtualBox_DEFS += VBOX_WITH_NETFLT
|
---|
338 | endif
|
---|
339 |
|
---|
340 | VirtualBox_INCS = \
|
---|
341 | ./include \
|
---|
342 | $(PATH_VirtualBox)/include
|
---|
343 |
|
---|
344 | ifeq ($(KBUILD_TYPE),release)
|
---|
345 | VirtualBox_LDFLAGS.win += /SUBSYSTEM:windows
|
---|
346 | else
|
---|
347 | VirtualBox_LDFLAGS.linux+= -rdynamic # for backtrace_symbols()
|
---|
348 | ifeq ($(USERNAME),dmik)
|
---|
349 | VirtualBox_LDFLAGS.win += /SUBSYSTEM:windows
|
---|
350 | else
|
---|
351 | VirtualBox_LDFLAGS.win += /SUBSYSTEM:console
|
---|
352 | endif
|
---|
353 | endif
|
---|
354 | VirtualBox_LDFLAGS.os2 = -Zlinker /PM:PM -Zno-fork
|
---|
355 | VirtualBox_LDFLAGS.darwin = \
|
---|
356 | -framework IOKit -framework Carbon -framework QuickTime \
|
---|
357 | $(if $(VBOX_WITH_HARDENING),-install_name $(VBOX_DYLD_EXECUTABLE_PATH)/VirtualBox3.dylib)
|
---|
358 | ifdef VBOX_WITH_ICHAT_THEATER
|
---|
359 | VirtualBox_LDFLAGS.darwin += -framework Foundation -framework AppKit -framework InstantMessage -framework QuartzCore
|
---|
360 | endif
|
---|
361 | VirtualBox_LIBS.win = \
|
---|
362 | $(PATH_SDK_WINPSDK_LIB)/Htmlhelp.Lib \
|
---|
363 | $(PATH_SDK_DXSDK_LIB)/ddraw.lib \
|
---|
364 | $(PATH_SDK_DXSDK_LIB)/dxguid.lib
|
---|
365 | VirtualBox_LIBS.os2 += $(PATH_DLL)/VBoxHlp$(VBOX_SUFF_DLL)
|
---|
366 | ifeq ($(filter-out freebsd linux netbsd openbsd solaris,$(KBUILD_TARGET)),) # X11
|
---|
367 | VirtualBox_LIBS += $(PATH_DLL)/VBoxKeyboard3$(VBOX_SUFF_DLL)
|
---|
368 | endif
|
---|
369 |
|
---|
370 |
|
---|
371 | ifdef VBOX_WITH_DEBUGGER_GUI ## @todo make this dynamically loadable and ship with release builds too.
|
---|
372 | ifeq ($(KBUILD_TARGET),win)
|
---|
373 | VirtualBox_LIBS += $(PATH_LIB)/VBoxDbg3$(VBOX_SUFF_LIB)
|
---|
374 | else
|
---|
375 | VirtualBox_LIBS += $(PATH_DLL)/VBoxDbg3$(VBOX_SUFF_DLL)
|
---|
376 | endif
|
---|
377 | endif
|
---|
378 |
|
---|
379 | # Some flag hacks (should go away).
|
---|
380 | ifneq ($(KBUILD_TARGET),win)
|
---|
381 | VirtualBox_src/HappyHttp.cpp_CXXFLAGS += -fexceptions
|
---|
382 | VirtualBox_src/VBoxDownloaderWgt.cpp_CXXFLAGS += -fexceptions
|
---|
383 | VirtualBox_src/VBoxNetworkFramework.cpp_CXXFLAGS += -fexceptions
|
---|
384 | endif
|
---|
385 | VirtualBox_src/HappyHttp.cpp_CXXFLAGS.linux += -O2
|
---|
386 |
|
---|
387 | ## @todo how to detect what tool is used?
|
---|
388 | ## @todo GCC3 seems to lack -Wno-missing-base-class-initializer, so we use more generic -Wno-extra
|
---|
389 | ## @todo r=bird: see VirtualBox4.
|
---|
390 | ifdef VBOX_WITH_XPCOM
|
---|
391 | VirtualBox_src/COMDefs.cpp_CXXFLAGS = $(VBOX_GCC_Wno-extra)
|
---|
392 | endif
|
---|
393 |
|
---|
394 | #
|
---|
395 | # static images imported from VBoxUI.pro as VirtualBox_QT_IMAGES
|
---|
396 | #
|
---|
397 | VirtualBox_BLDDIRS += $(PATH_VirtualBox)/ui
|
---|
398 | VirtualBox_SOURCES += $(PATH_VirtualBox)/ui/vbox_image_collection.cpp
|
---|
399 | VirtualBox_CLEAN += $(PATH_VirtualBox)/ui/vbox_image_collection.cpp $(PATH_VirtualBox)/ui/vbox_image_collection.txt
|
---|
400 |
|
---|
401 | $$(PATH_VirtualBox)/ui/vbox_image_collection.txt: $(PATH_SUB_CURRENT)/VBoxUI.pro $$(VirtualBox_QT_IMAGES) | $$(dir $$@)
|
---|
402 | $(RM) -f $@
|
---|
403 | $(APPEND) -v $@ VirtualBox_QT_IMAGES
|
---|
404 |
|
---|
405 | $$(PATH_VirtualBox)/ui/vbox_image_collection.cpp: $$(PATH_VirtualBox)/ui/vbox_image_collection.txt | $$(dir $$@)
|
---|
406 | $(call MSG_TOOL,uic,VirtualBox,$<,$@)
|
---|
407 | $(QUIET)$(VBOX_UIC) -o $@ -embed VBoxGUI -f $<
|
---|
408 |
|
---|
409 |
|
---|
410 | #
|
---|
411 | # Generate COM Wrappers
|
---|
412 | #
|
---|
413 | VirtualBox_BLDDIRS += $(PATH_VirtualBox)/include
|
---|
414 | VirtualBox_CLEAN += $(PATH_VirtualBox)/include/COMWrappers.h
|
---|
415 | VirtualBox_INTERMEDIATES += $(PATH_VirtualBox)/include/COMWrappers.h
|
---|
416 |
|
---|
417 | $$(PATH_VirtualBox)/include/COMWrappers.h: \
|
---|
418 | $(PATH_ROOT)/src/VBox/Main/idl/VirtualBox.xidl \
|
---|
419 | $(VBOX_PATH_VIRTUALBOX3_SRC)/include/COMWrappers.xsl \
|
---|
420 | | $$(dir $$@)
|
---|
421 | $(call MSG_GENERATE,VirtualBox,$<,$@)
|
---|
422 | $(QUIET)$(VBOX_XSLTPROC) -o $@ $(VBOX_PATH_VIRTUALBOX3_SRC)/include/COMWrappers.xsl $<
|
---|
423 |
|
---|
424 | # alias for generating the COM Wrappers file.
|
---|
425 | testwrappers:: $(PATH_VirtualBox)/include/COMWrappers.h
|
---|
426 |
|
---|
427 |
|
---|
428 | ifeq ($(KBUILD_TARGET),win)
|
---|
429 | #
|
---|
430 | # On Windows we'll have to generate/edit the resource file.
|
---|
431 | # The IDI_ICON1 name is Qt specific.
|
---|
432 | #
|
---|
433 | $$(PATH_VirtualBox)/VirtualBox.rc: $(PATH_SUB_CURRENT)/Makefile.kmk $(VBOX_WINDOWS_ICON_FILE) | $$(dir $$@)
|
---|
434 | $(RM) -f $@
|
---|
435 | $(APPEND) $@ 'IDI_ICON1 ICON "$(subst /,\\,$(VBOX_WINDOWS_ICON_FILE))"'
|
---|
436 | $(CAT) $@
|
---|
437 |
|
---|
438 | VirtualBox_CLEAN.win += $(PATH_VirtualBox)/VirtualBox.rc
|
---|
439 | endif # win
|
---|
440 |
|
---|
441 |
|
---|
442 | if "$(KBUILD_TARGET)" == "darwin" && !defined(VBOX_WITH_QT4GUI) # don't conflict the qt4 gui
|
---|
443 | #
|
---|
444 | # On Mac OS X (darwin) we need to install icon resources and compulsory bundle contents.
|
---|
445 | #
|
---|
446 | $(warning The qt3 gui will not work right on it own after we renamed it to *3..)
|
---|
447 | INSTALLS.darwin += VirtualBox3.app
|
---|
448 | VirtualBox3.app_INST = $(INST_VIRTUALBOX)Contents/
|
---|
449 | VirtualBox3.app_MODE = 644
|
---|
450 | VirtualBox3.app_SOURCES = \
|
---|
451 | src/darwin/PkgInfo \
|
---|
452 | $(PATH_VirtualBox3.app)/Info.plist \
|
---|
453 | $(VBOX_MACOSX_ICON_FILE)=>Resources/virtualbox.icns
|
---|
454 |
|
---|
455 | $$(PATH_VirtualBox3.app)/Info.plist: $(PATH_SUB_CURRENT)/src/darwin/Info.plist $(VBOX_VERSION_MK) | $$(dir $$@)
|
---|
456 | $(call MSG_GENERATE,VirtualBox3.app,$<,$@)
|
---|
457 | $(QUIET)$(RM) -f $@
|
---|
458 | $(QUIET)$(SED) \
|
---|
459 | -e 's/@VBOX_VERSION_STRING@/$(VBOX_VERSION_STRING)/g' \
|
---|
460 | -e 's/@VBOX_VERSION_MAJOR@/$(VBOX_VERSION_MAJOR)/g' \
|
---|
461 | -e 's/@VBOX_VERSION_MINOR@/$(VBOX_VERSION_MINOR)/g' \
|
---|
462 | -e 's/@VBOX_VERSION_BUILD@/$(VBOX_VERSION_BUILD)/g' \
|
---|
463 | $< > $@
|
---|
464 |
|
---|
465 | INSTALLS.darwin += VirtualBoxVM3.app
|
---|
466 | VirtualBoxVM3.app_INST = $(VirtualBox3.app_INST)Resources/VirtualBoxVM.app/Contents/
|
---|
467 | VirtualBoxVM3.app_MODE = 644
|
---|
468 | VirtualBoxVM3.app_SOURCES = \
|
---|
469 | src/darwin/VM-PkgInfo=>PkgInfo \
|
---|
470 | $(PATH_VirtualBoxVM3.app)/VM-Info.plist=>Info.plist \
|
---|
471 | $(VBOX_MACOSX_ICON_FILE)=>Resources/virtualbox.icns
|
---|
472 | VirtualBoxVM3.app_SYMLINKS = \
|
---|
473 | MacOS=>../../../MacOS/
|
---|
474 |
|
---|
475 | $$(PATH_VirtualBoxVM3.app)/VM-Info.plist: $(PATH_SUB_CURRENT)/src/darwin/VM-Info.plist $(VBOX_VERSION_MK) | $$(dir $$@)
|
---|
476 | $(call MSG_GENERATE,VirtualBoxVM3.app,$<,$@)
|
---|
477 | $(QUIET)$(RM) -f $@
|
---|
478 | $(QUIET)$(SED) \
|
---|
479 | -e 's/@VBOX_VERSION_STRING@/$(VBOX_VERSION_STRING)/g' \
|
---|
480 | -e 's/@VBOX_VERSION_MAJOR@/$(VBOX_VERSION_MAJOR)/g' \
|
---|
481 | -e 's/@VBOX_VERSION_MINOR@/$(VBOX_VERSION_MINOR)/g' \
|
---|
482 | -e 's/@VBOX_VERSION_BUILD@/$(VBOX_VERSION_BUILD)/g' \
|
---|
483 | --output $@ \
|
---|
484 | $<
|
---|
485 | endif # darwin && !qt4gui
|
---|
486 |
|
---|
487 |
|
---|
488 | ifdef VBOX_WITH_TESTCASES
|
---|
489 | #
|
---|
490 | # Testcase for the darwin keyboard routines.
|
---|
491 | #
|
---|
492 | PROGRAMS.darwin += tstDarwinKeyboard
|
---|
493 | tstDarwinKeyboard_TEMPLATE = VBOXR3TSTEXE
|
---|
494 | tstDarwinKeyboard_NAME = tstDarwinKeyboard3
|
---|
495 | tstDarwinKeyboard_INCS = include
|
---|
496 | tstDarwinKeyboard_SOURCES = \
|
---|
497 | src/darwin/tstDarwinKeyboard.cpp \
|
---|
498 | src/darwin/DarwinKeyboard.cpp
|
---|
499 | tstDarwinKeyboard_LDFLAGS = -framework IOKit -framework Carbon
|
---|
500 | tstDarwinKeyboard_LIBS = \
|
---|
501 | $(LIB_RUNTIME)
|
---|
502 | endif
|
---|
503 |
|
---|
504 |
|
---|
505 | #
|
---|
506 | # Restore / reset things to avoid possible conflicts with kBuild (VBoxUI.pro).
|
---|
507 | #
|
---|
508 | TEMPLATE := $(SAVED_TEMPLATE)
|
---|
509 | LANGUAGE :=
|
---|
510 | FORMS :=
|
---|
511 | TRANSLATIONS :=
|
---|
512 | IMAGES :=
|
---|
513 |
|
---|
514 |
|
---|
515 | # Commit the magic.
|
---|
516 | include $(KBUILD_PATH)/subfooter.kmk
|
---|
517 |
|
---|
518 |
|
---|
519 | #
|
---|
520 | # Update all known NLS translation (.ts) files in the nls/ subdirectory.
|
---|
521 | #
|
---|
522 | # NOTE: This target is intended to be run only by the GUI maintainer shortly
|
---|
523 | # before a new product release. VirtualBox_xx_YY.ts is a template for new
|
---|
524 | # languages and should never be actually translated or installed.
|
---|
525 | #
|
---|
526 | updatenls:: \
|
---|
527 | $(VirtualBox_SOURCES) \
|
---|
528 | $(wildcard include/*.h)
|
---|
529 | $(call MSG_L1,lupdate all languages (nls/*.ts))
|
---|
530 | $(QUIET)$(TOOL_QT3_LUPDATE) \
|
---|
531 | $^ \
|
---|
532 | -ts \
|
---|
533 | $(filter-out nls/qt_%.ts,$(VirtualBox_QT_TRANSLATIONS)) \
|
---|
534 | nls/VirtualBox_xx_YY.ts
|
---|
535 |
|
---|