VirtualBox

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

Last change on this file since 99443 was 99040, checked in by vboxsync, 22 months ago

*.kmk: Applied scm with new indenting of multiline variable/function expansions in variable assignments. bugref:10348

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