VirtualBox

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

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

Added new type of network device 'e1000'. Define VBOX_WITH_E1000 to activate.

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