VirtualBox

source: vbox/trunk/src/libs/xpcom18a4/Makefile.kmk@ 108453

最後變更 在這個檔案從108453是 108322,由 vboxsync 提交於 3 週 前

libs/xpcom18a4: Replace xpidl with xpidl-new which enables us to drop the dreaded libIDL dependency (library is dead for well over a decade), bugref:10321

  • 屬性 svn:eol-style 設為 native
  • 屬性 svn:keywords 設為 Author Date Id Revision
檔案大小: 33.5 KB
 
1# $Id: Makefile.kmk 108322 2025-02-21 11:38:25Z vboxsync $
2## @file
3# Sub-Makefile for XPCOM.
4#
5
6#
7# Copyright (C) 2006-2024 Oracle and/or its affiliates.
8#
9# This file is part of VirtualBox base platform packages, as
10# available from https://www.alldomusa.eu.org.
11#
12# This program is free software; you can redistribute it and/or
13# modify it under the terms of the GNU General Public License
14# as published by the Free Software Foundation, in version 3 of the
15# License.
16#
17# This program is distributed in the hope that it will be useful, but
18# WITHOUT ANY WARRANTY; without even the implied warranty of
19# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20# General Public License for more details.
21#
22# You should have received a copy of the GNU General Public License
23# along with this program; if not, see <https://www.gnu.org/licenses>.
24#
25# SPDX-License-Identifier: GPL-3.0-only
26#
27
28SUB_DEPTH = ../../..
29include $(KBUILD_PATH)/subheader.kmk
30
31# Make sure our Config.kmk is included.
32ifndef VBOX_PATH_XPCOM_SRC
33 include $(PATH_SUB_CURRENT)/Config.kmk
34endif
35
36#
37# Globals
38#
39
40# File for filtering out C symbols from the XPCOM library. Used to avoid
41# symbol namespace pollution, causing trouble with system libraries.
42XPCOM_C_NAMESPACE_MAP = $(VBOX_PATH_XPCOM_SRC)/xpcom-namespace-cleanup.map
43ifdef VBOX_WITH_XPCOM_NAMESPACE_CLEANUP
44 # At the moment, only Solaris uses the generated map file. GNU ld is smart
45 # enough to handle symbol wildcards itself.
46 if1of ($(KBUILD_TARGET), solaris)
47 XPCOM_C_NAMESPACE_MAP = $(PATH_TARGET)/xpcom-namespace-cleanup.map
48 OTHER_CLEAN += $(XPCOM_C_NAMESPACE_MAP)
49 endif
50endif
51
52# @todo check whether VBoxXPCOMIPCC.so or VBoxXPCOMIPCD contain undefined
53# symbols starting with NS_, PL_, PR_ or XPT. Would move the test time failure
54# when missing a symbol renaming to a build time failure. Likewise, there
55# should be a check whether VBoxXPCOM.so contains global C symbols (at least
56# where the whitelisting of symbols via the map file is not used).
57
58#
59# Header installs.
60#
61INSTALLS += \
62 NSPRPUB-HEADERS \
63 STRING-HEADERS \
64 XPCOM-HEADERS \
65 IPCD-HEADERS
66
67#
68# The IDL compiler, typelib linker and xpt files.
69#
70BLDPROGS += \
71 xpidl \
72 xpt_link
73
74BLDDIRS += \
75 $(PATH_TARGET)/VBox-xpcom-xpt-files/
76
77#
78# Always build the VBoxXPCOM import library.
79#
80IMPORT_LIBS += VBoxXPCOMImp
81
82#
83# We build several libraries so that any linker command line
84# length restrictions limit will be avoided. (Solaris, Mac?)
85#
86if !defined(VBOX_ONLY_SDK) && (!defined(VBOX_ONLY_EXTPACKS) || !defined(VBOX_ONLY_EXTPACKS_USE_IMPLIBS))
87
88 VBOX_XPCOM_LIBRARIES := \
89 VBox-xpcom-nspr \
90 VBox-xpcom-typelib \
91 VBox-xpcom-string \
92 VBox-xpcom-base \
93 VBox-xpcom-ds \
94 VBox-xpcom-io \
95 VBox-xpcom-components \
96 VBox-xpcom-threads \
97 VBox-xpcom-xptinfo \
98 VBox-xpcom-xptcall \
99 VBox-xpcom-proxy \
100 VBox-xpcom-ipcshared \
101 VBoxXPCOMGlue_s \
102 $(if $(VBOX_WITH_XPCOM_GLUE_WHICH_IS_UNUSED),VBoxXPCOMGlue,)
103 LIBRARIES += $(VBOX_XPCOM_LIBRARIES)
104
105 VBOX_XPCOM_DLLS := \
106 VBoxXPCOM \
107 VBoxXPCOMIPCC \
108 VBoxXPCOMIPCD
109
110 DLLS += $(VBOX_XPCOM_DLLS)
111
112 ifdef VBOX_WITH_32_ON_64_MAIN_API
113 LIBRARIES += $(addsuffix -x86,$(VBOX_XPCOM_LIBRARIES))
114 DLLS += $(addsuffix -x86,$(VBOX_XPCOM_DLLS))
115 endif
116
117
118 ifdef VBOX_WITH_TESTCASES
119 PROGRAMS += \
120 tstnsIFileTest \
121 tstTestArray \
122 tstTestAutoLock \
123 tstTestCOMPtr \
124 tstTestCOMPtrEq \
125 tstTestCRT \
126 tstTestFactory \
127 tstTestHashtables \
128 tstTestID \
129 tstTestObserverService \
130 tstTestXPIDLString \
131 tstTestXPTCInvoke \
132 tstTestDeque \
133 tstTestAutoPtr \
134 tstTestMinStringAPI \
135 tstTestStrings \
136 tstPrimitiveTest
137 endif # VBOX_WITH_TESTCASES
138
139endif # !VBOX_ONLY_SDK && (!defined(VBOX_ONLY_EXTPACKS) || !defined(VBOX_ONLY_EXTPACKS_USE_IMPLIBS))
140
141
142
143
144#
145# SDK headers - lot's of files to install...
146#
147# Tip: If you are going to remove files here, you might
148# wish to do a `kmk uninstall' first to avoid have
149# obsoleted files in the $(INST_SDK) directory.
150#
151NSPRPUB-HEADERS_INST = $(INST_SDK)bindings/xpcom/include/nsprpub/
152NSPRPUB-HEADERS_IFFLAGS = -m 644
153NSPRPUB-HEADERS_SOURCES = \
154 nsprpub/pr/include/nspr.h \
155 nsprpub/lib/ds/plarena.h \
156 nsprpub/lib/ds/plarenas.h \
157 nsprpub/lib/ds/plhash.h \
158 nsprpub/pr/include/prbit.h \
159 nsprpub/pr/include/prlong.h \
160 nsprpub/pr/include/prmem.h \
161 nsprpub/pr/include/prmon.h \
162 nsprpub/pr/include/prtime.h \
163 nsprpub/pr/include/prtypes.h \
164 nsprpub/pr/include/md/_vbox.cfg=>prcpucfg.h
165
166STRING-HEADERS_INST = $(INST_SDK)bindings/xpcom/include/string/
167STRING-HEADERS_IFFLAGS = -m 644
168STRING-HEADERS_SOURCES = \
169 xpcom/string/public/nsAString.h \
170 xpcom/string/public/nsAlgorithm.h \
171 xpcom/string/public/nsCharTraits.h \
172 xpcom/string/public/nsDependentString.h \
173 xpcom/string/public/nsDependentSubstring.h \
174 xpcom/string/public/nsEmbedString.h \
175 xpcom/string/public/nsLiteralString.h \
176 xpcom/string/public/nsObsoleteAString.h \
177 xpcom/string/public/nsPrintfCString.h \
178 xpcom/string/public/nsPromiseFlatString.h \
179 xpcom/string/public/nsReadableUtils.h \
180 xpcom/string/public/nsString.h \
181 xpcom/string/public/nsStringAPI.h \
182 xpcom/string/public/nsStringFwd.h \
183 xpcom/string/public/nsStringIterator.h \
184 xpcom/string/public/nsSubstring.h \
185 xpcom/string/public/nsSubstringTuple.h \
186 xpcom/string/public/nsTAString.h \
187 xpcom/string/public/nsTDependentString.h \
188 xpcom/string/public/nsTDependentSubstring.h \
189 xpcom/string/public/nsTObsoleteAString.h \
190 xpcom/string/public/nsTPromiseFlatString.h \
191 xpcom/string/public/nsTString.h \
192 xpcom/string/public/nsTSubstring.h \
193 xpcom/string/public/nsTSubstringTuple.h \
194 xpcom/string/public/nsUTF8Utils.h \
195 xpcom/string/public/nsXPIDLString.h \
196 xpcom/string/public/string-template-def-char.h \
197 xpcom/string/public/string-template-def-unichar.h \
198 xpcom/string/public/string-template-undef.h
199
200XPCOM-HEADERS_INST = $(INST_SDK)bindings/xpcom/include/xpcom/
201XPCOM-HEADERS_IFFLAGS = -m 644
202XPCOM-HEADERS_SOURCES = \
203 xpcom/base/nsAgg.h \
204 xpcom/io/nsAppDirectoryServiceDefs.h \
205 xpcom/ds/nsArray.h \
206 xpcom/ds/nsArrayEnumerator.h \
207 xpcom/ds/nsAtomService.h \
208 xpcom/threads/nsAutoLock.h \
209 xpcom/base/nsAutoPtr.h \
210 xpcom/ds/nsBaseHashtable.h \
211 xpcom/ds/nsCOMArray.h \
212 xpcom/ds/nsCRT.h \
213 xpcom/components/nsCategoryManagerUtils.h \
214 xpcom/ds/nsClassHashtable.h \
215 xpcom/components/nsComponentManagerObsolete.h \
216 xpcom/components/nsComponentManagerUtils.h \
217 xpcom/ds/nsDataHashtable.h \
218 xpcom/base/nsDebugImpl.h \
219 xpcom/ds/nsDeque.h \
220 xpcom/io/nsDirectoryService.h \
221 xpcom/io/nsDirectoryServiceDefs.h \
222 xpcom/io/nsDirectoryServiceUtils.h \
223 xpcom/ds/nsDoubleHashtable.h \
224 xpcom/ds/nsEnumeratorUtils.h \
225 xpcom/base/nsError.h \
226 xpcom/threads/nsEventQueueUtils.h \
227 xpcom/ds/nsHashKeys.h \
228 xpcom/ds/nsHashSets.h \
229 xpcom/ds/nsHashtable.h \
230 xpcom/base/nsID.h \
231 xpcom/base/nsIID.h \
232 xpcom/components/nsIServiceManagerObsolete.h \
233 xpcom/components/nsIServiceManagerUtils.h \
234 xpcom/base/nsISupportsBase.h \
235 xpcom/ds/nsInt64.h \
236 xpcom/ds/nsInterfaceHashtable.h \
237 xpcom/io/nsLocalFile.h \
238 xpcom/io/nsLocalFileUnix.h \
239 xpcom/components/nsModule.h \
240 xpcom/io/nsNativeCharsetUtils.h \
241 xpcom/components/nsNativeComponentLoader.h \
242 xpcom/ds/nsObserverService.h \
243 xpcom/components/nsObsoleteModuleLoading.h \
244 xpcom/proxy/public/nsProxiedService.h \
245 xpcom/proxy/public/nsProxyEvent.h \
246 xpcom/proxy/public/nsProxyRelease.h \
247 xpcom/ds/nsRefPtrHashtable.h \
248 xpcom/ds/nsStaticAtom.h \
249 xpcom/components/nsStaticComponent.h \
250 xpcom/ds/nsStringEnumerator.h \
251 xpcom/io/nsStringIO.h \
252 xpcom/ds/nsSupportsArray.h \
253 xpcom/ds/nsSupportsPrimitives.h \
254 xpcom/ds/nsTHashtable.h \
255 xpcom/base/nsTraceRefcntImpl.h \
256 xpcom/ds/nsVariant.h \
257 xpcom/ds/nsVoidArray.h \
258 xpcom/base/nsWeakPtr.h \
259 xpcom/build/nsXPCOM.h \
260 xpcom/build/nsXPCOMCID.h \
261 xpcom/base/nscore.h \
262 xpcom/ds/pldhash.h \
263 xpcom/threads/plevent.h \
264 xpcom/components/xcDll.h \
265 xpcom/typelib/xpt/public/xpt_arena.h \
266 xpcom/typelib/xpt/public/xpt_struct.h \
267 xpcom/typelib/xpt/public/xpt_xdr.h \
268 xpcom/reflect/xptcall/public/xptcall.h \
269 xpcom/reflect/xptcall/public/xptcstubsdecl.inc \
270 xpcom/reflect/xptcall/public/xptcstubsdef.inc \
271 xpcom/reflect/xptinfo/public/xptinfo.h \
272 \
273 xpcom/glue/nsIInterfaceRequestorUtils.h \
274 xpcom/glue/nsISupportsImpl.h \
275 xpcom/glue/nsISupportsUtils.h \
276 xpcom/glue/nsIWeakReferenceUtils.h \
277 \
278 xpcom/glue/nsCOMPtr.h \
279 xpcom/glue/nsDebug.h \
280 xpcom/glue/nsGenericFactory.h \
281 xpcom/glue/nsIGenericFactory.h \
282 xpcom/glue/nsMemory.h \
283 xpcom/glue/nsTraceRefcnt.h \
284 xpcom/glue/nsWeakReference.h \
285 \
286 xpcom/glue/standalone/nsXPCOMGlue.h \
287 \
288 xpcom-config.h
289
290IPCD-HEADERS_INST = $(INST_SDK)bindings/xpcom/include/ipcd/
291IPCD-HEADERS_IFFLAGS = -m 644
292IPCD-HEADERS_SOURCES = \
293 ipc/ipcd/client/public/ipcCID.h \
294 ipc/ipcd/client/public/ipcdclient.h
295
296
297#
298# The IDL compiler.
299#
300# We build it statically because we cannot rely on additional .a files
301# like in the original build
302#
303xpidl_TEMPLATE = XPComBldProg
304xpidl_DEFS = EXPORT_XPT_API
305## @todo This assumes HOST == TARGET.
306xpidl_INST = $(INST_BIN)
307xpidl_SOURCES = \
308 xpcom/typelib/xpidl/xpidl.c \
309 xpcom/typelib/xpidl/xpidl_idl.c \
310 xpcom/typelib/xpidl/xpidl_util.c \
311 xpcom/typelib/xpidl/xpidl_header.c \
312 xpcom/typelib/xpidl/xpidl_typelib.c \
313 xpcom/typelib/xpt/src/xpt_arena.c \
314 xpcom/typelib/xpt/src/xpt_struct.c \
315 xpcom/typelib/xpt/src/xpt_xdr.c \
316 ../../VBox/Runtime/common/script/scriptlex.cpp
317
318
319#
320# The XPT linker.
321#
322xpt_link_TEMPLATE = XPComBldProg
323xpt_link_SOURCES = \
324 xpcom/typelib/xpt/tools/xpt_link.c \
325 xpcom/typelib/xpt/src/xpt_arena.c \
326 xpcom/typelib/xpt/src/xpt_struct.c \
327 xpcom/typelib/xpt/src/xpt_xdr.c
328
329
330#
331# The NSPR Library.
332#
333VBox-xpcom-nspr_TEMPLATE = XPComDll
334VBox-xpcom-nspr_INSTTYPE = none
335VBox-xpcom-nspr_DEFS = \
336 _NSPR_BUILD_
337VBox-xpcom-nspr_DEFS.linux = \
338 _POSIX_SOURCE=1 \
339 _BSD_SOURCE=1 \
340 _SVID_SOURCE=1 \
341 _DEFAULT_SOURCE \
342 _REENTRANT=1
343# _BSD_SOURCE is here to keep the Glibc header files happy and make them include the right things
344VBox-xpcom-nspr_INCS = \
345 $(VBox-xpcom-nspr_0_OUTDIR)
346VBox-xpcom-nspr_SOURCES = \
347 nsprpub/lib/ds/plarena.c \
348 nsprpub/lib/ds/plhash.c \
349 nsprpub/pr/src/pthreads/ptsynch.c
350
351$(call KB_FN_DO_PASS0_ON_TARGET,VBox-xpcom-nspr)
352
353$(evalcall2 VBOX_XPCOM_X86,VBox-xpcom-nspr)
354
355
356VBox-xpcom-typelib_TEMPLATE = XPComDll
357VBox-xpcom-typelib_INSTTYPE = none
358VBox-xpcom-typelib_SOURCES = \
359 xpcom/typelib/xpt/src/xpt_arena.c \
360 xpcom/typelib/xpt/src/xpt_struct.c \
361 xpcom/typelib/xpt/src/xpt_xdr.c
362$(evalcall VBOX_XPCOM_X86,VBox-xpcom-typelib)
363
364VBox-xpcom-string_TEMPLATE = XPComDll
365VBox-xpcom-string_INSTTYPE = none
366VBox-xpcom-string_SOURCES = \
367 xpcom/string/src/nsAString.cpp \
368 xpcom/string/src/nsDependentSubstring.cpp \
369 xpcom/string/src/nsObsoleteAStringThunk.cpp \
370 xpcom/string/src/nsPrintfCString.cpp \
371 xpcom/string/src/nsPromiseFlatString.cpp \
372 xpcom/string/src/nsReadableUtils.cpp \
373 xpcom/string/src/nsSubstring.cpp \
374 xpcom/string/src/nsSubstringTuple.cpp \
375 xpcom/string/src/nsString.cpp \
376 xpcom/string/src/nsStringComparator.cpp \
377 xpcom/string/src/nsStringObsolete.cpp
378$(evalcall VBOX_XPCOM_X86,VBox-xpcom-string)
379
380VBox-xpcom-base_TEMPLATE = XPComDll
381VBox-xpcom-base_INSTTYPE = none
382VBox-xpcom-base_DEFS = _IMPL_NS_COM
383VBox-xpcom-base_SOURCES = \
384 xpcom/base/nsDebugImpl.cpp \
385 xpcom/base/nsErrorService.cpp \
386 xpcom/base/nsExceptionService.cpp \
387 xpcom/base/nsID.cpp \
388 xpcom/base/nsTraceRefcntImpl.cpp
389$(evalcall VBOX_XPCOM_X86,VBox-xpcom-base)
390
391VBox-xpcom-ds_TEMPLATE = XPComDll
392VBox-xpcom-ds_INSTTYPE = none
393VBox-xpcom-ds_DEFS = _IMPL_NS_COM
394VBox-xpcom-ds_SOURCES = \
395 xpcom/ds/pldhash.c \
396 xpcom/ds/nsAtomTable.cpp \
397 xpcom/ds/nsAtomService.cpp \
398 xpcom/ds/nsCRT.cpp \
399 xpcom/ds/nsDeque.cpp \
400 xpcom/ds/nsEmptyEnumerator.cpp \
401 xpcom/ds/nsEnumeratorUtils.cpp \
402 xpcom/ds/nsHashSets.cpp \
403 xpcom/ds/nsHashtable.cpp \
404 xpcom/ds/nsObserverList.cpp \
405 xpcom/ds/nsObserverService.cpp \
406 xpcom/ds/nsProperties.cpp \
407 xpcom/ds/nsStringEnumerator.cpp \
408 xpcom/ds/nsSupportsArray.cpp \
409 xpcom/ds/nsSupportsArrayEnumerator.cpp \
410 xpcom/ds/nsSupportsPrimitives.cpp \
411 xpcom/ds/nsTHashtable.cpp \
412 xpcom/ds/nsVariant.cpp \
413 xpcom/ds/nsVoidArray.cpp \
414 xpcom/ds/nsCOMArray.cpp \
415 xpcom/ds/nsArray.cpp \
416 xpcom/ds/nsArrayEnumerator.cpp
417$(evalcall VBOX_XPCOM_X86,VBox-xpcom-ds)
418
419# @todo what about MOZ_USER_DIR?
420VBox-xpcom-io_TEMPLATE = XPComDll
421VBox-xpcom-io_INSTTYPE = none
422ifdef VBOX_WITH_AUTOMATIC_DEFS_QUOTING
423 VBox-xpcom-io_DEFS = _IMPL_NS_COM MOZ_USER_DIR=".mozilla"
424else
425 VBox-xpcom-io_DEFS = _IMPL_NS_COM MOZ_USER_DIR=\".mozilla\"
426endif
427if defined(VBOX_WITH_HARDENING) && defined(VBOX_PATH_APP_PRIVATE_ARCH)
428 ifdef VBOX_WITH_AUTOMATIC_DEFS_QUOTING
429 VBox-xpcom-io_DEFS += MOZ_DEFAULT_VBOX_XPCOM_HOME="$(VBOX_PATH_APP_PRIVATE_ARCH)"
430 else
431 VBox-xpcom-io_DEFS += MOZ_DEFAULT_VBOX_XPCOM_HOME=\"$(VBOX_PATH_APP_PRIVATE_ARCH)\"
432 endif
433endif
434VBox-xpcom-io_SOURCES = \
435 xpcom/io/nsAppFileLocationProvider.cpp \
436 xpcom/io/nsDirectoryService.cpp \
437 xpcom/io/nsLocalFileCommon.cpp \
438 xpcom/io/SpecialSystemDirectory.cpp \
439 xpcom/io/nsNativeCharsetUtils.cpp
440if1of ($(KBUILD_TARGET) $(KBUILD_TARGET).$(KBUILD_TARGET_ARCH), freebsd linux netbsd openbsd solaris darwin.amd64 darwin.arm64)
441 VBox-xpcom-io_SOURCES += \
442 xpcom/io/nsLocalFileUnix.cpp
443endif
444$(evalcall VBOX_XPCOM_X86,VBox-xpcom-io)
445
446VBox-xpcom-components_TEMPLATE = XPComDll
447VBox-xpcom-components_INSTTYPE = none
448VBox-xpcom-components_DEFS = _IMPL_NS_COM EXPORT_XPTI_API
449VBox-xpcom-components_SOURCES = \
450 xpcom/components/nsCategoryManager.cpp \
451 xpcom/components/nsComponentManager.cpp \
452 xpcom/components/nsComponentManagerObsolete.cpp \
453 xpcom/components/nsNativeComponentLoader.cpp \
454 xpcom/components/nsServiceManagerObsolete.cpp \
455 xpcom/components/xcDll.cpp \
456 xpcom/components/nsStaticComponentLoader.cpp
457$(evalcall VBOX_XPCOM_X86,VBox-xpcom-components)
458
459VBox-xpcom-threads_TEMPLATE = XPComDll
460VBox-xpcom-threads_INSTTYPE = none
461VBox-xpcom-threads_DEFS = _IMPL_NS_COM
462VBox-xpcom-threads_SOURCES = \
463 xpcom/threads/plevent.c \
464 xpcom/threads/nsAutoLock.cpp \
465 xpcom/threads/nsEventQueue.cpp \
466 xpcom/threads/nsEventQueueService.cpp
467$(evalcall VBOX_XPCOM_X86,VBox-xpcom-threads)
468
469VBox-xpcom-xptinfo_TEMPLATE = XPComDll
470VBox-xpcom-xptinfo_INSTTYPE = none
471VBox-xpcom-xptinfo_DEFS = _IMPL_NS_COM _IMPL_NS_BASE EXPORT_XPTI_API EXPORT_XPT_API
472VBox-xpcom-xptinfo_SOURCES = \
473 xpcom/reflect/xptinfo/src/xptiFile.cpp \
474 xpcom/reflect/xptinfo/src/xptiInterfaceInfo.cpp \
475 xpcom/reflect/xptinfo/src/xptiInterfaceInfoManager.cpp \
476 xpcom/reflect/xptinfo/src/xptiManifest.cpp \
477 xpcom/reflect/xptinfo/src/xptiMisc.cpp \
478 xpcom/reflect/xptinfo/src/xptiTypelibGuts.cpp \
479 xpcom/reflect/xptinfo/src/xptiWorkingSet.cpp \
480 xpcom/reflect/xptinfo/src/xptiZipItem.cpp \
481 xpcom/reflect/xptinfo/src/xptiZipLoader.cpp
482$(evalcall VBOX_XPCOM_X86,VBox-xpcom-xptinfo)
483
484
485VBox-xpcom-xptcall_TEMPLATE = XPComDll
486VBox-xpcom-xptcall_INSTTYPE = none
487VBox-xpcom-xptcall_DEFS = _IMPL_NS_COM _IMPL_NS_BASE EXPORT_XPTC_API
488VBox-xpcom-xptcall_DEFS.darwin = KEEP_STACK_16_BYTE_ALIGNED
489VBox-xpcom-xptcall_SOURCES = xpcom/reflect/xptcall/src/xptcall.cpp
490VBox-xpcom-xptcall_SOURCES.freebsd.x86 = xpcom/reflect/xptcall/src/md/unix/xptcinvoke_gcc_x86_unix.cpp \
491 xpcom/reflect/xptcall/src/md/unix/xptcstubs_gcc_x86_unix.cpp
492VBox-xpcom-xptcall_SOURCES.linux.x86 = xpcom/reflect/xptcall/src/md/unix/xptcinvoke_gcc_x86_unix.cpp \
493 xpcom/reflect/xptcall/src/md/unix/xptcstubs_gcc_x86_unix.cpp
494VBox-xpcom-xptcall_SOURCES.solaris.x86 = xpcom/reflect/xptcall/src/md/unix/xptcinvoke_x86_solaris.cpp \
495 xpcom/reflect/xptcall/src/md/unix/xptcstubs_x86_solaris.cpp
496VBox-xpcom-xptcall_SOURCES.amd64 = xpcom/reflect/xptcall/src/md/unix/xptcinvoke_amd64_vbox.asm
497VBox-xpcom-xptcall_SOURCES.arm64 = xpcom/reflect/xptcall/src/md/unix/xptcinvoke_arm64_vbox.cpp \
498 xpcom/reflect/xptcall/src/md/unix/xptcstubs_arm64_vbox.cpp
499VBox-xpcom-xptcall_SOURCES.darwin.amd64 = xpcom/reflect/xptcall/src/md/unix/xptcstubs_amd64_darwin.cpp # Underscore prefix.
500VBox-xpcom-xptcall_SOURCES.freebsd.amd64 = xpcom/reflect/xptcall/src/md/unix/xptcstubs_x86_64_linux.cpp
501VBox-xpcom-xptcall_SOURCES.linux.amd64 = xpcom/reflect/xptcall/src/md/unix/xptcstubs_x86_64_linux.cpp
502ifndef VBOX_GCC_USING_SOLARIS_AS
503 VBox-xpcom-xptcall_SOURCES.solaris.amd64 = xpcom/reflect/xptcall/src/md/unix/xptcstubs_x86_64_linux.cpp
504else
505 VBox-xpcom-xptcall_SOURCES.solaris.amd64 = xpcom/reflect/xptcall/src/md/unix/xptcstubs_x86_64_solaris.cpp
506endif
507
508xpcom/reflect/xptcall/src/md/unix/xptcstubs_x86_solaris.cpp_CXXFLAGS = -O0
509# -O0 works fine, while -O1 doesn't. The gcc man page can't be listing all the -f*
510# stuff that -O1 enables, because when using the options without -O1, it's -fomit-frame-pointer
511# that triggers is, while -O1 -fno-omit-frame-pointer does not work. Anyway, it's probably a gcc/mozila
512# bug and it's not worth investigating as I'm not the maintainger of the solaris gcc port. [bird, 2007-09-17]
513
514$(evalcall VBOX_XPCOM_X86,VBox-xpcom-xptcall)
515
516
517VBox-xpcom-proxy_TEMPLATE = XPComDll
518VBox-xpcom-proxy_INSTTYPE = none
519VBox-xpcom-proxy_DEFS = _IMPL_NS_COM EXPORT_XPTC_API EXPORT_XPTI_API
520VBox-xpcom-proxy_SOURCES = \
521 xpcom/proxy/src/nsProxyEvent.cpp \
522 xpcom/proxy/src/nsProxyEventClass.cpp \
523 xpcom/proxy/src/nsProxyEventObject.cpp \
524 xpcom/proxy/src/nsProxyObjectManager.cpp \
525 xpcom/proxy/src/nsProxyRelease.cpp
526$(evalcall VBOX_XPCOM_X86,VBox-xpcom-proxy)
527
528
529#
530# The VBoxXPCOM Glue static libraries.
531#
532# This isn't the normal XPCOM glue (see the places in XPCOM where XPCOM_GLUE is
533# checked), VirtualBox has its own glue library and this means this isn't used
534# much (one reason is that we don't provide frozen APIs yet). All VBox XPCOM
535# client applications are dependent on the given version of both the VBox XPCOM
536# runtime (binary dependency) and VirtualBox component library (COM interface
537# dependency). For this reason, VBox client applications link to the VBox XPCOM
538# shared library directly (instead of linking to the standalone XPCOM glue
539# library that would dynamically search for and load the installed XPCOM
540# runtime). For the same reason, we link all parts of XPCOM into a single
541# shared XPCOM library below (as opposed to the original XPCOM where e.g. NSPR
542# lives in a separate DLL). Additionally there is VBox specific glue code to
543# make both the client and server side code build with both XPCOM and COM,
544# which should be made part of the SDK eventually, but this is a higher level
545# of abstraction than this XPCOM specific glue code.
546#
547VBoxXPCOMGlue_COMMON_SOURCES = \
548 xpcom/glue/nsCOMPtr.cpp \
549 xpcom/glue/nsComponentManagerUtils.cpp \
550 xpcom/glue/nsDebug.cpp \
551 xpcom/glue/nsGenericFactory.cpp \
552 xpcom/glue/nsIInterfaceRequestorUtils.cpp \
553 xpcom/glue/nsMemory.cpp \
554 xpcom/glue/nsTraceRefcnt.cpp \
555 xpcom/glue/nsWeakReference.cpp
556
557# dependent glue library which goes in to the VBoxXPCOM shared library
558VBoxXPCOMGlue_s_TEMPLATE = XPComDll
559VBoxXPCOMGlue_s_INSTTYPE = none
560VBoxXPCOMGlue_s_DEFS = _IMPL_NS_COM
561VBoxXPCOMGlue_s_SOURCES = $(VBoxXPCOMGlue_COMMON_SOURCES)
562$(evalcall VBOX_XPCOM_X86,VBoxXPCOMGlue_s)
563
564# standalone glue library which all third-party client apps (if any) will
565# link with (currently completely unused and nit built, to be part of the SDK)
566VBoxXPCOMGlue_TEMPLATE = XPComDll
567VBoxXPCOMGlue_SOURCES = $(VBoxXPCOMGlue_COMMON_SOURCES)
568#VBoxXPCOMGlue_INST = lib/ $(INST_SDK)lib/
569$(evalcall VBOX_XPCOM_X86,VBoxXPCOMGlue)
570
571
572#
573# The VBoxXPCOM Shared Object, assembling all lib files.
574#
575VBoxXPCOM_TEMPLATE = XPComDll
576VBoxXPCOM_NAME = $(basename $(notdir $(LIB_XPCOM)))
577VBoxXPCOM_DEFS = BUILD_DCONNECT=1 _IMPL_NS_COM
578ifdef VBOX_WITH_XPCOM_NAMESPACE_CLEANUP
579 VBoxXPCOM_LDFLAGS.linux = -Wl,--version-script=$(XPCOM_C_NAMESPACE_MAP)
580 VBoxXPCOM_LNK_DEPS.linux += $(XPCOM_C_NAMESPACE_MAP)
581 VBoxXPCOM_LDFLAGS.solaris = -Wl,-M,$(XPCOM_C_NAMESPACE_MAP)
582 VBoxXPCOM_LNK_DEPS.solaris += $(XPCOM_C_NAMESPACE_MAP)
583endif
584VBoxXPCOM_SOURCES = \
585 xpcom/build/nsXPComInit.cpp \
586 xpcom/build/nsStringAPI.cpp
587VBoxXPCOM_SOURCES.darwin = \
588 vboxdeps.cpp
589VBoxXPCOM_SOURCES.solaris = \
590 vboxdeps.cpp
591VBoxXPCOM_LIBS = \
592 $(VBox-xpcom-typelib_1_TARGET) \
593 $(VBox-xpcom-string_1_TARGET) \
594 $(VBox-xpcom-base_1_TARGET) \
595 $(VBox-xpcom-ds_1_TARGET) \
596 $(VBox-xpcom-io_1_TARGET) \
597 $(VBox-xpcom-components_1_TARGET) \
598 $(VBox-xpcom-threads_1_TARGET) \
599 $(VBox-xpcom-xptinfo_1_TARGET) \
600 $(VBox-xpcom-xptcall_1_TARGET) \
601 $(VBox-xpcom-proxy_1_TARGET) \
602 $(VBox-xpcom-nspr_1_TARGET) \
603 $(VBoxXPCOMGlue_s_1_TARGET)
604VBoxXPCOM_LIBS.linux = \
605 pthread dl
606
607ifeq ($(filter-out freebsd linux netbsd openbsd,$(KBUILD_TARGET)),) # gnu ld.
608 VBoxXPCOM_LDFLAGS = -Wl,--whole-archive \
609 $(VBox-xpcom-typelib_1_TARGET) \
610 $(VBox-xpcom-string_1_TARGET) \
611 $(VBox-xpcom-base_1_TARGET) \
612 $(VBox-xpcom-ds_1_TARGET) \
613 $(VBox-xpcom-io_1_TARGET) \
614 $(VBox-xpcom-components_1_TARGET) \
615 $(VBox-xpcom-threads_1_TARGET) \
616 $(VBox-xpcom-xptinfo_1_TARGET) \
617 $(VBox-xpcom-xptcall_1_TARGET) \
618 $(VBox-xpcom-proxy_1_TARGET) \
619 $(VBox-xpcom-nspr_1_TARGET) \
620 $(VBoxXPCOMGlue_s_1_TARGET) \
621 -Wl,--no-whole-archive
622endif
623
624VBoxXPCOM_LDFLAGS.solaris += -Wl,-z,allextract \
625 $(VBox-xpcom-typelib_1_TARGET) \
626 $(VBox-xpcom-string_1_TARGET) \
627 $(VBox-xpcom-base_1_TARGET) \
628 $(VBox-xpcom-ds_1_TARGET) \
629 $(VBox-xpcom-io_1_TARGET) \
630 $(VBox-xpcom-components_1_TARGET) \
631 $(VBox-xpcom-threads_1_TARGET) \
632 $(VBox-xpcom-xptinfo_1_TARGET) \
633 $(VBox-xpcom-xptcall_1_TARGET) \
634 $(VBox-xpcom-proxy_1_TARGET) \
635 $(VBox-xpcom-nspr_1_TARGET) \
636 $(VBoxXPCOMGlue_s_1_TARGET) \
637 -Wl,-z,defaultextract
638
639# EF heap
640#VBoxXPCOM_LIBS += $(LIB_RUNTIME_EF)
641#VBoxXPCOM_LDFLAGS = -Wl,--whole-archive $(VBoxXPCOM_LIBS) -Wl,--no-whole-archive $(LIB_RUNTIME)
642VBoxXPCOM_LDFLAGS.darwin = -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/VBoxXPCOM.dylib
643
644#
645# The 32-bit VBoxXPCOM Shared Object, assembling all lib files.
646#
647VBoxXPCOM-x86_TEMPLATE = XPComDll-x86
648VBoxXPCOM-x86_EXTENDS = VBoxXPCOM
649VBoxXPCOM-x86_NAME = VBoxXPCOM-x86
650VBoxXPCOM-x86_LIBS = \
651 $(VBox-xpcom-typelib-x86_1_TARGET) \
652 $(VBox-xpcom-string-x86_1_TARGET) \
653 $(VBox-xpcom-base-x86_1_TARGET) \
654 $(VBox-xpcom-ds-x86_1_TARGET) \
655 $(VBox-xpcom-io-x86_1_TARGET) \
656 $(VBox-xpcom-components-x86_1_TARGET) \
657 $(VBox-xpcom-threads-x86_1_TARGET) \
658 $(VBox-xpcom-xptinfo-x86_1_TARGET) \
659 $(VBox-xpcom-xptcall-x86_1_TARGET) \
660 $(VBox-xpcom-proxy-x86_1_TARGET) \
661 $(VBox-xpcom-nspr-x86_1_TARGET) \
662 $(VBoxXPCOMGlue_s-x86_1_TARGET)
663
664ifeq ($(filter-out freebsd linux netbsd openbsd,$(KBUILD_TARGET)),) # gnu ld.
665 VBoxXPCOM-x86_LDFLAGS = -Wl,--whole-archive \
666 $(VBox-xpcom-typelib-x86_1_TARGET) \
667 $(VBox-xpcom-string-x86_1_TARGET) \
668 $(VBox-xpcom-base-x86_1_TARGET) \
669 $(VBox-xpcom-ds-x86_1_TARGET) \
670 $(VBox-xpcom-io-x86_1_TARGET) \
671 $(VBox-xpcom-components-x86_1_TARGET) \
672 $(VBox-xpcom-threads-x86_1_TARGET) \
673 $(VBox-xpcom-xptinfo-x86_1_TARGET) \
674 $(VBox-xpcom-xptcall-x86_1_TARGET) \
675 $(VBox-xpcom-proxy-x86_1_TARGET) \
676 $(VBox-xpcom-nspr-x86_1_TARGET) \
677 $(VBoxXPCOMGlue_s-x86_1_TARGET) \
678 -Wl,--no-whole-archive
679endif
680
681VBoxXPCOM-x86_LDFLAGS.solaris += -Wl,-z,allextract \
682 $(VBox-xpcom-typelib-x86_1_TARGET) \
683 $(VBox-xpcom-string-x86_1_TARGET) \
684 $(VBox-xpcom-base-x86_1_TARGET) \
685 $(VBox-xpcom-ds-x86_1_TARGET) \
686 $(VBox-xpcom-io-x86_1_TARGET) \
687 $(VBox-xpcom-components-x86_1_TARGET) \
688 $(VBox-xpcom-threads-x86_1_TARGET) \
689 $(VBox-xpcom-xptinfo-x86_1_TARGET) \
690 $(VBox-xpcom-xptcall-x86_1_TARGET) \
691 $(VBox-xpcom-proxy-x86_1_TARGET) \
692 $(VBox-xpcom-nspr-x86_1_TARGET) \
693 $(VBoxXPCOMGlue_s-x86_1_TARGET) \
694 -Wl,-z,defaultextract
695
696
697#
698# VBoxXPCOMImp - Import library/hack.
699#
700ifdef VBOX_WITH_XPCOM_NAMESPACE_CLEANUP
701 $(call VBOX_GENERATE_IMPORT_TARGET_FN,VBoxXPCOMImp,VBoxXPCOM,VBoxXPCOM-mangled.def)
702else
703 $(call VBOX_GENERATE_IMPORT_TARGET_FN,VBoxXPCOMImp,VBoxXPCOM,VBoxXPCOM.def)
704endif
705
706
707#
708# IPC templates.
709#
710ifdef VBOX_IPC_RELEASE_LOG
711 IPC_LOGGING = 1
712else ifneq ($(KBUILD_TYPE),release)
713 IPC_LOGGING = 1
714endif
715
716TEMPLATE_XPComIpcDll = XPCOM IPC libraries
717TEMPLATE_XPComIpcDll_EXTENDS = XPComDll
718TEMPLATE_XPComIpcDll_DEFS = \
719 $(TEMPLATE_XPComDll_DEFS) \
720 BUILD_DCONNECT=1
721
722ifdef VBOX_WITH_AUTOMATIC_DEFS_QUOTING
723 TEMPLATE_XPComIpcDll_DEFS += IPC_DAEMON_APP_NAME="VBoxSVC$(SUFF_EXE)"
724else
725 TEMPLATE_XPComIpcDll_DEFS += IPC_DAEMON_APP_NAME=\"VBoxSVC$(SUFF_EXE)\"
726endif
727ifdef IPC_LOGGING
728 TEMPLATE_XPComIpcDll_DEFS += IPC_LOGGING
729endif
730TEMPLATE_XPComIpcDll_LATE_LIBS = $(VBoxXPCOM_1_TARGET) $(TEMPLATE_XPComDll_LATE_LIBS)
731ifneq ($(KBUILD_TARGET),win)
732 ifeq ($(filter-out solaris.x86 %.amd64 %.sparc32 %.sparc64,$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH)),) ## TODO: cleanup!
733 if defined(VBOX_WITH_RELATIVE_RUNPATH) && !defined(VBOX_WITH_HARDENING)
734 TEMPLATE_XPComIpcDll_LDFLAGS = $(filter-out '$(VBOX_GCC_RPATH_OPT)%',$(TEMPLATE_XPComDll_LDFLAGS)) '$(VBOX_GCC_RPATH_OPT)$(VBOX_WITH_RELATIVE_RUNPATH)/..'
735 endif
736 else ifndef VBOX_WITH_HARDENING
737 ifdef VBOX_WITH_RELATIVE_RUNPATH
738 TEMPLATE_XPComIpcDll_LDFLAGS = $(filter-out '$(VBOX_GCC_RPATH_OPT)%',$(TEMPLATE_XPComDll_LDFLAGS)) '$(VBOX_GCC_RPATH_OPT)$(VBOX_WITH_RELATIVE_RUNPATH)/..'
739 endif
740 endif
741endif
742
743TEMPLATE_XPComIpcDll-x86 = 32-bit XPCOM IPC libraries
744TEMPLATE_XPComIpcDll-x86_EXTENDS = XPComIpcDll
745TEMPLATE_XPComIpcDll-x86_BLD_TRG_ARCH = x86
746TEMPLATE_XPComIpcDll-x86_LATE_LIBS = $(VBoxXPCOM-x86_1_TARGET) $(TEMPLATE_XPComDll-x86_LATE_LIBS)
747
748TEMPLATE_XPComIpcExe = XPCOM IPC executables
749TEMPLATE_XPComIpcExe_EXTENDS = XPComExe
750TEMPLATE_XPComIpcExe_DEFS = $(TEMPLATE_XPComExe_DEFS) BUILD_DCONNECT=1
751ifdef IPC_LOGGING
752 TEMPLATE_XPComIpcExe_DEFS += IPC_LOGGING
753endif
754
755#
756# Shared IPC code. Used by the IPC component as well as the executables.
757#
758VBox-xpcom-ipcshared_TEMPLATE = XPComIpcDll
759VBox-xpcom-ipcshared_INSTTYPE = none
760VBox-xpcom-ipcshared_SOURCES = \
761 ipc/ipcd/shared/src/ipcConfig.cpp \
762 ipc/ipcd/shared/src/ipcStringList.cpp \
763 ipc/ipcd/shared/src/ipcIDList.cpp \
764 ipc/ipcd/shared/src/ipcm.cpp
765$(evalcall VBOX_XPCOM_X86,VBox-xpcom-ipcshared)
766
767
768#
769# DCONNECT client shared object
770#
771VBoxXPCOMIPCC_TEMPLATE = XPComIpcDll
772VBoxXPCOMIPCC_INST = $(INST_BIN)components/
773VBoxXPCOMIPCC_SOURCES = \
774 ipc/ipcd/client/src/ipcdclient.cpp \
775 ipc/ipcd/client/src/ipcService.cpp \
776 ipc/ipcd/client/src/ipcModuleFactory.cpp \
777 ipc/ipcd/client/src/ipcDConnectService.cpp \
778 \
779 ipc/ipcd/client/src/ipcConnectionUnix.cpp
780VBoxXPCOMIPCC_LDFLAGS.darwin = -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/components/VBoxXPCOMIPCC.dylib
781VBoxXPCOMIPCC_LIBS = \
782 $(VBox-xpcom-ipcshared_1_TARGET)
783
784# 32-bit version of the component.
785$(evalcall VBOX_XPCOM_X86,VBoxXPCOMIPCC)
786VBoxXPCOMIPCC-x86_LIBS = \
787 $(VBox-xpcom-ipcshared-x86_1_TARGET)
788
789
790#
791# DCONNECT daemon executable
792#
793VBoxXPCOMIPCD_TEMPLATE = XPComIpcDll
794VBoxXPCOMIPCD_SOURCES = \
795 ipc/ipcd/daemon/src/ipcd.cpp \
796 ipc/ipcd/daemon/src/ipcClient.cpp \
797 ipc/ipcd/daemon/src/ipcCommandModule.cpp
798VBoxXPCOMIPCD_LDFLAGS.darwin = -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/VBoxXPCOMIPCD.dylib
799VBoxXPCOMIPCD_LIBS = \
800 $(VBox-xpcom-ipcshared_1_TARGET) \
801 $(VBoxXPCOM_1_TARGET) \
802 $(TEMPLATE_XPComDll_LATE_LIBS)
803
804
805#
806# Include sub-makefiles for the Python<->XPCOM and Java<->XPCOM bridges.
807#
808ifndef VBOX_ONLY_EXTPACKS
809 # Find the Python headers for the Python<->XPCOM bridge if enabled.
810 ifdef VBOX_WITH_PYTHON
811 include $(PATH_SUB_CURRENT)/python/Makefile.kmk
812 endif
813
814 ifdef VBOX_WITH_JXPCOM
815 include $(PATH_SUB_CURRENT)/java/Makefile.kmk
816 endif
817endif # !VBOX_ONLY_EXTPACKS
818
819
820#
821# testcases
822#
823tstnsIFileTest_TEMPLATE = XPComTstExe
824tstnsIFileTest_SOURCES = xpcom/tests/nsIFileTest.cpp
825tstTestArray_TEMPLATE = XPComTstExe
826tstTestArray_SOURCES = xpcom/tests/TestArray.cpp
827tstTestAtoms_TEMPLATE = XPComTstExe
828tstTestAtoms_SOURCES = xpcom/tests/TestAtoms.cpp
829tstTestAutoLock_TEMPLATE = XPComTstExe
830tstTestAutoLock_SOURCES = xpcom/tests/TestAutoLock.cpp
831tstTestCOMPtr_TEMPLATE = XPComTstExe
832tstTestCOMPtr_SOURCES = xpcom/tests/TestCOMPtr.cpp
833tstTestCOMPtrEq_TEMPLATE = XPComTstExe
834tstTestCOMPtrEq_SOURCES = xpcom/tests/TestCOMPtrEq.cpp
835tstTestCRT_TEMPLATE = XPComTstExe
836tstTestCRT_SOURCES = xpcom/tests/TestCRT.cpp
837tstTestFactory_TEMPLATE = XPComTstExe
838tstTestFactory_SOURCES = xpcom/tests/TestFactory.cpp
839tstTestHashtables_TEMPLATE = XPComTstExe
840tstTestHashtables_SOURCES = xpcom/tests/TestHashtables.cpp
841tstTestID_TEMPLATE = XPComTstExe
842tstTestID_SOURCES = xpcom/tests/TestID.cpp
843tstTestObserverService_TEMPLATE = XPComTstExe
844tstTestObserverService_SOURCES = xpcom/tests/TestObserverService.cpp
845tstTestXPIDLString_TEMPLATE = XPComTstExe
846tstTestXPIDLString_SOURCES = xpcom/tests/TestXPIDLString.cpp
847tstTestXPTCInvoke_TEMPLATE = XPComTstExe
848tstTestXPTCInvoke_SOURCES = xpcom/reflect/xptcall/tests/TestXPTCInvoke.cpp
849tstTestDeque_TEMPLATE = XPComTstExe
850tstTestDeque_SOURCES = xpcom/tests/TestDeque.cpp
851tstTestAutoPtr_TEMPLATE = XPComTstExe
852tstTestAutoPtr_SOURCES = xpcom/tests/TestAutoPtr.cpp
853tstTestMinStringAPI_TEMPLATE = XPComTstExe
854tstTestMinStringAPI_SOURCES = xpcom/tests/TestMinStringAPI.cpp
855tstTestStrings_TEMPLATE = XPComTstExe
856tstTestStrings_SOURCES = xpcom/tests/TestStrings.cpp
857tstPrimitiveTest_TEMPLATE = XPComTstExe
858tstPrimitiveTest_SOURCES = xpcom/typelib/xpt/tests/PrimitiveTest.c
859
860
861
862OTHER_CLEAN += \
863 $(PATH_TARGET)/VBox-xpcom-idl-timestamp \
864 $(addprefix $(VBOX_PATH_SDK)/bindings/xpcom/include,$(notdir $(subst .idl,.h,$(XPCOM_IDLFILES)))) \
865 $(addprefix $(VBOX_PATH_SDK)/bindings/xpcom/include,$(notdir $(subst .idl,.xpt,$(XPCOM_IDLFILES)))) \
866 $(addprefix $(VBOX_PATH_SDK)/bindings/xpcom/idl/,$(notdir $(XPCOM_IDLFILES))) \
867 $(addprefix $(PATH_TARGET)/VBox-xpcom-xpt-files/,$(notdir $(subst .idl,.xpt,$(XPCOM_IDLFILES))))
868
869
870#
871# Create and install VBoxXPCOMBase.xpt
872#
873INSTALLS += VBoxXPCOMBase-xpt-inst
874VBOX_XPTFILES = $(addprefix $(PATH_TARGET)/VBox-xpcom-xpt-files/, \
875 nsIErrorService.xpt \
876 nsIException.xpt \
877 nsIExceptionService.xpt \
878 nsIDebug.xpt \
879 nsIInterfaceRequestor.xpt \
880 nsIProgrammingLanguage.xpt \
881 nsISupports.xpt \
882 nsITraceRefcnt.xpt \
883 nsIWeakReference.xpt \
884 nsrootidl.xpt \
885 nsIAtom.xpt \
886 nsIAtomService.xpt \
887 nsICollection.xpt \
888 nsIEnumerator.xpt \
889 nsIVariant.xpt \
890 nsISerializable.xpt \
891 nsIStringEnumerator.xpt \
892 nsISupportsArray.xpt \
893 nsISupportsIterators.xpt \
894 nsIArray.xpt \
895 nsIObserverService.xpt \
896 nsIObserver.xpt \
897 nsIProperties.xpt \
898 nsISimpleEnumerator.xpt \
899 nsISupportsPrimitives.xpt \
900 nsIBinaryInputStream.xpt \
901 nsIBinaryOutputStream.xpt \
902 nsIObjectInputStream.xpt \
903 nsIObjectOutputStream.xpt \
904 nsIDirectoryService.xpt \
905 nsIFile.xpt \
906 nsILocalFile.xpt \
907 nsIInputStream.xpt \
908 nsIOutputStream.xpt \
909 nsIComponentLoader.xpt \
910 nsIComponentLoaderManager.xpt \
911 nsIComponentManagerObsolete.xpt \
912 nsINativeComponentLoader.xpt \
913 nsIClassInfo.xpt \
914 nsIComponentRegistrar.xpt \
915 nsIFactory.xpt \
916 nsIModule.xpt \
917 nsIServiceManager.xpt \
918 nsIComponentManager.xpt \
919 nsICategoryManager.xpt \
920 nsIRunnable.xpt \
921 nsIEventTarget.xpt \
922 nsIEventQueue.xpt \
923 nsIEventQueueService.xpt \
924 nsIInterfaceInfo.xpt \
925 nsIInterfaceInfoManager.xpt \
926 nsIXPTLoader.xpt)
927
928VBoxXPCOMBase-xpt-inst_INST = $(INST_BIN)components/
929VBoxXPCOMBase-xpt-inst_MODE = 0644
930VBoxXPCOMBase-xpt-inst_SOURCES = \
931 $(PATH_TARGET)/VBox-xpcom-xpt-files/VBoxXPCOMBase.xpt
932VBoxXPCOMBase-xpt-inst_CLEAN = \
933 $(VBOX_XPTFILES) \
934 $(PATH_TARGET)/VBox-xpcom-xpt-files/VBoxXPCOMBase.xpt
935
936# combined typelib library
937$(PATH_TARGET)/VBox-xpcom-xpt-files/VBoxXPCOMBase.xpt: $$(VBOX_XPTFILES) | $$(xpt_link_1_TARGET) $(PATH_TARGET)/VBox-xpcom-xpt-files/
938 $(call MSG_LINK,XPCOM_TYPELIB,$@)
939 $(QUIET)$(MKDIR) -p -- $(PATH_STAGE_BIN)/components
940 $(QUIET)$(xpt_link_1_TARGET) $@ $^
941
942
943
944# generate rules
945include $(FILE_KBUILD_SUB_FOOTER)
946
947
948
949#
950# Generate IDL rules.
951#
952
953##
954# Define for compiling one IDL into a header and a typelib
955# @param idl The filename with everything.
956define def_IDL
957 $(VBOX_PATH_SDK)/bindings/xpcom/include/$(notdir $(subst .idl,.h,$(idl))) \
958 + $(PATH_TARGET)/VBox-xpcom-xpt-files/$(notdir $(subst .idl,.xpt,$(idl))): \
959 $(VBOX_PATH_XPCOM_SRC)/$(idl) \
960 | $$$$(xpidl_1_TARGET) \
961 $(PATH_TARGET)/VBox-xpcom-xpt-files/
962 $$(call MSG_TOOL,xpidl,XPCOM,$$<,$$@)
963 $$(QUIET)$(MKDIR) -p $(VBOX_PATH_SDK)/bindings/xpcom/include $(VBOX_PATH_SDK)/bindings/xpcom/idl
964 $$(QUIET)$$(xpidl_1_TARGET) -m header $(XPIDL_INCS) -e $$@ $$<
965 $$(QUIET)$$(xpidl_1_TARGET) -m typelib $(XPIDL_INCS) -e $(addprefix $(PATH_TARGET)/VBox-xpcom-xpt-files/,$(notdir $(subst .idl,.xpt,$(idl)))) $$<
966 $$(QUIET)$(CP) $$< $$(VBOX_PATH_SDK)/bindings/xpcom/idl
967endef
968
969$(foreach idl, $(XPCOM_IDLFILES), $(eval $(def_IDL)))
970
971# dummy target.
972$(PATH_TARGET)/VBox-xpcom-idl-timestamp: $$(addprefix $$(VBOX_PATH_SDK)/bindings/xpcom/include/,$$(notdir $$(subst .idl,.h,$$(XPCOM_IDLFILES))))
973 $(call MSG_L1,IDL processing completed.)
974 $(QUIET)$(MKDIR) -p $(dir $@)
975 $(QUIET)$(APPEND) -t $@
976
977#
978# HACK ALERT! Make sure main doesn't start using xpidl before we're done
979# with the idl files here. The trick here is that we're using TARGET_xpidl,
980# i.e. the copy residing in obj/, while VBOX_XPIDL is pointing to
981# xpidl_1_STAGE_TARGET which is the one in bin/.
982#
983$(VBOX_XPIDL): | $(PATH_TARGET)/VBox-xpcom-idl-timestamp
984
985
986#
987# Generate linker map file filtering out unwanted global symbols.
988#
989$(PATH_TARGET)/xpcom-namespace-cleanup.map foo.map: $$(VBoxXPCOM_LIBS) $$(VBoxXPCOM_2_OBJS)
990 $(call MSG_L1, Creating linker map $@ for scrubbing the symbol namespace)
991 $(QUIET)$(APPEND) -t $@ '{ local: *; global: '
992 $(QUIET)$(VBOX_NM) -p -g $^ \
993 | $(SED) -n \
994 -e '/^$$/b' \
995 -e '/:$$/b' \
996 -e '/ U /b' \
997 -e 's/^[^ ]* [A-Z] \(.*\)$$/\1/' \
998 -e 's/\<_Z[^ ]*$$/&;/p' \
999 -e 's/\<VBoxNs[^ ]*$$/&;/p' \
1000 -e 's/\<_edata$$/&;/p' \
1001 -e 's/\<_end$$/&;/p' \
1002 -e 's/\<_etext$$/&;/p'\
1003 -e 's/\<_fini$$/&;/p' \
1004 -e 's/\<_init$$/&;/p' \
1005 --append $@
1006 $(QUIET)$(APPEND) $@ '};'
1007#ifeq ($(KBUILD_TARGET),solaris)
1008# # Temporary gcc 4.5.2 hack on Solaris which emits unknown mangled symbols for ctors/dtors for certain objects. See @bugref{5838}.
1009# if $(VBOX_GCC_VERSION_CXX) == 40502
1010# $(QUIET)$(SED) -re '/^_Z.*[C-D]5E/d' $@ > $@-sedtmp
1011# $(QUIET)$(MV) $@-sedtmp $@
1012# endif
1013#endif
1014
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette