VirtualBox

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

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

Converted to sub-makefiles so we can build webservices in parallel with the other stuff (req. 0.1.3 binaries).

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