VirtualBox

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

最後變更 在這個檔案從102017是 102017,由 vboxsync 提交於 17 月 前

libs/xpcom: Remove TestThreads as nsThread is unused now and scheduled for removal, bugref:10545

  • 屬性 svn:eol-style 設為 native
  • 屬性 svn:keywords 設為 Author Date Id Revision
檔案大小: 40.2 KB
 
1# $Id: Makefile.kmk 102017 2023-11-09 10:42:31Z vboxsync $
2## @file
3# Sub-Makefile for XPCOM.
4#
5
6#
7# Copyright (C) 2006-2023 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 NSPRPUB-MD-HEADERS \
64 NSPRPUB-PRIV-HEADERS \
65 STRING-HEADERS \
66 XPCOM-HEADERS \
67 IPCD-HEADERS
68
69#
70# The IDL compiler, typelib linker and xpt files.
71#
72BLDPROGS += \
73 xpidl \
74 xpt_link
75
76BLDDIRS += \
77 $(PATH_TARGET)/VBox-xpcom-xpt-files/
78
79#
80# Always build the VBoxXPCOM import library.
81#
82IMPORT_LIBS += VBoxXPCOMImp
83
84#
85# We build several libraries so that any linker command line
86# length restrictions limit will be avoided. (Solaris, Mac?)
87#
88if !defined(VBOX_ONLY_SDK) && (!defined(VBOX_ONLY_EXTPACKS) || !defined(VBOX_ONLY_EXTPACKS_USE_IMPLIBS))
89
90 VBOX_XPCOM_LIBRARIES := \
91 VBox-xpcom-nspr \
92 VBox-xpcom-typelib \
93 VBox-xpcom-string \
94 VBox-xpcom-base \
95 VBox-xpcom-ds \
96 VBox-xpcom-io \
97 VBox-xpcom-components \
98 VBox-xpcom-threads \
99 VBox-xpcom-xptinfo \
100 VBox-xpcom-xptcall \
101 VBox-xpcom-proxy \
102 VBox-xpcom-ipcshared \
103 VBoxXPCOMGlue_s \
104 $(if $(VBOX_WITH_XPCOM_GLUE_WHICH_IS_UNUSED),VBoxXPCOMGlue,)
105 LIBRARIES += $(VBOX_XPCOM_LIBRARIES)
106
107 VBOX_XPCOM_DLLS := \
108 VBoxXPCOM \
109 VBoxXPCOMIPCC
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 # tstnsIFileEnumerator
138 # tstTestAtoms
139 # tstTestServMgr
140 # tstTestCallTemplates
141 # tstTestPermanentAtoms
142 # tstSimpleTypeLib
143 # tstXptDump
144 # tstXptLink
145 endif # VBOX_WITH_TESTCASES
146 PROGRAMS += VBoxXPCOMIPCD
147
148endif # !VBOX_ONLY_SDK && (!defined(VBOX_ONLY_EXTPACKS) || !defined(VBOX_ONLY_EXTPACKS_USE_IMPLIBS))
149
150
151
152
153#
154# SDK headers - lot's of files to install...
155#
156# Tip: If you are going to remove files here, you might
157# wish to do a `kmk uninstall' first to avoid have
158# obsoleted files in the $(INST_SDK) directory.
159#
160NSPRPUB-HEADERS_INST = $(INST_SDK)bindings/xpcom/include/nsprpub/
161NSPRPUB-HEADERS_IFFLAGS = -m 644
162NSPRPUB-HEADERS_SOURCES = \
163 nsprpub/pr/include/nspr.h \
164 nsprpub/lib/ds/plarena.h \
165 nsprpub/lib/ds/plarenas.h \
166 nsprpub/lib/ds/plhash.h \
167 nsprpub/lib/libc/include/plstr.h \
168 nsprpub/pr/include/prbit.h \
169 nsprpub/pr/include/prclist.h \
170 nsprpub/pr/include/prcvar.h \
171 nsprpub/pr/include/prerr.h \
172 nsprpub/pr/include/prerror.h \
173 nsprpub/pr/include/prinet.h \
174 nsprpub/pr/include/prinit.h \
175 nsprpub/pr/include/prinrval.h \
176 nsprpub/pr/include/prio.h \
177 nsprpub/pr/include/prlock.h \
178 nsprpub/pr/include/prlong.h \
179 nsprpub/pr/include/prmem.h \
180 nsprpub/pr/include/prmon.h \
181 nsprpub/pr/include/prprf.h \
182 nsprpub/pr/include/prproces.h \
183 nsprpub/pr/include/prthread.h \
184 nsprpub/pr/include/prtime.h \
185 nsprpub/pr/include/prtypes.h \
186 nsprpub/pr/include/md/_vbox.cfg=>prcpucfg.h
187NSPRPUB-MD-HEADERS_INST = $(INST_SDK)bindings/xpcom/include/nsprpub/md/
188NSPRPUB-MD-HEADERS_IFFLAGS = -m 644
189NSPRPUB-MD-HEADERS_SOURCES = \
190 nsprpub/pr/include/md/_darwin.h \
191 nsprpub/pr/include/md/_freebsd.h \
192 nsprpub/pr/include/md/_linux.h \
193 nsprpub/pr/include/md/_netbsd.h \
194 nsprpub/pr/include/md/_openbsd.h \
195 nsprpub/pr/include/md/_solaris.h \
196 nsprpub/pr/include/md/_unix_errors.h \
197 nsprpub/pr/include/md/_unixos.h \
198 nsprpub/pr/include/md/_pth.h \
199 nsprpub/pr/include/md/prosdep.h \
200 \
201 nsprpub/pr/include/md/_freebsd.cfg \
202 nsprpub/pr/include/md/_linux.cfg \
203 nsprpub/pr/include/md/_darwin.cfg \
204 nsprpub/pr/include/md/_netbsd.cfg \
205 nsprpub/pr/include/md/_openbsd.cfg \
206 nsprpub/pr/include/md/_solaris32.cfg \
207 nsprpub/pr/include/md/_solaris64.cfg
208
209NSPRPUB-PRIV-HEADERS_INST = $(INST_SDK)bindings/xpcom/include/nsprpub/private/
210NSPRPUB-PRIV-HEADERS_IFFLAGS = -m 644
211NSPRPUB-PRIV-HEADERS_SOURCES = \
212 nsprpub/pr/include/private/pprio.h \
213 nsprpub/pr/include/private/pprthred.h \
214 nsprpub/pr/include/private/prpriv.h
215
216STRING-HEADERS_INST = $(INST_SDK)bindings/xpcom/include/string/
217STRING-HEADERS_IFFLAGS = -m 644
218STRING-HEADERS_SOURCES = \
219 xpcom/string/public/nsAString.h \
220 xpcom/string/public/nsAlgorithm.h \
221 xpcom/string/public/nsCharTraits.h \
222 xpcom/string/public/nsDependentString.h \
223 xpcom/string/public/nsDependentSubstring.h \
224 xpcom/string/public/nsEmbedString.h \
225 xpcom/string/public/nsLiteralString.h \
226 xpcom/string/public/nsObsoleteAString.h \
227 xpcom/string/public/nsPrintfCString.h \
228 xpcom/string/public/nsPromiseFlatString.h \
229 xpcom/string/public/nsReadableUtils.h \
230 xpcom/string/public/nsString.h \
231 xpcom/string/public/nsStringAPI.h \
232 xpcom/string/public/nsStringFwd.h \
233 xpcom/string/public/nsStringIterator.h \
234 xpcom/string/public/nsSubstring.h \
235 xpcom/string/public/nsSubstringTuple.h \
236 xpcom/string/public/nsTAString.h \
237 xpcom/string/public/nsTDependentString.h \
238 xpcom/string/public/nsTDependentSubstring.h \
239 xpcom/string/public/nsTObsoleteAString.h \
240 xpcom/string/public/nsTPromiseFlatString.h \
241 xpcom/string/public/nsTString.h \
242 xpcom/string/public/nsTSubstring.h \
243 xpcom/string/public/nsTSubstringTuple.h \
244 xpcom/string/public/nsUTF8Utils.h \
245 xpcom/string/public/nsXPIDLString.h \
246 xpcom/string/public/string-template-def-char.h \
247 xpcom/string/public/string-template-def-unichar.h \
248 xpcom/string/public/string-template-undef.h
249
250XPCOM-HEADERS_INST = $(INST_SDK)bindings/xpcom/include/xpcom/
251XPCOM-HEADERS_IFFLAGS = -m 644
252XPCOM-HEADERS_SOURCES = \
253 xpcom/base/nsAgg.h \
254 xpcom/io/nsAppDirectoryServiceDefs.h \
255 xpcom/ds/nsArray.h \
256 xpcom/ds/nsArrayEnumerator.h \
257 xpcom/ds/nsAtomService.h \
258 xpcom/ds/nsAutoBuffer.h \
259 xpcom/threads/nsAutoLock.h \
260 xpcom/base/nsAutoPtr.h \
261 xpcom/ds/nsBaseHashtable.h \
262 xpcom/ds/nsCOMArray.h \
263 xpcom/ds/nsCRT.h \
264 xpcom/components/nsCategoryManagerUtils.h \
265 xpcom/ds/nsClassHashtable.h \
266 xpcom/base/nsCom.h \
267 xpcom/components/nsComponentManagerObsolete.h \
268 xpcom/components/nsComponentManagerUtils.h \
269 xpcom/ds/nsCppSharedAllocator.h \
270 xpcom/ds/nsDataHashtable.h \
271 xpcom/base/nsDebugImpl.h \
272 xpcom/ds/nsDeque.h \
273 xpcom/io/nsDirectoryService.h \
274 xpcom/io/nsDirectoryServiceDefs.h \
275 xpcom/io/nsDirectoryServiceUtils.h \
276 xpcom/ds/nsDoubleHashtable.h \
277 xpcom/ds/nsEnumeratorUtils.h \
278 xpcom/base/nsError.h \
279 xpcom/threads/nsEventQueueUtils.h \
280 xpcom/ds/nsHashKeys.h \
281 xpcom/ds/nsHashSets.h \
282 xpcom/ds/nsHashtable.h \
283 xpcom/base/nsID.h \
284 xpcom/base/nsIID.h \
285 xpcom/components/nsIServiceManagerObsolete.h \
286 xpcom/components/nsIServiceManagerUtils.h \
287 xpcom/base/nsISupportsBase.h \
288 xpcom/ds/nsInt64.h \
289 xpcom/ds/nsInterfaceHashtable.h \
290 xpcom/io/nsLocalFile.h \
291 xpcom/io/nsLocalFileUnix.h \
292 xpcom/io/nsLocalFileOSX.h \
293 xpcom/components/nsModule.h \
294 xpcom/io/nsNativeCharsetUtils.h \
295 xpcom/components/nsNativeComponentLoader.h \
296 xpcom/ds/nsObserverService.h \
297 xpcom/components/nsObsoleteModuleLoading.h \
298 xpcom/proxy/public/nsProxiedService.h \
299 xpcom/proxy/public/nsProxyEvent.h \
300 xpcom/proxy/public/nsProxyRelease.h \
301 xpcom/ds/nsQuickSort.h \
302 xpcom/ds/nsRefPtrHashtable.h \
303 xpcom/io/nsScriptableInputStream.h \
304 xpcom/ds/nsStaticAtom.h \
305 xpcom/components/nsStaticComponent.h \
306 xpcom/ds/nsStaticNameTable.h \
307 xpcom/ds/nsStringEnumerator.h \
308 xpcom/io/nsStringIO.h \
309 xpcom/ds/nsSupportsArray.h \
310 xpcom/ds/nsSupportsPrimitives.h \
311 xpcom/ds/nsTHashtable.h \
312 xpcom/base/nsTraceRefcntImpl.h \
313 xpcom/ds/nsValueArray.h \
314 xpcom/ds/nsVariant.h \
315 xpcom/ds/nsVoidArray.h \
316 xpcom/base/nsWeakPtr.h \
317 xpcom/build/nsXPCOM.h \
318 xpcom/build/nsXPCOMCID.h \
319 xpcom/base/nscore.h \
320 xpcom/ds/pldhash.h \
321 xpcom/threads/plevent.h \
322 xpcom/components/xcDll.h \
323 xpcom/typelib/xpt/public/xpt_arena.h \
324 xpcom/typelib/xpt/public/xpt_struct.h \
325 xpcom/typelib/xpt/public/xpt_xdr.h \
326 xpcom/reflect/xptcall/public/xptcall.h \
327 xpcom/reflect/xptcall/public/xptcstubsdecl.inc \
328 xpcom/reflect/xptcall/public/xptcstubsdef.inc \
329 xpcom/reflect/xptinfo/public/xptinfo.h \
330 \
331 xpcom/glue/nsIInterfaceRequestorUtils.h \
332 xpcom/glue/nsISupportsImpl.h \
333 xpcom/glue/nsISupportsUtils.h \
334 xpcom/glue/nsIWeakReferenceUtils.h \
335 \
336 xpcom/glue/nsCOMPtr.h \
337 xpcom/glue/nsDebug.h \
338 xpcom/glue/nsGenericFactory.h \
339 xpcom/glue/nsIGenericFactory.h \
340 xpcom/glue/nsMemory.h \
341 xpcom/glue/nsTraceRefcnt.h \
342 xpcom/glue/nsWeakReference.h \
343 \
344 xpcom/glue/standalone/nsXPCOMGlue.h \
345 \
346 xpcom-config.h
347
348IPCD-HEADERS_INST = $(INST_SDK)bindings/xpcom/include/ipcd/
349IPCD-HEADERS_IFFLAGS = -m 644
350IPCD-HEADERS_SOURCES = \
351 ipc/ipcd/client/public/ipcCID.h \
352 ipc/ipcd/extensions/lock/public/ipcLockCID.h \
353 ipc/ipcd/util/public/ipcMessageReader.h \
354 ipc/ipcd/util/public/ipcMessageWriter.h \
355 ipc/ipcd/client/public/ipcdclient.h
356
357
358#
359# The IDL compiler.
360#
361# We build it statically because we cannot rely on additional .a files
362# like in the original build
363#
364xpidl_TEMPLATE = XPComBldProg
365xpidl_DEFS = EXPORT_XPT_API
366## @todo This assumes HOST == TARGET.
367xpidl_INST = $(INST_BIN)
368## Obsolete hack: MacPorts is 32-bit on 10.5 and 64-bit on 10.6. Set your KBUILD_HOST_ARCH env.vars. accordingly.
369#if "$(KBUILD_HOST).$(KBUILD_HOST_ARCH)" == "darwin.amd64" && defined(VBOX_MACOS_10_5_WORKAROUND)
370# xpidl_BLD_TRG_ARCH = x86
371# ## @todo kBuild ticket 84 workarounds:
372# xpidl_DEFS.x86 = $(TEMPLATE_XPComBldProg_DEFS.x86)
373# xpidl_CFLAGS.x86 = $(TEMPLATE_XPComBldProg_CFLAGS.x86)
374# xpidl_CXXFLAGS.x86 = $(TEMPLATE_XPComBldProg_CXXFLAGS.x86)
375# xpidl_LDFLAGS.x86 = $(TEMPLATE_XPComBldProg_LDFLAGS.x86)
376#endif
377ifdef VBOX_WITH_JAVA_SUPPORT_IN_XPIDL
378 xpidl_DEFS += VBOX_XPIDL_EMULATE_GENJIFACES VBOX_XPIDL_EMULATE_GENJIFACES_DIFF
379endif
380xpidl_SOURCES = \
381 xpcom/typelib/xpidl/xpidl.c \
382 xpcom/typelib/xpidl/xpidl_idl.c \
383 xpcom/typelib/xpidl/xpidl_util.c \
384 xpcom/typelib/xpidl/xpidl_header.c \
385 xpcom/typelib/xpidl/xpidl_typelib.c \
386 xpcom/typelib/xpidl/xpidl_doc.c \
387 xpcom/typelib/xpidl/xpidl_java.c \
388 xpcom/typelib/xpt/src/xpt_arena.c \
389 xpcom/typelib/xpt/src/xpt_struct.c \
390 xpcom/typelib/xpt/src/xpt_xdr.c
391
392# We do these ONCE.
393libIDL_config_cflags := $(shell $(VBOX_LIBIDL_CONFIG) --cflags)
394libIDL_config_libs := $(shell $(VBOX_LIBIDL_CONFIG) --libs)
395xpidl_CFLAGS = \
396 $(libIDL_config_cflags)
397if1of ($(KBUILD_HOST), linux solaris)
398 xpidl_LDFLAGS = \
399 $(filter-out -l%,$(libIDL_config_libs))
400 xpidl_LIBS.$(KBUILD_HOST) += \
401 $(subst -l,,$(filter -l%,$(libIDL_config_libs)))
402else
403 xpidl_LDFLAGS = \
404 $(libIDL_config_libs)
405endif
406xpidl_LDFLAGS.linux = \
407 $(VBOX_LD_as_needed)
408
409#
410# The XPT linker.
411#
412xpt_link_TEMPLATE = XPComBldProg
413xpt_link_SOURCES = \
414 xpcom/typelib/xpt/tools/xpt_link.c \
415 xpcom/typelib/xpt/src/xpt_arena.c \
416 xpcom/typelib/xpt/src/xpt_struct.c \
417 xpcom/typelib/xpt/src/xpt_xdr.c
418
419
420#
421# The NSPR Library.
422#
423VBox-xpcom-nspr_TEMPLATE = XPComDll
424VBox-xpcom-nspr_INSTTYPE = none
425VBox-xpcom-nspr_DEFS = \
426 _NSPR_BUILD_ \
427 HAVE_LCHOWN=1 \
428 HAVE_STRERROR=1 \
429 FORCE_PR_LOG
430VBox-xpcom-nspr_DEFS += \
431 VBOX_USE_IPRT_IN_NSPR
432VBox-xpcom-nspr_DEFS.darwin.amd64 = \
433 VBOX_USE_MORE_IPRT_IN_NSPR
434VBox-xpcom-nspr_DEFS.darwin.arm64 = \
435 VBOX_USE_MORE_IPRT_IN_NSPR
436VBox-xpcom-nspr_DEFS.darwin = \
437 HAVE_BSD_FLOCK=1 \
438 HAVE_SOCKLEN_T=1 \
439 _PR_PTHREADS
440VBox-xpcom-nspr_DEFS.freebsd = \
441 FREEBSD=1 \
442 HAVE_CVAR_BUILT_ON_SEM \
443 _PR_PTHREADS
444## @todo filling in the missing stuff, please don't just copy it from linux.
445# FIXME: LINUX should be defined by _linux.cfg
446VBox-xpcom-nspr_DEFS.linux = \
447 LINUX=1 \
448 _POSIX_SOURCE=1 \
449 _BSD_SOURCE=1 \
450 _SVID_SOURCE=1 \
451 _DEFAULT_SOURCE \
452 _REENTRANT=1 \
453 _LARGEFILE64_SOURCE=1 \
454 HAVE_FCNTL_FILE_LOCKING=1 \
455 HAVE_CVAR_BUILT_ON_SEM \
456 _PR_PTHREADS
457# _BSD_SOURCE is here to keep the Glibc header files happy and make them include the right things
458VBox-xpcom-nspr_DEFS.netbsd = \
459 _PR_PTHREADS
460VBox-xpcom-nspr_DEFS.openbsd = \
461 _PR_PTHREADS
462VBox-xpcom-nspr_DEFS.solaris = \
463 HAVE_FCNTL_FILE_LOCKING=1 \
464 HAVE_SOCKLEN_T=1 \
465 _PR_PTHREADS
466VBox-xpcom-nspr_INCS = \
467 nsprpub/pr/include/private \
468 $(VBox-xpcom-nspr_0_OUTDIR)
469
470VBox-xpcom-nspr_SOURCES = \
471 nsprpub/pr/src/io/priometh.c \
472 nsprpub/pr/src/io/prmapopt.c \
473 nsprpub/pr/src/io/prprf.c \
474 nsprpub/pr/src/io/prscanf.c \
475 nsprpub/pr/src/io/prstdio.c \
476 nsprpub/pr/src/misc/prerr.c \
477 nsprpub/pr/src/misc/prerror.c \
478 nsprpub/pr/src/misc/prerrortable.c \
479 nsprpub/pr/src/misc/prinit.c \
480 nsprpub/pr/src/misc/prinrval.c \
481 nsprpub/pr/src/misc/prlog2.c \
482 nsprpub/pr/src/misc/prlong.c \
483 nsprpub/pr/src/misc/prtime.c \
484 nsprpub/lib/ds/plarena.c \
485 nsprpub/lib/ds/plhash.c \
486 nsprpub/lib/libc/src/strlen.c \
487 nsprpub/lib/libc/src/strcpy.c \
488 nsprpub/lib/libc/src/strdup.c \
489 nsprpub/lib/libc/src/strcmp.c \
490 nsprpub/lib/libc/src/strccmp.c \
491 nsprpub/lib/libc/src/strchr.c \
492 nsprpub/lib/libc/src/strpbrk.c \
493 nsprpub/lib/libc/src/strstr.c \
494 nsprpub/lib/libc/src/strcstr.c
495
496ifeq ($(filter-out darwin freebsd linux netbsd openbsd solaris,$(KBUILD_TARGET)),) # unixish
497 VBox-xpcom-nspr_SOURCES += \
498 nsprpub/pr/src/md/unix/unix.c \
499 nsprpub/pr/src/md/unix/unix_errors.c \
500 nsprpub/pr/src/pthreads/ptio.c \
501 nsprpub/pr/src/pthreads/ptsynch.c \
502 nsprpub/pr/src/pthreads/ptthread.c
503endif
504
505$(call KB_FN_DO_PASS0_ON_TARGET,VBox-xpcom-nspr)
506
507$(evalcall2 VBOX_XPCOM_X86,VBox-xpcom-nspr)
508
509
510VBox-xpcom-typelib_TEMPLATE = XPComDll
511VBox-xpcom-typelib_INSTTYPE = none
512VBox-xpcom-typelib_SOURCES = \
513 xpcom/typelib/xpt/src/xpt_arena.c \
514 xpcom/typelib/xpt/src/xpt_struct.c \
515 xpcom/typelib/xpt/src/xpt_xdr.c
516$(evalcall VBOX_XPCOM_X86,VBox-xpcom-typelib)
517
518VBox-xpcom-string_TEMPLATE = XPComDll
519VBox-xpcom-string_INSTTYPE = none
520VBox-xpcom-string_SOURCES = \
521 xpcom/string/src/nsAString.cpp \
522 xpcom/string/src/nsDependentSubstring.cpp \
523 xpcom/string/src/nsObsoleteAStringThunk.cpp \
524 xpcom/string/src/nsPrintfCString.cpp \
525 xpcom/string/src/nsPromiseFlatString.cpp \
526 xpcom/string/src/nsReadableUtils.cpp \
527 xpcom/string/src/nsSubstring.cpp \
528 xpcom/string/src/nsSubstringTuple.cpp \
529 xpcom/string/src/nsString.cpp \
530 xpcom/string/src/nsStringComparator.cpp \
531 xpcom/string/src/nsStringObsolete.cpp
532$(evalcall VBOX_XPCOM_X86,VBox-xpcom-string)
533
534VBox-xpcom-base_TEMPLATE = XPComDll
535VBox-xpcom-base_INSTTYPE = none
536VBox-xpcom-base_DEFS = _IMPL_NS_COM
537VBox-xpcom-base_SOURCES = \
538 xpcom/base/nsDebugImpl.cpp \
539 xpcom/base/nsErrorService.cpp \
540 xpcom/base/nsExceptionService.cpp \
541 xpcom/base/nsID.cpp \
542 xpcom/base/nsTraceRefcntImpl.cpp
543$(evalcall VBOX_XPCOM_X86,VBox-xpcom-base)
544
545VBox-xpcom-ds_TEMPLATE = XPComDll
546VBox-xpcom-ds_INSTTYPE = none
547VBox-xpcom-ds_DEFS = _IMPL_NS_COM
548VBox-xpcom-ds_SOURCES = \
549 xpcom/ds/pldhash.c \
550 xpcom/ds/nsAtomTable.cpp \
551 xpcom/ds/nsAtomService.cpp \
552 xpcom/ds/nsCRT.cpp \
553 xpcom/ds/nsDeque.cpp \
554 xpcom/ds/nsEmptyEnumerator.cpp \
555 xpcom/ds/nsEnumeratorUtils.cpp \
556 xpcom/ds/nsHashSets.cpp \
557 xpcom/ds/nsHashtable.cpp \
558 xpcom/ds/nsObserverList.cpp \
559 xpcom/ds/nsObserverService.cpp \
560 xpcom/ds/nsProperties.cpp \
561 xpcom/ds/nsQuickSort.cpp \
562 xpcom/ds/nsStaticNameTable.cpp \
563 xpcom/ds/nsStringEnumerator.cpp \
564 xpcom/ds/nsSupportsArray.cpp \
565 xpcom/ds/nsSupportsArrayEnumerator.cpp \
566 xpcom/ds/nsSupportsPrimitives.cpp \
567 xpcom/ds/nsTHashtable.cpp \
568 xpcom/ds/nsVariant.cpp \
569 xpcom/ds/nsVoidArray.cpp \
570 xpcom/ds/nsValueArray.cpp \
571 xpcom/ds/nsCOMArray.cpp \
572 xpcom/ds/nsArray.cpp \
573 xpcom/ds/nsArrayEnumerator.cpp
574# xpcom/ds/nsHashPropertyBag.cpp
575$(evalcall VBOX_XPCOM_X86,VBox-xpcom-ds)
576
577# @todo what about MOZ_USER_DIR?
578VBox-xpcom-io_TEMPLATE = XPComDll
579VBox-xpcom-io_INSTTYPE = none
580ifdef VBOX_WITH_AUTOMATIC_DEFS_QUOTING
581 VBox-xpcom-io_DEFS = _IMPL_NS_COM MOZ_USER_DIR=".mozilla"
582else
583 VBox-xpcom-io_DEFS = _IMPL_NS_COM MOZ_USER_DIR=\".mozilla\"
584endif
585if defined(VBOX_WITH_HARDENING) && defined(VBOX_PATH_APP_PRIVATE_ARCH)
586 ifdef VBOX_WITH_AUTOMATIC_DEFS_QUOTING
587 VBox-xpcom-io_DEFS += MOZ_DEFAULT_VBOX_XPCOM_HOME="$(VBOX_PATH_APP_PRIVATE_ARCH)"
588 else
589 VBox-xpcom-io_DEFS += MOZ_DEFAULT_VBOX_XPCOM_HOME=\"$(VBOX_PATH_APP_PRIVATE_ARCH)\"
590 endif
591endif
592VBox-xpcom-io_SOURCES = \
593 xpcom/io/nsAppFileLocationProvider.cpp \
594 xpcom/io/nsBinaryStream.cpp \
595 xpcom/io/nsByteArrayInputStream.cpp \
596 xpcom/io/nsDirectoryService.cpp \
597 xpcom/io/nsInputStreamTee.cpp \
598 xpcom/io/nsLocalFileCommon.cpp \
599 xpcom/io/nsScriptableInputStream.cpp \
600 xpcom/io/SpecialSystemDirectory.cpp \
601 xpcom/io/nsNativeCharsetUtils.cpp
602if1of ($(KBUILD_TARGET) $(KBUILD_TARGET).$(KBUILD_TARGET_ARCH), freebsd linux netbsd openbsd solaris darwin.amd64 darwin.arm64)
603 VBox-xpcom-io_SOURCES += \
604 xpcom/io/nsLocalFileUnix.cpp
605endif
606$(evalcall VBOX_XPCOM_X86,VBox-xpcom-io)
607
608VBox-xpcom-components_TEMPLATE = XPComDll
609VBox-xpcom-components_INSTTYPE = none
610VBox-xpcom-components_DEFS = _IMPL_NS_COM EXPORT_XPTI_API
611VBox-xpcom-components_SOURCES = \
612 xpcom/components/nsCategoryManager.cpp \
613 xpcom/components/nsComponentManager.cpp \
614 xpcom/components/nsComponentManagerObsolete.cpp \
615 xpcom/components/nsNativeComponentLoader.cpp \
616 xpcom/components/nsServiceManagerObsolete.cpp \
617 xpcom/components/xcDll.cpp \
618 xpcom/components/nsStaticComponentLoader.cpp
619$(evalcall VBOX_XPCOM_X86,VBox-xpcom-components)
620
621VBox-xpcom-threads_TEMPLATE = XPComDll
622VBox-xpcom-threads_INSTTYPE = none
623VBox-xpcom-threads_DEFS = _IMPL_NS_COM
624VBox-xpcom-threads_SOURCES = \
625 xpcom/threads/plevent.c \
626 xpcom/threads/nsAutoLock.cpp \
627 xpcom/threads/nsEventQueue.cpp \
628 xpcom/threads/nsEventQueueService.cpp \
629 xpcom/threads/nsThread.cpp
630$(evalcall VBOX_XPCOM_X86,VBox-xpcom-threads)
631
632VBox-xpcom-xptinfo_TEMPLATE = XPComDll
633VBox-xpcom-xptinfo_INSTTYPE = none
634VBox-xpcom-xptinfo_DEFS = _IMPL_NS_COM _IMPL_NS_BASE EXPORT_XPTI_API EXPORT_XPT_API
635VBox-xpcom-xptinfo_SOURCES = \
636 xpcom/reflect/xptinfo/src/xptiFile.cpp \
637 xpcom/reflect/xptinfo/src/xptiInterfaceInfo.cpp \
638 xpcom/reflect/xptinfo/src/xptiInterfaceInfoManager.cpp \
639 xpcom/reflect/xptinfo/src/xptiManifest.cpp \
640 xpcom/reflect/xptinfo/src/xptiMisc.cpp \
641 xpcom/reflect/xptinfo/src/xptiTypelibGuts.cpp \
642 xpcom/reflect/xptinfo/src/xptiWorkingSet.cpp \
643 xpcom/reflect/xptinfo/src/xptiZipItem.cpp \
644 xpcom/reflect/xptinfo/src/xptiZipLoader.cpp
645$(evalcall VBOX_XPCOM_X86,VBox-xpcom-xptinfo)
646
647
648VBox-xpcom-xptcall_TEMPLATE = XPComDllYasm
649VBox-xpcom-xptcall_INSTTYPE = none
650VBox-xpcom-xptcall_DEFS = _IMPL_NS_COM _IMPL_NS_BASE EXPORT_XPTC_API
651VBox-xpcom-xptcall_DEFS.darwin = KEEP_STACK_16_BYTE_ALIGNED
652VBox-xpcom-xptcall_SOURCES = xpcom/reflect/xptcall/src/xptcall.cpp
653VBox-xpcom-xptcall_SOURCES.freebsd.x86 = xpcom/reflect/xptcall/src/md/unix/xptcinvoke_gcc_x86_unix.cpp \
654 xpcom/reflect/xptcall/src/md/unix/xptcstubs_gcc_x86_unix.cpp
655VBox-xpcom-xptcall_SOURCES.linux.x86 = xpcom/reflect/xptcall/src/md/unix/xptcinvoke_gcc_x86_unix.cpp \
656 xpcom/reflect/xptcall/src/md/unix/xptcstubs_gcc_x86_unix.cpp
657VBox-xpcom-xptcall_SOURCES.solaris.x86 = xpcom/reflect/xptcall/src/md/unix/xptcinvoke_x86_solaris.cpp \
658 xpcom/reflect/xptcall/src/md/unix/xptcstubs_x86_solaris.cpp
659VBox-xpcom-xptcall_SOURCES.amd64 = xpcom/reflect/xptcall/src/md/unix/xptcinvoke_amd64_vbox.asm
660VBox-xpcom-xptcall_SOURCES.arm64 = xpcom/reflect/xptcall/src/md/unix/xptcinvoke_arm64_vbox.cpp \
661 xpcom/reflect/xptcall/src/md/unix/xptcstubs_arm64_vbox.cpp
662VBox-xpcom-xptcall_SOURCES.darwin.amd64 = xpcom/reflect/xptcall/src/md/unix/xptcstubs_amd64_darwin.cpp # Underscore prefix.
663VBox-xpcom-xptcall_SOURCES.freebsd.amd64 = xpcom/reflect/xptcall/src/md/unix/xptcstubs_x86_64_linux.cpp
664VBox-xpcom-xptcall_SOURCES.linux.amd64 = xpcom/reflect/xptcall/src/md/unix/xptcstubs_x86_64_linux.cpp
665ifndef VBOX_GCC_USING_SOLARIS_AS
666 VBox-xpcom-xptcall_SOURCES.solaris.amd64 = xpcom/reflect/xptcall/src/md/unix/xptcstubs_x86_64_linux.cpp
667else
668 VBox-xpcom-xptcall_SOURCES.solaris.amd64 = xpcom/reflect/xptcall/src/md/unix/xptcstubs_x86_64_solaris.cpp
669endif
670
671xpcom/reflect/xptcall/src/md/unix/xptcstubs_x86_solaris.cpp_CXXFLAGS = -O0
672# -O0 works fine, while -O1 doesn't. The gcc man page can't be listing all the -f*
673# stuff that -O1 enables, because when using the options without -O1, it's -fomit-frame-pointer
674# that triggers is, while -O1 -fno-omit-frame-pointer does not work. Anyway, it's probably a gcc/mozila
675# bug and it's not worth investigating as I'm not the maintainger of the solaris gcc port. [bird, 2007-09-17]
676
677$(evalcall VBOX_XPCOM_X86,VBox-xpcom-xptcall)
678
679
680VBox-xpcom-proxy_TEMPLATE = XPComDll
681VBox-xpcom-proxy_INSTTYPE = none
682VBox-xpcom-proxy_DEFS = _IMPL_NS_COM EXPORT_XPTC_API EXPORT_XPTI_API
683VBox-xpcom-proxy_SOURCES = \
684 xpcom/proxy/src/nsProxyEvent.cpp \
685 xpcom/proxy/src/nsProxyEventClass.cpp \
686 xpcom/proxy/src/nsProxyEventObject.cpp \
687 xpcom/proxy/src/nsProxyObjectManager.cpp \
688 xpcom/proxy/src/nsProxyRelease.cpp
689$(evalcall VBOX_XPCOM_X86,VBox-xpcom-proxy)
690
691
692#
693# The VBoxXPCOM Glue static libraries.
694#
695# This isn't the normal XPCOM glue (see the places in XPCOM where XPCOM_GLUE is
696# checked), VirtualBox has its own glue library and this means this isn't used
697# much (one reason is that we don't provide frozen APIs yet). All VBox XPCOM
698# client applications are dependent on the given version of both the VBox XPCOM
699# runtime (binary dependency) and VirtualBox component library (COM interface
700# dependency). For this reason, VBox client applications link to the VBox XPCOM
701# shared library directly (instead of linking to the standalone XPCOM glue
702# library that would dynamically search for and load the installed XPCOM
703# runtime). For the same reason, we link all parts of XPCOM into a single
704# shared XPCOM library below (as opposed to the original XPCOM where e.g. NSPR
705# lives in a separate DLL). Additionally there is VBox specific glue code to
706# make both the client and server side code build with both XPCOM and COM,
707# which should be made part of the SDK eventually, but this is a higher level
708# of abstraction than this XPCOM specific glue code.
709#
710VBoxXPCOMGlue_COMMON_SOURCES = \
711 xpcom/glue/nsCOMPtr.cpp \
712 xpcom/glue/nsComponentManagerUtils.cpp \
713 xpcom/glue/nsDebug.cpp \
714 xpcom/glue/nsGenericFactory.cpp \
715 xpcom/glue/nsIInterfaceRequestorUtils.cpp \
716 xpcom/glue/nsMemory.cpp \
717 xpcom/glue/nsTraceRefcnt.cpp \
718 xpcom/glue/nsWeakReference.cpp
719
720# dependent glue library which goes in to the VBoxXPCOM shared library
721VBoxXPCOMGlue_s_TEMPLATE = XPComDll
722VBoxXPCOMGlue_s_INSTTYPE = none
723VBoxXPCOMGlue_s_DEFS = _IMPL_NS_COM
724VBoxXPCOMGlue_s_SOURCES = $(VBoxXPCOMGlue_COMMON_SOURCES)
725$(evalcall VBOX_XPCOM_X86,VBoxXPCOMGlue_s)
726
727# standalone glue library which all third-party client apps (if any) will
728# link with (currently completely unused and nit built, to be part of the SDK)
729VBoxXPCOMGlue_TEMPLATE = XPComDll
730VBoxXPCOMGlue_SOURCES = $(VBoxXPCOMGlue_COMMON_SOURCES)
731#VBoxXPCOMGlue_INST = lib/ $(INST_SDK)lib/
732$(evalcall VBOX_XPCOM_X86,VBoxXPCOMGlue)
733
734
735#
736# The VBoxXPCOM Shared Object, assembling all lib files.
737#
738VBoxXPCOM_TEMPLATE = XPComDll
739VBoxXPCOM_NAME = $(basename $(notdir $(LIB_XPCOM)))
740VBoxXPCOM_DEFS = BUILD_DCONNECT=1 _IMPL_NS_COM
741ifdef VBOX_WITH_XPCOM_NAMESPACE_CLEANUP
742 VBoxXPCOM_LDFLAGS.linux = -Wl,--version-script=$(XPCOM_C_NAMESPACE_MAP)
743 VBoxXPCOM_LNK_DEPS.linux += $(XPCOM_C_NAMESPACE_MAP)
744 VBoxXPCOM_LDFLAGS.solaris = -Wl,-M,$(XPCOM_C_NAMESPACE_MAP)
745 VBoxXPCOM_LNK_DEPS.solaris += $(XPCOM_C_NAMESPACE_MAP)
746endif
747VBoxXPCOM_SOURCES = \
748 xpcom/build/nsXPComInit.cpp \
749 xpcom/build/nsStringAPI.cpp
750VBoxXPCOM_SOURCES.darwin = \
751 vboxdeps.cpp
752VBoxXPCOM_SOURCES.solaris = \
753 vboxdeps.cpp
754VBoxXPCOM_LIBS = \
755 $(VBox-xpcom-typelib_1_TARGET) \
756 $(VBox-xpcom-string_1_TARGET) \
757 $(VBox-xpcom-base_1_TARGET) \
758 $(VBox-xpcom-ds_1_TARGET) \
759 $(VBox-xpcom-io_1_TARGET) \
760 $(VBox-xpcom-components_1_TARGET) \
761 $(VBox-xpcom-threads_1_TARGET) \
762 $(VBox-xpcom-xptinfo_1_TARGET) \
763 $(VBox-xpcom-xptcall_1_TARGET) \
764 $(VBox-xpcom-proxy_1_TARGET) \
765 $(VBox-xpcom-nspr_1_TARGET) \
766 $(VBoxXPCOMGlue_s_1_TARGET)
767VBoxXPCOM_LIBS.linux = \
768 pthread dl
769
770ifeq ($(filter-out freebsd linux netbsd openbsd,$(KBUILD_TARGET)),) # gnu ld.
771 VBoxXPCOM_LDFLAGS = -Wl,--whole-archive \
772 $(VBox-xpcom-typelib_1_TARGET) \
773 $(VBox-xpcom-string_1_TARGET) \
774 $(VBox-xpcom-base_1_TARGET) \
775 $(VBox-xpcom-ds_1_TARGET) \
776 $(VBox-xpcom-io_1_TARGET) \
777 $(VBox-xpcom-components_1_TARGET) \
778 $(VBox-xpcom-threads_1_TARGET) \
779 $(VBox-xpcom-xptinfo_1_TARGET) \
780 $(VBox-xpcom-xptcall_1_TARGET) \
781 $(VBox-xpcom-proxy_1_TARGET) \
782 $(VBox-xpcom-nspr_1_TARGET) \
783 $(VBoxXPCOMGlue_s_1_TARGET) \
784 -Wl,--no-whole-archive
785endif
786
787VBoxXPCOM_LDFLAGS.solaris += -Wl,-z,allextract \
788 $(VBox-xpcom-typelib_1_TARGET) \
789 $(VBox-xpcom-string_1_TARGET) \
790 $(VBox-xpcom-base_1_TARGET) \
791 $(VBox-xpcom-ds_1_TARGET) \
792 $(VBox-xpcom-io_1_TARGET) \
793 $(VBox-xpcom-components_1_TARGET) \
794 $(VBox-xpcom-threads_1_TARGET) \
795 $(VBox-xpcom-xptinfo_1_TARGET) \
796 $(VBox-xpcom-xptcall_1_TARGET) \
797 $(VBox-xpcom-proxy_1_TARGET) \
798 $(VBox-xpcom-nspr_1_TARGET) \
799 $(VBoxXPCOMGlue_s_1_TARGET) \
800 -Wl,-z,defaultextract
801
802# EF heap
803#VBoxXPCOM_LIBS += $(LIB_RUNTIME_EF)
804#VBoxXPCOM_LDFLAGS = -Wl,--whole-archive $(VBoxXPCOM_LIBS) -Wl,--no-whole-archive $(LIB_RUNTIME)
805VBoxXPCOM_LDFLAGS.darwin = -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/VBoxXPCOM.dylib
806
807#
808# The 32-bit VBoxXPCOM Shared Object, assembling all lib files.
809#
810VBoxXPCOM-x86_TEMPLATE = XPComDll-x86
811VBoxXPCOM-x86_EXTENDS = VBoxXPCOM
812VBoxXPCOM-x86_NAME = VBoxXPCOM-x86
813VBoxXPCOM-x86_LIBS = \
814 $(VBox-xpcom-typelib-x86_1_TARGET) \
815 $(VBox-xpcom-string-x86_1_TARGET) \
816 $(VBox-xpcom-base-x86_1_TARGET) \
817 $(VBox-xpcom-ds-x86_1_TARGET) \
818 $(VBox-xpcom-io-x86_1_TARGET) \
819 $(VBox-xpcom-components-x86_1_TARGET) \
820 $(VBox-xpcom-threads-x86_1_TARGET) \
821 $(VBox-xpcom-xptinfo-x86_1_TARGET) \
822 $(VBox-xpcom-xptcall-x86_1_TARGET) \
823 $(VBox-xpcom-proxy-x86_1_TARGET) \
824 $(VBox-xpcom-nspr-x86_1_TARGET) \
825 $(VBoxXPCOMGlue_s-x86_1_TARGET)
826
827ifeq ($(filter-out freebsd linux netbsd openbsd,$(KBUILD_TARGET)),) # gnu ld.
828 VBoxXPCOM-x86_LDFLAGS = -Wl,--whole-archive \
829 $(VBox-xpcom-typelib-x86_1_TARGET) \
830 $(VBox-xpcom-string-x86_1_TARGET) \
831 $(VBox-xpcom-base-x86_1_TARGET) \
832 $(VBox-xpcom-ds-x86_1_TARGET) \
833 $(VBox-xpcom-io-x86_1_TARGET) \
834 $(VBox-xpcom-components-x86_1_TARGET) \
835 $(VBox-xpcom-threads-x86_1_TARGET) \
836 $(VBox-xpcom-xptinfo-x86_1_TARGET) \
837 $(VBox-xpcom-xptcall-x86_1_TARGET) \
838 $(VBox-xpcom-proxy-x86_1_TARGET) \
839 $(VBox-xpcom-nspr-x86_1_TARGET) \
840 $(VBoxXPCOMGlue_s-x86_1_TARGET) \
841 -Wl,--no-whole-archive
842endif
843
844VBoxXPCOM-x86_LDFLAGS.solaris += -Wl,-z,allextract \
845 $(VBox-xpcom-typelib-x86_1_TARGET) \
846 $(VBox-xpcom-string-x86_1_TARGET) \
847 $(VBox-xpcom-base-x86_1_TARGET) \
848 $(VBox-xpcom-ds-x86_1_TARGET) \
849 $(VBox-xpcom-io-x86_1_TARGET) \
850 $(VBox-xpcom-components-x86_1_TARGET) \
851 $(VBox-xpcom-threads-x86_1_TARGET) \
852 $(VBox-xpcom-xptinfo-x86_1_TARGET) \
853 $(VBox-xpcom-xptcall-x86_1_TARGET) \
854 $(VBox-xpcom-proxy-x86_1_TARGET) \
855 $(VBox-xpcom-nspr-x86_1_TARGET) \
856 $(VBoxXPCOMGlue_s-x86_1_TARGET) \
857 -Wl,-z,defaultextract
858
859
860#
861# VBoxXPCOMImp - Import library/hack.
862#
863ifdef VBOX_WITH_XPCOM_NAMESPACE_CLEANUP
864 $(call VBOX_GENERATE_IMPORT_TARGET_FN,VBoxXPCOMImp,VBoxXPCOM,VBoxXPCOM-mangled.def)
865else
866 $(call VBOX_GENERATE_IMPORT_TARGET_FN,VBoxXPCOMImp,VBoxXPCOM,VBoxXPCOM.def)
867endif
868
869
870#
871# IPC templates.
872#
873ifdef VBOX_IPC_RELEASE_LOG
874 IPC_LOGGING = 1
875else ifneq ($(KBUILD_TYPE),release)
876 IPC_LOGGING = 1
877endif
878
879TEMPLATE_XPComIpcDll = XPCOM IPC libraries
880TEMPLATE_XPComIpcDll_EXTENDS = XPComDll
881TEMPLATE_XPComIpcDll_DEFS = $(TEMPLATE_XPComDll_DEFS) BUILD_DCONNECT=1
882ifdef VBOX_WITH_AUTOMATIC_DEFS_QUOTING
883 TEMPLATE_XPComIpcDll_DEFS += IPC_DAEMON_APP_NAME="VBoxXPCOMIPCD$(SUFF_EXE)"
884else
885 TEMPLATE_XPComIpcDll_DEFS += IPC_DAEMON_APP_NAME=\"VBoxXPCOMIPCD$(SUFF_EXE)\"
886endif
887ifdef IPC_LOGGING
888 TEMPLATE_XPComIpcDll_DEFS += IPC_LOGGING
889endif
890TEMPLATE_XPComIpcDll_LIBS = $(VBoxXPCOM_1_TARGET) $(TEMPLATE_XPComDll_LIBS)
891ifneq ($(KBUILD_TARGET),win)
892 ifeq ($(filter-out solaris.x86 %.amd64 %.sparc32 %.sparc64,$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH)),) ## TODO: cleanup!
893 if defined(VBOX_WITH_RELATIVE_RUNPATH) && !defined(VBOX_WITH_HARDENING)
894 TEMPLATE_XPComIpcDll_LDFLAGS = $(filter-out '$(VBOX_GCC_RPATH_OPT)%',$(TEMPLATE_XPComDll_LDFLAGS)) '$(VBOX_GCC_RPATH_OPT)$(VBOX_WITH_RELATIVE_RUNPATH)/..'
895 endif
896 else ifndef VBOX_WITH_HARDENING
897 ifdef VBOX_WITH_RELATIVE_RUNPATH
898 TEMPLATE_XPComIpcDll_LDFLAGS = $(filter-out '$(VBOX_GCC_RPATH_OPT)%',$(TEMPLATE_XPComDll_LDFLAGS)) '$(VBOX_GCC_RPATH_OPT)$(VBOX_WITH_RELATIVE_RUNPATH)/..'
899 endif
900 endif
901endif
902
903TEMPLATE_XPComIpcDll-x86 = 32-bit XPCOM IPC libraries
904TEMPLATE_XPComIpcDll-x86_EXTENDS = XPComIpcDll
905TEMPLATE_XPComIpcDll-x86_BLD_TRG_ARCH = x86
906TEMPLATE_XPComIpcDll-x86_LIBS = $(VBoxXPCOM-x86_1_TARGET) $(TEMPLATE_XPComDll-x86_LIBS)
907
908TEMPLATE_XPComIpcExe = XPCOM IPC executables
909TEMPLATE_XPComIpcExe_EXTENDS = XPComExe
910TEMPLATE_XPComIpcExe_DEFS = $(TEMPLATE_XPComExe_DEFS) BUILD_DCONNECT=1
911ifdef IPC_LOGGING
912 TEMPLATE_XPComIpcExe_DEFS += IPC_LOGGING
913endif
914
915#
916# Shared IPC code. Used by the IPC component as well as the executables.
917#
918VBox-xpcom-ipcshared_TEMPLATE = XPComIpcDll
919VBox-xpcom-ipcshared_INSTTYPE = none
920VBox-xpcom-ipcshared_SOURCES = \
921 ipc/ipcd/shared/src/ipcLog.cpp \
922 ipc/ipcd/shared/src/ipcConfig.cpp \
923 ipc/ipcd/shared/src/ipcMessage.cpp \
924 ipc/ipcd/shared/src/ipcMessagePrimitives.cpp \
925 ipc/ipcd/shared/src/ipcStringList.cpp \
926 ipc/ipcd/shared/src/ipcIDList.cpp \
927 ipc/ipcd/shared/src/ipcm.cpp
928$(evalcall VBOX_XPCOM_X86,VBox-xpcom-ipcshared)
929
930
931#
932# DCONNECT client shared object
933#
934VBoxXPCOMIPCC_TEMPLATE = XPComIpcDll
935VBoxXPCOMIPCC_INST = $(INST_BIN)components/
936#VBoxXPCOMIPCC_DEFS = HAVE_DEPENDENT_LIBS - dependentLibs.h is linux specific, so this cannot be required.
937VBoxXPCOMIPCC_SOURCES = \
938 ipc/ipcd/client/src/ipcdclient.cpp \
939 ipc/ipcd/client/src/ipcService.cpp \
940 ipc/ipcd/client/src/ipcModuleFactory.cpp \
941 ipc/ipcd/extensions/dconnect/src/ipcDConnectService.cpp \
942 \
943 ipc/ipcd/util/src/ipcMessageReader.cpp \
944 ipc/ipcd/util/src/ipcMessageWriter.cpp \
945 \
946 ipc/ipcd/extensions/lock/src/ipcLockProtocol.cpp \
947 ipc/ipcd/extensions/lock/src/ipcLockService.cpp \
948 \
949 ipc/ipcd/extensions/transmngr/src/tmTransactionService.cpp \
950 \
951 ipc/ipcd/extensions/transmngr/common/tmTransaction.cpp \
952 ipc/ipcd/extensions/transmngr/common/tmVector.cpp \
953 ipc/ipcd/client/src/ipcConnectionUnix.cpp
954VBoxXPCOMIPCC_LDFLAGS.darwin = -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/components/VBoxXPCOMIPCC.dylib
955VBoxXPCOMIPCC_LIBS = \
956 $(VBox-xpcom-ipcshared_1_TARGET)
957
958# 32-bit version of the component.
959$(evalcall VBOX_XPCOM_X86,VBoxXPCOMIPCC)
960VBoxXPCOMIPCC-x86_LIBS = \
961 $(VBox-xpcom-ipcshared-x86_1_TARGET)
962
963
964#
965# DCONNECT daemon executable
966#
967VBoxXPCOMIPCD_TEMPLATE = XPComIpcExe
968VBoxXPCOMIPCD_SOURCES = \
969 ipc/ipcd/daemon/src/ipcd.cpp \
970 ipc/ipcd/daemon/src/ipcClient.cpp \
971 ipc/ipcd/daemon/src/ipcCommandModule.cpp \
972 ipc/ipcd/daemon/src/ipcdUnix.cpp
973
974
975#
976# Include sub-makefiles for the Python<->XPCOM and Java<->XPCOM bridges.
977#
978ifndef VBOX_ONLY_EXTPACKS
979 # Find the Python headers for the Python<->XPCOM bridge if enabled.
980 ifdef VBOX_WITH_PYTHON
981 include $(PATH_SUB_CURRENT)/python/Makefile.kmk
982 endif
983
984 ifdef VBOX_WITH_JXPCOM
985 include $(PATH_SUB_CURRENT)/java/Makefile.kmk
986 endif
987endif # !VBOX_ONLY_EXTPACKS
988
989
990#
991# testcases
992#
993tstnsIFileEnumerator_TEMPLATE = XPComTstExe
994tstnsIFileEnumerator_SOURCES = xpcom/tests/nsIFileEnumerator.cpp
995tstnsIFileTest_TEMPLATE = XPComTstExe
996tstnsIFileTest_SOURCES = xpcom/tests/nsIFileTest.cpp
997tstTestArray_TEMPLATE = XPComTstExe
998tstTestArray_SOURCES = xpcom/tests/TestArray.cpp
999tstTestAtoms_TEMPLATE = XPComTstExe
1000tstTestAtoms_SOURCES = xpcom/tests/TestAtoms.cpp
1001tstTestAutoLock_TEMPLATE = XPComTstExe
1002tstTestAutoLock_SOURCES = xpcom/tests/TestAutoLock.cpp
1003tstTestCallTemplates_TEMPLATE = XPComTstExe
1004tstTestCallTemplates_SOURCES = xpcom/tests/TestCallTemplates.cpp
1005tstTestCOMPtr_TEMPLATE = XPComTstExe
1006tstTestCOMPtr_SOURCES = xpcom/tests/TestCOMPtr.cpp
1007tstTestCOMPtrEq_TEMPLATE = XPComTstExe
1008tstTestCOMPtrEq_SOURCES = xpcom/tests/TestCOMPtrEq.cpp
1009tstTestCRT_TEMPLATE = XPComTstExe
1010tstTestCRT_SOURCES = xpcom/tests/TestCRT.cpp
1011tstTestFactory_TEMPLATE = XPComTstExe
1012tstTestFactory_SOURCES = xpcom/tests/TestFactory.cpp
1013tstTestHashtables_TEMPLATE = XPComTstExe
1014tstTestHashtables_SOURCES = xpcom/tests/TestHashtables.cpp
1015tstTestID_TEMPLATE = XPComTstExe
1016tstTestID_SOURCES = xpcom/tests/TestID.cpp
1017tstTestObserverService_TEMPLATE = XPComTstExe
1018tstTestObserverService_SOURCES = xpcom/tests/TestObserverService.cpp
1019tstTestPermanentAtoms_TEMPLATE = XPComTstExe
1020tstTestPermanentAtoms_SOURCES = xpcom/tests/TestPermanentAtoms.cpp
1021tstTestServMgr_TEMPLATE = XPComTstExe
1022tstTestServMgr_SOURCES = xpcom/tests/TestServMgr.cpp
1023tstTestServMgr_INCS = xpcom/tests/services
1024tstTestXPIDLString_TEMPLATE = XPComTstExe
1025tstTestXPIDLString_SOURCES = xpcom/tests/TestXPIDLString.cpp
1026tstTestXPTCInvoke_TEMPLATE = XPComTstExe
1027tstTestXPTCInvoke_SOURCES = xpcom/reflect/xptcall/tests/TestXPTCInvoke.cpp
1028tstTestDeque_TEMPLATE = XPComTstExe
1029tstTestDeque_SOURCES = xpcom/tests/TestDeque.cpp
1030tstTestAutoPtr_TEMPLATE = XPComTstExe
1031tstTestAutoPtr_SOURCES = xpcom/tests/TestAutoPtr.cpp
1032tstTestMinStringAPI_TEMPLATE = XPComTstExe
1033tstTestMinStringAPI_SOURCES = xpcom/tests/TestMinStringAPI.cpp
1034tstTestStrings_TEMPLATE = XPComTstExe
1035tstTestStrings_SOURCES = xpcom/tests/TestStrings.cpp
1036tstPrimitiveTest_TEMPLATE = XPComTstExe
1037tstPrimitiveTest_SOURCES = xpcom/typelib/xpt/tests/PrimitiveTest.c
1038tstSimpleTypeLib_TEMPLATE = XPComTstExe
1039tstSimpleTypeLib_SOURCES = xpcom/typelib/xpt/tests/SimpleTypeLib.c
1040tstXptDump_TEMPLATE = XPComTstExe
1041tstXptDump_SOURCES = xpcom/typelib/xpt/tools/xpt_dump.c
1042tstXptLink_TEMPLATE = XPComTstExe
1043tstXptLink_SOURCES = xpcom/typelib/xpt/tools/xpt_link.c
1044
1045
1046
1047OTHER_CLEAN += \
1048 $(PATH_TARGET)/VBox-xpcom-idl-timestamp \
1049 $(addprefix $(VBOX_PATH_SDK)/bindings/xpcom/include,$(notdir $(subst .idl,.h,$(XPCOM_IDLFILES)))) \
1050 $(addprefix $(VBOX_PATH_SDK)/bindings/xpcom/include,$(notdir $(subst .idl,.xpt,$(XPCOM_IDLFILES)))) \
1051 $(addprefix $(VBOX_PATH_SDK)/bindings/xpcom/idl/,$(notdir $(XPCOM_IDLFILES))) \
1052 $(addprefix $(PATH_TARGET)/VBox-xpcom-xpt-files/,$(notdir $(subst .idl,.xpt,$(XPCOM_IDLFILES))))
1053
1054
1055#
1056# Create and install VBoxXPCOMBase.xpt
1057#
1058INSTALLS += VBoxXPCOMBase-xpt-inst
1059VBOX_XPTFILES = $(addprefix $(PATH_TARGET)/VBox-xpcom-xpt-files/, \
1060 nsIErrorService.xpt \
1061 nsIException.xpt \
1062 nsIExceptionService.xpt \
1063 nsIDebug.xpt \
1064 nsIInterfaceRequestor.xpt \
1065 nsIProgrammingLanguage.xpt \
1066 nsISupports.xpt \
1067 nsITraceRefcnt.xpt \
1068 nsIWeakReference.xpt \
1069 nsrootidl.xpt \
1070 nsIAtom.xpt \
1071 nsIAtomService.xpt \
1072 nsICollection.xpt \
1073 nsIEnumerator.xpt \
1074 nsIPropertyBag.xpt \
1075 nsIVariant.xpt \
1076 nsISerializable.xpt \
1077 nsIStringEnumerator.xpt \
1078 nsISupportsArray.xpt \
1079 nsISupportsIterators.xpt \
1080 nsIArray.xpt \
1081 nsIObserverService.xpt \
1082 nsIObserver.xpt \
1083 nsIProperties.xpt \
1084 nsISimpleEnumerator.xpt \
1085 nsISupportsPrimitives.xpt \
1086 nsIBinaryInputStream.xpt \
1087 nsIBinaryOutputStream.xpt \
1088 nsIByteArrayInputStream.xpt \
1089 nsIInputStreamTee.xpt \
1090 nsILineInputStream.xpt \
1091 nsIObjectInputStream.xpt \
1092 nsIObjectOutputStream.xpt \
1093 nsISeekableStream.xpt \
1094 nsIStreamBufferAccess.xpt \
1095 nsIAsyncInputStream.xpt \
1096 nsIAsyncOutputStream.xpt \
1097 nsIDirectoryService.xpt \
1098 nsIFile.xpt \
1099 nsILocalFile.xpt \
1100 nsIInputStream.xpt \
1101 nsIOutputStream.xpt \
1102 nsIScriptableInputStream.xpt \
1103 nsIComponentLoader.xpt \
1104 nsIComponentLoaderManager.xpt \
1105 nsIComponentManagerObsolete.xpt \
1106 nsINativeComponentLoader.xpt \
1107 nsIClassInfo.xpt \
1108 nsIComponentRegistrar.xpt \
1109 nsIFactory.xpt \
1110 nsIModule.xpt \
1111 nsIServiceManager.xpt \
1112 nsIComponentManager.xpt \
1113 nsICategoryManager.xpt \
1114 nsIThread.xpt \
1115 nsIRunnable.xpt \
1116 nsIEventTarget.xpt \
1117 nsIEventQueue.xpt \
1118 nsIEventQueueService.xpt \
1119 nsIInterfaceInfo.xpt \
1120 nsIInterfaceInfoManager.xpt \
1121 nsIXPTLoader.xpt)
1122
1123VBoxXPCOMBase-xpt-inst_INST = $(INST_BIN)components/
1124VBoxXPCOMBase-xpt-inst_MODE = 0644
1125VBoxXPCOMBase-xpt-inst_SOURCES = \
1126 $(PATH_TARGET)/VBox-xpcom-xpt-files/VBoxXPCOMBase.xpt
1127VBoxXPCOMBase-xpt-inst_CLEAN = \
1128 $(VBOX_XPTFILES) \
1129 $(PATH_TARGET)/VBox-xpcom-xpt-files/VBoxXPCOMBase.xpt
1130
1131# combined typelib library
1132$(PATH_TARGET)/VBox-xpcom-xpt-files/VBoxXPCOMBase.xpt: $$(VBOX_XPTFILES) | $$(xpt_link_1_TARGET) $(PATH_TARGET)/VBox-xpcom-xpt-files/
1133 $(call MSG_LINK,XPCOM_TYPELIB,$@)
1134 $(QUIET)$(MKDIR) -p -- $(PATH_STAGE_BIN)/components
1135 $(QUIET)$(xpt_link_1_TARGET) $@ $^
1136
1137
1138
1139# generate rules
1140include $(FILE_KBUILD_SUB_FOOTER)
1141
1142
1143
1144#
1145# Generate IDL rules.
1146#
1147
1148##
1149# Define for compiling one IDL into a header and a typelib
1150# @param idl The filename with everything.
1151define def_IDL
1152 $(VBOX_PATH_SDK)/bindings/xpcom/include/$(notdir $(subst .idl,.h,$(idl))) \
1153 + $(PATH_TARGET)/VBox-xpcom-xpt-files/$(notdir $(subst .idl,.xpt,$(idl))): \
1154 $(VBOX_PATH_XPCOM_SRC)/$(idl) \
1155 | $$$$(xpidl_1_TARGET) \
1156 $(PATH_TARGET)/VBox-xpcom-xpt-files/
1157 $$(call MSG_TOOL,xpidl,XPCOM,$$<,$$@)
1158 $$(QUIET)$(MKDIR) -p $(VBOX_PATH_SDK)/bindings/xpcom/include $(VBOX_PATH_SDK)/bindings/xpcom/idl
1159 $$(QUIET)$$(xpidl_1_TARGET) -m header $(XPIDL_INCS) -e $$@ $$<
1160 $$(QUIET)$$(xpidl_1_TARGET) -m typelib $(XPIDL_INCS) -e $(addprefix $(PATH_TARGET)/VBox-xpcom-xpt-files/,$(notdir $(subst .idl,.xpt,$(idl)))) $$<
1161 $$(QUIET)$(CP) $$< $$(VBOX_PATH_SDK)/bindings/xpcom/idl
1162endef
1163
1164$(foreach idl, $(XPCOM_IDLFILES), $(eval $(def_IDL)))
1165
1166# dummy target.
1167$(PATH_TARGET)/VBox-xpcom-idl-timestamp: $$(addprefix $$(VBOX_PATH_SDK)/bindings/xpcom/include/,$$(notdir $$(subst .idl,.h,$$(XPCOM_IDLFILES))))
1168 $(call MSG_L1,IDL processing completed.)
1169 $(QUIET)$(MKDIR) -p $(dir $@)
1170 $(QUIET)$(APPEND) -t $@
1171
1172#
1173# HACK ALERT! Make sure main doesn't start using xpidl before we're done
1174# with the idl files here. The trick here is that we're using TARGET_xpidl,
1175# i.e. the copy residing in obj/, while VBOX_XPIDL is pointing to
1176# xpidl_1_STAGE_TARGET which is the one in bin/.
1177#
1178$(VBOX_XPIDL): | $(PATH_TARGET)/VBox-xpcom-idl-timestamp
1179
1180
1181#
1182# Generate linker map file filtering out unwanted global symbols.
1183#
1184$(PATH_TARGET)/xpcom-namespace-cleanup.map foo.map: $$(VBoxXPCOM_LIBS) $$(VBoxXPCOM_2_OBJS)
1185 $(call MSG_L1, Creating linker map $@ for scrubbing the symbol namespace)
1186 $(QUIET)$(APPEND) -t $@ '{ local: *; global: '
1187 $(QUIET)$(VBOX_NM) -p -g $^ \
1188 | $(SED) -n \
1189 -e '/^$$/b' \
1190 -e '/:$$/b' \
1191 -e '/ U /b' \
1192 -e 's/^[^ ]* [A-Z] \(.*\)$$/\1/' \
1193 -e 's/\<_Z[^ ]*$$/&;/p' \
1194 -e 's/\<VBoxNs[^ ]*$$/&;/p' \
1195 -e 's/\<_edata$$/&;/p' \
1196 -e 's/\<_end$$/&;/p' \
1197 -e 's/\<_etext$$/&;/p'\
1198 -e 's/\<_fini$$/&;/p' \
1199 -e 's/\<_init$$/&;/p' \
1200 --append $@
1201 $(QUIET)$(APPEND) $@ '};'
1202#ifeq ($(KBUILD_TARGET),solaris)
1203# # Temporary gcc 4.5.2 hack on Solaris which emits unknown mangled symbols for ctors/dtors for certain objects. See @bugref{5838}.
1204# if $(VBOX_GCC_VERSION_CXX) == 40502
1205# $(QUIET)$(SED) -re '/^_Z.*[C-D]5E/d' $@ > $@-sedtmp
1206# $(QUIET)$(MV) $@-sedtmp $@
1207# endif
1208#endif
1209
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

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