VirtualBox

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

Last change on this file since 29064 was 29064, checked in by vboxsync, 15 years ago

xpcom18a4/*.kmk: Moved the templates and globals from Makefile.kmk to Config.kmk (new).

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