VirtualBox

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

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

scm fix for src/libs/xpcom18a4/Makefile.kmk

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