VirtualBox

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

Last change on this file since 4041 was 3934, checked in by vboxsync, 17 years ago

Switched to runtime detection and loading of dbus and libhal on Linux hosts (in Main)

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