VirtualBox

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

Last change on this file since 101803 was 101803, checked in by vboxsync, 15 months ago

libs/xpcom: Get rid of code used only if MOZ_TIMELINE is defined which we never do, bugref:10545

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

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