VirtualBox

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

Last change on this file since 101748 was 101748, checked in by vboxsync, 13 months ago

libs/xpcom: Remove prsystem.{c,h} and uxrng.c as they aren't used anywhere, bugref:10545

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

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette