VirtualBox

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

Last change on this file since 3090 was 2981, checked in by vboxsync, 18 years ago

InnoTek -> innotek: all the headers and comments.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 16.1 KB
Line 
1# $Id: Makefile.kmk 2981 2007-06-01 16:01:28Z 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
25ifdef VBOX_WITH_VRDP_MC
26DEFS += VRDP_MC
27endif
28
29SUBDIRS_AFTER = testcase
30
31ifndef VBOX_OSE
32SUBDIRS_AFTER += webservice
33endif
34
35LIBRARIES =
36DLLS = VBoxXML VBoxC
37PROGRAMS = VBoxSVC
38ifeq ($(BUILD_TARGET),win)
39 LIBRARIES = VBoxCOM
40else
41 ifndef VBOX_WITH_XPCOM
42 $(error "VBox: VBOX_WITH_XPCOM isn't defined")
43 endif
44 DLLS += VBoxSVCM
45 LIBRARIES = VBoxXPCOM
46 DEFS += VBOX_WITH_XPCOM
47 DEFS += VBOX_WITH_SYS_V_IPC_SESSION_WATCHER
48 DEFS += VBOX_WITH_UNIXY_TAP_NETWORKING
49endif
50#PROGRAMS = tstCFGLdr
51
52ifeq ($(BUILD_TARGET),win)
53 OTHERS = $(PATH_BIN)/comregister.cmd
54 IDLFILE = $(VBOX_PATH_SDK)/idl/VirtualBox.idl
55 OTHER_CLEAN = \
56 $(PATH_BIN)/comregister.cmd \
57 $(VBOX_PATH_SDK)/include/VirtualBox.h \
58 $(IDLFILE) \
59 $(VBOX_PATH_SDK)/lib/VirtualBox.tlb \
60 $(VBOX_PATH_SDK)/lib/VirtualBox_i.c \
61 $(PATH_VBoxCOM)/VirtualBox.h \
62 $(PATH_VBoxCOM)/VirtualBox_i.c \
63 $(PATH_VBoxCOM)/VirtualBox.tlb
64else
65 INSTALLS = xpcom-components
66 IDLFILE = $(VBOX_PATH_SDK)/idl/VirtualBox_XPCOM.idl
67 ifeq ($(BUILD_TARGET),linux)
68 IDLTYPELIB = $(PATH_BIN)/VirtualBox_XPCOM.xpt
69 else
70 IDLTYPELIB = $(PATH_BIN)/components/VirtualBox_XPCOM.xpt
71 endif
72 IDLHEADER = $(VBOX_PATH_SDK)/include/VirtualBox_XPCOM.h
73 OTHERS = $(IDLTYPELIB)
74 OTHER_CLEAN = \
75 $(IDLFILE) \
76 $(IDLHEADER) \
77 $(IDLTYPELIB)
78
79endif
80
81
82
83#
84# The Main API documentation
85#
86docs: $(PATH_TARGET)/docs.Main
87
88$(PATH_TARGET)/docs.Main: \
89 Doxyfile.Main \
90 idl/doxygen.xsl \
91 idl/VirtualBox.xidl \
92 | $(call DIRDEP, $(PATH_TARGET)) \
93 $(call DIRDEP, $(PATH_OUT)/docs/Main)
94 $(RM) -f $(wildcard $(PATH_OUT)/docs/Main/html/*)
95 $(VBOX_XSLTPROC) -o $(PATH_TARGET)/VirtualBox.idl idl/doxygen.xsl idl/VirtualBox.xidl
96 PATH_OUT="$(PATH_OUT)" PATH_TARGET="$(PATH_TARGET)" PATH_CHM="$(subst /,\\,$(PATH_BIN)/VirtualBoxAPI.chm)" doxygen Doxyfile.Main
97 -$(EXEC_X86_WIN32) $(VBOX_PATH_HTML_HELP_WORKSHOP)/hhc.exe $(subst /,\\,$(PATH_OUT)/docs/Main/html/index.hhp)
98 $(APPEND) $(PATH_TARGET)/docs.Main
99
100$(call DIRDEP, $(PATH_OUT)/docs/Main):
101 $(MKDIR) -p $@
102
103
104#
105# VBoxSVC executable
106#
107VBoxSVC_TEMPLATE = VBOXMAINEXE
108VBoxSVC_DEFS = CFGLDR_HAVE_COM IN_CFGLDR_R3
109ifdef VBOX_WITH_VRDP
110VBoxSVC_DEFS += VBOX_VRDP IN_VRDP_R3
111endif
112ifdef VBOX_WITH_HGCM
113VBoxSVC_DEFS += VBOX_HGCM
114endif
115ifdef VBOX_MAIN_RELEASE_LOG
116VBoxSVC_DEFS += VBOX_MAIN_RELEASE_LOG LOG_ENABLED
117endif
118ifdef VBOX_WITH_USB
119VBoxSVC_DEFS += VBOX_WITH_USB
120endif
121ifdef VBOX_WITH_ALSA
122VBoxSVC_DEFS += VBOX_WITH_ALSA
123endif
124ifdef VBOX_WITH_WINMM
125VBoxSVC_DEFS += VBOX_WITH_WINMM
126endif
127ifdef VBOX_WITHOUT_LINUX_COMPILER_H
128VBoxSVC_DEFS += VBOX_WITHOUT_LINUX_COMPILER_H
129endif
130VBoxSVC_DEFS.win += VBOX_COM_OUTOFPROC_MODULE
131VBoxSVC_DEFS.win.x86 += _WIN32_WINNT=0x0500
132VBoxSVC_DEFS.win.amd64 += _WIN32_WINNT=0x0510
133VBoxSVC_INCS = \
134 include \
135 $(PATH_VBoxSVC) \
136 $(PATH_VBoxCOM) \
137 $(PATH_CURRENT)
138ifdef VBOX_WITH_XPCOM
139 VBoxSVC_LIBS += \
140 $(PATH_BIN)/VBoxDDU$(VBOX_SUFF_DLL) \
141 $(PATH_BIN)/VBoxXML$(VBOX_SUFF_DLL) \
142 $(TARGET_VBoxXPCOM)
143 VBoxSVC_LIBS += \
144 $(PATH_LIB)/VBoxXPCOMGlue$(VBOX_SUFF_LIB) \
145 $(PATH_BIN)/VBoxXPCOM$(VBOX_SUFF_DLL)
146 VBoxSVC_LIBS.darwin = \
147 $(LIB_VMM) \
148 $(LIB_REM)
149else
150 VBoxSVC_LIBS = \
151 $(PATH_LIB)/VBoxDDU$(VBOX_SUFF_LIB) \
152 $(PATH_LIB)/VBoxXML$(VBOX_SUFF_LIB) \
153 $(PATH_LIB)/VBoxCOM$(VBOX_SUFF_LIB)
154endif
155ifdef VBOX_WITH_LIBHAL
156VBoxSVC_CXXFLAGS += \
157 $(LIB_HAL_CFLAGS)
158VBoxSVC_LIBPATH += \
159 $(LIB_HAL_LIBPATH)
160VBoxSVC_LIBS += \
161 $(LIB_HAL_LIBS)
162VBoxSVC_DEFS += \
163 VBOX_USE_LIBHAL
164endif
165
166VBoxSVC_SOURCES = \
167 Logging.cpp \
168 Matching.cpp \
169 USBDeviceFilterImpl.cpp \
170 USBProxyService.cpp \
171 VirtualBoxBase.cpp \
172 VirtualBoxXMLUtil.cpp \
173 VirtualBoxErrorInfoImpl.cpp \
174 VirtualBoxImpl.cpp \
175 MachineImpl.cpp \
176 SnapshotImpl.cpp \
177 HardDiskImpl.cpp \
178 HardDiskAttachmentImpl.cpp \
179 ProgressImpl.cpp \
180 DVDDriveImpl.cpp \
181 DVDImageImpl.cpp \
182 FloppyDriveImpl.cpp \
183 FloppyImageImpl.cpp \
184 HostImpl.cpp \
185 HostDVDDriveImpl.cpp \
186 HostFloppyDriveImpl.cpp \
187 HostUSBDeviceImpl.cpp \
188 GuestOSTypeImpl.cpp \
189 NetworkAdapterImpl.cpp \
190 USBControllerImpl.cpp \
191 AudioAdapterImpl.cpp \
192 SharedFolderImpl.cpp \
193 SystemPropertiesImpl.cpp \
194 BIOSSettingsImpl.cpp
195
196ifdef VBOX_WITH_VRDP
197VBoxSVC_SOURCES += VRDPServerImpl.cpp
198endif
199
200VBoxSVC_SOURCES.darwin = \
201 darwin/iokit.cpp
202
203VBoxSVC_SOURCES.win = \
204 HostNetworkInterfaceImpl.cpp \
205 win32/svcmain.cpp \
206 win32/svchlp.cpp \
207 win32/VBoxSVC.rc
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.win += win32/USBProxyServiceWin32.cpp
218endif
219
220VBoxSVC_LDFLAGS.darwin = -framework IOKit
221ifeq ($(BUILD_TYPE),debug)
222VBoxSVC_LDFLAGS.linux += -rdynamic # for backtrace_symbols()
223endif
224
225#
226# VBoxSVC wrapper module
227#
228ifdef VBOX_WITH_XPCOM
229
230VBoxSVCM_TEMPLATE = VBOXMAIN
231ifneq ($(BUILD_TARGET),linux)
232VBoxSVCM_INST = $(INST_BIN)components/
233endif
234VBoxSVCM_DEFS = IN_RING3 IN_CFGLDR_R3
235VBoxSVCM_INCS = \
236 include \
237 $(PATH_VBoxC) \
238 $(PATH_VBoxCOM) \
239 $(PATH_CURRENT)
240VBoxSVCM_SOURCES = \
241 linux/server_module.cpp
242VBoxSVCM_LIBS = \
243 $(PATH_BIN)/VBoxXPCOM$(VBOX_SUFF_DLL)
244VBoxSVCM_LDFLAGS.darwin = \
245 -install_name @executable_path/components/VBoxSVCM.dylib \
246 -exported_symbols_list $(PATH_TARGET)/VBoxSVCM.def
247ifeq ($(BUILD_TARGET),darwin)
248VBoxSVCM_ORDERDEPS += $(PATH_TARGET)/VBoxSVCM.def
249VBoxSVCM_CLEAN += $(PATH_TARGET)/VBoxSVCM.def
250$(PATH_TARGET)/VBoxSVCM.def:
251 $(RM) -f $@
252 $(APPEND) $@ _NSGetModule
253endif
254
255endif # VBOX_WITH_XPCOM
256
257#
258# VBoxC module
259#
260VBoxC_TEMPLATE = VBOXMAIN
261ifneq ($(filter-out linux win,$(BUILD_TARGET)),)
262VBoxC_INST = $(INST_BIN)components/
263endif
264VBoxC_DEFS = IN_RING3 IN_CFGLDR_R3
265VBoxC_DEFS += VBOX_COM_INPROC
266ifdef VBOX_WITH_VRDP
267VBoxC_DEFS += VBOX_VRDP IN_VRDP_R3
268endif
269ifdef VBOX_WITH_HGCM
270VBoxC_DEFS += VBOX_HGCM
271endif
272ifdef VBOX_MAIN_RELEASE_LOG
273VBoxC_DEFS += VBOX_MAIN_RELEASE_LOG LOG_ENABLED
274endif
275ifdef VBOX_WITH_USB
276VBoxC_DEFS += VBOX_WITH_USB
277endif
278ifdef VBOX_WITH_ALSA
279VBoxC_DEFS += VBOX_WITH_ALSA
280endif
281ifdef VBOX_WITH_WINMM
282VBoxC_DEFS += VBOX_WITH_WINMM
283endif
284VBoxC_DEFS.win.x86 += _WIN32_WINNT=0x0500
285VBoxC_DEFS.win.amd64 += _WIN32_WINNT=0x0510
286VBoxC_INCS = \
287 include \
288 $(PATH_VBoxC) \
289 $(PATH_VBoxCOM)
290VBoxC_INCS.win := \
291 $(PATH_SUB_CURRENT)
292VBoxC_LDFLAGS.darwin = \
293 -install_name @executable_path/components/VBoxSVCM.dylib \
294 -exported_symbols_list $(PATH_TARGET)/VBoxC.def
295ifdef VBOX_USE_VCC80
296VBoxC_LDFLAGS.win = /MANIFEST
297endif
298ifdef VBOX_WITH_XPCOM
299VBoxC_LIBS = \
300 $(TARGET_VBoxXPCOM) \
301 $(PATH_BIN)/VBoxXPCOM$(VBOX_SUFF_DLL)
302 ifneq ($(BUILD_TARGET),darwin) # Why is a XPCOM component linking with the glue? Because of the old com.cpp?
303VBoxC_LIBS += $(PATH_LIB)/VBoxXPCOMGlue$(VBOX_SUFF_LIB)
304 endif
305else
306VBoxC_LIBS = \
307 $(PATH_LIB)/VBoxCOM$(VBOX_SUFF_LIB)
308endif
309VBoxC_LIBS += \
310 $(LIB_VMM) \
311 $(LIB_REM)
312VBoxC_SOURCES = \
313 Logging.cpp \
314 VBoxDll.cpp \
315 USBDeviceImpl.cpp \
316 RemoteUSBDeviceImpl.cpp \
317 VirtualBoxBase.cpp \
318 VirtualBoxErrorInfoImpl.cpp \
319 ProgressImpl.cpp \
320 SharedFolderImpl.cpp \
321 SessionImpl.cpp \
322 ConsoleImpl.cpp \
323 ConsoleVRDPServer.cpp \
324 GuestImpl.cpp \
325 KeyboardImpl.cpp \
326 MouseImpl.cpp \
327 DisplayImpl.cpp \
328 FramebufferImpl.cpp \
329 MachineDebuggerImpl.cpp \
330 VBoxDriversRegister.cpp \
331 AudioSnifferInterface.cpp \
332 VMMDevInterface.cpp
333VBoxC_SOURCES.win = \
334 win32/dllmain.cpp \
335 win32/VBoxC.def \
336 win32/VBoxC.rc
337ifdef VBOX_WITH_XPCOM
338VBoxC_SOURCES += \
339 linux/module.cpp
340endif
341
342ifdef VBOX_WITH_HGCM
343VBoxC_SOURCES += \
344 hgcm/HGCMObjects.cpp \
345 hgcm/HGCMThread.cpp \
346 hgcm/HGCM.cpp
347endif
348
349ifdef VBOX_WITH_USB
350VBoxC_SOURCES += \
351 RemoteUSBBackend.cpp
352endif
353
354ifeq ($(BUILD_TARGET),darwin)
355VBoxC_ORDERDEPS += $(PATH_TARGET)/VBoxC.def
356VBoxC_CLEAN += $(PATH_TARGET)/VBoxC.def
357$(PATH_TARGET)/VBoxC.def: $(MAKEFILE_CURRENT)
358 $(RM) -f $@
359 $(APPEND) $@ _NSGetModule
360 $(APPEND) $@ _VBoxDriversRegister
361endif
362
363#
364# VBoxXML
365#
366VBoxXML_TEMPLATE = VBOXMAIN
367VBoxXML_SDKS = VBOX_XALAN VBOX_XERCES
368## @todo Why do we need this? Why isn't it in the template?!?
369VBoxXML_CXXFLAGS.win = -EHsc
370VBoxXML_DEFS = \
371 CFGLDR_HAVE_COM IN_RING3 IN_CFGLDR_R3
372VBoxXML_INCS = \
373 include \
374 $(PATH_TARGET)
375VBoxXML_SOURCES = \
376 xml/cfgldr.cpp \
377 xml/cfgldrhlp.cpp
378ifdef VBOX_WITH_XPCOM
379VBoxXML_LIBS = \
380 $(TARGET_VBoxXPCOM) \
381 $(PATH_BIN)/VBoxXPCOM$(VBOX_SUFF_DLL)
382endif
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#
397tstCFGLdr_TEMPLATE = VBOXR3
398tstCFGLdr_SDKS = VBOX_XALAN VBOX_XERCES
399tstCFGLdr_DEFS = IN_CFGLDR_R3 STANDALONE_TEST
400## @todo these makes uncessary noice. fix the template usage!
401tstCFGLdr_CXXFLAGS.win = -EHsc
402tstCFGLdr_SOURCES = \
403 xml/cfgldr.cpp \
404 xml/cfgldrhlp.cpp
405tstCFGLdr_INCS = \
406 include \
407 $(PATH_TARGET)
408ifdef VBOX_WITH_XPCOM
409tstCFGLdr_LIBS = \
410 $(PATH_LIB)/VBoxXPCOM$(VBOX_SUFF_LIB)
411endif
412tstCFGLdr_LIBS += \
413 $(LIB_RUNTIME)
414
415
416#
417# VBoxCOM - COM Abstraction Layer library
418#
419VBoxCOM_COMMON_SOURCES = \
420 glue/com.cpp \
421 glue/initterm.cpp \
422 glue/string.cpp \
423 glue/EventQueue.cpp \
424 glue/ErrorInfo.cpp
425
426VBoxCOM_TEMPLATE = VBOXMAIN
427VBoxCOM_DEFS.x86 = _WIN32_WINNT=0x0500
428VBoxCOM_DEFS.amd64 = _WIN32_WINNT=0x0510
429VBoxCOM_SOURCES = \
430 $(VBoxCOM_COMMON_SOURCES) \
431 $(PATH_VBoxCOM)/VirtualBox_i.c
432
433
434#
435# VBoxXPCOM
436#
437VBoxXPCOM_TEMPLATE = VBOXMAIN
438VBoxXPCOM_SOURCES = \
439 $(VBoxCOM_COMMON_SOURCES) \
440 linux/helpers.cpp
441VBoxXPCOM_INCS = \
442 include
443
444
445#
446# Generate _DEPS on all sources which depends on generated headers.
447#
448ifeq ($(BUILD_TARGET),win)
449PREREQS = $(PATH_VBoxCOM)/VirtualBox_i.c
450else
451PREREQS = $(IDLTYPELIB) $(IDLHEADER)
452endif
453
454# brute force way to ensure the prereqs are generated before anything is compiled.
455define def_src_deps
456$(src)_DEPS = $(PREREQS)
457endef
458$(foreach src,\
459 $(VBoxC_SOURCES) $(VBoxC_SOURCES.$(BUILD_TARGET)) \
460 $(VBoxSVC_SOURCES) $(VBoxSVC_SOURCES.$(BUILD_TARGET)) \
461 $(VBoxCOM_COMMON_SOURCES) $(VBoxCOM_SOURCES) $(VBoxXPCOM_SOURCES) \
462 ,$(eval $(value def_src_deps)))
463
464
465#
466# Embed XML Schema files to VBoxSVC
467#
468VBOX_XML_ENTITIES = $(PATH_TARGET)/VirtualBoxXMLUtil_entities.h
469VBOX_XML_ENTITIES_COMMON = $(PATH_TARGET)/VirtualBoxXMLUtil_common_entities.h
470
471VBOX_XML_SCHEMA_COMMON = xml/VirtualBox-settings-common.xsd
472VBOX_XML_SCHEMA.darwin = xml/VirtualBox-settings-macosx.xsd
473VBOX_XML_SCHEMA.linux = xml/VirtualBox-settings-linux.xsd
474VBOX_XML_SCHEMA.win = xml/VirtualBox-settings-windows.xsd
475
476VirtualBoxXMLUtil.cpp_DEPS = $(VBOX_XML_ENTITIES) $(VBOX_XML_ENTITIES_COMMON)
477
478$(VBOX_XML_ENTITIES_COMMON): $(VBOX_XML_SCHEMA_COMMON) $(VBOX_BIN2C)
479 $(call MSG_TOOL,bin2c,VBoxXML,$<,$@)
480 $(QUIET)$(VBOX_BIN2C) VirtualBox_settings_common_xsd $< $@
481
482$(VBOX_XML_ENTITIES): $(VBOX_XML_SCHEMA.$(BUILD_TARGET)) $(VBOX_BIN2C)
483 $(call MSG_TOOL,bin2c,VBoxXML,$<,$@)
484 $(QUIET)$(VBOX_BIN2C) VirtualBox_settings_xsd $< $@
485
486OTHER_CLEAN += $(VBOX_XML_ENTITIES) $(VBOX_XML_ENTITIES_COMMON)
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,VBoxXML,$<,$@)
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#
510# Creates the symlinks necessary for making XPCOM work.
511#
512## @todo Figure out why Linux really needs this, darwin doesn't...
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,VBoxXML,$<,$@)
539 $(QUIET)$(MKDIR) -p $(@D)
540 $(QUIET)$(VBOX_XSLTPROC) -o $@ $^
541
542$(IDLTYPELIB): $(IDLFILE) | $(call DIRDEP,$(dir $(IDLTYPELIB)))
543 $(call MSG_TOOL,xpidl,VBoxXML,$<,$@)
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,VBoxXML,$<,$@)
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,VBoxXML,$<,$@)
564 $(QUIET)$(MKDIR) -p $(VBOX_PATH_SDK)/idl
565 $(QUIET)$(VBOX_XSLTPROC) -o $@ $^
566
567## @todo r=bird: last changes to this rule showed incorrect dependencies here as it broke testcase (see testboxwin2).
568# This is kind of obvious when looking at the rule, because it's (a) not specifing all it output
569# and (b) generating more stuff *after* the maintarget has been completed.
570#
571# What needs to be done is to not depend on _i.c in the object subdir, but on all the final outputs.
572$(PATH_VBoxCOM)/VirtualBox_i.c: $(IDLFILE) | $(call DIRDEP,$(PATH_VBoxCOM))
573 $(MAIN_IDL) $(IDL_DEFS) \
574 /out $(subst /,\\,$(PATH_VBoxCOM)) \
575 /cpp_cmd $(subst /,\\,$(TOOL_$(VBOX_VCC_TOOL)_CC)) \
576 /I $(subst /,\\,$(PATH_SDK_WINPSDK_INC)) \
577 /I idl \
578 $(subst /,\\,$<)
579 $(MKDIR) -p $(VBOX_PATH_SDK)/include
580 $(CP) $(PATH_VBoxCOM)/VirtualBox.h $(VBOX_PATH_SDK)/include
581 $(MKDIR) -p $(VBOX_PATH_SDK)/lib
582 $(CP) $(PATH_VBoxCOM)/VirtualBox.tlb $(VBOX_PATH_SDK)/lib
583 $(CP) $(PATH_VBoxCOM)/VirtualBox_i.c $(VBOX_PATH_SDK)/lib
584
585endif
586
587# bird: anyone still using this? If not it's a gonner.
588## Hack to work around wine's trouble with midl.exe and rc.exe (seems to be msvcrt.dll related)
589#gen: $(PREREQS)
590
591
592#
593# Translation stuff
594#
595VBoxSVC_HEADERS = \
596 include/collection.h \
597 include/MachineImpl.h \
598 include/HostDVDDriveImpl.h \
599 include/HostFloppyDriveImpl.h
600
601VBoxC_HEADERS = \
602 include/ConsoleImpl.h
603
604VBoxSVC_TRANSLATIONS = \
605 nls/VBoxSVC_de.ts
606
607VBoxC_TRANSLATIONS = \
608 nls/VBoxC_de.ts
609
610updatenls:
611 $(VBOX_LUPDATE) $(VBoxSVC_SOURCES) $(VBoxSVC_HEADERS) -ts $(VBoxSVC_TRANSLATIONS)
612 $(VBOX_LUPDATE) $(VBoxC_SOURCES) $(VBoxC_HEADERS) -ts $(VBoxC_TRANSLATIONS)
613
614ifdef VBOX_WITH_XPCOM
615
616testidl: $(IDLFILE) $(IDLTYPELIB)
617testidlhdr: $(IDLHEADER)
618
619else
620
621testidl: $(IDLFILE) $(PATH_VBoxCOM)/VirtualBox_i.c
622
623endif
624
625$(PATH_BIN)/comregister.cmd: win32/comregister.cmd
626 $(CP) $< $@
627
628
629# Hot fix when dependencies goes bad again...
630#.NOTPARALLEL: $(TARGET_VBoxC) $(TARGET_VBoxSVC) $(TARGET_VBoxXPCOM) $(TARGET_VBoxCOM) $(IDLHEADER) $(IDLFILE) $(PATH_VBoxCOM)/VirtualBox_i.c
631
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