VirtualBox

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

最後變更 在這個檔案從108257是 108257,由 vboxsync 提交於 4 週 前

Config.kmk,xpcom18a4: Remove unused code, bugref:10321

  • 屬性 svn:eol-style 設為 native
  • 屬性 svn:keywords 設為 Author Date Id Revision
檔案大小: 34.1 KB
 
1# $Id: Makefile.kmk 108257 2025-02-17 12:57:55Z 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
317# We do these ONCE.
318libIDL_config_cflags := $(shell $(VBOX_LIBIDL_CONFIG) --cflags)
319libIDL_config_libs := $(shell $(VBOX_LIBIDL_CONFIG) --libs)
320xpidl_CFLAGS = \
321 $(libIDL_config_cflags)
322if1of ($(KBUILD_HOST), linux solaris)
323 xpidl_LDFLAGS = \
324 $(filter-out -l%,$(libIDL_config_libs))
325 xpidl_LIBS.$(KBUILD_HOST) += \
326 $(subst -l,,$(filter -l%,$(libIDL_config_libs)))
327else
328 ifeq ($(KBUILD_HOST),darwin)
329 # Need to put the SDK /usr/lib before the libIDL path to make it pick the system iconv
330 xpidl_LDFLAGS = \
331 -L$(VBOX_PATH_MACOSX_SDK)/usr/lib \
332 $(libIDL_config_libs)
333 else
334 xpidl_LDFLAGS = \
335 $(libIDL_config_libs)
336 endif
337endif
338xpidl_LDFLAGS.linux = \
339 $(VBOX_LD_as_needed)
340
341#
342# The XPT linker.
343#
344xpt_link_TEMPLATE = XPComBldProg
345xpt_link_SOURCES = \
346 xpcom/typelib/xpt/tools/xpt_link.c \
347 xpcom/typelib/xpt/src/xpt_arena.c \
348 xpcom/typelib/xpt/src/xpt_struct.c \
349 xpcom/typelib/xpt/src/xpt_xdr.c
350
351
352#
353# The NSPR Library.
354#
355VBox-xpcom-nspr_TEMPLATE = XPComDll
356VBox-xpcom-nspr_INSTTYPE = none
357VBox-xpcom-nspr_DEFS = \
358 _NSPR_BUILD_
359VBox-xpcom-nspr_DEFS.linux = \
360 _POSIX_SOURCE=1 \
361 _BSD_SOURCE=1 \
362 _SVID_SOURCE=1 \
363 _DEFAULT_SOURCE \
364 _REENTRANT=1
365# _BSD_SOURCE is here to keep the Glibc header files happy and make them include the right things
366VBox-xpcom-nspr_INCS = \
367 $(VBox-xpcom-nspr_0_OUTDIR)
368VBox-xpcom-nspr_SOURCES = \
369 nsprpub/lib/ds/plarena.c \
370 nsprpub/lib/ds/plhash.c \
371 nsprpub/pr/src/pthreads/ptsynch.c
372
373$(call KB_FN_DO_PASS0_ON_TARGET,VBox-xpcom-nspr)
374
375$(evalcall2 VBOX_XPCOM_X86,VBox-xpcom-nspr)
376
377
378VBox-xpcom-typelib_TEMPLATE = XPComDll
379VBox-xpcom-typelib_INSTTYPE = none
380VBox-xpcom-typelib_SOURCES = \
381 xpcom/typelib/xpt/src/xpt_arena.c \
382 xpcom/typelib/xpt/src/xpt_struct.c \
383 xpcom/typelib/xpt/src/xpt_xdr.c
384$(evalcall VBOX_XPCOM_X86,VBox-xpcom-typelib)
385
386VBox-xpcom-string_TEMPLATE = XPComDll
387VBox-xpcom-string_INSTTYPE = none
388VBox-xpcom-string_SOURCES = \
389 xpcom/string/src/nsAString.cpp \
390 xpcom/string/src/nsDependentSubstring.cpp \
391 xpcom/string/src/nsObsoleteAStringThunk.cpp \
392 xpcom/string/src/nsPrintfCString.cpp \
393 xpcom/string/src/nsPromiseFlatString.cpp \
394 xpcom/string/src/nsReadableUtils.cpp \
395 xpcom/string/src/nsSubstring.cpp \
396 xpcom/string/src/nsSubstringTuple.cpp \
397 xpcom/string/src/nsString.cpp \
398 xpcom/string/src/nsStringComparator.cpp \
399 xpcom/string/src/nsStringObsolete.cpp
400$(evalcall VBOX_XPCOM_X86,VBox-xpcom-string)
401
402VBox-xpcom-base_TEMPLATE = XPComDll
403VBox-xpcom-base_INSTTYPE = none
404VBox-xpcom-base_DEFS = _IMPL_NS_COM
405VBox-xpcom-base_SOURCES = \
406 xpcom/base/nsDebugImpl.cpp \
407 xpcom/base/nsErrorService.cpp \
408 xpcom/base/nsExceptionService.cpp \
409 xpcom/base/nsID.cpp \
410 xpcom/base/nsTraceRefcntImpl.cpp
411$(evalcall VBOX_XPCOM_X86,VBox-xpcom-base)
412
413VBox-xpcom-ds_TEMPLATE = XPComDll
414VBox-xpcom-ds_INSTTYPE = none
415VBox-xpcom-ds_DEFS = _IMPL_NS_COM
416VBox-xpcom-ds_SOURCES = \
417 xpcom/ds/pldhash.c \
418 xpcom/ds/nsAtomTable.cpp \
419 xpcom/ds/nsAtomService.cpp \
420 xpcom/ds/nsCRT.cpp \
421 xpcom/ds/nsDeque.cpp \
422 xpcom/ds/nsEmptyEnumerator.cpp \
423 xpcom/ds/nsEnumeratorUtils.cpp \
424 xpcom/ds/nsHashSets.cpp \
425 xpcom/ds/nsHashtable.cpp \
426 xpcom/ds/nsObserverList.cpp \
427 xpcom/ds/nsObserverService.cpp \
428 xpcom/ds/nsProperties.cpp \
429 xpcom/ds/nsStringEnumerator.cpp \
430 xpcom/ds/nsSupportsArray.cpp \
431 xpcom/ds/nsSupportsArrayEnumerator.cpp \
432 xpcom/ds/nsSupportsPrimitives.cpp \
433 xpcom/ds/nsTHashtable.cpp \
434 xpcom/ds/nsVariant.cpp \
435 xpcom/ds/nsVoidArray.cpp \
436 xpcom/ds/nsCOMArray.cpp \
437 xpcom/ds/nsArray.cpp \
438 xpcom/ds/nsArrayEnumerator.cpp
439$(evalcall VBOX_XPCOM_X86,VBox-xpcom-ds)
440
441# @todo what about MOZ_USER_DIR?
442VBox-xpcom-io_TEMPLATE = XPComDll
443VBox-xpcom-io_INSTTYPE = none
444ifdef VBOX_WITH_AUTOMATIC_DEFS_QUOTING
445 VBox-xpcom-io_DEFS = _IMPL_NS_COM MOZ_USER_DIR=".mozilla"
446else
447 VBox-xpcom-io_DEFS = _IMPL_NS_COM MOZ_USER_DIR=\".mozilla\"
448endif
449if defined(VBOX_WITH_HARDENING) && defined(VBOX_PATH_APP_PRIVATE_ARCH)
450 ifdef VBOX_WITH_AUTOMATIC_DEFS_QUOTING
451 VBox-xpcom-io_DEFS += MOZ_DEFAULT_VBOX_XPCOM_HOME="$(VBOX_PATH_APP_PRIVATE_ARCH)"
452 else
453 VBox-xpcom-io_DEFS += MOZ_DEFAULT_VBOX_XPCOM_HOME=\"$(VBOX_PATH_APP_PRIVATE_ARCH)\"
454 endif
455endif
456VBox-xpcom-io_SOURCES = \
457 xpcom/io/nsAppFileLocationProvider.cpp \
458 xpcom/io/nsDirectoryService.cpp \
459 xpcom/io/nsLocalFileCommon.cpp \
460 xpcom/io/SpecialSystemDirectory.cpp \
461 xpcom/io/nsNativeCharsetUtils.cpp
462if1of ($(KBUILD_TARGET) $(KBUILD_TARGET).$(KBUILD_TARGET_ARCH), freebsd linux netbsd openbsd solaris darwin.amd64 darwin.arm64)
463 VBox-xpcom-io_SOURCES += \
464 xpcom/io/nsLocalFileUnix.cpp
465endif
466$(evalcall VBOX_XPCOM_X86,VBox-xpcom-io)
467
468VBox-xpcom-components_TEMPLATE = XPComDll
469VBox-xpcom-components_INSTTYPE = none
470VBox-xpcom-components_DEFS = _IMPL_NS_COM EXPORT_XPTI_API
471VBox-xpcom-components_SOURCES = \
472 xpcom/components/nsCategoryManager.cpp \
473 xpcom/components/nsComponentManager.cpp \
474 xpcom/components/nsComponentManagerObsolete.cpp \
475 xpcom/components/nsNativeComponentLoader.cpp \
476 xpcom/components/nsServiceManagerObsolete.cpp \
477 xpcom/components/xcDll.cpp \
478 xpcom/components/nsStaticComponentLoader.cpp
479$(evalcall VBOX_XPCOM_X86,VBox-xpcom-components)
480
481VBox-xpcom-threads_TEMPLATE = XPComDll
482VBox-xpcom-threads_INSTTYPE = none
483VBox-xpcom-threads_DEFS = _IMPL_NS_COM
484VBox-xpcom-threads_SOURCES = \
485 xpcom/threads/plevent.c \
486 xpcom/threads/nsAutoLock.cpp \
487 xpcom/threads/nsEventQueue.cpp \
488 xpcom/threads/nsEventQueueService.cpp
489$(evalcall VBOX_XPCOM_X86,VBox-xpcom-threads)
490
491VBox-xpcom-xptinfo_TEMPLATE = XPComDll
492VBox-xpcom-xptinfo_INSTTYPE = none
493VBox-xpcom-xptinfo_DEFS = _IMPL_NS_COM _IMPL_NS_BASE EXPORT_XPTI_API EXPORT_XPT_API
494VBox-xpcom-xptinfo_SOURCES = \
495 xpcom/reflect/xptinfo/src/xptiFile.cpp \
496 xpcom/reflect/xptinfo/src/xptiInterfaceInfo.cpp \
497 xpcom/reflect/xptinfo/src/xptiInterfaceInfoManager.cpp \
498 xpcom/reflect/xptinfo/src/xptiManifest.cpp \
499 xpcom/reflect/xptinfo/src/xptiMisc.cpp \
500 xpcom/reflect/xptinfo/src/xptiTypelibGuts.cpp \
501 xpcom/reflect/xptinfo/src/xptiWorkingSet.cpp \
502 xpcom/reflect/xptinfo/src/xptiZipItem.cpp \
503 xpcom/reflect/xptinfo/src/xptiZipLoader.cpp
504$(evalcall VBOX_XPCOM_X86,VBox-xpcom-xptinfo)
505
506
507VBox-xpcom-xptcall_TEMPLATE = XPComDll
508VBox-xpcom-xptcall_INSTTYPE = none
509VBox-xpcom-xptcall_DEFS = _IMPL_NS_COM _IMPL_NS_BASE EXPORT_XPTC_API
510VBox-xpcom-xptcall_DEFS.darwin = KEEP_STACK_16_BYTE_ALIGNED
511VBox-xpcom-xptcall_SOURCES = xpcom/reflect/xptcall/src/xptcall.cpp
512VBox-xpcom-xptcall_SOURCES.freebsd.x86 = xpcom/reflect/xptcall/src/md/unix/xptcinvoke_gcc_x86_unix.cpp \
513 xpcom/reflect/xptcall/src/md/unix/xptcstubs_gcc_x86_unix.cpp
514VBox-xpcom-xptcall_SOURCES.linux.x86 = xpcom/reflect/xptcall/src/md/unix/xptcinvoke_gcc_x86_unix.cpp \
515 xpcom/reflect/xptcall/src/md/unix/xptcstubs_gcc_x86_unix.cpp
516VBox-xpcom-xptcall_SOURCES.solaris.x86 = xpcom/reflect/xptcall/src/md/unix/xptcinvoke_x86_solaris.cpp \
517 xpcom/reflect/xptcall/src/md/unix/xptcstubs_x86_solaris.cpp
518VBox-xpcom-xptcall_SOURCES.amd64 = xpcom/reflect/xptcall/src/md/unix/xptcinvoke_amd64_vbox.asm
519VBox-xpcom-xptcall_SOURCES.arm64 = xpcom/reflect/xptcall/src/md/unix/xptcinvoke_arm64_vbox.cpp \
520 xpcom/reflect/xptcall/src/md/unix/xptcstubs_arm64_vbox.cpp
521VBox-xpcom-xptcall_SOURCES.darwin.amd64 = xpcom/reflect/xptcall/src/md/unix/xptcstubs_amd64_darwin.cpp # Underscore prefix.
522VBox-xpcom-xptcall_SOURCES.freebsd.amd64 = xpcom/reflect/xptcall/src/md/unix/xptcstubs_x86_64_linux.cpp
523VBox-xpcom-xptcall_SOURCES.linux.amd64 = xpcom/reflect/xptcall/src/md/unix/xptcstubs_x86_64_linux.cpp
524ifndef VBOX_GCC_USING_SOLARIS_AS
525 VBox-xpcom-xptcall_SOURCES.solaris.amd64 = xpcom/reflect/xptcall/src/md/unix/xptcstubs_x86_64_linux.cpp
526else
527 VBox-xpcom-xptcall_SOURCES.solaris.amd64 = xpcom/reflect/xptcall/src/md/unix/xptcstubs_x86_64_solaris.cpp
528endif
529
530xpcom/reflect/xptcall/src/md/unix/xptcstubs_x86_solaris.cpp_CXXFLAGS = -O0
531# -O0 works fine, while -O1 doesn't. The gcc man page can't be listing all the -f*
532# stuff that -O1 enables, because when using the options without -O1, it's -fomit-frame-pointer
533# that triggers is, while -O1 -fno-omit-frame-pointer does not work. Anyway, it's probably a gcc/mozila
534# bug and it's not worth investigating as I'm not the maintainger of the solaris gcc port. [bird, 2007-09-17]
535
536$(evalcall VBOX_XPCOM_X86,VBox-xpcom-xptcall)
537
538
539VBox-xpcom-proxy_TEMPLATE = XPComDll
540VBox-xpcom-proxy_INSTTYPE = none
541VBox-xpcom-proxy_DEFS = _IMPL_NS_COM EXPORT_XPTC_API EXPORT_XPTI_API
542VBox-xpcom-proxy_SOURCES = \
543 xpcom/proxy/src/nsProxyEvent.cpp \
544 xpcom/proxy/src/nsProxyEventClass.cpp \
545 xpcom/proxy/src/nsProxyEventObject.cpp \
546 xpcom/proxy/src/nsProxyObjectManager.cpp \
547 xpcom/proxy/src/nsProxyRelease.cpp
548$(evalcall VBOX_XPCOM_X86,VBox-xpcom-proxy)
549
550
551#
552# The VBoxXPCOM Glue static libraries.
553#
554# This isn't the normal XPCOM glue (see the places in XPCOM where XPCOM_GLUE is
555# checked), VirtualBox has its own glue library and this means this isn't used
556# much (one reason is that we don't provide frozen APIs yet). All VBox XPCOM
557# client applications are dependent on the given version of both the VBox XPCOM
558# runtime (binary dependency) and VirtualBox component library (COM interface
559# dependency). For this reason, VBox client applications link to the VBox XPCOM
560# shared library directly (instead of linking to the standalone XPCOM glue
561# library that would dynamically search for and load the installed XPCOM
562# runtime). For the same reason, we link all parts of XPCOM into a single
563# shared XPCOM library below (as opposed to the original XPCOM where e.g. NSPR
564# lives in a separate DLL). Additionally there is VBox specific glue code to
565# make both the client and server side code build with both XPCOM and COM,
566# which should be made part of the SDK eventually, but this is a higher level
567# of abstraction than this XPCOM specific glue code.
568#
569VBoxXPCOMGlue_COMMON_SOURCES = \
570 xpcom/glue/nsCOMPtr.cpp \
571 xpcom/glue/nsComponentManagerUtils.cpp \
572 xpcom/glue/nsDebug.cpp \
573 xpcom/glue/nsGenericFactory.cpp \
574 xpcom/glue/nsIInterfaceRequestorUtils.cpp \
575 xpcom/glue/nsMemory.cpp \
576 xpcom/glue/nsTraceRefcnt.cpp \
577 xpcom/glue/nsWeakReference.cpp
578
579# dependent glue library which goes in to the VBoxXPCOM shared library
580VBoxXPCOMGlue_s_TEMPLATE = XPComDll
581VBoxXPCOMGlue_s_INSTTYPE = none
582VBoxXPCOMGlue_s_DEFS = _IMPL_NS_COM
583VBoxXPCOMGlue_s_SOURCES = $(VBoxXPCOMGlue_COMMON_SOURCES)
584$(evalcall VBOX_XPCOM_X86,VBoxXPCOMGlue_s)
585
586# standalone glue library which all third-party client apps (if any) will
587# link with (currently completely unused and nit built, to be part of the SDK)
588VBoxXPCOMGlue_TEMPLATE = XPComDll
589VBoxXPCOMGlue_SOURCES = $(VBoxXPCOMGlue_COMMON_SOURCES)
590#VBoxXPCOMGlue_INST = lib/ $(INST_SDK)lib/
591$(evalcall VBOX_XPCOM_X86,VBoxXPCOMGlue)
592
593
594#
595# The VBoxXPCOM Shared Object, assembling all lib files.
596#
597VBoxXPCOM_TEMPLATE = XPComDll
598VBoxXPCOM_NAME = $(basename $(notdir $(LIB_XPCOM)))
599VBoxXPCOM_DEFS = BUILD_DCONNECT=1 _IMPL_NS_COM
600ifdef VBOX_WITH_XPCOM_NAMESPACE_CLEANUP
601 VBoxXPCOM_LDFLAGS.linux = -Wl,--version-script=$(XPCOM_C_NAMESPACE_MAP)
602 VBoxXPCOM_LNK_DEPS.linux += $(XPCOM_C_NAMESPACE_MAP)
603 VBoxXPCOM_LDFLAGS.solaris = -Wl,-M,$(XPCOM_C_NAMESPACE_MAP)
604 VBoxXPCOM_LNK_DEPS.solaris += $(XPCOM_C_NAMESPACE_MAP)
605endif
606VBoxXPCOM_SOURCES = \
607 xpcom/build/nsXPComInit.cpp \
608 xpcom/build/nsStringAPI.cpp
609VBoxXPCOM_SOURCES.darwin = \
610 vboxdeps.cpp
611VBoxXPCOM_SOURCES.solaris = \
612 vboxdeps.cpp
613VBoxXPCOM_LIBS = \
614 $(VBox-xpcom-typelib_1_TARGET) \
615 $(VBox-xpcom-string_1_TARGET) \
616 $(VBox-xpcom-base_1_TARGET) \
617 $(VBox-xpcom-ds_1_TARGET) \
618 $(VBox-xpcom-io_1_TARGET) \
619 $(VBox-xpcom-components_1_TARGET) \
620 $(VBox-xpcom-threads_1_TARGET) \
621 $(VBox-xpcom-xptinfo_1_TARGET) \
622 $(VBox-xpcom-xptcall_1_TARGET) \
623 $(VBox-xpcom-proxy_1_TARGET) \
624 $(VBox-xpcom-nspr_1_TARGET) \
625 $(VBoxXPCOMGlue_s_1_TARGET)
626VBoxXPCOM_LIBS.linux = \
627 pthread dl
628
629ifeq ($(filter-out freebsd linux netbsd openbsd,$(KBUILD_TARGET)),) # gnu ld.
630 VBoxXPCOM_LDFLAGS = -Wl,--whole-archive \
631 $(VBox-xpcom-typelib_1_TARGET) \
632 $(VBox-xpcom-string_1_TARGET) \
633 $(VBox-xpcom-base_1_TARGET) \
634 $(VBox-xpcom-ds_1_TARGET) \
635 $(VBox-xpcom-io_1_TARGET) \
636 $(VBox-xpcom-components_1_TARGET) \
637 $(VBox-xpcom-threads_1_TARGET) \
638 $(VBox-xpcom-xptinfo_1_TARGET) \
639 $(VBox-xpcom-xptcall_1_TARGET) \
640 $(VBox-xpcom-proxy_1_TARGET) \
641 $(VBox-xpcom-nspr_1_TARGET) \
642 $(VBoxXPCOMGlue_s_1_TARGET) \
643 -Wl,--no-whole-archive
644endif
645
646VBoxXPCOM_LDFLAGS.solaris += -Wl,-z,allextract \
647 $(VBox-xpcom-typelib_1_TARGET) \
648 $(VBox-xpcom-string_1_TARGET) \
649 $(VBox-xpcom-base_1_TARGET) \
650 $(VBox-xpcom-ds_1_TARGET) \
651 $(VBox-xpcom-io_1_TARGET) \
652 $(VBox-xpcom-components_1_TARGET) \
653 $(VBox-xpcom-threads_1_TARGET) \
654 $(VBox-xpcom-xptinfo_1_TARGET) \
655 $(VBox-xpcom-xptcall_1_TARGET) \
656 $(VBox-xpcom-proxy_1_TARGET) \
657 $(VBox-xpcom-nspr_1_TARGET) \
658 $(VBoxXPCOMGlue_s_1_TARGET) \
659 -Wl,-z,defaultextract
660
661# EF heap
662#VBoxXPCOM_LIBS += $(LIB_RUNTIME_EF)
663#VBoxXPCOM_LDFLAGS = -Wl,--whole-archive $(VBoxXPCOM_LIBS) -Wl,--no-whole-archive $(LIB_RUNTIME)
664VBoxXPCOM_LDFLAGS.darwin = -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/VBoxXPCOM.dylib
665
666#
667# The 32-bit VBoxXPCOM Shared Object, assembling all lib files.
668#
669VBoxXPCOM-x86_TEMPLATE = XPComDll-x86
670VBoxXPCOM-x86_EXTENDS = VBoxXPCOM
671VBoxXPCOM-x86_NAME = VBoxXPCOM-x86
672VBoxXPCOM-x86_LIBS = \
673 $(VBox-xpcom-typelib-x86_1_TARGET) \
674 $(VBox-xpcom-string-x86_1_TARGET) \
675 $(VBox-xpcom-base-x86_1_TARGET) \
676 $(VBox-xpcom-ds-x86_1_TARGET) \
677 $(VBox-xpcom-io-x86_1_TARGET) \
678 $(VBox-xpcom-components-x86_1_TARGET) \
679 $(VBox-xpcom-threads-x86_1_TARGET) \
680 $(VBox-xpcom-xptinfo-x86_1_TARGET) \
681 $(VBox-xpcom-xptcall-x86_1_TARGET) \
682 $(VBox-xpcom-proxy-x86_1_TARGET) \
683 $(VBox-xpcom-nspr-x86_1_TARGET) \
684 $(VBoxXPCOMGlue_s-x86_1_TARGET)
685
686ifeq ($(filter-out freebsd linux netbsd openbsd,$(KBUILD_TARGET)),) # gnu ld.
687 VBoxXPCOM-x86_LDFLAGS = -Wl,--whole-archive \
688 $(VBox-xpcom-typelib-x86_1_TARGET) \
689 $(VBox-xpcom-string-x86_1_TARGET) \
690 $(VBox-xpcom-base-x86_1_TARGET) \
691 $(VBox-xpcom-ds-x86_1_TARGET) \
692 $(VBox-xpcom-io-x86_1_TARGET) \
693 $(VBox-xpcom-components-x86_1_TARGET) \
694 $(VBox-xpcom-threads-x86_1_TARGET) \
695 $(VBox-xpcom-xptinfo-x86_1_TARGET) \
696 $(VBox-xpcom-xptcall-x86_1_TARGET) \
697 $(VBox-xpcom-proxy-x86_1_TARGET) \
698 $(VBox-xpcom-nspr-x86_1_TARGET) \
699 $(VBoxXPCOMGlue_s-x86_1_TARGET) \
700 -Wl,--no-whole-archive
701endif
702
703VBoxXPCOM-x86_LDFLAGS.solaris += -Wl,-z,allextract \
704 $(VBox-xpcom-typelib-x86_1_TARGET) \
705 $(VBox-xpcom-string-x86_1_TARGET) \
706 $(VBox-xpcom-base-x86_1_TARGET) \
707 $(VBox-xpcom-ds-x86_1_TARGET) \
708 $(VBox-xpcom-io-x86_1_TARGET) \
709 $(VBox-xpcom-components-x86_1_TARGET) \
710 $(VBox-xpcom-threads-x86_1_TARGET) \
711 $(VBox-xpcom-xptinfo-x86_1_TARGET) \
712 $(VBox-xpcom-xptcall-x86_1_TARGET) \
713 $(VBox-xpcom-proxy-x86_1_TARGET) \
714 $(VBox-xpcom-nspr-x86_1_TARGET) \
715 $(VBoxXPCOMGlue_s-x86_1_TARGET) \
716 -Wl,-z,defaultextract
717
718
719#
720# VBoxXPCOMImp - Import library/hack.
721#
722ifdef VBOX_WITH_XPCOM_NAMESPACE_CLEANUP
723 $(call VBOX_GENERATE_IMPORT_TARGET_FN,VBoxXPCOMImp,VBoxXPCOM,VBoxXPCOM-mangled.def)
724else
725 $(call VBOX_GENERATE_IMPORT_TARGET_FN,VBoxXPCOMImp,VBoxXPCOM,VBoxXPCOM.def)
726endif
727
728
729#
730# IPC templates.
731#
732ifdef VBOX_IPC_RELEASE_LOG
733 IPC_LOGGING = 1
734else ifneq ($(KBUILD_TYPE),release)
735 IPC_LOGGING = 1
736endif
737
738TEMPLATE_XPComIpcDll = XPCOM IPC libraries
739TEMPLATE_XPComIpcDll_EXTENDS = XPComDll
740TEMPLATE_XPComIpcDll_DEFS = \
741 $(TEMPLATE_XPComDll_DEFS) \
742 BUILD_DCONNECT=1
743
744ifdef VBOX_WITH_AUTOMATIC_DEFS_QUOTING
745 TEMPLATE_XPComIpcDll_DEFS += IPC_DAEMON_APP_NAME="VBoxSVC$(SUFF_EXE)"
746else
747 TEMPLATE_XPComIpcDll_DEFS += IPC_DAEMON_APP_NAME=\"VBoxSVC$(SUFF_EXE)\"
748endif
749ifdef IPC_LOGGING
750 TEMPLATE_XPComIpcDll_DEFS += IPC_LOGGING
751endif
752TEMPLATE_XPComIpcDll_LATE_LIBS = $(VBoxXPCOM_1_TARGET) $(TEMPLATE_XPComDll_LATE_LIBS)
753ifneq ($(KBUILD_TARGET),win)
754 ifeq ($(filter-out solaris.x86 %.amd64 %.sparc32 %.sparc64,$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH)),) ## TODO: cleanup!
755 if defined(VBOX_WITH_RELATIVE_RUNPATH) && !defined(VBOX_WITH_HARDENING)
756 TEMPLATE_XPComIpcDll_LDFLAGS = $(filter-out '$(VBOX_GCC_RPATH_OPT)%',$(TEMPLATE_XPComDll_LDFLAGS)) '$(VBOX_GCC_RPATH_OPT)$(VBOX_WITH_RELATIVE_RUNPATH)/..'
757 endif
758 else ifndef VBOX_WITH_HARDENING
759 ifdef VBOX_WITH_RELATIVE_RUNPATH
760 TEMPLATE_XPComIpcDll_LDFLAGS = $(filter-out '$(VBOX_GCC_RPATH_OPT)%',$(TEMPLATE_XPComDll_LDFLAGS)) '$(VBOX_GCC_RPATH_OPT)$(VBOX_WITH_RELATIVE_RUNPATH)/..'
761 endif
762 endif
763endif
764
765TEMPLATE_XPComIpcDll-x86 = 32-bit XPCOM IPC libraries
766TEMPLATE_XPComIpcDll-x86_EXTENDS = XPComIpcDll
767TEMPLATE_XPComIpcDll-x86_BLD_TRG_ARCH = x86
768TEMPLATE_XPComIpcDll-x86_LATE_LIBS = $(VBoxXPCOM-x86_1_TARGET) $(TEMPLATE_XPComDll-x86_LATE_LIBS)
769
770TEMPLATE_XPComIpcExe = XPCOM IPC executables
771TEMPLATE_XPComIpcExe_EXTENDS = XPComExe
772TEMPLATE_XPComIpcExe_DEFS = $(TEMPLATE_XPComExe_DEFS) BUILD_DCONNECT=1
773ifdef IPC_LOGGING
774 TEMPLATE_XPComIpcExe_DEFS += IPC_LOGGING
775endif
776
777#
778# Shared IPC code. Used by the IPC component as well as the executables.
779#
780VBox-xpcom-ipcshared_TEMPLATE = XPComIpcDll
781VBox-xpcom-ipcshared_INSTTYPE = none
782VBox-xpcom-ipcshared_SOURCES = \
783 ipc/ipcd/shared/src/ipcConfig.cpp \
784 ipc/ipcd/shared/src/ipcStringList.cpp \
785 ipc/ipcd/shared/src/ipcIDList.cpp \
786 ipc/ipcd/shared/src/ipcm.cpp
787$(evalcall VBOX_XPCOM_X86,VBox-xpcom-ipcshared)
788
789
790#
791# DCONNECT client shared object
792#
793VBoxXPCOMIPCC_TEMPLATE = XPComIpcDll
794VBoxXPCOMIPCC_INST = $(INST_BIN)components/
795VBoxXPCOMIPCC_SOURCES = \
796 ipc/ipcd/client/src/ipcdclient.cpp \
797 ipc/ipcd/client/src/ipcService.cpp \
798 ipc/ipcd/client/src/ipcModuleFactory.cpp \
799 ipc/ipcd/client/src/ipcDConnectService.cpp \
800 \
801 ipc/ipcd/client/src/ipcConnectionUnix.cpp
802VBoxXPCOMIPCC_LDFLAGS.darwin = -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/components/VBoxXPCOMIPCC.dylib
803VBoxXPCOMIPCC_LIBS = \
804 $(VBox-xpcom-ipcshared_1_TARGET)
805
806# 32-bit version of the component.
807$(evalcall VBOX_XPCOM_X86,VBoxXPCOMIPCC)
808VBoxXPCOMIPCC-x86_LIBS = \
809 $(VBox-xpcom-ipcshared-x86_1_TARGET)
810
811
812#
813# DCONNECT daemon executable
814#
815VBoxXPCOMIPCD_TEMPLATE = XPComIpcDll
816VBoxXPCOMIPCD_SOURCES = \
817 ipc/ipcd/daemon/src/ipcd.cpp \
818 ipc/ipcd/daemon/src/ipcClient.cpp \
819 ipc/ipcd/daemon/src/ipcCommandModule.cpp
820VBoxXPCOMIPCD_LDFLAGS.darwin = -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/VBoxXPCOMIPCD.dylib
821VBoxXPCOMIPCD_LIBS = \
822 $(VBox-xpcom-ipcshared_1_TARGET) \
823 $(VBoxXPCOM_1_TARGET) \
824 $(TEMPLATE_XPComDll_LATE_LIBS)
825
826
827#
828# Include sub-makefiles for the Python<->XPCOM and Java<->XPCOM bridges.
829#
830ifndef VBOX_ONLY_EXTPACKS
831 # Find the Python headers for the Python<->XPCOM bridge if enabled.
832 ifdef VBOX_WITH_PYTHON
833 include $(PATH_SUB_CURRENT)/python/Makefile.kmk
834 endif
835
836 ifdef VBOX_WITH_JXPCOM
837 include $(PATH_SUB_CURRENT)/java/Makefile.kmk
838 endif
839endif # !VBOX_ONLY_EXTPACKS
840
841
842#
843# testcases
844#
845tstnsIFileTest_TEMPLATE = XPComTstExe
846tstnsIFileTest_SOURCES = xpcom/tests/nsIFileTest.cpp
847tstTestArray_TEMPLATE = XPComTstExe
848tstTestArray_SOURCES = xpcom/tests/TestArray.cpp
849tstTestAtoms_TEMPLATE = XPComTstExe
850tstTestAtoms_SOURCES = xpcom/tests/TestAtoms.cpp
851tstTestAutoLock_TEMPLATE = XPComTstExe
852tstTestAutoLock_SOURCES = xpcom/tests/TestAutoLock.cpp
853tstTestCOMPtr_TEMPLATE = XPComTstExe
854tstTestCOMPtr_SOURCES = xpcom/tests/TestCOMPtr.cpp
855tstTestCOMPtrEq_TEMPLATE = XPComTstExe
856tstTestCOMPtrEq_SOURCES = xpcom/tests/TestCOMPtrEq.cpp
857tstTestCRT_TEMPLATE = XPComTstExe
858tstTestCRT_SOURCES = xpcom/tests/TestCRT.cpp
859tstTestFactory_TEMPLATE = XPComTstExe
860tstTestFactory_SOURCES = xpcom/tests/TestFactory.cpp
861tstTestHashtables_TEMPLATE = XPComTstExe
862tstTestHashtables_SOURCES = xpcom/tests/TestHashtables.cpp
863tstTestID_TEMPLATE = XPComTstExe
864tstTestID_SOURCES = xpcom/tests/TestID.cpp
865tstTestObserverService_TEMPLATE = XPComTstExe
866tstTestObserverService_SOURCES = xpcom/tests/TestObserverService.cpp
867tstTestXPIDLString_TEMPLATE = XPComTstExe
868tstTestXPIDLString_SOURCES = xpcom/tests/TestXPIDLString.cpp
869tstTestXPTCInvoke_TEMPLATE = XPComTstExe
870tstTestXPTCInvoke_SOURCES = xpcom/reflect/xptcall/tests/TestXPTCInvoke.cpp
871tstTestDeque_TEMPLATE = XPComTstExe
872tstTestDeque_SOURCES = xpcom/tests/TestDeque.cpp
873tstTestAutoPtr_TEMPLATE = XPComTstExe
874tstTestAutoPtr_SOURCES = xpcom/tests/TestAutoPtr.cpp
875tstTestMinStringAPI_TEMPLATE = XPComTstExe
876tstTestMinStringAPI_SOURCES = xpcom/tests/TestMinStringAPI.cpp
877tstTestStrings_TEMPLATE = XPComTstExe
878tstTestStrings_SOURCES = xpcom/tests/TestStrings.cpp
879tstPrimitiveTest_TEMPLATE = XPComTstExe
880tstPrimitiveTest_SOURCES = xpcom/typelib/xpt/tests/PrimitiveTest.c
881
882
883
884OTHER_CLEAN += \
885 $(PATH_TARGET)/VBox-xpcom-idl-timestamp \
886 $(addprefix $(VBOX_PATH_SDK)/bindings/xpcom/include,$(notdir $(subst .idl,.h,$(XPCOM_IDLFILES)))) \
887 $(addprefix $(VBOX_PATH_SDK)/bindings/xpcom/include,$(notdir $(subst .idl,.xpt,$(XPCOM_IDLFILES)))) \
888 $(addprefix $(VBOX_PATH_SDK)/bindings/xpcom/idl/,$(notdir $(XPCOM_IDLFILES))) \
889 $(addprefix $(PATH_TARGET)/VBox-xpcom-xpt-files/,$(notdir $(subst .idl,.xpt,$(XPCOM_IDLFILES))))
890
891
892#
893# Create and install VBoxXPCOMBase.xpt
894#
895INSTALLS += VBoxXPCOMBase-xpt-inst
896VBOX_XPTFILES = $(addprefix $(PATH_TARGET)/VBox-xpcom-xpt-files/, \
897 nsIErrorService.xpt \
898 nsIException.xpt \
899 nsIExceptionService.xpt \
900 nsIDebug.xpt \
901 nsIInterfaceRequestor.xpt \
902 nsIProgrammingLanguage.xpt \
903 nsISupports.xpt \
904 nsITraceRefcnt.xpt \
905 nsIWeakReference.xpt \
906 nsrootidl.xpt \
907 nsIAtom.xpt \
908 nsIAtomService.xpt \
909 nsICollection.xpt \
910 nsIEnumerator.xpt \
911 nsIVariant.xpt \
912 nsISerializable.xpt \
913 nsIStringEnumerator.xpt \
914 nsISupportsArray.xpt \
915 nsISupportsIterators.xpt \
916 nsIArray.xpt \
917 nsIObserverService.xpt \
918 nsIObserver.xpt \
919 nsIProperties.xpt \
920 nsISimpleEnumerator.xpt \
921 nsISupportsPrimitives.xpt \
922 nsIBinaryInputStream.xpt \
923 nsIBinaryOutputStream.xpt \
924 nsIObjectInputStream.xpt \
925 nsIObjectOutputStream.xpt \
926 nsIDirectoryService.xpt \
927 nsIFile.xpt \
928 nsILocalFile.xpt \
929 nsIInputStream.xpt \
930 nsIOutputStream.xpt \
931 nsIComponentLoader.xpt \
932 nsIComponentLoaderManager.xpt \
933 nsIComponentManagerObsolete.xpt \
934 nsINativeComponentLoader.xpt \
935 nsIClassInfo.xpt \
936 nsIComponentRegistrar.xpt \
937 nsIFactory.xpt \
938 nsIModule.xpt \
939 nsIServiceManager.xpt \
940 nsIComponentManager.xpt \
941 nsICategoryManager.xpt \
942 nsIRunnable.xpt \
943 nsIEventTarget.xpt \
944 nsIEventQueue.xpt \
945 nsIEventQueueService.xpt \
946 nsIInterfaceInfo.xpt \
947 nsIInterfaceInfoManager.xpt \
948 nsIXPTLoader.xpt)
949
950VBoxXPCOMBase-xpt-inst_INST = $(INST_BIN)components/
951VBoxXPCOMBase-xpt-inst_MODE = 0644
952VBoxXPCOMBase-xpt-inst_SOURCES = \
953 $(PATH_TARGET)/VBox-xpcom-xpt-files/VBoxXPCOMBase.xpt
954VBoxXPCOMBase-xpt-inst_CLEAN = \
955 $(VBOX_XPTFILES) \
956 $(PATH_TARGET)/VBox-xpcom-xpt-files/VBoxXPCOMBase.xpt
957
958# combined typelib library
959$(PATH_TARGET)/VBox-xpcom-xpt-files/VBoxXPCOMBase.xpt: $$(VBOX_XPTFILES) | $$(xpt_link_1_TARGET) $(PATH_TARGET)/VBox-xpcom-xpt-files/
960 $(call MSG_LINK,XPCOM_TYPELIB,$@)
961 $(QUIET)$(MKDIR) -p -- $(PATH_STAGE_BIN)/components
962 $(QUIET)$(xpt_link_1_TARGET) $@ $^
963
964
965
966# generate rules
967include $(FILE_KBUILD_SUB_FOOTER)
968
969
970
971#
972# Generate IDL rules.
973#
974
975##
976# Define for compiling one IDL into a header and a typelib
977# @param idl The filename with everything.
978define def_IDL
979 $(VBOX_PATH_SDK)/bindings/xpcom/include/$(notdir $(subst .idl,.h,$(idl))) \
980 + $(PATH_TARGET)/VBox-xpcom-xpt-files/$(notdir $(subst .idl,.xpt,$(idl))): \
981 $(VBOX_PATH_XPCOM_SRC)/$(idl) \
982 | $$$$(xpidl_1_TARGET) \
983 $(PATH_TARGET)/VBox-xpcom-xpt-files/
984 $$(call MSG_TOOL,xpidl,XPCOM,$$<,$$@)
985 $$(QUIET)$(MKDIR) -p $(VBOX_PATH_SDK)/bindings/xpcom/include $(VBOX_PATH_SDK)/bindings/xpcom/idl
986 $$(QUIET)$$(xpidl_1_TARGET) -m header $(XPIDL_INCS) -e $$@ $$<
987 $$(QUIET)$$(xpidl_1_TARGET) -m typelib $(XPIDL_INCS) -e $(addprefix $(PATH_TARGET)/VBox-xpcom-xpt-files/,$(notdir $(subst .idl,.xpt,$(idl)))) $$<
988 $$(QUIET)$(CP) $$< $$(VBOX_PATH_SDK)/bindings/xpcom/idl
989endef
990
991$(foreach idl, $(XPCOM_IDLFILES), $(eval $(def_IDL)))
992
993# dummy target.
994$(PATH_TARGET)/VBox-xpcom-idl-timestamp: $$(addprefix $$(VBOX_PATH_SDK)/bindings/xpcom/include/,$$(notdir $$(subst .idl,.h,$$(XPCOM_IDLFILES))))
995 $(call MSG_L1,IDL processing completed.)
996 $(QUIET)$(MKDIR) -p $(dir $@)
997 $(QUIET)$(APPEND) -t $@
998
999#
1000# HACK ALERT! Make sure main doesn't start using xpidl before we're done
1001# with the idl files here. The trick here is that we're using TARGET_xpidl,
1002# i.e. the copy residing in obj/, while VBOX_XPIDL is pointing to
1003# xpidl_1_STAGE_TARGET which is the one in bin/.
1004#
1005$(VBOX_XPIDL): | $(PATH_TARGET)/VBox-xpcom-idl-timestamp
1006
1007
1008#
1009# Generate linker map file filtering out unwanted global symbols.
1010#
1011$(PATH_TARGET)/xpcom-namespace-cleanup.map foo.map: $$(VBoxXPCOM_LIBS) $$(VBoxXPCOM_2_OBJS)
1012 $(call MSG_L1, Creating linker map $@ for scrubbing the symbol namespace)
1013 $(QUIET)$(APPEND) -t $@ '{ local: *; global: '
1014 $(QUIET)$(VBOX_NM) -p -g $^ \
1015 | $(SED) -n \
1016 -e '/^$$/b' \
1017 -e '/:$$/b' \
1018 -e '/ U /b' \
1019 -e 's/^[^ ]* [A-Z] \(.*\)$$/\1/' \
1020 -e 's/\<_Z[^ ]*$$/&;/p' \
1021 -e 's/\<VBoxNs[^ ]*$$/&;/p' \
1022 -e 's/\<_edata$$/&;/p' \
1023 -e 's/\<_end$$/&;/p' \
1024 -e 's/\<_etext$$/&;/p'\
1025 -e 's/\<_fini$$/&;/p' \
1026 -e 's/\<_init$$/&;/p' \
1027 --append $@
1028 $(QUIET)$(APPEND) $@ '};'
1029#ifeq ($(KBUILD_TARGET),solaris)
1030# # Temporary gcc 4.5.2 hack on Solaris which emits unknown mangled symbols for ctors/dtors for certain objects. See @bugref{5838}.
1031# if $(VBOX_GCC_VERSION_CXX) == 40502
1032# $(QUIET)$(SED) -re '/^_Z.*[C-D]5E/d' $@ > $@-sedtmp
1033# $(QUIET)$(MV) $@-sedtmp $@
1034# endif
1035#endif
1036
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

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