VirtualBox

source: vbox/trunk/src/VBox/Main/Makefile.kmk@ 7257

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

VBOXMAINDLL are used for stuff in different directories, so having ':/..' is potentially unsafe. So, we'll have to set it on each target instead and kill the inherited -R* stuff.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 17.2 KB
Line 
1# $Id: Makefile.kmk 6988 2008-02-18 12:29:53Z vboxsync $
2
3## @file
4# Makefile for the VBox Main module.
5#
6
7#
8# Copyright (C) 2006-2007 innotek GmbH
9#
10# This file is part of VirtualBox Open Source Edition (OSE), as
11# available from http://www.virtualbox.org. This file is free software;
12# you can redistribute it and/or modify it under the terms of the GNU
13# General Public License (GPL) as published by the Free Software
14# Foundation, in version 2 as it comes in the "COPYING" file of the
15# VirtualBox OSE distribution. VirtualBox OSE is distributed in the
16# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
17#
18
19DEPTH = ../../..
20include $(PATH_KBUILD)/subheader.kmk
21
22# The KMK_OPTS_JOBS is a kmk v0.1.3 feature. Fake it for now.
23ifndef KMK_OPTS_JOBS
24 KMK_OPTS_JOBS = 1
25endif
26
27# Include sub-makefile(s) first if we're doing parallel building.
28# This is primarily a hack to try avoid idling all but one cpu when
29# building the gigant soap sources.
30ifneq ($(KMK_OPTS_JOBS),1)
31 ifdef VBOX_WITH_WEBSERVICES
32 include $(PATH_SUB_CURRENT)/webservice/Makefile.kmk
33 endif
34 include $(PATH_SUB_CURRENT)/testcase/Makefile.kmk
35endif
36
37# targets++
38LIBRARIES += VBoxCOM
39DLLS += VBoxSettings VBoxC
40PROGRAMS += VBoxSVC
41VBOX_MAIN_DEFS =
42ifneq ($(BUILD_TARGET),win)
43 ifndef VBOX_WITH_XPCOM
44 $(error "VBox: VBOX_WITH_XPCOM isn't defined")
45 endif
46 DLLS += VBoxSVCM
47 ifneq ($(BUILD_TARGET),os2)
48 VBOX_MAIN_DEFS+= VBOX_WITH_SYS_V_IPC_SESSION_WATCHER
49 endif
50 VBOX_MAIN_DEFS += VBOX_WITH_UNIXY_TAP_NETWORKING
51endif
52## @todo eliminate or expand VBOX_MAIN_DEFS.
53
54#PROGRAMS += tstCFGLdr
55
56ifeq ($(BUILD_TARGET),win)
57 OTHERS += $(PATH_BIN)/comregister.cmd
58 IDLFILE = $(VBOX_PATH_SDK)/idl/VirtualBox.idl
59 OTHER_CLEAN += \
60 $(PATH_BIN)/comregister.cmd \
61 $(VBOX_PATH_SDK)/include/VirtualBox.h \
62 $(IDLFILE) \
63 $(VBOX_PATH_SDK)/lib/VirtualBox.tlb \
64 $(VBOX_PATH_SDK)/lib/VirtualBox_i.c \
65 $(PATH_VBoxCOM)/VirtualBox.h \
66 $(PATH_VBoxCOM)/VirtualBox_i.c \
67 $(PATH_VBoxCOM)/VirtualBox.tlb
68else
69 INSTALLS += xpcom-components
70 IDLFILE = $(VBOX_PATH_SDK)/idl/VirtualBox_XPCOM.idl
71 ifeq ($(BUILD_TARGET),linux)
72 IDLTYPELIB = $(PATH_BIN)/VirtualBox_XPCOM.xpt
73 else
74 IDLTYPELIB = $(PATH_BIN)/components/VirtualBox_XPCOM.xpt
75 endif
76 IDLHEADER = $(VBOX_PATH_SDK)/include/VirtualBox_XPCOM.h
77 OTHERS += $(IDLTYPELIB)
78 OTHER_CLEAN += \
79 $(IDLFILE) \
80 $(IDLHEADER) \
81 $(IDLTYPELIB)
82
83endif
84
85
86#
87# The Main API documentation
88#
89docs: $(PATH_TARGET)/docs.Main
90
91$(PATH_TARGET)/docs.Main: \
92 Doxyfile.Main \
93 idl/doxygen.xsl \
94 idl/VirtualBox.xidl \
95 | $(call DIRDEP, $(PATH_TARGET)) \
96 $(call DIRDEP, $(PATH_OUT)/docs/Main)
97 $(RM) -f $(wildcard $(PATH_OUT)/docs/Main/html/*)
98 $(VBOX_XSLTPROC) -o $(PATH_TARGET)/VirtualBox.idl idl/doxygen.xsl idl/VirtualBox.xidl
99 $(REDIRECT) -E 'PATH_OUT=$(PATH_OUT)' -E 'PATH_TARGET=$(PATH_TARGET)' -E 'PATH_CHM=$(subst /,\,$(PATH_BIN)/VirtualBoxAPI.chm)' \
100 -- doxygen Doxyfile.Main
101 -$(EXEC_X86_WIN32) $(VBOX_PATH_HTML_HELP_WORKSHOP)/hhc.exe $(subst /,\\,$(PATH_OUT)/docs/Main/html/index.hhp)
102 $(APPEND) $(PATH_TARGET)/docs.Main
103
104$(call DIRDEP, $(PATH_OUT)/docs/Main):
105 $(MKDIR) -p $@
106
107
108#
109# VBoxSVC executable
110#
111VBoxSVC_TEMPLATE = VBOXMAINEXE
112VBoxSVC_DEFS = VBOX_MAIN_SETTINGS_ADDONS $(VBOX_MAIN_DEFS)
113ifdef VBOX_WITH_VRDP
114VBoxSVC_DEFS += VBOX_VRDP
115endif
116ifdef VBOX_WITH_HGCM
117VBoxSVC_DEFS += VBOX_HGCM
118endif
119ifdef VBOX_MAIN_RELEASE_LOG
120VBoxSVC_DEFS += VBOX_MAIN_RELEASE_LOG LOG_ENABLED
121endif
122ifdef VBOX_WITH_USB
123VBoxSVC_DEFS += VBOX_WITH_USB
124ifdef VBOX_WITH_EHCI
125VBoxSVC_DEFS += VBOX_WITH_EHCI
126endif
127endif
128ifdef VBOX_WITH_ALSA
129VBoxSVC_DEFS += VBOX_WITH_ALSA
130endif
131ifdef VBOX_WITH_PULSE
132VBoxSVC_DEFS += VBOX_WITH_PULSE
133endif
134ifdef VBOX_WITH_WINMM
135VBoxSVC_DEFS += VBOX_WITH_WINMM
136endif
137ifdef VBOX_WITH_E1000
138VBoxSVC_DEFS += VBOX_WITH_E1000
139endif
140ifdef VBOX_WITHOUT_LINUX_COMPILER_H
141VBoxSVC_DEFS += VBOX_WITHOUT_LINUX_COMPILER_H
142endif
143
144VBoxSVC_DEFS.win += VBOX_COM_OUTOFPROC_MODULE
145VBoxSVC_DEFS.win.x86 += _WIN32_WINNT=0x0500
146VBoxSVC_DEFS.win.amd64 += _WIN32_WINNT=0x0510
147VBoxSVC_DEFS.linux += VBOX_USE_LIBHAL
148VBoxSVC_DEFS.solaris += VBOX_USE_LIBHAL
149
150VBoxSVC_INCS = \
151 include \
152 $(PATH_VBoxSVC) \
153 $(PATH_CURRENT)
154VBoxSVC_INCS.win = \
155 $(PATH_VBoxCOM)
156ifdef VBOX_WITH_USB
157 VBoxSVC_INCS.os2 = \
158 $(PATH_ROOT)/src/VBox/HostDrivers/VBoxUSB/os2
159endif
160
161VBoxSVC_LIBS += \
162 $(LIB_DDU) \
163 $(LIB_SETTINGS)
164VBoxSVC_LIBS.darwin = \
165 $(LIB_VMM) \
166 $(LIB_REM)
167VBoxSVC_LIBS.solaris = \
168 adm
169
170VBoxSVC_SOURCES = \
171 Logging.cpp \
172 Matching.cpp \
173 USBDeviceFilterImpl.cpp \
174 USBProxyService.cpp \
175 VirtualBoxBase.cpp \
176 VirtualBoxErrorInfoImpl.cpp \
177 VirtualBoxImpl.cpp \
178 VirtualBoxImplExtra.cpp \
179 MachineImpl.cpp \
180 SnapshotImpl.cpp \
181 HardDiskImpl.cpp \
182 HardDiskAttachmentImpl.cpp \
183 ProgressImpl.cpp \
184 DVDDriveImpl.cpp \
185 DVDImageImpl.cpp \
186 FloppyDriveImpl.cpp \
187 FloppyImageImpl.cpp \
188 HostImpl.cpp \
189 HostDVDDriveImpl.cpp \
190 HostFloppyDriveImpl.cpp \
191 HostUSBDeviceImpl.cpp \
192 GuestOSTypeImpl.cpp \
193 NetworkAdapterImpl.cpp \
194 SerialPortImpl.cpp \
195 ParallelPortImpl.cpp \
196 USBControllerImpl.cpp \
197 AudioAdapterImpl.cpp \
198 SharedFolderImpl.cpp \
199 SystemPropertiesImpl.cpp \
200 BIOSSettingsImpl.cpp
201
202ifdef VBOX_WITH_VRDP
203VBoxSVC_SOURCES += VRDPServerImpl.cpp
204endif
205
206VBoxSVC_SOURCES.darwin = \
207 darwin/iokit.cpp
208
209VBoxSVC_SOURCES.win = \
210 HostNetworkInterfaceImpl.cpp \
211 win32/svcmain.cpp \
212 win32/svchlp.cpp \
213 win32/VBoxSVC.rc
214
215VBoxSVC_SOURCES.linux = \
216 linux/vbox-libhal.cpp
217
218VBoxSVC_SOURCES.solaris = \
219 linux/vbox-libhal.cpp
220
221ifdef VBOX_WITH_XPCOM
222VBoxSVC_SOURCES += \
223 linux/server.cpp
224endif
225
226ifdef VBOX_WITH_USB
227VBoxSVC_SOURCES.darwin += darwin/USBProxyServiceDarwin.cpp
228VBoxSVC_SOURCES.linux += linux/USBProxyServiceLinux.cpp
229VBoxSVC_SOURCES.os2 += os2/USBProxyServiceOs2.cpp
230VBoxSVC_SOURCES.win += win32/USBProxyServiceWin32.cpp
231endif
232
233VBoxSVC_LDFLAGS.darwin = -framework IOKit
234ifeq ($(BUILD_TYPE),debug)
235VBoxSVC_LDFLAGS.linux += -rdynamic # for backtrace_symbols()
236endif
237
238## Alternative USB filtering.
239#ifeq ($(filter-out darwin,$(BUILD_TARGET)),)
240#VBoxSVC_DEFS += VBOX_WITH_USBFILTER
241#VBoxSVC_LIBS += $(PATH_LIB)/USBLib$(VBOX_SUFF_LIB)
242#endif
243
244win32/VBoxSVC.rc_DEPS = $(PATH_TARGET)/VBoxSVC.rgs
245
246
247#
248# VBoxSVC wrapper module
249#
250ifdef VBOX_WITH_XPCOM
251
252VBoxSVCM_TEMPLATE = VBOXMAINDLL
253ifneq ($(BUILD_TARGET),linux)
254VBoxSVCM_INST = $(INST_BIN)components/
255endif
256VBoxSVCM_DEFS = IN_RING3 $(VBOX_MAIN_DEFS)
257VBoxSVCM_INCS = \
258 include \
259 $(PATH_VBoxC) \
260 $(PATH_CURRENT)
261VBoxSVCM_SOURCES = \
262 linux/server_module.cpp
263VBoxSVCM_LDFLAGS.darwin = \
264 -install_name @executable_path/components/VBoxSVCM.dylib \
265 -exported_symbols_list $(PATH_TARGET)/VBoxSVCM.def
266VBoxSVCM_LDFLAGS.solaris = '-R$$(VBOX_ORIGIN)/..'
267ifeq ($(BUILD_TARGET),darwin)
268VBoxSVCM_ORDERDEPS += $(PATH_TARGET)/VBoxSVCM.def
269VBoxSVCM_CLEAN += $(PATH_TARGET)/VBoxSVCM.def
270$(PATH_TARGET)/VBoxSVCM.def:
271 $(RM) -f $@
272 $(APPEND) $@ _NSGetModule
273endif
274
275endif # VBOX_WITH_XPCOM
276
277
278#
279# VBoxC module
280#
281VBoxC_TEMPLATE = VBOXMAINDLL
282ifneq ($(filter-out linux win,$(BUILD_TARGET)),)
283VBoxC_INST = $(INST_BIN)components/
284endif
285
286VBoxC_DEFS = IN_RING3 $(VBOX_MAIN_DEFS)
287VBoxC_DEFS += VBOX_COM_INPROC
288
289ifdef VBOX_WITH_VRDP
290VBoxC_DEFS += VBOX_VRDP
291endif
292ifdef VBOX_WITH_HGCM
293VBoxC_DEFS += VBOX_HGCM
294endif
295ifdef VBOX_MAIN_RELEASE_LOG
296VBoxC_DEFS += VBOX_MAIN_RELEASE_LOG LOG_ENABLED
297endif
298ifdef VBOX_WITH_USB
299VBoxC_DEFS += VBOX_WITH_USB
300ifdef VBOX_WITH_EHCI
301VBoxC_DEFS += VBOX_WITH_EHCI
302endif
303endif
304ifdef VBOX_WITH_ALSA
305VBoxC_DEFS += VBOX_WITH_ALSA
306endif
307ifdef VBOX_WITH_PULSE
308VBoxC_DEFS += VBOX_WITH_PULSE
309endif
310ifdef VBOX_WITH_WINMM
311VBoxC_DEFS += VBOX_WITH_WINMM
312endif
313ifdef VBOX_WITH_CROSSBOW
314VBoxC_DEFS += VBOX_WITH_CROSSBOW
315endif
316ifdef VBOX_WITH_E1000
317VBoxC_DEFS += VBOX_WITH_E1000
318endif
319
320VBoxC_DEFS.win.x86 += _WIN32_WINNT=0x0500
321VBoxC_DEFS.win.amd64 += _WIN32_WINNT=0x0510
322
323VBoxC_INCS = \
324 include \
325 $(PATH_VBoxC)
326VBoxC_INCS.win = \
327 $(PATH_VBoxCOM) \
328 $(PATH_SUB_CURRENT)
329
330VBoxC_LDFLAGS.darwin = \
331 -install_name @executable_path/components/VBoxSVCM.dylib \
332 -exported_symbols_list $(PATH_TARGET)/VBoxC.def
333VBoxC_LDFLAGS.solaris = '-R$$(VBOX_ORIGIN)/..'
334ifdef VBOX_USE_VCC80
335 VBoxC_LDFLAGS.win = /MANIFEST
336endif
337
338VBoxC_LIBS += \
339 $(LIB_VMM) \
340 $(LIB_REM)
341
342VBoxC_SOURCES = \
343 Logging.cpp \
344 VBoxDll.cpp \
345 Version.cpp \
346 USBDeviceImpl.cpp \
347 RemoteUSBDeviceImpl.cpp \
348 VirtualBoxBase.cpp \
349 VirtualBoxErrorInfoImpl.cpp \
350 ProgressImpl.cpp \
351 SharedFolderImpl.cpp \
352 SessionImpl.cpp \
353 ConsoleImpl.cpp \
354 ConsoleImpl2.cpp \
355 ConsoleVRDPServer.cpp \
356 GuestImpl.cpp \
357 KeyboardImpl.cpp \
358 MouseImpl.cpp \
359 DisplayImpl.cpp \
360 FramebufferImpl.cpp \
361 MachineDebuggerImpl.cpp \
362 VBoxDriversRegister.cpp \
363 AudioSnifferInterface.cpp \
364 VMMDevInterface.cpp
365VBoxC_SOURCES.win = \
366 win32/dllmain.cpp \
367 win32/VBoxC.def \
368 win32/VBoxC.rc
369ifdef VBOX_WITH_XPCOM
370VBoxC_SOURCES += \
371 linux/module.cpp
372endif
373
374ifdef VBOX_WITH_HGCM
375VBoxC_SOURCES += \
376 hgcm/HGCMObjects.cpp \
377 hgcm/HGCMThread.cpp \
378 hgcm/HGCM.cpp
379endif
380
381ifdef VBOX_WITH_USB
382VBoxC_SOURCES += \
383 RemoteUSBBackend.cpp
384endif
385
386ifeq ($(BUILD_TARGET),darwin)
387VBoxC_ORDERDEPS += $(PATH_TARGET)/VBoxC.def
388VBoxC_CLEAN += $(PATH_TARGET)/VBoxC.def
389$(PATH_TARGET)/VBoxC.def: $(MAKEFILE_CURRENT)
390 $(RM) -f $@
391 $(APPEND) $@ _NSGetModule
392 $(APPEND) $@ _VBoxDriversRegister
393endif
394
395# Version.cpp uses VBOX_SVN_REV.
396Version.cpp_DEFS = VBOX_SVN_REV=$(VBOX_SVN_REV)
397Version.cpp_DEPS = $(VBOX_SVN_REV_KMK)
398
399ConsoleImpl.cpp_DEFS = VBOX_BUILD_TARGET=\"$(BUILD_TARGET).$(BUILD_TARGET_ARCH)\"
400
401win32/VBoxC.rc_DEPS = $(PATH_TARGET)/VBoxC.rgs $(PATH_VBoxCOM)/VirtualBox.tlb
402
403
404#
405# VBoxSettings
406#
407VBoxSettings_TEMPLATE = VBOXMAINDLL
408VBoxSettings_NAME = $(basename $(notdir $(LIB_SETTINGS)))
409VBoxSettings_SDKS = VBOX_LIBXML2 VBOX_ZLIB
410VBoxSettings_DEFS = IN_VBOXSETTINGS_R3
411VBoxSettings_INCS = \
412 include \
413 $(PATH_TARGET)
414VBoxSettings_SOURCES = \
415 xml/Settings.cpp
416VBoxSettings_LDFLAGS.darwin = -install_name @executable_path/$(notdir $(LIB_SETTINGS)) -Wl,-x # no debug info please.
417VBoxSettings_LDFLAGS.solaris = '-R$$(VBOX_ORIGIN)'
418
419
420#
421# VBoxCOM - COM Abstraction Layer library
422#
423VBoxCOM_TEMPLATE = VBOXMAINLIB
424VBoxCOM_SOURCES = \
425 glue/com.cpp \
426 glue/initterm.cpp \
427 glue/string.cpp \
428 glue/EventQueue.cpp \
429 glue/ErrorInfo.cpp
430ifeq ($(BUILD_TARGET),win)
431 VBoxCOM_DEFS.x86 += _WIN32_WINNT=0x0500
432 VBoxCOM_DEFS.amd64 += _WIN32_WINNT=0x0510
433 VBoxCOM_SOURCES += \
434 $(PATH_VBoxCOM)/VirtualBox_i.c
435else
436 VBoxCOM_INCS += \
437 include
438 VBoxCOM_SOURCES += \
439 linux/helpers.cpp
440endif
441
442
443#
444# Generate _DEPS on all sources which depends on generated headers.
445#
446ifeq ($(BUILD_TARGET),win)
447PREREQS = $(PATH_VBoxCOM)/VirtualBox_i.c
448else
449PREREQS = $(IDLTYPELIB) $(IDLHEADER)
450endif
451
452# brute force way to ensure the prereqs are generated before anything is compiled.
453define def_src_deps
454$(src)_ORDERDEPS += $(PREREQS)
455endef
456$(foreach src,\
457 $(VBoxC_SOURCES) $(VBoxC_SOURCES.$(BUILD_TARGET)) \
458 $(VBoxSVC_SOURCES) $(VBoxSVC_SOURCES.$(BUILD_TARGET)) \
459 $(VBoxCOM_SOURCES) \
460 ,$(eval $(value def_src_deps)))
461
462
463#
464# Embed XML Schema files to VBoxSVC
465#
466
467VBOX_XML_SCHEMA_H = $(PATH_TARGET)/xml_VirtualBox_settings_xsd.h
468VBOX_XML_SCHEMA_COMMON_H = $(PATH_TARGET)/xml_VirtualBox_settings_common_xsd.h
469VBOX_XML_CONVERTER_TEMPLATE_H = $(PATH_TARGET)/xml_SettingsConverter_xsl.h
470
471VBOX_XML_SCHEMA_COMMON = xml/VirtualBox-settings-common.xsd
472VBOX_XML_SCHEMA.darwin = xml/VirtualBox-settings-macosx.xsd
473VBOX_XML_SCHEMA.linux = xml/VirtualBox-settings-linux.xsd
474VBOX_XML_SCHEMA.freebsd = xml/VirtualBox-settings-freebsd.xsd
475VBOX_XML_SCHEMA.win = xml/VirtualBox-settings-windows.xsd
476VBOX_XML_SCHEMA.os2 = xml/VirtualBox-settings-os2.xsd
477VBOX_XML_SCHEMA.solaris = xml/VirtualBox-settings-solaris.xsd
478
479VBOX_XML_CONVERTER_TEMPLATE = xml/SettingsConverter.xsl
480
481VirtualBoxImplExtra.cpp_DEPS = \
482 $(VBOX_XML_SCHEMA_H) $(VBOX_XML_SCHEMA_COMMON_H) $(VBOX_XML_CONVERTER_TEMPLATE_H)
483
484$(VBOX_XML_SCHEMA_H): $(VBOX_XML_SCHEMA.$(BUILD_TARGET)) $(VBOX_BIN2C)
485 $(call MSG_TOOL,bin2c,VBoxSVC,$<,$@)
486 $(QUIET)$(VBOX_BIN2C) _xml_VirtualBox_settings_xsd $< $@
487
488$(VBOX_XML_SCHEMA_COMMON_H): $(VBOX_XML_SCHEMA_COMMON) $(VBOX_BIN2C)
489 $(call MSG_TOOL,bin2c,VBoxSVC,$<,$@)
490 $(QUIET)$(VBOX_BIN2C) _xml_VirtualBox_settings_common_xsd $< $@
491
492$(VBOX_XML_CONVERTER_TEMPLATE_H): $(VBOX_XML_CONVERTER_TEMPLATE) $(VBOX_BIN2C)
493 $(call MSG_TOOL,bin2c,VBoxSVC,$<,$@)
494 $(QUIET)$(VBOX_BIN2C) _xml_SettingsConverter_xsl $< $@
495
496OTHER_CLEAN += \
497 $(VBOX_XML_SCHEMA_H) $(VBOX_XML_SCHEMA_COMMON_H) $(VBOX_XML_CONVERTER_TEMPLATE_H)
498
499
500#
501# Generate SchemaDefs.h from XML Schema
502#
503VBOX_XML_SCHEMADEFS_H = $(PATH_TARGET)/SchemaDefs.h
504VBOX_XML_SCHEMADEFS_XSL = xml/SchemaDefs.xsl
505
506VBoxC_DEPS += $(VBOX_XML_SCHEMADEFS_H)
507VBoxC_INCS += $(PATH_TARGET)
508VBoxSVC_DEPS += $(VBOX_XML_SCHEMADEFS_H)
509VBoxSVC_INCS += $(PATH_TARGET)
510
511$(VBOX_XML_SCHEMADEFS_H): $(VBOX_XML_SCHEMADEFS_XSL) $(VBOX_XML_SCHEMA.$(BUILD_TARGET)) $(VBOX_XML_SCHEMA_COMMON)
512 $(call MSG_TOOL,xsltproc,VBoxSVC,$<,$@)
513 $(QUIET)$(VBOX_XSLTPROC) -o $@ $(filter-out $(VBOX_XML_SCHEMA_COMMON),$^)
514
515OTHER_CLEAN += $(VBOX_XML_SCHEMADEFS_H)
516.NOTPARALLEL: $(VBOX_XML_SCHEMADEFS_H)
517
518
519#
520# Creates the symlinks necessary for making XPCOM work.
521#
522## @todo Figure out why Linux really needs this, darwin doesn't...
523
524xpcom-components_INST = $(INST_BIN)components/
525ifeq ($(BUILD_TARGET),linux)
526xpcom-components_SYMLINKS = \
527 VirtualBox_XPCOM.xpt=>../VirtualBox_XPCOM.xpt \
528 VBoxXPCOMBase.xpt=>../VBoxXPCOMBase.xpt \
529 VBoxC$(SUFF_DLL)=>../VBoxC$(SUFF_DLL) \
530 VBoxSVCM$(SUFF_DLL)=>../VBoxSVCM$(SUFF_DLL) \
531 VBoxXPCOMIPCC$(SUFF_DLL)=>../VBoxXPCOMIPCC$(SUFF_DLL)
532endif
533
534
535#
536# Include sub-makefile(s) last if we're not doing parallel building.
537#
538# We do this here so that the webservices ends up last in the target
539# lists. For 100% correctness we must do this after all the main
540# targets has been fully fleshed out as subheader/footer.kmk will
541# process new targets.
542#
543ifeq ($(KMK_OPTS_JOBS),1)
544 ifdef VBOX_WITH_WEBSERVICES
545 include $(PATH_SUB_CURRENT)/webservice/Makefile.kmk
546 endif
547 include $(PATH_SUB_CURRENT)/testcase/Makefile.kmk
548endif
549
550# generate rules
551include $(PATH_KBUILD)/subfooter.kmk
552
553
554#
555# Additions rules.
556#
557
558XIDLFILE = idl/VirtualBox.xidl
559
560ifneq ($(BUILD_TARGET),win)
561
562linux/helpers.cpp: $(IDLTYPELIB)
563
564$(IDLFILE): idl/xpidl.xsl $(XIDLFILE) | $(call DIRDEP,$(dir $(IDLFILE)))
565 $(call MSG_TOOL,xsltproc,VBoxSVC,$<,$@)
566 $(QUIET)$(MKDIR) -p $(@D)
567 $(QUIET)$(VBOX_XSLTPROC) -o $@ $^
568
569$(IDLTYPELIB): $(IDLFILE) | $(call DIRDEP,$(dir $(IDLTYPELIB)))
570 $(call MSG_TOOL,xpidl,VBoxSVC,$<,$@)
571 $(QUIET)$(VBOX_XPIDL) -m typelib -I $(VBOX_PATH_XPCOM_IDL) -e $@ $<
572
573$(IDLHEADER): $(IDLFILE) | $(call DIRDEP,$(dir $(IDLHEADER)))
574 $(call MSG_TOOL,xpidl,VBoxSVC,$<,$@)
575 $(QUIET)$(VBOX_XPIDL) -m header -I $(VBOX_PATH_XPCOM_IDL) -e $@ $<
576
577else
578
579MAIN_IDL ?= $(EXEC_X86_WIN32) $(firstword $(wildcard \
580 $(PATH_SDK_WINPSDK_BIN)/Midl.Exe\
581 $(PATH_SDK_WINPSDK)/Bin/Midl.Exe\
582 $(PATH_DEVTOOLS)/win.x86/bin/midl.exe\
583 ) Sorry_Cannot_Find_The_Midl_Compiler_In_The_PSDK)
584IDL_DEFS = /nologo
585ifdef VBOX_WITH_VRDP
586 IDL_DEFS += /D VBOX_VRDP
587endif
588
589$(IDLFILE): idl/midl.xsl $(XIDLFILE)
590 $(call MSG_TOOL,xsltproc,VBoxSVC,$<,$@)
591 $(QUIET)$(MKDIR) -p $(VBOX_PATH_SDK)/idl
592 $(QUIET)$(VBOX_XSLTPROC) -o $@ $^
593
594$(PATH_TARGET)/VBoxSVC.rgs: win32/VirtualBox_rgs.xsl $(XIDLFILE)
595 $(VBOX_XSLTPROC) --stringparam Module VBoxSVC -o $@ $^
596
597$(PATH_TARGET)/VBoxC.rgs: win32/VirtualBox_rgs.xsl $(XIDLFILE)
598 $(VBOX_XSLTPROC) --stringparam Module VBoxC -o $@ $^
599
600## @todo r=bird: last changes to this rule showed incorrect dependencies here as it broke testcase (see testboxwin2).
601# This is kind of obvious when looking at the rule, because it's (a) not specifing all it output
602# and (b) generating more stuff *after* the maintarget has been completed.
603#
604# What needs to be done is to not depend on _i.c in the object subdir, but on all the final outputs.
605$(PATH_VBoxCOM)/VirtualBox_i.c \
606+ $(VBOX_PATH_SDK)/lib/VirtualBox_i.c \
607+ $(PATH_VBoxCOM)/VirtualBox.h \
608+ $(VBOX_PATH_SDK)/include/VirtualBox.h \
609+ $(PATH_VBoxCOM)/VirtualBox.tlb \
610+ $(VBOX_PATH_SDK)/lib/VirtualBox.tlb: $(IDLFILE) | $(call DIRDEP,$(PATH_VBoxCOM))
611 $(MAIN_IDL) $(IDL_DEFS) \
612 /out $(subst /,\\,$(PATH_VBoxCOM)) \
613 /cpp_cmd $(subst /,\\,$(TOOL_$(VBOX_VCC_TOOL)_CC)) \
614 /I $(subst /,\\,$(PATH_SDK_WINPSDK_INC)) \
615 /I idl \
616 $(subst /,\\,$<)
617 $(MKDIR) -p $(VBOX_PATH_SDK)/include
618 $(CP) $(PATH_VBoxCOM)/VirtualBox.h $(VBOX_PATH_SDK)/include
619 $(MKDIR) -p $(VBOX_PATH_SDK)/lib
620 $(CP) $(PATH_VBoxCOM)/VirtualBox.tlb $(VBOX_PATH_SDK)/lib
621 $(CP) $(PATH_VBoxCOM)/VirtualBox_i.c $(VBOX_PATH_SDK)/lib
622
623endif
624
625# bird: anyone still using this? If not it's a gonner.
626## Hack to work around wine's trouble with midl.exe and rc.exe (seems to be msvcrt.dll related)
627#gen: $(PREREQS)
628
629
630#
631# Translation stuff
632#
633VBoxSVC_HEADERS = \
634 include/collection.h \
635 include/MachineImpl.h \
636 include/HostDVDDriveImpl.h \
637 include/HostFloppyDriveImpl.h
638
639VBoxC_HEADERS = \
640 include/ConsoleImpl.h
641
642VBoxSVC_TRANSLATIONS = \
643 nls/VBoxSVC_de.ts
644
645VBoxC_TRANSLATIONS = \
646 nls/VBoxC_de.ts
647
648updatenls:
649 $(VBOX_LUPDATE) $(VBoxSVC_SOURCES) $(VBoxSVC_HEADERS) -ts $(VBoxSVC_TRANSLATIONS)
650 $(VBOX_LUPDATE) $(VBoxC_SOURCES) $(VBoxC_HEADERS) -ts $(VBoxC_TRANSLATIONS)
651
652ifdef VBOX_WITH_XPCOM
653
654testidl: $(IDLFILE) $(IDLTYPELIB)
655testidlhdr: $(IDLHEADER)
656
657else
658
659testidl: $(IDLFILE) $(PATH_VBoxCOM)/VirtualBox_i.c
660
661endif
662
663$(PATH_BIN)/comregister.cmd: win32/comregister.cmd
664 $(CP) $< $@
665
666
667# Hot fix when dependencies goes bad again...
668#.NOTPARALLEL: $(TARGET_VBoxC) $(TARGET_VBoxSVC) $(TARGET_VBoxCOM) $(IDLHEADER) $(IDLFILE) $(PATH_VBoxCOM)/VirtualBox_i.c
669
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