VirtualBox

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

Last change on this file since 102340 was 102340, checked in by vboxsync, 6 months ago

libs/xpcom: Replace the uses of PL_strncpyz with RTStrCopyPand get rid of it, bugref:10545

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

© 2023 Oracle
ContactPrivacy policyTerms of Use