VirtualBox

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

Last change on this file since 3839 was 3822, checked in by vboxsync, 18 years ago

Enabled new VRDP server interface.

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