VirtualBox

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

Last change on this file since 53361 was 51166, checked in by vboxsync, 11 years ago

Config.kmk, libs/xpcom: Disable C5/D5 symbol filtering hack for Solaris gcc 4.5.2 and newer, and rely on compiler for symbol visibility.

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