VirtualBox

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

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

libs/xpcom: Make PR_CeilingLog2() and PR_FloorLog2() inline, bugref:10545

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