VirtualBox

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

Last change on this file since 5161 was 5146, checked in by vboxsync, 18 years ago

move the SVN revision stuff into separate files to omit recompilation of expensive files if only the SVN revision changed

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