VirtualBox

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

Last change on this file since 6595 was 6511, checked in by vboxsync, 17 years ago

Added VBOX_WITH_WEBSERVICES for including / excluding the webservices api from the build.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 15.8 KB
Line 
1# $Id: Makefile.kmk 6511 2008-01-25 11:03:22Z 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
23ifdef VBOX_WITH_WEBSERVICES
24 SUBDIRS_AFTER += webservice
25endif
26
27ifndef VBOX_OSE
28 DEFS += VBOX_WITH_E1000
29endif
30
31LIBRARIES = VBoxCOM
32DLLS = VBoxSettings VBoxC
33PROGRAMS = VBoxSVC
34ifneq ($(BUILD_TARGET),win)
35 ifndef VBOX_WITH_XPCOM
36 $(error "VBox: VBOX_WITH_XPCOM isn't defined")
37 endif
38 DLLS += VBoxSVCM
39 ifneq ($(BUILD_TARGET),os2)
40 DEFS += VBOX_WITH_SYS_V_IPC_SESSION_WATCHER
41 endif
42 DEFS += VBOX_WITH_UNIXY_TAP_NETWORKING
43endif
44
45
46ifeq ($(BUILD_TARGET),win)
47 OTHERS = $(PATH_BIN)/comregister.cmd
48 IDLFILE = $(VBOX_PATH_SDK)/idl/VirtualBox.idl
49 OTHER_CLEAN = \
50 $(PATH_BIN)/comregister.cmd \
51 $(VBOX_PATH_SDK)/include/VirtualBox.h \
52 $(IDLFILE) \
53 $(VBOX_PATH_SDK)/lib/VirtualBox.tlb \
54 $(VBOX_PATH_SDK)/lib/VirtualBox_i.c \
55 $(PATH_VBoxCOM)/VirtualBox.h \
56 $(PATH_VBoxCOM)/VirtualBox_i.c \
57 $(PATH_VBoxCOM)/VirtualBox.tlb
58else
59 INSTALLS = xpcom-components
60 IDLFILE = $(VBOX_PATH_SDK)/idl/VirtualBox_XPCOM.idl
61 ifeq ($(BUILD_TARGET),linux)
62 IDLTYPELIB = $(PATH_BIN)/VirtualBox_XPCOM.xpt
63 else
64 IDLTYPELIB = $(PATH_BIN)/components/VirtualBox_XPCOM.xpt
65 endif
66 IDLHEADER = $(VBOX_PATH_SDK)/include/VirtualBox_XPCOM.h
67 OTHERS = $(IDLTYPELIB)
68 OTHER_CLEAN = \
69 $(IDLFILE) \
70 $(IDLHEADER) \
71 $(IDLTYPELIB)
72
73endif
74
75
76#
77# The Main API documentation
78#
79docs: $(PATH_TARGET)/docs.Main
80
81$(PATH_TARGET)/docs.Main: \
82 Doxyfile.Main \
83 idl/doxygen.xsl \
84 idl/VirtualBox.xidl \
85 | $(call DIRDEP, $(PATH_TARGET)) \
86 $(call DIRDEP, $(PATH_OUT)/docs/Main)
87 $(RM) -f $(wildcard $(PATH_OUT)/docs/Main/html/*)
88 $(VBOX_XSLTPROC) -o $(PATH_TARGET)/VirtualBox.idl idl/doxygen.xsl idl/VirtualBox.xidl
89 $(REDIRECT) -E 'PATH_OUT=$(PATH_OUT)' -E 'PATH_TARGET=$(PATH_TARGET)' -E 'PATH_CHM=$(subst /,\,$(PATH_BIN)/VirtualBoxAPI.chm)' \
90 -- doxygen Doxyfile.Main
91 -$(EXEC_X86_WIN32) $(VBOX_PATH_HTML_HELP_WORKSHOP)/hhc.exe $(subst /,\\,$(PATH_OUT)/docs/Main/html/index.hhp)
92 $(APPEND) $(PATH_TARGET)/docs.Main
93
94$(call DIRDEP, $(PATH_OUT)/docs/Main):
95 $(MKDIR) -p $@
96
97
98#
99# VBoxSVC executable
100#
101
102VBoxSVC_TEMPLATE = VBOXMAINEXE
103VBoxSVC_DEFS = VBOX_MAIN_SETTINGS_ADDONS
104ifdef VBOX_WITH_VRDP
105VBoxSVC_DEFS += VBOX_VRDP
106endif
107ifdef VBOX_WITH_HGCM
108VBoxSVC_DEFS += VBOX_HGCM
109endif
110ifdef VBOX_MAIN_RELEASE_LOG
111VBoxSVC_DEFS += VBOX_MAIN_RELEASE_LOG LOG_ENABLED
112endif
113ifdef VBOX_WITH_USB
114VBoxSVC_DEFS += VBOX_WITH_USB
115ifdef VBOX_WITH_EHCI
116VBoxSVC_DEFS += VBOX_WITH_EHCI
117endif
118endif
119ifdef VBOX_WITH_ALSA
120VBoxSVC_DEFS += VBOX_WITH_ALSA
121endif
122ifdef VBOX_WITH_PULSE
123VBoxSVC_DEFS += VBOX_WITH_PULSE
124endif
125ifdef VBOX_WITH_WINMM
126VBoxSVC_DEFS += VBOX_WITH_WINMM
127endif
128ifdef VBOX_WITHOUT_LINUX_COMPILER_H
129VBoxSVC_DEFS += VBOX_WITHOUT_LINUX_COMPILER_H
130endif
131
132VBoxSVC_DEFS.win += VBOX_COM_OUTOFPROC_MODULE
133VBoxSVC_DEFS.win.x86 += _WIN32_WINNT=0x0500
134VBoxSVC_DEFS.win.amd64 += _WIN32_WINNT=0x0510
135VBoxSVC_DEFS.linux += VBOX_USE_LIBHAL
136VBoxSVC_DEFS.solaris += VBOX_USE_LIBHAL
137
138VBoxSVC_INCS = \
139 include \
140 $(PATH_VBoxSVC) \
141 $(PATH_CURRENT)
142VBoxSVC_INCS.win = \
143 $(PATH_VBoxCOM)
144ifdef VBOX_WITH_USB
145 VBoxSVC_INCS.os2 = \
146 $(PATH_ROOT)/src/VBox/HostDrivers/VBoxUSB/os2
147endif
148
149VBoxSVC_LIBS += \
150 $(LIB_DDU) \
151 $(LIB_SETTINGS)
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 VirtualBoxErrorInfoImpl.cpp \
165 VirtualBoxImpl.cpp \
166 VirtualBoxImplExtra.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
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
276VBoxC_DEFS += VBOX_COM_INPROC
277
278ifdef VBOX_WITH_VRDP
279VBoxC_DEFS += VBOX_VRDP
280endif
281ifdef VBOX_WITH_HGCM
282VBoxC_DEFS += VBOX_HGCM
283endif
284ifdef VBOX_MAIN_RELEASE_LOG
285VBoxC_DEFS += VBOX_MAIN_RELEASE_LOG LOG_ENABLED
286endif
287ifdef VBOX_WITH_USB
288VBoxC_DEFS += VBOX_WITH_USB
289ifdef VBOX_WITH_EHCI
290VBoxC_DEFS += VBOX_WITH_EHCI
291endif
292endif
293ifdef VBOX_WITH_ALSA
294VBoxC_DEFS += VBOX_WITH_ALSA
295endif
296ifdef VBOX_WITH_PULSE
297VBoxC_DEFS += VBOX_WITH_PULSE
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)
312VBoxC_INCS.win = \
313 $(PATH_VBoxCOM) \
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
320 VBoxC_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# VBoxSettings
391#
392
393VBoxSettings_TEMPLATE = VBOXMAINDLL
394VBoxSettings_NAME = $(basename $(notdir $(LIB_SETTINGS)))
395VBoxSettings_SDKS = VBOX_LIBXML2 VBOX_ZLIB
396VBoxSettings_DEFS = IN_VBOXSETTINGS_R3
397VBoxSettings_INCS = \
398 include \
399 $(PATH_TARGET)
400VBoxSettings_SOURCES = \
401 xml/Settings.cpp
402VBoxSettings_LDFLAGS.darwin = -install_name @executable_path/$(notdir $(LIB_SETTINGS)) -Wl,-x # no debug info please.
403
404
405#
406# VBoxCOM - COM Abstraction Layer library
407#
408
409VBoxCOM_TEMPLATE = VBOXMAINLIB
410VBoxCOM_SOURCES = \
411 glue/com.cpp \
412 glue/initterm.cpp \
413 glue/string.cpp \
414 glue/EventQueue.cpp \
415 glue/ErrorInfo.cpp
416ifeq ($(BUILD_TARGET),win)
417 VBoxCOM_DEFS.x86 += _WIN32_WINNT=0x0500
418 VBoxCOM_DEFS.amd64 += _WIN32_WINNT=0x0510
419 VBoxCOM_SOURCES += \
420 $(PATH_VBoxCOM)/VirtualBox_i.c
421else
422 VBoxCOM_INCS += \
423 include
424 VBoxCOM_SOURCES += \
425 linux/helpers.cpp
426endif
427
428
429#
430# Generate _DEPS on all sources which depends on generated headers.
431#
432ifeq ($(BUILD_TARGET),win)
433PREREQS = $(PATH_VBoxCOM)/VirtualBox_i.c
434else
435PREREQS = $(IDLTYPELIB) $(IDLHEADER)
436endif
437
438# brute force way to ensure the prereqs are generated before anything is compiled.
439define def_src_deps
440$(src)_ORDERDEPS += $(PREREQS)
441endef
442$(foreach src,\
443 $(VBoxC_SOURCES) $(VBoxC_SOURCES.$(BUILD_TARGET)) \
444 $(VBoxSVC_SOURCES) $(VBoxSVC_SOURCES.$(BUILD_TARGET)) \
445 $(VBoxCOM_SOURCES) \
446 ,$(eval $(value def_src_deps)))
447
448
449#
450# Embed XML Schema files to VBoxSVC
451#
452
453VBOX_XML_SCHEMA_H = $(PATH_TARGET)/xml_VirtualBox_settings_xsd.h
454VBOX_XML_SCHEMA_COMMON_H = $(PATH_TARGET)/xml_VirtualBox_settings_common_xsd.h
455VBOX_XML_CONVERTER_TEMPLATE_H = $(PATH_TARGET)/xml_SettingsConverter_xsl.h
456
457VBOX_XML_SCHEMA_COMMON = xml/VirtualBox-settings-common.xsd
458VBOX_XML_SCHEMA.darwin = xml/VirtualBox-settings-macosx.xsd
459VBOX_XML_SCHEMA.linux = xml/VirtualBox-settings-linux.xsd
460VBOX_XML_SCHEMA.freebsd = xml/VirtualBox-settings-freebsd.xsd
461VBOX_XML_SCHEMA.win = xml/VirtualBox-settings-windows.xsd
462VBOX_XML_SCHEMA.os2 = xml/VirtualBox-settings-os2.xsd
463VBOX_XML_SCHEMA.solaris = xml/VirtualBox-settings-solaris.xsd
464
465VBOX_XML_CONVERTER_TEMPLATE = xml/SettingsConverter.xsl
466
467VirtualBoxImplExtra.cpp_DEPS = \
468 $(VBOX_XML_SCHEMA_H) $(VBOX_XML_SCHEMA_COMMON_H) $(VBOX_XML_CONVERTER_TEMPLATE_H)
469
470$(VBOX_XML_SCHEMA_H): $(VBOX_XML_SCHEMA.$(BUILD_TARGET)) $(VBOX_BIN2C)
471 $(call MSG_TOOL,bin2c,VBoxSVC,$<,$@)
472 $(QUIET)$(VBOX_BIN2C) _xml_VirtualBox_settings_xsd $< $@
473
474$(VBOX_XML_SCHEMA_COMMON_H): $(VBOX_XML_SCHEMA_COMMON) $(VBOX_BIN2C)
475 $(call MSG_TOOL,bin2c,VBoxSVC,$<,$@)
476 $(QUIET)$(VBOX_BIN2C) _xml_VirtualBox_settings_common_xsd $< $@
477
478$(VBOX_XML_CONVERTER_TEMPLATE_H): $(VBOX_XML_CONVERTER_TEMPLATE) $(VBOX_BIN2C)
479 $(call MSG_TOOL,bin2c,VBoxSVC,$<,$@)
480 $(QUIET)$(VBOX_BIN2C) _xml_SettingsConverter_xsl $< $@
481
482OTHER_CLEAN += \
483 $(VBOX_XML_SCHEMA_H) $(VBOX_XML_SCHEMA_COMMON_H) $(VBOX_XML_CONVERTER_TEMPLATE_H)
484
485
486#
487# Generate SchemaDefs.h from XML Schema
488#
489VBOX_XML_SCHEMADEFS_H = $(PATH_TARGET)/SchemaDefs.h
490VBOX_XML_SCHEMADEFS_XSL = xml/SchemaDefs.xsl
491
492VBoxC_DEPS += $(VBOX_XML_SCHEMADEFS_H)
493VBoxC_INCS += $(PATH_TARGET)
494VBoxSVC_DEPS += $(VBOX_XML_SCHEMADEFS_H)
495VBoxSVC_INCS += $(PATH_TARGET)
496
497$(VBOX_XML_SCHEMADEFS_H): $(VBOX_XML_SCHEMADEFS_XSL) $(VBOX_XML_SCHEMA.$(BUILD_TARGET)) $(VBOX_XML_SCHEMA_COMMON)
498 $(call MSG_TOOL,xsltproc,VBoxSVC,$<,$@)
499 $(QUIET)$(VBOX_XSLTPROC) -o $@ $(filter-out $(VBOX_XML_SCHEMA_COMMON),$^)
500
501OTHER_CLEAN += $(VBOX_XML_SCHEMADEFS_H)
502.NOTPARALLEL: $(VBOX_XML_SCHEMADEFS_H)
503
504
505#
506# Creates the symlinks necessary for making XPCOM work.
507#
508## @todo Figure out why Linux really needs this, darwin doesn't...
509
510xpcom-components_INST = $(INST_BIN)components/
511ifeq ($(BUILD_TARGET),linux)
512xpcom-components_SYMLINKS = \
513 VirtualBox_XPCOM.xpt=>../VirtualBox_XPCOM.xpt \
514 VBoxXPCOMBase.xpt=>../VBoxXPCOMBase.xpt \
515 VBoxC$(SUFF_DLL)=>../VBoxC$(SUFF_DLL) \
516 VBoxSVCM$(SUFF_DLL)=>../VBoxSVCM$(SUFF_DLL) \
517 VBoxXPCOMIPCC$(SUFF_DLL)=>../VBoxXPCOMIPCC$(SUFF_DLL)
518endif
519
520# generate
521include $(PATH_KBUILD)/footer.kmk
522
523
524#
525# Additions rules.
526#
527
528XIDLFILE = idl/VirtualBox.xidl
529
530ifneq ($(BUILD_TARGET),win)
531
532linux/helpers.cpp: $(IDLTYPELIB)
533
534$(IDLFILE): idl/xpidl.xsl $(XIDLFILE) | $(call DIRDEP,$(dir $(IDLFILE)))
535 $(call MSG_TOOL,xsltproc,VBoxSVC,$<,$@)
536 $(QUIET)$(MKDIR) -p $(@D)
537 $(QUIET)$(VBOX_XSLTPROC) -o $@ $^
538
539$(IDLTYPELIB): $(IDLFILE) | $(call DIRDEP,$(dir $(IDLTYPELIB)))
540 $(call MSG_TOOL,xpidl,VBoxSVC,$<,$@)
541 $(QUIET)$(VBOX_XPIDL) -m typelib -I $(VBOX_PATH_XPCOM_IDL) -e $@ $<
542
543$(IDLHEADER): $(IDLFILE) | $(call DIRDEP,$(dir $(IDLHEADER)))
544 $(call MSG_TOOL,xpidl,VBoxSVC,$<,$@)
545 $(QUIET)$(VBOX_XPIDL) -m header -I $(VBOX_PATH_XPCOM_IDL) -e $@ $<
546
547else
548
549MAIN_IDL ?= $(EXEC_X86_WIN32) $(firstword $(wildcard \
550 $(PATH_SDK_WINPSDK_BIN)/Midl.Exe\
551 $(PATH_SDK_WINPSDK)/Bin/Midl.Exe\
552 $(PATH_DEVTOOLS)/win.x86/bin/midl.exe\
553 ) Sorry_Cannot_Find_The_Midl_Compiler_In_The_PSDK)
554IDL_DEFS = /nologo
555ifdef VBOX_WITH_VRDP
556 IDL_DEFS += /D VBOX_VRDP
557endif
558
559$(IDLFILE): idl/midl.xsl $(XIDLFILE)
560 $(call MSG_TOOL,xsltproc,VBoxSVC,$<,$@)
561 $(QUIET)$(MKDIR) -p $(VBOX_PATH_SDK)/idl
562 $(QUIET)$(VBOX_XSLTPROC) -o $@ $^
563
564$(PATH_TARGET)/VBoxSVC.rgs: win32/VirtualBox_rgs.xsl $(XIDLFILE)
565 $(VBOX_XSLTPROC) --stringparam Module VBoxSVC -o $@ $^
566
567$(PATH_TARGET)/VBoxC.rgs: win32/VirtualBox_rgs.xsl $(XIDLFILE)
568 $(VBOX_XSLTPROC) --stringparam Module VBoxC -o $@ $^
569
570## @todo r=bird: last changes to this rule showed incorrect dependencies here as it broke testcase (see testboxwin2).
571# This is kind of obvious when looking at the rule, because it's (a) not specifing all it output
572# and (b) generating more stuff *after* the maintarget has been completed.
573#
574# What needs to be done is to not depend on _i.c in the object subdir, but on all the final outputs.
575$(PATH_VBoxCOM)/VirtualBox_i.c: $(IDLFILE) | $(call DIRDEP,$(PATH_VBoxCOM))
576 $(MAIN_IDL) $(IDL_DEFS) \
577 /out $(subst /,\\,$(PATH_VBoxCOM)) \
578 /cpp_cmd $(subst /,\\,$(TOOL_$(VBOX_VCC_TOOL)_CC)) \
579 /I $(subst /,\\,$(PATH_SDK_WINPSDK_INC)) \
580 /I idl \
581 $(subst /,\\,$<)
582 $(MKDIR) -p $(VBOX_PATH_SDK)/include
583 $(CP) $(PATH_VBoxCOM)/VirtualBox.h $(VBOX_PATH_SDK)/include
584 $(MKDIR) -p $(VBOX_PATH_SDK)/lib
585 $(CP) $(PATH_VBoxCOM)/VirtualBox.tlb $(VBOX_PATH_SDK)/lib
586 $(CP) $(PATH_VBoxCOM)/VirtualBox_i.c $(VBOX_PATH_SDK)/lib
587
588endif
589
590# bird: anyone still using this? If not it's a gonner.
591## Hack to work around wine's trouble with midl.exe and rc.exe (seems to be msvcrt.dll related)
592#gen: $(PREREQS)
593
594
595#
596# Translation stuff
597#
598VBoxSVC_HEADERS = \
599 include/collection.h \
600 include/MachineImpl.h \
601 include/HostDVDDriveImpl.h \
602 include/HostFloppyDriveImpl.h
603
604VBoxC_HEADERS = \
605 include/ConsoleImpl.h
606
607VBoxSVC_TRANSLATIONS = \
608 nls/VBoxSVC_de.ts
609
610VBoxC_TRANSLATIONS = \
611 nls/VBoxC_de.ts
612
613updatenls:
614 $(VBOX_LUPDATE) $(VBoxSVC_SOURCES) $(VBoxSVC_HEADERS) -ts $(VBoxSVC_TRANSLATIONS)
615 $(VBOX_LUPDATE) $(VBoxC_SOURCES) $(VBoxC_HEADERS) -ts $(VBoxC_TRANSLATIONS)
616
617ifdef VBOX_WITH_XPCOM
618
619testidl: $(IDLFILE) $(IDLTYPELIB)
620testidlhdr: $(IDLHEADER)
621
622else
623
624testidl: $(IDLFILE) $(PATH_VBoxCOM)/VirtualBox_i.c
625
626endif
627
628$(PATH_BIN)/comregister.cmd: win32/comregister.cmd
629 $(CP) $< $@
630
631
632# Hot fix when dependencies goes bad again...
633#.NOTPARALLEL: $(TARGET_VBoxC) $(TARGET_VBoxSVC) $(TARGET_VBoxCOM) $(IDLHEADER) $(IDLFILE) $(PATH_VBoxCOM)/VirtualBox_i.c
634
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