VirtualBox

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

Last change on this file since 101922 was 101920, checked in by vboxsync, 17 months ago

libs/xpcom: Get rid of unused nsIConsole* and nsConsole interfaces which were never actively used to catch log messages, bugref:10545

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

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