VirtualBox

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

Last change on this file since 6286 was 6124, checked in by vboxsync, 17 years ago

Removed VBoxXML (including CFGLDR), xerces and xalan.

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