VirtualBox

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

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

libs/xpcom: Remove unused code in nsprpub, bugref:10545

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