VirtualBox

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

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

libs/xpcom: Remove individual *.cfg files and merge relevant stuff into vbox.cfg, bugref:10545

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