VirtualBox

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

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

xpcom/Makefile.kmk: trying to clean up XPCOMBLDPROG... done

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 68.2 KB
Line 
1# $Id: Makefile.kmk 25788 2010-01-12 18:10:19Z vboxsync $
2## @file
3# Sub-Makefile for XPCOM.
4#
5
6#
7# Copyright (C) 2006-2007 Sun Microsystems, Inc.
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# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
18# Clara, CA 95054 USA or visit http://www.sun.com if you need
19# additional information or have any questions.
20#
21
22SUB_DEPTH = ../../..
23include $(KBUILD_PATH)/subheader.kmk
24
25# File for filtering out C symbols from the XPCOM library. Used to avoid
26# symbol namespace pollution, causing trouble with system libraries.
27XPCOM_C_NAMESPACE_MAP = $(VBOX_PATH_XPCOM_SRC)/xpcom-namespace-cleanup.map
28ifdef VBOX_WITH_XPCOM_NAMESPACE_CLEANUP
29 VBOX_NM = nm$(HOSTSUFF_EXE)
30 # At the moment, only Solaris uses the generated map file. GNU ld is smart
31 # enough to handle symbol wildcards itself.
32 if1of ($(KBUILD_TARGET), solaris)
33 XPCOM_C_NAMESPACE_MAP = $(PATH_TARGET)/xpcom-namespace-cleanup.map
34 OTHER_CLEAN += $(XPCOM_C_NAMESPACE_MAP)
35 endif
36endif
37
38# @todo check whether VBoxXPCOMIPCC.so or VBoxXPCOMIPCD contain undefined
39# symbols starting with NS_, PL_, PR_ or XPT. Would move the test time failure
40# when missing a symbol renaming to a build time failure. Likewise, there
41# should be a check whether VBoxXPCOM.so contains global C symbols (at least
42# where the whitelisting of symbols via the map file is not used).
43
44#
45# Globals.
46#
47VBOX_PATH_XPCOM_SRC := $(PATH_SUB_CURRENT)
48
49BLDDIRS += $(PATH_TARGET)/VBox-xpcom-xpt-files/
50
51
52#
53# Template for building the XPCOM libraries (shared).
54#
55TEMPLATE_XPCOM = XPCOM libraries (shared)
56TEMPLATE_XPCOM_EXTENDS = VBOXR3NP
57## @todo correct inheritance here to make it use all the VBOXR3NP settings instead of overriding all of them.
58TEMPLATE_XPCOM_ASTOOL = $(TEMPLATE_VBOXR3NP_TOOL)
59TEMPLATE_XPCOM_ASFLAGS = $(NO_SUCH_VARIABLE)
60TEMPLATE_XPCOM_ASFLAGS.x86 = -m32
61TEMPLATE_XPCOM_ASFLAGS.amd64 = -m64
62TEMPLATE_XPCOM_ASDEFS = $(NO_SUCH_VARIABLE)
63TEMPLATE_XPCOM_CXXFLAGS = -g -pipe -ansi -Wall -Wno-unused -Wno-non-virtual-dtor \
64 $(VBOX_GCC_Wno-invalid-offsetof) -Wno-sign-compare -Wno-unused -Wno-ctor-dtor-privacy \
65 $(VBOX_GCC_fvisibility-inlines-hidden) $(VBOX_GCC_fvisibility-hidden)
66TEMPLATE_XPCOM_CXXFLAGS.x86 = -m32
67TEMPLATE_XPCOM_CXXFLAGS.amd64 = -m64
68TEMPLATE_XPCOM_CXXFLAGS.release = -O
69TEMPLATE_XPCOM_CXXFLAGS.profile = -O
70TEMPLATE_XPCOM_CXXFLAGS.darwin = -fpascal-strings -fshort-wchar -fno-common -fno-rtti $(VBOX_DARWIN_DEF_SDK_CXXFLAGS)
71TEMPLATE_XPCOM_CXXFLAGS.freebsd = -pthread
72TEMPLATE_XPCOM_CXXFLAGS.l4 = -fno-exceptions -nostdinc
73TEMPLATE_XPCOM_CXXFLAGS.linux = -pthread
74TEMPLATE_XPCOM_CXXFLAGS.solaris = -fno-omit-frame-pointer # for now anyway.
75TEMPLATE_XPCOM_CFLAGS = -g -pipe -Wall -Wno-unused -Wno-parentheses -Wno-uninitialized $(VBOX_GCC_fvisibility-hidden)
76TEMPLATE_XPCOM_CFLAGS.x86 = -m32
77TEMPLATE_XPCOM_CFLAGS.amd64 = -m64
78TEMPLATE_XPCOM_CFLAGS.release = -O
79TEMPLATE_XPCOM_CFLAGS.profile = -O
80TEMPLATE_XPCOM_CFLAGS.freebsd = -pthread
81TEMPLATE_XPCOM_CFLAGS.l4 = -nostdinc
82TEMPLATE_XPCOM_CFLAGS.linux = -pthread -ansi
83TEMPLATE_XPCOM_CFLAGS.solaris = -fno-omit-frame-pointer # for now anyway.
84TEMPLATE_XPCOM_DEFS = MOZILLA_CLIENT=1 NDEBUG=1 _IMPL_NS_COM \
85 XPCOM_DLL_BASE=\"$(basename $(notdir $(LIB_XPCOM)))\" \
86 MOZ_DLL_SUFFIX=\"$(suffix $(LIB_XPCOM))\" \
87 IN_RING3
88ifdef VBOX_WITH_XPCOM_NAMESPACE_CLEANUP
89 TEMPLATE_XPCOM_DEFS += VBOX_WITH_XPCOM_NAMESPACE_CLEANUP
90endif
91TEMPLATE_XPCOM_DEFS.x86 = i386=1
92TEMPLATE_XPCOM_DEFS.amd64 = HAVE_VA_LIST_AS_ARRAY HAVE_VA_COPY VA_COPY\(a\,b\)=__builtin_va_copy\(a\,b\)
93TEMPLATE_XPCOM_DEFS.darwin = OSTYPE=\"Darwin8.8.1\" OSARCH=\"Darwin\" XP_UNIX=1 XP_MACOSX=1 TARGET_CARBON=1 HAVE_VISIBILITY_ATTRIBUTE=1 DARWIN=1 $(TEMPLATE_VBOXR3NP_DEFS.darwin)
94TEMPLATE_XPCOM_DEFS.darwin.amd64 = VBOX_MACOSX_FOLLOWS_UNIX_IO
95TEMPLATE_XPCOM_DEFS.freebsd = OSTYPE=\"FreeBSD5+\" OSARCH=\"FreeBSD\" XP_UNIX=1 FREEBSD=1 HAVE_VISIBILITY_ATTRIBUTE=1
96TEMPLATE_XPCOM_DEFS.linux = OSTYPE=\"Linux2.6\" OSARCH=\"Linux\" XP_UNIX=1 _GNU_SOURCE HAVE_VISIBILITY_ATTRIBUTE=1 ## @todo LINUX=1
97TEMPLATE_XPCOM_DEFS.l4 = OSTYPE=\"L4ENV\" OSARCH=\"L4\" XP_UNIX=1 L4ENV HAVE_VISIBILITY_ATTRIBUTE=1
98# Don't define BSD_SELECT because bsdselect() from kLIBC <= 0.6.3 has problems on SMP
99TEMPLATE_XPCOM_DEFS.os2 = OSTYPE=\"OS/2_4.5\" OSARCH=\"OS/2\" XP_OS2 XP_PC OS2=4
100TEMPLATE_XPCOM_DEFS.solaris = OSTYPE=\"Solaris10\" OSARCH=\"Solaris\" XP_UNIX=1 XP_SOLARIS=1 HAVE_LIBDL=1 HAVE_SENDFILEV=1 SOLARIS=1 _REENTRANT
101## @todo The LDFLAGS inheriting is being hidden here and below where -fPIC is added.
102ifdef VBOX_WITH_RUNPATH
103TEMPLATE_XPCOM_LDFLAGS += '$(VBOX_GCC_RPATH_OPT)$(VBOX_WITH_RUNPATH)'
104else ifdef VBOX_WITH_ORIGIN
105TEMPLATE_XPCOM_LDFLAGS += '$(VBOX_GCC_RPATH_OPT)$$(VBOX_ORIGIN)'
106endif
107TEMPLATE_XPCOM_LDFLAGS.x86 = -m32
108TEMPLATE_XPCOM_LDFLAGS.amd64 = -m64
109TEMPLATE_XPCOM_LDFLAGS.darwin = $(TEMPLATE_VBOXR3NP_LDFLAGS.darwin) \
110 -fshort-wchar -fno-rtti -fno-exceptions -fpascal-strings \
111 -current_version $(VBOX_VERSION_MAJOR).$(VBOX_VERSION_MINOR).$(VBOX_VERSION_BUILD) \
112 -framework CoreServices \
113 -framework CoreFoundation \
114 -framework Foundation \
115 -framework AppKit \
116 -framework Carbon
117## @todo wy is -fno-exceptions here.
118ifn1of ($(KBUILD_TARGET), os2 win)
119 TEMPLATE_XPCOM_CXXFLAGS += -fPIC
120 TEMPLATE_XPCOM_CFLAGS += -fPIC
121 TEMPLATE_XPCOM_LDFLAGS += -fPIC
122 TEMPLATE_XPCOM_DEFS += MOZ_PRESERVE_PIC
123endif
124TEMPLATE_XPCOM_INCS = xpcom/build \
125 xpcom/ds \
126 xpcom/io \
127 xpcom/base \
128 xpcom/components \
129 xpcom/threads \
130 xpcom/proxy/src \
131 xpcom/reflect/xptcall/src \
132 ipc/ipcd/client/src \
133 ipc/ipcd/shared/src \
134 ipc/ipcd/extensions/lock/src \
135 ipc/ipcd/extensions/transmngr/src \
136 ipc/ipcd/extensions/dconnect/src \
137 ipc/ipcd/extensions/transmngr/common \
138 $(VBOX_PATH_SDK)/bindings/xpcom/include \
139 $(VBOX_PATH_SDK)/bindings/xpcom/include/nsprpub \
140 $(VBOX_PATH_SDK)/bindings/xpcom/include/string \
141 $(VBOX_PATH_SDK)/bindings/xpcom/include/xpcom \
142 $(VBOX_PATH_SDK)/bindings/xpcom/include/ipcd \
143 .
144TEMPLATE_XPCOM_INCS.darwin = $(VBOX_PATH_MACOSX_SDK)/Developer/Headers/FlatCarbon
145TEMPLATE_XPCOM_INCS.l4 = $(L4_INCDIR) $(VBOX_L4_GCC3_INCS)
146TEMPLATE_XPCOM_LDFLAGS.l4 = $(L4_DIR)/lib/x86_586/crt0.o \
147 -T$(L4_DIR)/lib/x86_586/main_rel.ld -nostdlib \
148 # -Wl,--whole-archive,--no-allow-shlib-undefined
149TEMPLATE_XPCOM_LIBS.l4 = $(VBOX_GCC_LIBGCC)
150TEMPLATE_XPCOM_LIBS.solaris = sendfile
151TEMPLATE_XPCOM_ORDERDEPS = $(foreach hdrinst, $(filter %-HEADERS, $(INSTALLS)), $(TARGET_$(hdrinst))) \
152 $(PATH_VBox-xpcom-string)/idl_ts
153ifeq ($(KBUILD_TARGET),os2)
154 ifndef USE_OS2_TOOLKIT_HEADERS
155 TEMPLATE_XPCOM_DEFS.os2 += OS2EMX_PLAIN_CHAR
156 endif
157 TEMPLATE_XPCOM_DEFS.os2 += XP_OS2_EMX OS2=4
158 # this is at least for strnicmp()
159 TEMPLATE_XPCOM_DEFS.os2 += _EMX_SOURCE
160 # @@todo shouldn't this be somehow default for ASTOOL?
161 TEMPLATE_XPCOM_ASFLAGS.os2 += -Zomf
162endif
163
164# When using IPRT in NSRP or/and using IPRT for logging, link with IPRT.
165TEMPLATE_XPCOM_LIBS += $(LIB_RUNTIME)
166
167#
168# Template for building the XPCOM executables.
169# Used as a base template by XPCOMTSTEXE and XPCOMIPCEXE.
170#
171TEMPLATE_XPCOMEXE = XPCOM executable files
172TEMPLATE_XPCOMEXE_EXTENDS = XPCOM
173## @todo undo -fPIC.
174TEMPLATE_XPCOMEXE_INCS = ipc/ipcd/shared/src \
175 $(VBOX_PATH_SDK)/bindings/xpcom/include \
176 $(VBOX_PATH_SDK)/bindings/xpcom/include/nsprpub \
177 $(VBOX_PATH_SDK)/bindings/xpcom/include/string \
178 $(VBOX_PATH_SDK)/bindings/xpcom/include/xpcom \
179 $(VBOX_PATH_SDK)/bindings/xpcom/include/ipcd \
180 .
181TEMPLATE_XPCOMEXE_LIBS = \
182 $(TARGET_VBox-xpcom-ipcshared) \
183 $(TARGET_VBoxXPCOM) \
184 $(TEMPLATE_XPCOM_LIBS)
185TEMPLATE_XPCOMEXE_LIBS.freebsd = $(LIB_PTHREAD)
186TEMPLATE_XPCOMEXE_LIBS.linux = dl $(LIB_PTHREAD)
187TEMPLATE_XPCOMEXE_LIBS.l4 = $(LIB_RUNTIME) $(VBOX_GCC_LIBGCC)
188TEMPLATE_XPCOMEXE_LDFLAGS.darwin = -bind_at_load $(filter-out -current_version $(VBOX_VERSION_MAJOR).$(VBOX_VERSION_MINOR).$(VBOX_VERSION_BUILD),$(TEMPLATE_XPCOM_LDFLAGS.darwin))
189TEMPLATE_XPCOMEXE_LDFLAGS.l4 = $(L4_DIR)/lib/x86_586/crt0.o \
190 -T$(L4_DIR)/lib/x86_586/main_dyn.ld -nostdlib -lgcc \
191 -Wl,--export-dynamic,--dynamic-linker=libld-l4.s.so \
192 -Wl,--rpath-link,$(L4_LIBDIR) \
193 # -Wl,--whole-archive,--no-allow-shlib-undefined
194# -Wno-format
195
196
197#
198# Template for building the XPCOM testcase executables
199#
200TEMPLATE_XPCOMTSTEXE = XPCOM executable files (testcases)
201TEMPLATE_XPCOMTSTEXE_EXTENDS = XPCOMEXE
202TEMPLATE_XPCOMTSTEXE_CXXFLAGS = $(TEMPLATE_XPCOMEXE_CXXFLAGS) -Wno-format
203TEMPLATE_XPCOMTSTEXE_CFLAGS = $(TEMPLATE_XPCOMEXE_CFLAGS) -Wno-format
204
205
206#
207# Template for building XPCOM executables for running at build time.
208#
209# It extends the BLDPROG template in config.kmk but overrides CFLAGS
210# and CXXFLAGS completely at the moment.
211#
212TEMPLATE_XPCOMBLDPROG = XPCOM Build programs executables
213TEMPLATE_XPCOMBLDPROG_EXTENDS = VBOXBLDPROG
214## @todo Verify that this doesn't blow up because of template inheriance ordering. (we're assuming XPCOMEXE is expanded when this is being used.)
215TEMPLATE_XPCOMBLDPROG_DEFS = $(TEMPLATE_BLDPROG_DEFS) $(TEMPLATE_XPCOMEXE_DEFS)
216TEMPLATE_XPCOMBLDPROG_DEFS.$(KBUILD_HOST) = $(TEMPLATE_BLDPROG_DEFS.$(KBUILD_HOST)) $(TEMPLATE_XPCOMEXE_DEFS.$(KBUILD_HOST))
217TEMPLATE_XPCOMBLDPROG_DEFS.x86 = $(TEMPLATE_BLDPROG_DEFS.x86) $(TEMPLATE_XPCOMEXE_DEFS.x86)
218TEMPLATE_XPCOMBLDPROG_DEFS.amd64 = $(TEMPLATE_BLDPROG_DEFS.amd64) $(TEMPLATE_XPCOMEXE_DEFS.amd64)
219TEMPLATE_XPCOMBLDPROG_INCS = \
220 $(VBOX_PATH_SDK)/bindings/xpcom/include \
221 $(VBOX_PATH_SDK)/bindings/xpcom/include/nsprpub \
222 $(VBOX_PATH_SDK)/bindings/xpcom/include/string \
223 $(VBOX_PATH_SDK)/bindings/xpcom/include/xpcom \
224 $(VBOX_PATH_SDK)/bindings/xpcom/include/ipcd
225TEMPLATE_XPCOMBLDPROG_CFLAGS = $(filter-out -pedantic -Wshadow, $(TEMPLATE_BLDPROG_CFLAGS)) $(VBOX_GCC_Wno-int-to-pointer-cast) $(VBOX_GCC_Wno-pointer-to-int-cast)
226TEMPLATE_XPCOMBLDPROG_CXXFLAGS.darwin = $(TEMPLATE_BLDPROG_CXXFLAGS.darwin) -fpascal-strings -fshort-wchar -fno-common -fno-rtti
227TEMPLATE_XPCOMBLDPROG_CXXFLAGS.solaris = $(TEMPLATE_BLDPROG_CXXFLAGS.solaris) -fno-omit-frame-pointer # for now anyway.
228TEMPLATE_XPCOMBLDPROG_LDFLAGS.darwin = $(TEMPLATE_BLDPROG_LDFLAGS.darwin) -fpascal-strings -fshort-wchar -fno-rtti -fno-exceptions
229TEMPLATE_XPCOMBLDPROG_ORDERDEPS = $(foreach hdrinst, $(filter %-HEADERS, $(INSTALLS)), $(TARGET_$(hdrinst)))
230
231
232ifeq ($(VBOX_DEF_MACOSX_VERSION_MIN),10.4)
233 #
234 # Template for building VBoxPhython against the Mac OS X 10.4 SDK.
235 # ASSUMES that the SDK bits are in the .darwin properties we're overriding below.
236 #
237 TEMPLATE_XPCOMOSX104 = XPCOM libraries (shared) built against the Mac OS X 10.4 SDK
238 TEMPLATE_XPCOMOSX104_EXTENDS = XPCOM
239 TEMPLATE_XPCOMOSX104_CXXFLAGS.darwin = $(filter-out $(VBOX_DARWIN_DEF_SDK_CXXFLAGS),$(TEMPLATE_XPCOM_CXXFLAGS.darwin)) $(VBOX_DARWIN_DEF_SDK_10_4_CXXFLAGS)
240 TEMPLATE_XPCOMOSX104_CFLAGS.darwin = $(filter-out $(VBOX_DARWIN_DEF_SDK_CFLAGS),$(TEMPLATE_XPCOM_CFLAGS.darwin)) $(VBOX_DARWIN_DEF_SDK_10_4_CFLAGS)
241 TEMPLATE_XPCOMOSX104_LDFLAGS.darwin = $(filter-out $(VBOX_DARWIN_DEF_SDK_LDFLAGS),$(TEMPLATE_XPCOM_LDFLAGS.darwin)) $(VBOX_DARWIN_DEF_SDK_10_4_LDFLAGS)
242 TEMPLATE_XPCOMOSX104_DEFS.darwin = $(filter-out $(VBOX_DARWIN_DEF_SDK_DEFS),$(TEMPLATE_XPCOM_DEFS.darwin)) $(VBOX_DARWIN_DEF_SDK_10_4_DEFS)
243 TEMPLATE_XPCOMOSX104_INCS.darwin = $(VBOX_PATH_MACOSX_SDK_10_4)/Developer/Headers/FlatCarbon
244endif
245
246#
247# Template for building VBoxPhython against the Mac OS X 10.5 SDK.
248# ASSUMES that the SDK bits are in the .darwin properties we're overriding below.
249#
250TEMPLATE_XPCOMOSX105 = XPCOM libraries (shared) built against the Mac OS X 10.5 SDK
251TEMPLATE_XPCOMOSX105_EXTENDS = XPCOM
252TEMPLATE_XPCOMOSX105_CXXFLAGS.darwin = $(filter-out $(VBOX_DARWIN_DEF_SDK_CXXFLAGS),$(TEMPLATE_XPCOM_CXXFLAGS.darwin)) $(VBOX_DARWIN_DEF_SDK_10_5_CXXFLAGS)
253TEMPLATE_XPCOMOSX105_CFLAGS.darwin = $(filter-out $(VBOX_DARWIN_DEF_SDK_CFLAGS),$(TEMPLATE_XPCOM_CFLAGS.darwin)) $(VBOX_DARWIN_DEF_SDK_10_5_CFLAGS)
254TEMPLATE_XPCOMOSX105_LDFLAGS.darwin = $(filter-out $(VBOX_DARWIN_DEF_SDK_LDFLAGS),$(TEMPLATE_XPCOM_LDFLAGS.darwin)) $(VBOX_DARWIN_DEF_SDK_10_5_LDFLAGS)
255TEMPLATE_XPCOMOSX105_DEFS.darwin = $(filter-out $(VBOX_DARWIN_DEF_SDK_DEFS),$(TEMPLATE_XPCOM_DEFS.darwin)) $(VBOX_DARWIN_DEF_SDK_10_5_DEFS)
256TEMPLATE_XPCOMOSX105_INCS.darwin = $(VBOX_PATH_MACOSX_SDK_10_5)/Developer/Headers/FlatCarbon
257
258#
259# Template for building VBoxPhython against the Mac OS X 10.6 SDK.
260# ASSUMES that the SDK bits are in the .darwin properties we're overriding below.
261#
262TEMPLATE_XPCOMOSX106 = XPCOM libraries (shared) built against the Mac OS X 10.6 SDK
263TEMPLATE_XPCOMOSX106_EXTENDS = XPCOM
264TEMPLATE_XPCOMOSX106_CXXFLAGS.darwin = $(filter-out $(VBOX_DARWIN_DEF_SDK_CXXFLAGS),$(TEMPLATE_XPCOM_CXXFLAGS.darwin)) $(VBOX_DARWIN_DEF_SDK_10_6_CXXFLAGS)
265TEMPLATE_XPCOMOSX106_CFLAGS.darwin = $(filter-out $(VBOX_DARWIN_DEF_SDK_CFLAGS),$(TEMPLATE_XPCOM_CFLAGS.darwin)) $(VBOX_DARWIN_DEF_SDK_10_6_CFLAGS)
266TEMPLATE_XPCOMOSX106_LDFLAGS.darwin = $(filter-out $(VBOX_DARWIN_DEF_SDK_LDFLAGS),$(TEMPLATE_XPCOM_LDFLAGS.darwin)) $(VBOX_DARWIN_DEF_SDK_10_6_LDFLAGS)
267TEMPLATE_XPCOMOSX106_DEFS.darwin = $(filter-out $(VBOX_DARWIN_DEF_SDK_DEFS),$(TEMPLATE_XPCOM_DEFS.darwin)) $(VBOX_DARWIN_DEF_SDK_10_6_DEFS)
268TEMPLATE_XPCOMOSX106_INCS.darwin = $(VBOX_PATH_MACOSX_SDK_10_6)/Developer/Headers/FlatCarbon
269
270
271#
272# Header installs.
273#
274INSTALLS += \
275 NSPRPUB-HEADERS \
276 NSPRPUB-MD-HEADERS \
277 NSPRPUB-OBS-HEADERS \
278 NSPRPUB-PRIV-HEADERS \
279 STRING-HEADERS \
280 XPCOM-HEADERS \
281 IPCD-HEADERS
282
283#
284# The IDL compiler and typelib linker.
285#
286BLDPROGS += \
287 xpidl \
288 xpt_link
289
290#
291# We build several libraries so that any linker command line
292# length restrictions limit will be avoided. (Solaris, Mac?)
293#
294
295ifndef VBOX_ONLY_SDK
296LIBRARIES += \
297 VBox-xpcom-nspr \
298 VBox-xpcom-typelib \
299 VBox-xpcom-string \
300 VBox-xpcom-base \
301 VBox-xpcom-ds \
302 VBox-xpcom-io \
303 VBox-xpcom-components \
304 VBox-xpcom-threads \
305 VBox-xpcom-xptinfo \
306 VBox-xpcom-xptcall \
307 VBox-xpcom-proxy \
308 VBoxXPCOMGlue_s \
309 VBoxXPCOMGlue \
310 VBox-xpcom-ipcutils \
311 VBox-xpcom-ipcshared \
312 VBox-xpcom-ipcdlock \
313 VBox-xpcom-ipctransmgr \
314 VBox-xpcom-ipctmgrcom
315
316DLLS += \
317 VBoxXPCOM \
318 VBoxXPCOMIPCC
319
320ifdef VBOX_WITH_TESTCASES
321PROGRAMS += \
322 tstnsIFileEnumerator \
323 tstnsIFileTest \
324 tstTestArray \
325 tstTestAtoms \
326 tstTestAutoLock \
327 tstTestCallTemplates \
328 tstTestCOMPtr \
329 tstTestCOMPtrEq \
330 tstTestCRT \
331 tstTestFactory \
332 tstTestHashtables \
333 tstTestID \
334 tstTestObserverService \
335 tstTestPipes \
336 tstTestServMgr \
337 tstTestThreads \
338 tstTestXPIDLString \
339 tstTestDeque \
340 tstTestAutoPtr \
341 tstTestMinStringAPI \
342 tstTestStrings \
343 tstPrimitiveTest \
344 tstSimpleTypeLib \
345 tstXptDump \
346 tstXptLink
347# tstTestPermanentAtoms
348endif # VBOX_WITH_TESTCASES
349PROGRAMS += VBoxXPCOMIPCD
350
351
352else
353
354PATH_VBox-xpcom-string=$(PATH_BIN)
355
356endif # !VBOX_ONLY_SDK
357
358
359
360
361#
362# SDK headers - lot's of files to install...
363#
364# Tip: If you are going to remove files here, you might
365# wish to do a `kmk uninstall' first to avoid have
366# obsoleted files in the $(INST_SDK) directory.
367#
368NSPRPUB-HEADERS_INST = $(INST_SDK)bindings/xpcom/include/nsprpub/
369NSPRPUB-HEADERS_IFFLAGS = -m 644
370NSPRPUB-HEADERS_SOURCES = \
371 nsprpub/pr/include/nspr.h \
372 nsprpub/lib/ds/plarena.h \
373 nsprpub/lib/ds/plarenas.h \
374 nsprpub/lib/libc/include/plbase64.h \
375 nsprpub/lib/libc/include/plerror.h \
376 nsprpub/lib/libc/include/plgetopt.h \
377 nsprpub/lib/ds/plhash.h \
378 nsprpub/lib/libc/include/plresolv.h \
379 nsprpub/lib/libc/include/plstr.h \
380 nsprpub/pr/include/pratom.h \
381 nsprpub/pr/include/prbit.h \
382 nsprpub/pr/include/prclist.h \
383 nsprpub/pr/include/prcmon.h \
384 nsprpub/pr/include/prcountr.h \
385 nsprpub/pr/include/prcvar.h \
386 nsprpub/pr/include/prdtoa.h \
387 nsprpub/pr/include/prenv.h \
388 nsprpub/pr/include/prerr.h \
389 nsprpub/pr/include/prerror.h \
390 nsprpub/pr/include/prinet.h \
391 nsprpub/pr/include/prinit.h \
392 nsprpub/pr/include/prinrval.h \
393 nsprpub/pr/include/prio.h \
394 nsprpub/pr/include/pripcsem.h \
395 nsprpub/pr/include/prlink.h \
396 nsprpub/pr/include/prlock.h \
397 nsprpub/pr/include/prlog.h \
398 nsprpub/pr/include/prlong.h \
399 nsprpub/pr/include/prmem.h \
400 nsprpub/pr/include/prmon.h \
401 nsprpub/pr/include/prmwait.h \
402 nsprpub/pr/include/prnetdb.h \
403 nsprpub/pr/include/prolock.h \
404 nsprpub/pr/include/prpdce.h \
405 nsprpub/pr/include/prprf.h \
406 nsprpub/pr/include/prproces.h \
407 nsprpub/pr/include/prrng.h \
408 nsprpub/pr/include/prrwlock.h \
409 nsprpub/pr/include/prshm.h \
410 nsprpub/pr/include/prshma.h \
411 nsprpub/pr/include/prsystem.h \
412 nsprpub/pr/include/prthread.h \
413 nsprpub/pr/include/prtime.h \
414 nsprpub/pr/include/prtpool.h \
415 nsprpub/pr/include/prtrace.h \
416 nsprpub/pr/include/prtypes.h \
417 nsprpub/pr/include/prvrsion.h \
418 nsprpub/pr/include/prwin16.h \
419 nsprpub/pr/include/md/_vbox.cfg=>prcpucfg.h \
420
421NSPRPUB-MD-HEADERS_INST = $(INST_SDK)bindings/xpcom/include/nsprpub/md/
422NSPRPUB-MD-HEADERS_IFFLAGS = -m 644
423NSPRPUB-MD-HEADERS_SOURCES = \
424 nsprpub/pr/include/md/_iprt_atomic.h \
425 nsprpub/pr/include/md/_darwin.h \
426 nsprpub/pr/include/md/_freebsd.h \
427 nsprpub/pr/include/md/_l4v2.h \
428 nsprpub/pr/include/md/_linux.h \
429 nsprpub/pr/include/md/_macos.h \
430 nsprpub/pr/include/md/_netbsd.h \
431 nsprpub/pr/include/md/_openbsd.h \
432 nsprpub/pr/include/md/_os2_errors.h \
433 nsprpub/pr/include/md/_os2.h \
434 nsprpub/pr/include/md/_pcos.h \
435 nsprpub/pr/include/md/_solaris.h \
436 nsprpub/pr/include/md/_unix_errors.h \
437 nsprpub/pr/include/md/_unixos.h \
438 nsprpub/pr/include/md/_pth.h \
439 nsprpub/pr/include/md/prosdep.h \
440 \
441 nsprpub/pr/include/md/_freebsd.cfg \
442 nsprpub/pr/include/md/_linux.cfg \
443 nsprpub/pr/include/md/_darwin.cfg \
444 nsprpub/pr/include/md/_netbsd.cfg \
445 nsprpub/pr/include/md/_openbsd.cfg \
446 nsprpub/pr/include/md/_os2.cfg \
447 nsprpub/pr/include/md/_solaris32.cfg \
448 nsprpub/pr/include/md/_solaris64.cfg \
449 nsprpub/pr/include/md/_l4v2.cfg
450
451NSPRPUB-OBS-HEADERS_INST = $(INST_SDK)bindings/xpcom/include/nsprpub/obsolete/
452NSPRPUB-OBS-HEADERS_IFFLAGS = -m 644
453NSPRPUB-OBS-HEADERS_SOURCES = \
454 nsprpub/pr/include/obsolete/pralarm.h \
455 nsprpub/pr/include/obsolete/probslet.h \
456 nsprpub/pr/include/obsolete/protypes.h \
457 nsprpub/pr/include/obsolete/prsem.h
458
459NSPRPUB-PRIV-HEADERS_INST = $(INST_SDK)bindings/xpcom/include/nsprpub/private/
460NSPRPUB-PRIV-HEADERS_IFFLAGS = -m 644
461NSPRPUB-PRIV-HEADERS_SOURCES = \
462 nsprpub/pr/include/private/pprio.h \
463 nsprpub/pr/include/private/pprthred.h \
464 nsprpub/pr/include/private/prpriv.h
465
466STRING-HEADERS_INST = $(INST_SDK)bindings/xpcom/include/string
467STRING-HEADERS_IFFLAGS = -m 644
468STRING-HEADERS_SOURCES = \
469 xpcom/string/public/nsAString.h \
470 xpcom/string/public/nsAlgorithm.h \
471 xpcom/string/public/nsCharTraits.h \
472 xpcom/string/public/nsDependentString.h \
473 xpcom/string/public/nsDependentSubstring.h \
474 xpcom/string/public/nsEmbedString.h \
475 xpcom/string/public/nsLiteralString.h \
476 xpcom/string/public/nsObsoleteAString.h \
477 xpcom/string/public/nsPrintfCString.h \
478 xpcom/string/public/nsPromiseFlatString.h \
479 xpcom/string/public/nsReadableUtils.h \
480 xpcom/string/public/nsString.h \
481 xpcom/string/public/nsStringAPI.h \
482 xpcom/string/public/nsStringFwd.h \
483 xpcom/string/public/nsStringIterator.h \
484 xpcom/string/public/nsSubstring.h \
485 xpcom/string/public/nsSubstringTuple.h \
486 xpcom/string/public/nsTAString.h \
487 xpcom/string/public/nsTDependentString.h \
488 xpcom/string/public/nsTDependentSubstring.h \
489 xpcom/string/public/nsTObsoleteAString.h \
490 xpcom/string/public/nsTPromiseFlatString.h \
491 xpcom/string/public/nsTString.h \
492 xpcom/string/public/nsTSubstring.h \
493 xpcom/string/public/nsTSubstringTuple.h \
494 xpcom/string/public/nsUTF8Utils.h \
495 xpcom/string/public/nsXPIDLString.h \
496 xpcom/string/public/string-template-def-char.h \
497 xpcom/string/public/string-template-def-unichar.h \
498 xpcom/string/public/string-template-undef.h
499
500XPCOM-HEADERS_INST = $(INST_SDK)bindings/xpcom/include/xpcom
501XPCOM-HEADERS_IFFLAGS = -m 644
502XPCOM-HEADERS_SOURCES = \
503 xpcom/base/nsAgg.h \
504 xpcom/io/nsAppDirectoryServiceDefs.h \
505 xpcom/ds/nsArray.h \
506 xpcom/ds/nsArrayEnumerator.h \
507 xpcom/ds/nsAtomService.h \
508 xpcom/ds/nsAutoBuffer.h \
509 xpcom/threads/nsAutoLock.h \
510 xpcom/base/nsAutoPtr.h \
511 xpcom/ds/nsBaseHashtable.h \
512 xpcom/ds/nsCOMArray.h \
513 xpcom/ds/nsCRT.h \
514 xpcom/components/nsCategoryManagerUtils.h \
515 xpcom/ds/nsCheapSets.h \
516 xpcom/ds/nsClassHashtable.h \
517 xpcom/base/nsCom.h \
518 xpcom/components/nsComponentManagerObsolete.h \
519 xpcom/components/nsComponentManagerUtils.h \
520 xpcom/ds/nsCppSharedAllocator.h \
521 xpcom/ds/nsDataHashtable.h \
522 xpcom/base/nsDebugImpl.h \
523 xpcom/ds/nsDeque.h \
524 xpcom/io/nsDirectoryService.h \
525 xpcom/io/nsDirectoryServiceDefs.h \
526 xpcom/io/nsDirectoryServiceUtils.h \
527 xpcom/ds/nsDoubleHashtable.h \
528 xpcom/ds/nsEnumeratorUtils.h \
529 xpcom/base/nsError.h \
530 xpcom/io/nsEscape.h \
531 xpcom/threads/nsEventQueueUtils.h \
532 xpcom/io/nsFastLoadPtr.h \
533 xpcom/io/nsFastLoadService.h \
534 xpcom/ds/nsFixedSizeAllocator.h \
535 xpcom/ds/nsHashKeys.h \
536 xpcom/ds/nsHashSets.h \
537 xpcom/ds/nsHashtable.h \
538 xpcom/base/nsIAllocator.h \
539 xpcom/ds/nsIByteBuffer.h \
540 xpcom/base/nsID.h \
541 xpcom/base/nsIID.h \
542 xpcom/components/nsIServiceManagerObsolete.h \
543 xpcom/components/nsIServiceManagerUtils.h \
544 xpcom/base/nsISupportsBase.h \
545 xpcom/base/nsISupportsObsolete.h \
546 xpcom/ds/nsIUnicharBuffer.h \
547 xpcom/io/nsIUnicharInputStream.h \
548 xpcom/ds/nsInt64.h \
549 xpcom/ds/nsInterfaceHashtable.h \
550 xpcom/io/nsLinebreakConverter.h \
551 xpcom/io/nsLocalFile.h \
552 xpcom/io/nsLocalFileUnix.h \
553 xpcom/io/nsLocalFileOS2.h \
554 xpcom/io/nsLocalFileOSX.h \
555 xpcom/components/nsModule.h \
556 xpcom/io/nsMultiplexInputStream.h \
557 xpcom/io/nsNativeCharsetUtils.h \
558 xpcom/components/nsNativeComponentLoader.h \
559 xpcom/ds/nsObserverService.h \
560 xpcom/components/nsObsoleteModuleLoading.h \
561 xpcom/threads/nsProcess.h \
562 xpcom/proxy/public/nsProxiedService.h \
563 xpcom/proxy/public/nsProxyEvent.h \
564 xpcom/proxy/public/nsProxyRelease.h \
565 xpcom/ds/nsQuickSort.h \
566 xpcom/ds/nsRecyclingAllocator.h \
567 xpcom/ds/nsRefPtrHashtable.h \
568 xpcom/io/nsScriptableInputStream.h \
569 xpcom/ds/nsStaticAtom.h \
570 xpcom/components/nsStaticComponent.h \
571 xpcom/ds/nsStaticNameTable.h \
572 xpcom/io/nsStorageStream.h \
573 xpcom/io/nsStreamUtils.h \
574 xpcom/ds/nsStringEnumerator.h \
575 xpcom/io/nsStringIO.h \
576 xpcom/io/nsStringStream.h \
577 xpcom/ds/nsSupportsArray.h \
578 xpcom/ds/nsSupportsPrimitives.h \
579 xpcom/ds/nsTHashtable.h \
580 xpcom/ds/nsTextFormatter.h \
581 xpcom/ds/nsTime.h \
582 xpcom/base/nsTraceRefcntImpl.h \
583 xpcom/ds/nsUnitConversion.h \
584 xpcom/ds/nsValueArray.h \
585 xpcom/ds/nsVariant.h \
586 xpcom/ds/nsVoidArray.h \
587 xpcom/base/nsWeakPtr.h \
588 xpcom/build/nsXPCOM.h \
589 xpcom/build/nsXPCOMCID.h \
590 xpcom/base/nscore.h \
591 xpcom/ds/pldhash.h \
592 xpcom/threads/plevent.h \
593 xpcom/components/xcDll.h \
594 xpcom/typelib/xpt/public/xpt_arena.h \
595 xpcom/typelib/xpt/public/xpt_struct.h \
596 xpcom/typelib/xpt/public/xpt_xdr.h \
597 xpcom/reflect/xptcall/public/xptcall.h \
598 xpcom/reflect/xptcall/public/xptcstubsdecl.inc \
599 xpcom/reflect/xptcall/public/xptcstubsdef.inc \
600 xpcom/reflect/xptinfo/public/xptinfo.h \
601 \
602 xpcom/glue/nsIInterfaceRequestorUtils.h \
603 xpcom/glue/nsISupportsImpl.h \
604 xpcom/glue/nsISupportsUtils.h \
605 xpcom/glue/nsIWeakReferenceUtils.h \
606 \
607 xpcom/glue/nsCOMPtr.h \
608 xpcom/glue/nsDebug.h \
609 xpcom/glue/nsGenericFactory.h \
610 xpcom/glue/nsIGenericFactory.h \
611 xpcom/glue/nsMemory.h \
612 xpcom/glue/nsTraceRefcnt.h \
613 xpcom/glue/nsWeakReference.h \
614 \
615 xpcom/glue/standalone/nsXPCOMGlue.h \
616 \
617 xpcom-config.h
618
619IPCD-HEADERS_INST = $(INST_SDK)bindings/xpcom/include/ipcd/
620IPCD-HEADERS_IFFLAGS = -m 644
621IPCD-HEADERS_SOURCES = \
622 ipc/ipcd/client/public/ipcCID.h \
623 ipc/ipcd/extensions/lock/public/ipcLockCID.h \
624 ipc/ipcd/util/public/ipcMessageReader.h \
625 ipc/ipcd/util/public/ipcMessageWriter.h \
626 ipc/ipcd/daemon/public/ipcModule.h \
627 ipc/ipcd/daemon/public/ipcModuleUtil.h \
628 ipc/ipcd/client/public/ipcdclient.h
629
630
631#
632# The IDL compiler.
633#
634# We build it statically because we cannot rely on additional .a files
635# like in the original build
636#
637xpidl_TEMPLATE = XPCOMBLDPROG
638xpidl_DEFS = EXPORT_XPT_API
639## @todo This assumes HOST == TARGET.
640xpidl_INST = $(INST_BIN)
641## Obsolete hack: MacPorts is 32-bit on 10.5 and 64-bit on 10.6. Set your KBUILD_HOST_ARCH env.vars. accordingly.
642#if "$(KBUILD_HOST).$(KBUILD_HOST_ARCH)" == "darwin.amd64" && defined(VBOX_MACOS_10_5_WORKAROUND)
643# xpidl_BLD_TRG_ARCH = x86
644# ## @todo kBuild ticket 84 workarounds:
645# xpidl_DEFS.x86 = $(TEMPLATE_XPCOMBLDPROG_DEFS.x86)
646# xpidl_CFLAGS.x86 = $(TEMPLATE_XPCOMBLDPROG_CFLAGS.x86)
647# xpidl_CXXFLAGS.x86 = $(TEMPLATE_XPCOMBLDPROG_CXXFLAGS.x86)
648# xpidl_LDFLAGS.x86 = $(TEMPLATE_XPCOMBLDPROG_LDFLAGS.x86)
649#endif
650xpidl_SOURCES = \
651 xpcom/typelib/xpidl/xpidl.c \
652 xpcom/typelib/xpidl/xpidl_idl.c \
653 xpcom/typelib/xpidl/xpidl_util.c \
654 xpcom/typelib/xpidl/xpidl_header.c \
655 xpcom/typelib/xpidl/xpidl_typelib.c \
656 xpcom/typelib/xpidl/xpidl_doc.c \
657 xpcom/typelib/xpidl/xpidl_java.c \
658 xpcom/typelib/xpt/src/xpt_arena.c \
659 xpcom/typelib/xpt/src/xpt_struct.c \
660 xpcom/typelib/xpt/src/xpt_xdr.c
661
662ifeq ($(KBUILD_TARGET),os2)
663 # glib and libIDL needed by XPCOM on OS/2.
664 ifeq ($(VBOX_PATH_GLIB),)
665 VBOX_PATH_GLIB := $(lastword $(sort $(wildcard $(PATH_DEVTOOLS_TRG)/glibidl/*/glibidl/gcc335)))
666 endif
667 VBOX_PATH_LIBIDL ?= $(VBOX_PATH_GLIB)
668 ifeq ($(wildcard $(VBOX_PATH_GLIB)),)
669 $(warning VBOX_PATH_GLIB is "$(VBOX_PATH_GLIB)" which is not a valid directory!)
670 endif
671 ifeq ($(wildcard $(VBOX_PATH_LIBIDL)),)
672 $(warning VBOX_PATH_LIBIDL is "$(VBOX_PATH_LIBIDL)" which is not a valid directory!)
673 endif
674 xpidl_INCS = \
675 $(VBOX_PATH_LIBIDL)/include \
676 $(VBOX_PATH_GLIB)/include
677 xpidl_LIBS = \
678 $(VBOX_PATH_LIBIDL)/lib/libidl.lib \
679 $(VBOX_PATH_LIBIDL)/lib/glib.lib
680 # install necessary DLLs to the same place where xpidl goes
681 INSTALLS += xpidl-DLLS
682 xpidl_ORDERDEPS = $(TARGET_xpidl-DLLS)
683 xpidl-DLLS_INST = $(xpidl_INST)
684 # static libraries of these may be provided instead,
685 # so copy DLLs only when they are present
686 xpidl-DLLS_SOURCES += $(wildcard $(VBOX_PATH_GLIB)/lib/glib.dll)
687 xpidl-DLLS_SOURCES += $(wildcard $(VBOX_PATH_LIBIDL)/lib/libIDL.dll)
688else
689 # We do these ONCE.
690 libIDL_config_cflags := $(shell $(VBOX_LIBIDL_CONFIG) --cflags)
691 libIDL_config_libs := $(shell $(VBOX_LIBIDL_CONFIG) --libs)
692 xpidl_CFLAGS = \
693 $(libIDL_config_cflags)
694 xpidl_LDFLAGS = \
695 $(libIDL_config_libs)
696endif
697
698#
699# The XPT linker.
700#
701xpt_link_TEMPLATE = XPCOMBLDPROG
702xpt_link_SOURCES = \
703 xpcom/typelib/xpt/tools/xpt_link.c \
704 xpcom/typelib/xpt/src/xpt_arena.c \
705 xpcom/typelib/xpt/src/xpt_struct.c \
706 xpcom/typelib/xpt/src/xpt_xdr.c
707
708
709#
710# The NSPR Library.
711#
712VBox-xpcom-nspr_TEMPLATE = XPCOM
713VBox-xpcom-nspr_NOINST = 1
714VBox-xpcom-nspr_DEFS = \
715 _NSPR_BUILD_ \
716 HAVE_LCHOWN=1 \
717 HAVE_STRERROR=1 \
718 FORCE_PR_LOG
719VBox-xpcom-nspr_DEFS += \
720 VBOX_USE_IPRT_IN_NSPR
721VBox-xpcom-nspr_DEFS.darwin.amd64 = \
722 VBOX_USE_MORE_IPRT_IN_NSPR
723VBox-xpcom-nspr_DEFS.darwin = \
724 HAVE_BSD_FLOCK=1 \
725 _PR_PTHREADS
726VBox-xpcom-nspr_DEFS.freebsd = \
727 FREEBSD=1 \
728 HAVE_CVAR_BUILT_ON_SEM \
729 _PR_PTHREADS
730## @todo filling in the missing stuff, please don't just copy it from linux.
731# FIXME: LINUX should be defined by _linux.cfg
732VBox-xpcom-nspr_DEFS.linux = \
733 LINUX=1 \
734 _POSIX_SOURCE=1 \
735 _BSD_SOURCE=1 \
736 _SVID_SOURCE=1 \
737 _REENTRANT=1 \
738 _LARGEFILE64_SOURCE=1 \
739 HAVE_FCNTL_FILE_LOCKING=1 \
740 HAVE_CVAR_BUILT_ON_SEM \
741 _PR_PTHREADS
742# _BSD_SOURCE is here to keep the Glibc header files happy and make them include the right things
743# FIXME: L4 should be defined by _linux.cfg
744VBox-xpcom-nspr_DEFS.l4 = \
745 L4=1 \
746 _REENTRANT=1 \
747 _LARGEFILE64_SOURCE=1 \
748 _POSIX_SOURCE=1 \
749 _BSD_SOURCE=1 \
750 HAVE_FCNTL_FILE_LOCKING=1 \
751 HAVE_CVAR_BUILT_ON_SEM
752VBox-xpcom-nspr_DEFS.netbsd = \
753 _PR_PTHREADS
754VBox-xpcom-nspr_DEFS.openbsd = \
755 _PR_PTHREADS
756VBox-xpcom-nspr_DEFS.os2 =
757VBox-xpcom-nspr_DEFS.solaris = \
758 HAVE_FCNTL_FILE_LOCKING=1 \
759 _PR_PTHREADS
760VBox-xpcom-nspr_INCS = \
761 nsprpub/pr/include/private \
762 $(PATH_VBox-xpcom-nspr)
763
764VBox-xpcom-nspr_SOURCES = \
765 nsprpub/pr/src/io/prfdcach.c \
766 nsprpub/pr/src/io/prmwait.c \
767 nsprpub/pr/src/io/priometh.c \
768 nsprpub/pr/src/io/pripv6.c \
769 nsprpub/pr/src/io/prmapopt.c \
770 nsprpub/pr/src/io/prlayer.c \
771 nsprpub/pr/src/io/prlog.c \
772 nsprpub/pr/src/io/prmmap.c \
773 nsprpub/pr/src/io/prpolevt.c \
774 nsprpub/pr/src/io/prprf.c \
775 nsprpub/pr/src/io/prscanf.c \
776 nsprpub/pr/src/io/prstdio.c \
777 nsprpub/pr/src/linking/prlink.c \
778 nsprpub/pr/src/malloc/prmalloc.c \
779 nsprpub/pr/src/malloc/prmem.c \
780 nsprpub/pr/src/md/prosdep.c \
781 nsprpub/pr/src/memory/prseg.c \
782 nsprpub/pr/src/memory/prshm.c \
783 nsprpub/pr/src/memory/prshma.c \
784 nsprpub/pr/src/misc/pralarm.c \
785 nsprpub/pr/src/misc/pratom.c \
786 nsprpub/pr/src/misc/prcountr.c \
787 nsprpub/pr/src/misc/prdtoa.c \
788 nsprpub/pr/src/misc/prenv.c \
789 nsprpub/pr/src/misc/prerr.c \
790 nsprpub/pr/src/misc/prerror.c \
791 nsprpub/pr/src/misc/prerrortable.c \
792 nsprpub/pr/src/misc/prinit.c \
793 nsprpub/pr/src/misc/prinrval.c \
794 nsprpub/pr/src/misc/pripc.c \
795 nsprpub/pr/src/misc/prlog2.c \
796 nsprpub/pr/src/misc/prlong.c \
797 nsprpub/pr/src/misc/prnetdb.c \
798 nsprpub/pr/src/misc/prolock.c \
799 nsprpub/pr/src/misc/prrng.c \
800 nsprpub/pr/src/misc/prsystem.c \
801 nsprpub/pr/src/misc/prtime.c \
802 nsprpub/pr/src/misc/prthinfo.c \
803 nsprpub/pr/src/misc/prtpool.c \
804 nsprpub/pr/src/misc/prtrace.c \
805 nsprpub/pr/src/threads/prcmon.c \
806 nsprpub/pr/src/threads/prrwlock.c \
807 nsprpub/pr/src/threads/prtpd.c \
808 nsprpub/pr/src/prvrsion.c \
809 nsprpub/lib/ds/plarena.c \
810 nsprpub/lib/ds/plhash.c \
811 nsprpub/lib/libc/src/strlen.c \
812 nsprpub/lib/libc/src/strcpy.c \
813 nsprpub/lib/libc/src/strdup.c \
814 nsprpub/lib/libc/src/strcat.c \
815 nsprpub/lib/libc/src/strcmp.c \
816 nsprpub/lib/libc/src/strccmp.c \
817 nsprpub/lib/libc/src/strchr.c \
818 nsprpub/lib/libc/src/strpbrk.c \
819 nsprpub/lib/libc/src/strstr.c \
820 nsprpub/lib/libc/src/strcstr.c \
821 nsprpub/lib/libc/src/strtok.c \
822 nsprpub/lib/libc/src/base64.c \
823 nsprpub/lib/libc/src/plerror.c \
824 nsprpub/lib/libc/src/plgetopt.c
825
826ifeq ($(filter-out darwin freebsd linux netbsd openbsd solaris,$(KBUILD_TARGET)),) # unixish
827VBox-xpcom-nspr_SOURCES += \
828 nsprpub/pr/src/md/unix/unix.c \
829 nsprpub/pr/src/md/unix/unix_errors.c \
830 nsprpub/pr/src/md/unix/uxproces.c \
831 nsprpub/pr/src/md/unix/uxrng.c \
832 nsprpub/pr/src/md/unix/uxshm.c \
833 nsprpub/pr/src/md/unix/uxwrap.c \
834 nsprpub/pr/src/pthreads/ptio.c \
835 nsprpub/pr/src/pthreads/ptsynch.c \
836 nsprpub/pr/src/pthreads/ptthread.c \
837 nsprpub/pr/src/pthreads/ptmisc.c
838endif
839
840VBox-xpcom-nspr_SOURCES.darwin = nsprpub/pr/src/md/unix/darwin.c
841VBox-xpcom-nspr_SOURCES.darwin.x86 = nsprpub/pr/src/md/unix/os_Darwin_x86.s
842
843VBox-xpcom-nspr_SOURCES.freebsd = nsprpub/pr/src/md/unix/freebsd.c
844
845VBox-xpcom-nspr_SOURCES.l4 = \
846 nsprpub/pr/src/io/prfile.c /* why not for Linux? */ \
847 nsprpub/pr/src/io/prio.c /* "" "" "" "" */ \
848 nsprpub/pr/src/io/prsocket.c \
849 nsprpub/pr/src/md/unix/unix.c \
850 nsprpub/pr/src/md/unix/unix_errors.c \
851 nsprpub/pr/src/md/unix/uxpoll.c \
852 nsprpub/pr/src/md/unix/uxproces.c \
853 nsprpub/pr/src/md/unix/uxrng.c \
854 nsprpub/pr/src/md/unix/uxshm.c \
855 nsprpub/pr/src/md/unix/uxwrap.c \
856 nsprpub/pr/src/md/unix/l4env.c \
857 nsprpub/pr/src/threads/prcthr.c \
858 nsprpub/pr/src/threads/prmon.c \
859 nsprpub/pr/src/threads/combined/prucpu.c \
860 nsprpub/pr/src/threads/combined/prucv.c \
861 nsprpub/pr/src/threads/combined/prulock.c \
862 nsprpub/pr/src/threads/combined/prustack.c \
863 nsprpub/pr/src/threads/combined/pruthr.c
864# nsprpub/pr/src/md/l4env/prnetdb.c \
865# nsprpub/pr/src/md/l4env/threads.c
866VBox-xpcom-nspr_SOURCES.l4.x86 = nsprpub/pr/src/md/unix/os_Linux_x86.s
867VBox-xpcom-nspr_SOURCES.l4.amd64 = nsprpub/pr/src/md/unix/os_Linux_x86_64.s
868
869VBox-xpcom-nspr_SOURCES.linux = nsprpub/pr/src/md/unix/linux.c
870VBox-xpcom-nspr_SOURCES.linux.x86 = nsprpub/pr/src/md/unix/os_Linux_x86.s
871VBox-xpcom-nspr_SOURCES.linux.amd64 = nsprpub/pr/src/md/unix/os_Linux_x86_64.s
872
873VBox-xpcom-nspr_SOURCES.os2 = \
874 nsprpub/pr/src/io/prdir.c \
875 nsprpub/pr/src/io/prfile.c \
876 nsprpub/pr/src/io/prio.c \
877 nsprpub/pr/src/io/prsocket.c \
878 nsprpub/pr/src/md/os2/os2misc.c \
879 nsprpub/pr/src/md/os2/os2sem.c \
880 nsprpub/pr/src/md/os2/os2inrval.c \
881 nsprpub/pr/src/md/os2/os2gc.c \
882 nsprpub/pr/src/md/os2/os2thred.c \
883 nsprpub/pr/src/md/os2/os2io.c \
884 nsprpub/pr/src/md/os2/os2cv.c \
885 nsprpub/pr/src/md/os2/os2sock.c \
886 nsprpub/pr/src/md/os2/os2_errors.c \
887 nsprpub/pr/src/md/os2/os2poll.c \
888 nsprpub/pr/src/md/os2/os2rng.c \
889 nsprpub/pr/src/threads/prdump.c \
890 nsprpub/pr/src/threads/prmon.c \
891 nsprpub/pr/src/threads/prsem.c \
892 nsprpub/pr/src/threads/prcthr.c \
893 nsprpub/pr/src/threads/combined/prucpu.c \
894 nsprpub/pr/src/threads/combined/prucv.c \
895 nsprpub/pr/src/threads/combined/prulock.c \
896 nsprpub/pr/src/threads/combined/prustack.c \
897 nsprpub/pr/src/threads/combined/pruthr.c
898# gcc/emx sources
899VBox-xpcom-nspr_SOURCES.os2 += \
900 nsprpub/pr/src/md/os2/os2emx.s \
901 nsprpub/pr/src/md/os2/os2vaclegacy.s
902# IBM VAC sources (not used)
903#VBox-xpcom-nspr_SOURCES.os2 += \
904# nsprpub/pr/src/md/os2/os2vacpp.asm
905
906VBox-xpcom-nspr_SOURCES.solaris = nsprpub/pr/src/md/unix/solaris.c
907VBox-xpcom-nspr_SOURCES.solaris.x86 = nsprpub/pr/src/md/unix/os_SunOS_x86.s
908VBox-xpcom-nspr_SOURCES.solaris.amd64 = nsprpub/pr/src/md/unix/os_SunOS_x86_64.s
909
910# generate build stamps
911nsprpub/pr/src/prvrsion.c_DEPS = $(PATH_VBox-xpcom-nspr)/_pr_bld.h
912nsprpub/lib/ds/plvrsion.c_DEPS = $(PATH_VBox-xpcom-nspr)/_pl_bld.h
913VBox-xpcom-nspr_CLEAN += \
914 $(PATH_VBox-xpcom-nspr)/_pr_bld.h \
915 $(PATH_VBox-xpcom-nspr)/_pl_bld.h
916
917$$(PATH_VBox-xpcom-nspr)/_pr_bld.h: | $$(PATH_VBox-xpcom-nspr)/
918 $(call MSG_GENERATE,,$@)
919 $(QUIET)$(APPEND) -t $@ '#define _BUILD_STRING "$(date +%Y-%m-%d %T)"'
920
921$$(PATH_VBox-xpcom-nspr)/_pl_bld.h: | $$(PATH_VBox-xpcom-nspr)/
922 $(call MSG_GENERATE,,$@)
923 $(QUIET)$(APPEND) -t $@ '#define _BUILD_STRING "$(date +%Y-%m-%d %T)"'
924
925
926VBox-xpcom-typelib_TEMPLATE = XPCOM
927VBox-xpcom-typelib_NOINST = 1
928VBox-xpcom-typelib_SOURCES = \
929 xpcom/typelib/xpt/src/xpt_arena.c \
930 xpcom/typelib/xpt/src/xpt_struct.c \
931 xpcom/typelib/xpt/src/xpt_xdr.c
932
933VBox-xpcom-string_TEMPLATE = XPCOM
934VBox-xpcom-string_NOINST = 1
935VBox-xpcom-string_SOURCES = \
936 xpcom/string/src/nsAString.cpp \
937 xpcom/string/src/nsDependentSubstring.cpp \
938 xpcom/string/src/nsObsoleteAStringThunk.cpp \
939 xpcom/string/src/nsPrintfCString.cpp \
940 xpcom/string/src/nsPromiseFlatString.cpp \
941 xpcom/string/src/nsReadableUtils.cpp \
942 xpcom/string/src/nsSubstring.cpp \
943 xpcom/string/src/nsSubstringTuple.cpp \
944 xpcom/string/src/nsString.cpp \
945 xpcom/string/src/nsStringComparator.cpp \
946 xpcom/string/src/nsStringObsolete.cpp
947
948VBox-xpcom-base_TEMPLATE = XPCOM
949VBox-xpcom-base_NOINST = 1
950VBox-xpcom-base_DEFS = _IMPL_NS_COM
951VBox-xpcom-base_SOURCES = \
952 xpcom/base/nsAllocator.cpp \
953 xpcom/base/nsConsoleMessage.cpp \
954 xpcom/base/nsConsoleService.cpp \
955 xpcom/base/nsDebugImpl.cpp \
956 xpcom/base/nsErrorService.cpp \
957 xpcom/base/nsExceptionService.cpp \
958 xpcom/base/nsID.cpp \
959 xpcom/base/nsMemoryImpl.cpp \
960 xpcom/base/nsTraceRefcntImpl.cpp \
961 xpcom/base/nsStackFrameUnix.cpp
962
963VBox-xpcom-ds_TEMPLATE = XPCOM
964VBox-xpcom-ds_NOINST = 1
965VBox-xpcom-ds_DEFS = _IMPL_NS_COM
966VBox-xpcom-ds_SOURCES = \
967 xpcom/ds/pldhash.c \
968 xpcom/ds/nsAtomTable.cpp \
969 xpcom/ds/nsAtomService.cpp \
970 xpcom/ds/nsByteBuffer.cpp \
971 xpcom/ds/nsCheapSets.cpp \
972 xpcom/ds/nsCRT.cpp \
973 xpcom/ds/nsDeque.cpp \
974 xpcom/ds/nsEmptyEnumerator.cpp \
975 xpcom/ds/nsEnumeratorUtils.cpp \
976 xpcom/ds/nsFixedSizeAllocator.cpp \
977 xpcom/ds/nsHashSets.cpp \
978 xpcom/ds/nsHashtable.cpp \
979 xpcom/ds/nsObserverList.cpp \
980 xpcom/ds/nsObserverService.cpp \
981 xpcom/ds/nsProperties.cpp \
982 xpcom/ds/nsPersistentProperties.cpp \
983 xpcom/ds/nsQuickSort.cpp \
984 xpcom/ds/nsRecyclingAllocator.cpp \
985 xpcom/ds/nsStaticNameTable.cpp \
986 xpcom/ds/nsStringEnumerator.cpp \
987 xpcom/ds/nsSupportsArray.cpp \
988 xpcom/ds/nsSupportsArrayEnumerator.cpp \
989 xpcom/ds/nsSupportsPrimitives.cpp \
990 xpcom/ds/nsTHashtable.cpp \
991 xpcom/ds/nsUnicharBuffer.cpp \
992 xpcom/ds/nsVariant.cpp \
993 xpcom/ds/nsVoidArray.cpp \
994 xpcom/ds/nsTextFormatter.cpp \
995 xpcom/ds/nsTimelineService.cpp \
996 xpcom/ds/nsValueArray.cpp \
997 xpcom/ds/nsCOMArray.cpp \
998 xpcom/ds/nsArray.cpp \
999 xpcom/ds/nsArrayEnumerator.cpp
1000# xpcom/ds/nsHashPropertyBag.cpp
1001
1002# @todo what about MOZ_USER_DIR?
1003VBox-xpcom-io_TEMPLATE = XPCOM
1004VBox-xpcom-io_NOINST = 1
1005VBox-xpcom-io_DEFS = _IMPL_NS_COM MOZ_USER_DIR=\".mozilla\"
1006VBox-xpcom-io_INCS.darwin = \
1007 xpcom/MoreFiles
1008VBox-xpcom-io_SOURCES = \
1009 xpcom/io/nsAppFileLocationProvider.cpp \
1010 xpcom/io/nsBinaryStream.cpp \
1011 xpcom/io/nsByteArrayInputStream.cpp \
1012 xpcom/io/nsDirectoryService.cpp \
1013 xpcom/io/nsEscape.cpp \
1014 xpcom/io/nsFastLoadFile.cpp \
1015 xpcom/io/nsFastLoadService.cpp \
1016 xpcom/io/nsInputStreamTee.cpp \
1017 xpcom/io/nsLinebreakConverter.cpp \
1018 xpcom/io/nsLocalFileCommon.cpp \
1019 xpcom/io/nsMultiplexInputStream.cpp \
1020 xpcom/io/nsPipe3.cpp \
1021 xpcom/io/nsStreamUtils.cpp \
1022 xpcom/io/nsScriptableInputStream.cpp \
1023 xpcom/io/nsSegmentedBuffer.cpp \
1024 xpcom/io/SpecialSystemDirectory.cpp \
1025 xpcom/io/nsStorageStream.cpp \
1026 xpcom/io/nsStringStream.cpp \
1027 xpcom/io/nsUnicharInputStream.cpp \
1028 xpcom/io/nsNativeCharsetUtils.cpp
1029VBox-xpcom-io_SOURCES.darwin.x86 = \
1030 xpcom/io/nsLocalFileOSX.cpp \
1031 xpcom/MoreFiles/FSCopyObject.c \
1032 xpcom/MoreFiles/MoreFilesX.c
1033VBox-xpcom-io_SOURCES.l4 = \
1034 xpcom/io/nsLocalFileL4.cpp
1035if1of ($(KBUILD_TARGET) $(KBUILD_TARGET).$(KBUILD_TARGET_ARCH), freebsd linux netbsd openbsd solaris darwin.amd64)
1036VBox-xpcom-io_SOURCES += \
1037 xpcom/io/nsLocalFileUnix.cpp
1038endif
1039VBox-xpcom-io_SOURCES.os2 = \
1040 xpcom/io/nsLocalFileOS2.cpp
1041
1042VBox-xpcom-components_TEMPLATE = XPCOM
1043VBox-xpcom-components_NOINST = 1
1044VBox-xpcom-components_DEFS = _IMPL_NS_COM EXPORT_XPTI_API
1045VBox-xpcom-components_SOURCES = \
1046 xpcom/components/nsCategoryManager.cpp \
1047 xpcom/components/nsComponentManager.cpp \
1048 xpcom/components/nsComponentManagerObsolete.cpp \
1049 xpcom/components/nsNativeComponentLoader.cpp \
1050 xpcom/components/nsServiceManagerObsolete.cpp \
1051 xpcom/components/xcDll.cpp \
1052 xpcom/components/nsStaticComponentLoader.cpp
1053
1054VBox-xpcom-threads_TEMPLATE = XPCOM
1055VBox-xpcom-threads_NOINST = 1
1056VBox-xpcom-threads_DEFS = _IMPL_NS_COM
1057VBox-xpcom-threads_SOURCES = \
1058 xpcom/threads/plevent.c \
1059 xpcom/threads/nsAutoLock.cpp \
1060 xpcom/threads/nsEnvironment.cpp \
1061 xpcom/threads/nsEventQueue.cpp \
1062 xpcom/threads/nsEventQueueService.cpp \
1063 xpcom/threads/nsThread.cpp \
1064 xpcom/threads/nsTimerImpl.cpp \
1065 xpcom/threads/nsProcessCommon.cpp \
1066 xpcom/threads/TimerThread.cpp
1067
1068VBox-xpcom-xptinfo_TEMPLATE = XPCOM
1069VBox-xpcom-xptinfo_NOINST = 1
1070VBox-xpcom-xptinfo_DEFS = _IMPL_NS_COM _IMPL_NS_BASE EXPORT_XPTI_API EXPORT_XPT_API
1071VBox-xpcom-xptinfo_SOURCES = \
1072 xpcom/reflect/xptinfo/src/xptiFile.cpp \
1073 xpcom/reflect/xptinfo/src/xptiInterfaceInfo.cpp \
1074 xpcom/reflect/xptinfo/src/xptiInterfaceInfoManager.cpp \
1075 xpcom/reflect/xptinfo/src/xptiManifest.cpp \
1076 xpcom/reflect/xptinfo/src/xptiMisc.cpp \
1077 xpcom/reflect/xptinfo/src/xptiTypelibGuts.cpp \
1078 xpcom/reflect/xptinfo/src/xptiWorkingSet.cpp \
1079 xpcom/reflect/xptinfo/src/xptiZipItem.cpp \
1080 xpcom/reflect/xptinfo/src/xptiZipLoader.cpp
1081
1082
1083VBox-xpcom-xptcall_TEMPLATE = XPCOM
1084VBox-xpcom-xptcall_NOINST = 1
1085VBox-xpcom-xptcall_DEFS = _IMPL_NS_COM _IMPL_NS_BASE EXPORT_XPTC_API
1086VBox-xpcom-xptcall_DEFS.darwin = KEEP_STACK_16_BYTE_ALIGNED
1087VBox-xpcom-xptcall_DEFS.l4 = L4
1088VBox-xpcom-xptcall_DEFS.os2 = MOZ_NEED_LEADING_UNDERSCORE
1089VBox-xpcom-xptcall_INCS.os2 = xpcom/reflect/xptcall/src/md/unix
1090VBox-xpcom-xptcall_SOURCES = xpcom/reflect/xptcall/src/xptcall.cpp
1091VBox-xpcom-xptcall_SOURCES.darwin.x86 = xpcom/reflect/xptcall/src/md/unix/xptcinvoke_unixish_x86.cpp \
1092 xpcom/reflect/xptcall/src/md/unix/xptcstubs_unixish_x86.cpp
1093VBox-xpcom-xptcall_SOURCES.darwin.amd64= xpcom/reflect/xptcall/src/md/unix/xptcinvoke_amd64_darwin.cpp \
1094 xpcom/reflect/xptcall/src/md/unix/xptcstubs_amd64_darwin.cpp
1095VBox-xpcom-xptcall_SOURCES.freebsd.x86 = xpcom/reflect/xptcall/src/md/unix/xptcinvoke_gcc_x86_unix.cpp \
1096 xpcom/reflect/xptcall/src/md/unix/xptcstubs_gcc_x86_unix.cpp
1097VBox-xpcom-xptcall_SOURCES.freebsd.amd64=xpcom/reflect/xptcall/src/md/unix/xptcinvoke_x86_64_linux.cpp \
1098 xpcom/reflect/xptcall/src/md/unix/xptcstubs_x86_64_linux.cpp
1099VBox-xpcom-xptcall_SOURCES.linux.x86 = xpcom/reflect/xptcall/src/md/unix/xptcinvoke_gcc_x86_unix.cpp \
1100 xpcom/reflect/xptcall/src/md/unix/xptcstubs_gcc_x86_unix.cpp
1101VBox-xpcom-xptcall_SOURCES.linux.amd64 = xpcom/reflect/xptcall/src/md/unix/xptcinvoke_x86_64_linux.cpp \
1102 xpcom/reflect/xptcall/src/md/unix/xptcstubs_x86_64_linux.cpp
1103VBox-xpcom-xptcall_SOURCES.os2 = xpcom/reflect/xptcall/src/md/os2/xptcinvoke_gcc_x86_os2.cpp \
1104 xpcom/reflect/xptcall/src/md/os2/xptcstubs_gcc_x86_os2.cpp
1105VBox-xpcom-xptcall_SOURCES.solaris.x86 = xpcom/reflect/xptcall/src/md/unix/xptcinvoke_x86_solaris.cpp \
1106 xpcom/reflect/xptcall/src/md/unix/xptcstubs_x86_solaris.cpp
1107VBox-xpcom-xptcall_SOURCES.solaris.amd64 = xpcom/reflect/xptcall/src/md/unix/xptcinvoke_x86_64_linux.cpp \
1108 xpcom/reflect/xptcall/src/md/unix/xptcstubs_x86_64_linux.cpp
1109
1110xpcom/reflect/xptcall/src/md/unix/xptcstubs_x86_solaris.cpp_CXXFLAGS = -O0
1111# -O0 works fine, while -O1 doesn't. The gcc man page can't be listing all the -f*
1112# stuff that -O1 enables, because when using the options without -O1, it's -fomit-frame-pointer
1113# that triggers is, while -O1 -fno-omit-frame-pointer does not work. Anyway, it's probably a gcc/mozila
1114# bug and it's not worth investigating as I'm not the maintainger of the solaris gcc port. [bird, 2007-09-17]
1115
1116
1117VBox-xpcom-proxy_TEMPLATE = XPCOM
1118VBox-xpcom-proxy_NOINST = 1
1119VBox-xpcom-proxy_DEFS = _IMPL_NS_COM EXPORT_XPTC_API EXPORT_XPTI_API
1120VBox-xpcom-proxy_SOURCES = xpcom/proxy/src/nsProxyEvent.cpp \
1121 xpcom/proxy/src/nsProxyEventClass.cpp \
1122 xpcom/proxy/src/nsProxyEventObject.cpp \
1123 xpcom/proxy/src/nsProxyObjectManager.cpp \
1124 xpcom/proxy/src/nsProxyRelease.cpp
1125
1126
1127#
1128# The VBoxXPCOM Glue static libraries.
1129#
1130# See http://developer.mozilla.org/en/docs/XPCOM_Glue for details about the
1131# original XPCOM glue library purpose and usage.
1132#
1133# We don't really use the glue library in the described way because we don't
1134# provide frozen APIs (yet), so all VBox XPCOM client applications are
1135# dependent on the given version of both the VBox XPCOM runtime (binary
1136# dependency) and VirtualBox component library (COM interface dependency). For
1137# this reason, VBox client applications link to the VBox XPCOM shared library
1138# directly (instead of linking to the standalone XPCOM glue library that would
1139# dynamically search for and load the installed XPCOM runtime). For the same
1140# reason, we link all parts of XPCOM into a single shared XPCOM library below
1141# (as opposed to the original XPCOM where e.g. NSPR lives in a separate DLL).
1142#
1143VBoxXPCOMGlue_COMMON_SOURCES = \
1144 xpcom/glue/nsCOMPtr.cpp \
1145 xpcom/glue/nsComponentManagerUtils.cpp \
1146 xpcom/glue/nsDebug.cpp \
1147 xpcom/glue/nsGenericFactory.cpp \
1148 xpcom/glue/nsIInterfaceRequestorUtils.cpp \
1149 xpcom/glue/nsMemory.cpp \
1150 xpcom/glue/nsTraceRefcnt.cpp \
1151 xpcom/glue/nsWeakReference.cpp
1152
1153# dependent glue library which goes in to the VBoxXPCOM shared library
1154VBoxXPCOMGlue_s_TEMPLATE = XPCOM
1155VBoxXPCOMGlue_s_NOINST = 1
1156VBoxXPCOMGlue_s_DEFS = _IMPL_NS_COM
1157VBoxXPCOMGlue_s_SOURCES = $(VBoxXPCOMGlue_COMMON_SOURCES)
1158
1159# standalone glue library which all third-party client apps (if any) will link with
1160# (currently not used anywhere (see above) but still built to make sure
1161# the code inside #ifdef XPCOM_GLUE compiles)
1162VBoxXPCOMGlue_TEMPLATE = XPCOM
1163VBoxXPCOMGlue_DEFS = XPCOM_GLUE
1164VBoxXPCOMGlue_SOURCES = $(VBoxXPCOMGlue_COMMON_SOURCES) \
1165 xpcom/glue/standalone/nsXPCOMGlue.cpp \
1166 xpcom/glue/standalone/nsGREDirServiceProvider.cpp
1167VBoxXPCOMGlue_SOURCES += \
1168 $(TARGET_VBox-xpcom-string)
1169#VBoxXPCOMGlue_INST = lib/ $(INST_SDK)lib/
1170
1171
1172#
1173# The VBoxXPCOM Shared Object, assembling all lib files.
1174#
1175VBoxXPCOM_TEMPLATE = XPCOM
1176VBoxXPCOM_NAME = $(basename $(notdir $(LIB_XPCOM)))
1177VBoxXPCOM_DEFS = BUILD_DCONNECT="1" _IMPL_NS_COM
1178ifdef VBOX_WITH_XPCOM_NAMESPACE_CLEANUP
1179 VBoxXPCOM_LDFLAGS.linux = -Wl,--version-script=$(XPCOM_C_NAMESPACE_MAP)
1180 VBoxXPCOM_LNK_DEPS.linux += $(XPCOM_C_NAMESPACE_MAP)
1181 VBoxXPCOM_LDFLAGS.solaris = -Wl,-M,$(XPCOM_C_NAMESPACE_MAP)
1182 VBoxXPCOM_LNK_DEPS.solaris+= $(XPCOM_C_NAMESPACE_MAP)
1183endif
1184VBoxXPCOM_SOURCES = \
1185 xpcom/build/nsXPComInit.cpp \
1186 xpcom/build/nsStringAPI.cpp
1187VBoxXPCOM_SOURCES.darwin = \
1188 vboxdeps.cpp
1189VBoxXPCOM_SOURCES.os2 = \
1190 vboxdeps.cpp
1191VBoxXPCOM_SOURCES.solaris = \
1192 vboxdeps.cpp
1193VBoxXPCOM_LIBS = \
1194 $(TARGET_VBox-xpcom-typelib) \
1195 $(TARGET_VBox-xpcom-string) \
1196 $(TARGET_VBox-xpcom-base) \
1197 $(TARGET_VBox-xpcom-ds) \
1198 $(TARGET_VBox-xpcom-io) \
1199 $(TARGET_VBox-xpcom-components) \
1200 $(TARGET_VBox-xpcom-threads) \
1201 $(TARGET_VBox-xpcom-xptinfo) \
1202 $(TARGET_VBox-xpcom-xptcall) \
1203 $(TARGET_VBox-xpcom-proxy) \
1204 $(TARGET_VBox-xpcom-nspr) \
1205 $(TARGET_VBoxXPCOMGlue_s)
1206VBoxXPCOM_LIBS.linux = \
1207 pthread dl
1208
1209ifeq ($(filter-out freebsd l4 linux netbsd openbsd,$(KBUILD_TARGET)),) # gnu ld.
1210VBoxXPCOM_LDFLAGS = -Wl,--whole-archive \
1211 $(TARGET_VBox-xpcom-typelib) \
1212 $(TARGET_VBox-xpcom-string) \
1213 $(TARGET_VBox-xpcom-base) \
1214 $(TARGET_VBox-xpcom-ds) \
1215 $(TARGET_VBox-xpcom-io) \
1216 $(TARGET_VBox-xpcom-components) \
1217 $(TARGET_VBox-xpcom-threads) \
1218 $(TARGET_VBox-xpcom-xptinfo) \
1219 $(TARGET_VBox-xpcom-xptcall) \
1220 $(TARGET_VBox-xpcom-proxy) \
1221 $(TARGET_VBox-xpcom-nspr) \
1222 $(TARGET_VBoxXPCOMGlue_s) \
1223 -Wl,--no-whole-archive
1224endif
1225
1226VBoxXPCOM_LDFLAGS.solaris += -Wl,-z,allextract \
1227 $(TARGET_VBox-xpcom-typelib) \
1228 $(TARGET_VBox-xpcom-string) \
1229 $(TARGET_VBox-xpcom-base) \
1230 $(TARGET_VBox-xpcom-ds) \
1231 $(TARGET_VBox-xpcom-io) \
1232 $(TARGET_VBox-xpcom-components) \
1233 $(TARGET_VBox-xpcom-threads) \
1234 $(TARGET_VBox-xpcom-xptinfo) \
1235 $(TARGET_VBox-xpcom-xptcall) \
1236 $(TARGET_VBox-xpcom-proxy) \
1237 $(TARGET_VBox-xpcom-nspr) \
1238 $(TARGET_VBoxXPCOMGlue_s) \
1239 -Wl,-z,defaultextract
1240
1241#VBoxXPCOM_LIBS.l4 = $(L4_LIBDIR)/libxpcomstubs.a $(L4_LIBDIR)/../libuc_c++.a \
1242# $(VBOX_PATH_L4_GCC3_INSTALL)/libsupc++.a $(VBOX_PATH_L4_GCC3_INSTALL)/libgcc_eh.a
1243# EF heap
1244#VBoxXPCOM_LIBS += $(LIB_RUNTIME_EF)
1245#VBoxXPCOM_LDFLAGS = -Wl,--whole-archive $(VBoxXPCOM_LIBS) -Wl,--no-whole-archive $(LIB_RUNTIME)
1246VBoxXPCOM_LDFLAGS.darwin = -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/VBoxXPCOM.dylib
1247
1248ifdef VBOX_IPC_RELEASE_LOG
1249IPC_LOGGING = 1
1250else ifneq ($(KBUILD_TYPE),release)
1251IPC_LOGGING = 1
1252endif
1253
1254TEMPLATE_XPCOMIPC = XPCOM IPC libraries
1255TEMPLATE_XPCOMIPC_EXTENDS = XPCOM
1256TEMPLATE_XPCOMIPC_DEFS = \
1257 $(TEMPLATE_XPCOM_DEFS) BUILD_DCONNECT="1" \
1258 IPC_DAEMON_APP_NAME=\"VBoxXPCOMIPCD$(SUFF_EXE)\"
1259ifdef IPC_LOGGING
1260 TEMPLATE_XPCOMIPC_DEFS += IPC_LOGGING
1261endif
1262
1263TEMPLATE_XPCOMIPC_LIBS = $(TARGET_VBoxXPCOM) $(TEMPLATE_XPCOM_LIBS)
1264
1265TEMPLATE_XPCOMIPCEXE = XPCOM IPC executables
1266TEMPLATE_XPCOMIPCEXE_EXTENDS = XPCOMEXE
1267TEMPLATE_XPCOMIPCEXE_DEFS = $(TEMPLATE_XPCOMEXE_DEFS) BUILD_DCONNECT="1"
1268ifdef IPC_LOGGING
1269 TEMPLATE_XPCOMIPCEXE_DEFS += IPC_LOGGING
1270endif
1271
1272VBox-xpcom-ipcutils_TEMPLATE = XPCOMIPC
1273VBox-xpcom-ipcutils_NOINST = 1
1274VBox-xpcom-ipcutils_SOURCES = \
1275 ipc/ipcd/util/src/ipcMessageReader.cpp \
1276 ipc/ipcd/util/src/ipcMessageWriter.cpp
1277
1278VBox-xpcom-ipcshared_TEMPLATE = XPCOMIPC
1279VBox-xpcom-ipcshared_NOINST = 1
1280VBox-xpcom-ipcshared_SOURCES = \
1281 ipc/ipcd/shared/src/ipcLog.cpp \
1282 ipc/ipcd/shared/src/ipcConfig.cpp \
1283 ipc/ipcd/shared/src/ipcMessage.cpp \
1284 ipc/ipcd/shared/src/ipcMessagePrimitives.cpp \
1285 ipc/ipcd/shared/src/ipcStringList.cpp \
1286 ipc/ipcd/shared/src/ipcIDList.cpp \
1287 ipc/ipcd/shared/src/ipcm.cpp
1288
1289VBox-xpcom-ipcdlock_TEMPLATE = XPCOMIPC
1290VBox-xpcom-ipcdlock_NOINST = 1
1291VBox-xpcom-ipcdlock_SOURCES = \
1292 ipc/ipcd/extensions/lock/src/ipcLockProtocol.cpp \
1293 ipc/ipcd/extensions/lock/src/ipcLockService.cpp
1294
1295VBox-xpcom-ipctransmgr_TEMPLATE = XPCOMIPC
1296VBox-xpcom-ipctransmgr_NOINST = 1
1297VBox-xpcom-ipctransmgr_SOURCES = \
1298 ipc/ipcd/extensions/transmngr/src/tmTransactionService.cpp
1299
1300VBox-xpcom-ipctmgrcom_TEMPLATE = XPCOMIPC
1301VBox-xpcom-ipctmgrcom_NOINST = 1
1302VBox-xpcom-ipctmgrcom_SOURCES = \
1303 ipc/ipcd/extensions/transmngr/common/tmTransaction.cpp \
1304 ipc/ipcd/extensions/transmngr/common/tmVector.cpp
1305
1306
1307#
1308# DCONNECT client shared object
1309#
1310VBoxXPCOMIPCC_TEMPLATE = XPCOMIPC
1311VBoxXPCOMIPCC_NAME.os2 = VBoxIPCC
1312VBoxXPCOMIPCC_INST = $(INST_BIN)components/
1313#VBoxXPCOMIPCC_DEFS = HAVE_DEPENDENT_LIBS - dependentLibs.h is linux specific, so this cannot be required.
1314VBoxXPCOMIPCC_SOURCES = \
1315 ipc/ipcd/client/src/ipcdclient.cpp \
1316 ipc/ipcd/client/src/ipcService.cpp \
1317 ipc/ipcd/client/src/ipcModuleFactory.cpp \
1318 ipc/ipcd/extensions/dconnect/src/ipcDConnectService.cpp
1319ifeq ($(KBUILD_TARGET),win)
1320VBoxXPCOMIPCC_SOURCES += \
1321 ipc/ipcd/client/src/ipcConnectionWin.cpp
1322else
1323VBoxXPCOMIPCC_SOURCES += \
1324 ipc/ipcd/client/src/ipcConnectionUnix.cpp
1325endif
1326VBoxXPCOMIPCC_LDFLAGS.darwin = -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/components/VBoxXPCOMIPCC.dylib
1327VBoxXPCOMIPCC_LIBS = \
1328 $(TARGET_VBox-xpcom-ipcutils) \
1329 $(TARGET_VBox-xpcom-ipcshared) \
1330 $(TARGET_VBox-xpcom-ipcdlock) \
1331 $(TARGET_VBox-xpcom-ipctransmgr) \
1332 $(TARGET_VBox-xpcom-ipctmgrcom)
1333# EF
1334#VBoxXPCOMIPCC_LIBS += $(LIB_RUNTIME)
1335
1336
1337#
1338# DCONNECT daemon executable
1339#
1340VBoxXPCOMIPCD_TEMPLATE = XPCOMIPCEXE
1341VBoxXPCOMIPCD_SOURCES = \
1342 ipc/ipcd/daemon/src/ipcd.cpp \
1343 ipc/ipcd/daemon/src/ipcClient.cpp \
1344 ipc/ipcd/daemon/src/ipcModuleReg.cpp \
1345 ipc/ipcd/daemon/src/ipcCommandModule.cpp
1346ifeq ($(KBUILD_TARGET),win)
1347 VBoxXPCOMIPCD_SOURCES += \
1348 ipc/ipcd/daemon/src/ipcdWin.cpp
1349else
1350 VBoxXPCOMIPCD_SOURCES += \
1351 ipc/ipcd/daemon/src/ipcdUnix.cpp
1352endif
1353
1354
1355#
1356# Python<->XPCOM bridge.
1357#
1358
1359# Find the Python headers for the Python<->XPCOM bridge if enabled.
1360ifdef VBOX_WITH_PYTHON
1361ifdef VBOX_WITH_MULTIVERSION_PYTHON
1362 include $(PATH_SUB_CURRENT)/python/Makefile.kmk
1363else
1364 if "$(KBUILD_TARGET)" == "darwin" && !defined(VBOX_PATH_PYTHON_INC) && !defined(VBOX_LIB_PYTHON)
1365 ifndef VBOX_PYTHON_FRAMEWORK
1366 VBOX_PYTHON_FRAMEWORK := -framework Python
1367 VBOX_PATH_PYTHON_INC := $(VBOX_PATH_MACOSX_SDK)/System/Library/Frameworks/Python.framework/Headers
1368 endif
1369 else # !darwin || configured darwin
1370 ifndef VBOX_PATH_PYTHON_INC
1371 # As we build Solaris on newer Nevadas (109 currently) we want to use libpython2.4 for IPS compatiblity
1372 # with older Nevada/OpenSolaris versions upon importing/installing the package. Otherwise we pick the
1373 # highest libpython2.X available on the build box (2.6 on 109). We thus hardcode it to 2.4 here...
1374 ifeq ($(KBUILD_TARGET),solaris)
1375 VBOX_PATH_PYTHON_INC := /usr/include/python2.4
1376 else
1377 VBOX_PATH_PYTHON_INC := $(patsubst %/Python.h,%, $(lastword $(sort $(wildcard \
1378 /usr/include/python2.*/Python.h \
1379 /usr/local/include/python2.*/Python.h \
1380 ))))
1381 endif
1382 ifeq ($(VBOX_PATH_PYTHON_INC),)
1383 $(warning Unable to determine the python include directory (VBOX_PATH_PYTHON_INC).)
1384 endif
1385 endif
1386 VBOX_PYTHON_VER := 2$(lastword $(subst ., .,$(VBOX_PATH_PYTHON_INC)))
1387 ifndef VBOX_LIB_PYTHON
1388 VBOX_TMP := $(if $(eq $(KBUILD_TARGET).$(KBUILD_TARGET_ARCH),solaris.amd64),64/,)
1389 VBOX_LIB_PYTHON := $(firstword $(wildcard \
1390 /usr/lib/$(VBOX_TMP)libpython$(VBOX_PYTHON_VER)$(SUFF_DLL) \
1391 /usr/local/lib/$(VBOX_TMP)libpython$(VBOX_PYTHON_VER)$(SUFF_DLL) \
1392 /usr/lib/$(VBOX_TMP)libpython2$(SUFF_DLL) \
1393 /usr/local/lib/$(VBOX_TMP)libpython2$(SUFF_DLL) \
1394 /usr/lib/$(VBOX_TMP)libpython$(SUFF_DLL) \
1395 /usr/local/lib/$(VBOX_TMP)libpython$(SUFF_DLL) \
1396 ))
1397 ifeq ($(VBOX_LIB_PYTHON),)
1398 $(warning Unable to determine the python library (VBOX_LIB_PYTHON).)
1399 endif
1400 endif # !darwin || configured darwin
1401 endif
1402 ifndef VBOX_ONLY_SDK
1403 DLLS += VBoxPython
1404 endif
1405 INSTALLS += VBoxPython-inst-py-xpcom
1406
1407 # Python Client Module - the C++/XPCOM bits.
1408 VBoxPython_TEMPLATE = XPCOM
1409 VBoxPython_DEFS = _IMPL_NS_COM _IMPL_NS_BASE EXPORT_XPTI_API EXPORT_XPT_API \
1410 VBOX_PYXPCOM VBOX_WITH_XPCOM
1411 VBoxPython_DEFS.darwin = VBOX_PYXPCOM_VERSIONED
1412 VBoxPython_NAME.darwin = VBoxPython2_$(translate $(substr $(VBOX_DEF_MACOSX_VERSION_MIN),4),456,356)
1413 ifeq ($(KBUILD_TARGET),darwin)
1414 ## @todo kBuild - this ain't working: VBoxPython_DLLSUFF.darwin = .so
1415 VBoxPython_DLLSUFF = .so
1416 endif
1417 VBoxPython_LDFLAGS.darwin = $(VBOX_PYTHON_FRAMEWORK)
1418 VBoxPython_CXXFLAGS = -Wno-format
1419 VBoxPython_INCS = \
1420 python/src \
1421 $(VBOX_PATH_PYTHON_INC)
1422 VBoxPython_SOURCES = \
1423 python/src/module/_xpcom.cpp \
1424 python/src/dllmain.cpp \
1425 python/src/ErrorUtils.cpp \
1426 python/src/PyGBase.cpp \
1427 python/src/PyGInputStream.cpp \
1428 python/src/PyGModule.cpp \
1429 python/src/PyGStub.cpp \
1430 python/src/PyGWeakReference.cpp \
1431 python/src/PyIClassInfo.cpp \
1432 python/src/PyIComponentManager.cpp \
1433 python/src/PyIComponentManagerObsolete.cpp \
1434 python/src/PyIEnumerator.cpp \
1435 python/src/PyIID.cpp \
1436 python/src/PyIInputStream.cpp \
1437 python/src/PyIInterfaceInfo.cpp \
1438 python/src/PyIInterfaceInfoManager.cpp \
1439 python/src/PyISimpleEnumerator.cpp \
1440 python/src/PyISupports.cpp \
1441 python/src/PyIVariant.cpp \
1442 python/src/Pyxpt_info.cpp \
1443 python/src/TypeObject.cpp \
1444 python/src/VariantUtils.cpp
1445 VBoxPython_LIBS = \
1446 $(PATH_LIB)/VBoxCOM$(VBOX_SUFF_LIB) \
1447 $(PATH_BIN)/VBoxXPCOM$(VBOX_SUFF_DLL) \
1448 $(VBOX_LIB_PYTHON)
1449
1450 if !defined(VBOX_WITHOUT_VBOXPYTHON_FOR_OSX_10_5) \
1451 && "$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH)" == "darwin.x86" \
1452 && "$(VBOX_DEF_MACOSX_VERSION_MIN)" != "10.5"
1453 # Same as VBoxPython except built against the Mac OS X 10.5 SDK.
1454 DLLS += VBoxPython2_5
1455 VBoxPython2_5_EXTENDS = VBoxPython
1456 VBoxPython2_5_TEMPLATE = XPCOMOSX105
1457 VBoxPython2_5_NAME.darwin = VBoxPython2_5
1458 VBoxPython2_5_INCS = \
1459 python/src \
1460 $(VBOX_PATH_MACOSX_SDK_10_5)/System/Library/Frameworks/Python.framework/Headers
1461 endif
1462
1463 if defined(VBOX_WITH_VBOXPYTHON25_FOR_SOLARIS) && "$(KBUILD_TARGET)" == "solaris"
1464 # Same as VBoxPython except built against the newer python version.
1465 DLLS += VBoxPython2_5
1466 VBoxPython2_5_EXTENDS = VBoxPython
1467 VBoxPython2_5_TEMPLATE = XPCOM
1468 VBoxPython2_5_NAME = VBoxPython2_5
1469 VBoxPython2_5_INCS = \
1470 python/src \
1471 /usr/include/python2.5
1472 VBoxPython2_5_LIBS = \
1473 $(PATH_LIB)/VBoxCOM$(VBOX_SUFF_LIB) \
1474 $(PATH_BIN)/VBoxXPCOM$(VBOX_SUFF_DLL) \
1475 /usr/lib/$(VBOX_TMP)libpython2.5$(SUFF_DLL)
1476 endif
1477
1478 if !defined(VBOX_WITHOUT_VBOXPYTHON_FOR_OSX_10_6) \
1479 && "$(KBUILD_TARGET)" == "darwin" \
1480 && "$(VBOX_DEF_MACOSX_VERSION_MIN)" != "10.6"
1481 # Same as VBoxPython except built against the Mac OS X 10.6 SDK.
1482 DLLS += VBoxPython2_6
1483 VBoxPython2_6_EXTENDS = VBoxPython
1484 VBoxPython2_6_TEMPLATE = XPCOMOSX106
1485 VBoxPython2_6_NAME.darwin = VBoxPython2_6
1486 VBoxPython2_6_INCS = \
1487 python/src \
1488 $(VBOX_PATH_MACOSX_SDK_10_6)/System/Library/Frameworks/Python.framework/Headers
1489 endif
1490
1491 # Python Client Module - the Python bits.
1492 VBoxPython-inst-py-xpcom_INST = $(INST_SDK)bindings/xpcom/python/xpcom/
1493 VBoxPython-inst-py-xpcom_SOURCES = \
1494 python/vboxxpcom.py \
1495 python/components.py \
1496 python/file.py \
1497 python/__init__.py \
1498 python/nsError.py \
1499 python/primitives.py \
1500 python/xpcom_consts.py \
1501 python/xpt.py \
1502 python/client/__init__.py=>client/__init__.py \
1503 python/server/__init__.py=>server/__init__.py \
1504 python/server/enumerator.py=>server/enumerator.py \
1505 python/server/factory.py=>server/factory.py \
1506 python/server/loader.py=>server/loader.py \
1507 python/server/module.py=>server/module.py \
1508 python/server/policy.py=>server/policy.py
1509
1510endif # !VBOX_WITH_MULTIVERSION_PYTHON
1511endif # VBOX_WITH_PYTHON
1512
1513#
1514# testcases
1515#
1516tstnsIFileEnumerator_TEMPLATE = XPCOMTSTEXE
1517tstnsIFileEnumerator_SOURCES = xpcom/tests/nsIFileEnumerator.cpp
1518tstnsIFileTest_TEMPLATE = XPCOMTSTEXE
1519tstnsIFileTest_SOURCES = xpcom/tests/nsIFileTest.cpp
1520tstTestArray_TEMPLATE = XPCOMTSTEXE
1521tstTestArray_SOURCES = xpcom/tests/TestArray.cpp
1522tstTestAtoms_TEMPLATE = XPCOMTSTEXE
1523tstTestAtoms_SOURCES = xpcom/tests/TestAtoms.cpp
1524tstTestAutoLock_TEMPLATE = XPCOMTSTEXE
1525tstTestAutoLock_SOURCES = xpcom/tests/TestAutoLock.cpp
1526tstTestCallTemplates_TEMPLATE = XPCOMTSTEXE
1527tstTestCallTemplates_SOURCES = xpcom/tests/TestCallTemplates.cpp
1528tstTestCOMPtr_TEMPLATE = XPCOMTSTEXE
1529tstTestCOMPtr_SOURCES = xpcom/tests/TestCOMPtr.cpp
1530tstTestCOMPtrEq_TEMPLATE = XPCOMTSTEXE
1531tstTestCOMPtrEq_SOURCES = xpcom/tests/TestCOMPtrEq.cpp
1532tstTestCRT_TEMPLATE = XPCOMTSTEXE
1533tstTestCRT_SOURCES = xpcom/tests/TestCRT.cpp
1534tstTestFactory_TEMPLATE = XPCOMTSTEXE
1535tstTestFactory_SOURCES = xpcom/tests/TestFactory.cpp
1536tstTestHashtables_TEMPLATE = XPCOMTSTEXE
1537tstTestHashtables_SOURCES = xpcom/tests/TestHashtables.cpp
1538tstTestID_TEMPLATE = XPCOMTSTEXE
1539tstTestID_SOURCES = xpcom/tests/TestID.cpp
1540tstTestObserverService_TEMPLATE= XPCOMTSTEXE
1541tstTestObserverService_SOURCES = xpcom/tests/TestObserverService.cpp
1542tstTestPermanentAtoms_TEMPLATE = XPCOMTSTEXE
1543tstTestPermanentAtoms_SOURCES = xpcom/tests/TestPermanentAtoms.cpp
1544tstTestPipes_TEMPLATE = XPCOMTSTEXE
1545tstTestPipes_SOURCES = xpcom/tests/TestPipes.cpp
1546tstTestServMgr_TEMPLATE = XPCOMTSTEXE
1547tstTestServMgr_SOURCES = xpcom/tests/TestServMgr.cpp
1548tstTestServMgr_INCS = xpcom/tests/services
1549tstTestThreads_TEMPLATE = XPCOMTSTEXE
1550tstTestThreads_SOURCES = xpcom/tests/TestThreads.cpp
1551tstTestXPIDLString_TEMPLATE = XPCOMTSTEXE
1552tstTestXPIDLString_SOURCES = xpcom/tests/TestXPIDLString.cpp
1553tstTestDeque_TEMPLATE = XPCOMTSTEXE
1554tstTestDeque_SOURCES = xpcom/tests/TestDeque.cpp
1555tstTestAutoPtr_TEMPLATE = XPCOMTSTEXE
1556tstTestAutoPtr_SOURCES = xpcom/tests/TestAutoPtr.cpp
1557tstTestMinStringAPI_TEMPLATE = XPCOMTSTEXE
1558tstTestMinStringAPI_SOURCES = xpcom/tests/TestMinStringAPI.cpp
1559tstTestStrings_TEMPLATE = XPCOMTSTEXE
1560tstTestStrings_SOURCES = xpcom/tests/TestStrings.cpp
1561tstPrimitiveTest_TEMPLATE = XPCOMTSTEXE
1562tstPrimitiveTest_SOURCES = xpcom/typelib/xpt/tests/PrimitiveTest.c
1563tstSimpleTypeLib_TEMPLATE = XPCOMTSTEXE
1564tstSimpleTypeLib_SOURCES = xpcom/typelib/xpt/tests/SimpleTypeLib.c
1565tstXptDump_TEMPLATE = XPCOMTSTEXE
1566tstXptDump_SOURCES = xpcom/typelib/xpt/tools/xpt_dump.c
1567tstXptLink_TEMPLATE = XPCOMTSTEXE
1568tstXptLink_SOURCES = xpcom/typelib/xpt/tools/xpt_link.c
1569
1570
1571
1572
1573XPCOM_IDLFILES = \
1574 xpcom/base/nsIDebug.idl \
1575 xpcom/base/nsIInterfaceRequestor.idl \
1576 xpcom/base/nsIMemory.idl \
1577 xpcom/base/nsIProgrammingLanguage.idl \
1578 xpcom/base/nsISupports.idl \
1579 xpcom/base/nsITraceRefcnt.idl \
1580 xpcom/base/nsIWeakReference.idl \
1581 xpcom/base/nsIConsoleMessage.idl \
1582 xpcom/base/nsIConsoleService.idl \
1583 xpcom/base/nsIConsoleListener.idl \
1584 xpcom/base/nsIErrorService.idl \
1585 xpcom/base/nsIException.idl \
1586 xpcom/base/nsIExceptionService.idl \
1587 xpcom/base/nsrootidl.idl \
1588 xpcom/components/nsIClassInfo.idl \
1589 xpcom/components/nsIComponentRegistrar.idl \
1590 xpcom/components/nsIFactory.idl \
1591 xpcom/components/nsIModule.idl \
1592 xpcom/components/nsIServiceManager.idl \
1593 xpcom/components/nsIComponentManager.idl \
1594 xpcom/components/nsICategoryManager.idl \
1595 xpcom/components/nsIComponentLoader.idl \
1596 xpcom/components/nsINativeComponentLoader.idl \
1597 xpcom/components/nsIComponentManagerObsolete.idl \
1598 xpcom/components/nsIComponentLoaderManager.idl \
1599 xpcom/ds/nsISupportsArray.idl \
1600 xpcom/ds/nsICollection.idl \
1601 xpcom/ds/nsISerializable.idl \
1602 xpcom/ds/nsIEnumerator.idl \
1603 xpcom/ds/nsISimpleEnumerator.idl \
1604 xpcom/ds/nsIObserverService.idl \
1605 xpcom/ds/nsIObserver.idl \
1606 xpcom/ds/nsIAtom.idl \
1607 xpcom/ds/nsIAtomService.idl \
1608 xpcom/ds/nsIProperties.idl \
1609 xpcom/ds/nsIPersistentProperties2.idl \
1610 xpcom/ds/nsIRecyclingAllocator.idl \
1611 xpcom/ds/nsIStringEnumerator.idl \
1612 xpcom/ds/nsISupportsPrimitives.idl \
1613 xpcom/ds/nsISupportsIterators.idl \
1614 xpcom/ds/nsIVariant.idl \
1615 xpcom/ds/nsITimelineService.idl \
1616 xpcom/ds/nsIArray.idl \
1617 xpcom/ds/nsIPropertyBag.idl \
1618 xpcom/ds/nsIHashable.idl \
1619 xpcom/io/nsIDirectoryService.idl \
1620 xpcom/io/nsIDirectoryEnumerator.idl \
1621 xpcom/io/nsIFile.idl \
1622 xpcom/io/nsILocalFile.idl \
1623 xpcom/io/nsILocalFileMac.idl \
1624 xpcom/io/nsIInputStream.idl \
1625 xpcom/io/nsIObjectInputStream.idl \
1626 xpcom/io/nsIBinaryInputStream.idl \
1627 xpcom/io/nsIObjectOutputStream.idl \
1628 xpcom/io/nsIBinaryOutputStream.idl \
1629 xpcom/io/nsIOutputStream.idl \
1630 xpcom/io/nsIStreamBufferAccess.idl \
1631 xpcom/io/nsIByteArrayInputStream.idl \
1632 xpcom/io/nsISeekableStream.idl \
1633 xpcom/io/nsIFastLoadFileControl.idl \
1634 xpcom/io/nsIFastLoadService.idl \
1635 xpcom/io/nsIInputStreamTee.idl \
1636 xpcom/io/nsIMultiplexInputStream.idl \
1637 xpcom/io/nsIPipe.idl \
1638 xpcom/io/nsIAsyncInputStream.idl \
1639 xpcom/io/nsIAsyncOutputStream.idl \
1640 xpcom/io/nsIScriptableInputStream.idl \
1641 xpcom/io/nsIStorageStream.idl \
1642 xpcom/io/nsIStringStream.idl \
1643 xpcom/io/nsILineInputStream.idl \
1644 xpcom/proxy/public/nsIProxyObjectManager.idl \
1645 xpcom/threads/nsIEventQueueService.idl \
1646 xpcom/threads/nsIEventQueue.idl \
1647 xpcom/threads/nsIEventTarget.idl \
1648 xpcom/threads/nsIRunnable.idl \
1649 xpcom/threads/nsIThread.idl \
1650 xpcom/threads/nsITimer.idl \
1651 xpcom/threads/nsIEnvironment.idl \
1652 xpcom/threads/nsITimerInternal.idl \
1653 xpcom/threads/nsITimerManager.idl \
1654 xpcom/threads/nsIProcess.idl \
1655 xpcom/reflect/xptinfo/public/nsIInterfaceInfo.idl \
1656 xpcom/reflect/xptinfo/public/nsIInterfaceInfoManager.idl \
1657 xpcom/reflect/xptinfo/public/nsIXPTLoader.idl \
1658 ipc/ipcd/client/public/ipcIService.idl \
1659 ipc/ipcd/client/public/ipcIMessageObserver.idl \
1660 ipc/ipcd/client/public/ipcIClientObserver.idl \
1661 ipc/ipcd/extensions/lock/public/ipcILockService.idl \
1662 ipc/ipcd/extensions/transmngr/public/ipcITransactionService.idl \
1663 ipc/ipcd/extensions/dconnect/public/ipcIDConnectService.idl \
1664 ipc/ipcd/extensions/transmngr/public/ipcITransactionObserver.idl
1665
1666
1667OTHER_CLEAN += \
1668 $(PATH_VBox-xpcom-string)/idl_ts \
1669 $(addprefix $(VBOX_PATH_SDK)/bindings/xpcom/include,$(notdir $(subst .idl,.h,$(XPCOM_IDLFILES)))) \
1670 $(addprefix $(VBOX_PATH_SDK)/bindings/xpcom/include,$(notdir $(subst .idl,.xpt,$(XPCOM_IDLFILES)))) \
1671 $(addprefix $(VBOX_PATH_SDK)/bindings/xpcom/idl/,$(notdir $(XPCOM_IDLFILES))) \
1672 $(addprefix $(PATH_TARGET)/VBox-xpcom-xpt-files/,$(notdir $(subst .idl,.xpt,$(XPCOM_IDLFILES))))
1673
1674
1675#
1676# Create and install VBoxXPCOMBase.xpt
1677#
1678INSTALLS += VBoxXPCOMBase-xpt-inst
1679VBOX_XPTFILES = $(addprefix $(PATH_TARGET)/VBox-xpcom-xpt-files/, \
1680 nsIConsoleListener.xpt \
1681 nsIConsoleMessage.xpt \
1682 nsIConsoleService.xpt \
1683 nsIErrorService.xpt \
1684 nsIException.xpt \
1685 nsIExceptionService.xpt \
1686 nsIDebug.xpt \
1687 nsIInterfaceRequestor.xpt \
1688 nsIMemory.xpt \
1689 nsIProgrammingLanguage.xpt \
1690 nsISupports.xpt \
1691 nsITraceRefcnt.xpt \
1692 nsIWeakReference.xpt \
1693 nsrootidl.xpt \
1694 nsIAtom.xpt \
1695 nsIAtomService.xpt \
1696 nsICollection.xpt \
1697 nsIEnumerator.xpt \
1698 nsIPersistentProperties2.xpt \
1699 nsIPropertyBag.xpt \
1700 nsIRecyclingAllocator.xpt \
1701 nsIVariant.xpt \
1702 nsISerializable.xpt \
1703 nsIStringEnumerator.xpt \
1704 nsISupportsArray.xpt \
1705 nsISupportsIterators.xpt \
1706 nsITimelineService.xpt \
1707 nsIArray.xpt \
1708 nsIObserverService.xpt \
1709 nsIObserver.xpt \
1710 nsIProperties.xpt \
1711 nsISimpleEnumerator.xpt \
1712 nsISupportsPrimitives.xpt \
1713 nsIBinaryInputStream.xpt \
1714 nsIBinaryOutputStream.xpt \
1715 nsIByteArrayInputStream.xpt \
1716 nsIFastLoadFileControl.xpt \
1717 nsIFastLoadService.xpt \
1718 nsIInputStreamTee.xpt \
1719 nsILineInputStream.xpt \
1720 nsIMultiplexInputStream.xpt \
1721 nsIObjectInputStream.xpt \
1722 nsIObjectOutputStream.xpt \
1723 nsIPipe.xpt \
1724 nsISeekableStream.xpt \
1725 nsIStorageStream.xpt \
1726 nsIStringStream.xpt \
1727 nsIStreamBufferAccess.xpt \
1728 nsIAsyncInputStream.xpt \
1729 nsIAsyncOutputStream.xpt \
1730 nsIDirectoryService.xpt \
1731 nsIFile.xpt \
1732 nsILocalFile.xpt \
1733 nsIInputStream.xpt \
1734 nsIOutputStream.xpt \
1735 nsIScriptableInputStream.xpt \
1736 nsIComponentLoader.xpt \
1737 nsIComponentLoaderManager.xpt \
1738 nsIComponentManagerObsolete.xpt \
1739 nsINativeComponentLoader.xpt \
1740 nsIClassInfo.xpt \
1741 nsIComponentRegistrar.xpt \
1742 nsIFactory.xpt \
1743 nsIModule.xpt \
1744 nsIServiceManager.xpt \
1745 nsIComponentManager.xpt \
1746 nsICategoryManager.xpt \
1747 nsIThread.xpt \
1748 nsITimer.xpt \
1749 nsITimerInternal.xpt \
1750 nsITimerManager.xpt \
1751 nsIRunnable.xpt \
1752 nsIEventTarget.xpt \
1753 nsIEventQueue.xpt \
1754 nsIEventQueueService.xpt \
1755 nsIEnvironment.xpt \
1756 nsIProcess.xpt \
1757 nsIInterfaceInfo.xpt \
1758 nsIInterfaceInfoManager.xpt \
1759 nsIXPTLoader.xpt)
1760
1761VBoxXPCOMBase-xpt-inst_INST = $(INST_BIN)components/
1762VBoxXPCOMBase-xpt-inst_MODE = 0644
1763VBoxXPCOMBase-xpt-inst_SOURCES = \
1764 $(PATH_TARGET)/VBox-xpcom-xpt-files/VBoxXPCOMBase.xpt
1765VBoxXPCOMBase-xpt-inst_CLEAN = \
1766 $(VBOX_XPTFILES) \
1767 $(PATH_TARGET)/VBox-xpcom-xpt-files/VBoxXPCOMBase.xpt
1768
1769# combined typelib library
1770$(PATH_TARGET)/VBox-xpcom-xpt-files/VBoxXPCOMBase.xpt: $$(VBOX_XPTFILES) | $$(TARGET_xpt_link) $(PATH_TARGET)/VBox-xpcom-xpt-files/
1771 $(call MSG_LINK,XPCOM_TYPELIB,$@)
1772 $(QUIET)$(MKDIR) -p -- $(PATH_BIN)/components
1773 $(QUIET)$(TARGET_xpt_link) $@ $^
1774
1775
1776
1777# generate rules
1778include $(KBUILD_PATH)/subfooter.kmk
1779
1780
1781
1782#
1783# Generate IDL rules.
1784#
1785
1786##
1787# Define for compiling one IDL into a header and a typelib
1788# @param idl The filename with everything.
1789XPIDL_INCS = \
1790 -I $(VBOX_PATH_XPCOM_SRC)/xpcom/base/ \
1791 -I $(VBOX_PATH_XPCOM_SRC)/xpcom/ds/ \
1792 -I $(VBOX_PATH_XPCOM_SRC)/xpcom/components/ \
1793 -I $(VBOX_PATH_XPCOM_SRC)/xpcom/io/ \
1794 -I $(VBOX_PATH_XPCOM_SRC)/xpcom/threads/ \
1795 -I $(VBOX_PATH_XPCOM_SRC)/xpcom/reflect/xptinfo/public/
1796define def_IDL
1797$(VBOX_PATH_SDK)/bindings/xpcom/include/$(notdir $(subst .idl,.h,$(idl))) \
1798+ $(PATH_TARGET)/VBox-xpcom-xpt-files/$(notdir $(subst .idl,.xpt,$(idl))): \
1799 $(VBOX_PATH_XPCOM_SRC)/$(idl) \
1800 | $$$$(TARGET_xpidl) \
1801 $(PATH_TARGET)/VBox-xpcom-xpt-files/
1802 $$(call MSG_TOOL,xpidl,XPCOM,$$<,$$@)
1803 $$(QUIET)$(MKDIR) -p $(VBOX_PATH_SDK)/bindings/xpcom/include $(VBOX_PATH_SDK)/bindings/xpcom/idl
1804 $$(QUIET)$$(TARGET_xpidl) -m header $(XPIDL_INCS) -e $$@ $$<
1805 $$(QUIET)$$(TARGET_xpidl) -m typelib $(XPIDL_INCS) -e $(addprefix $(PATH_TARGET)/VBox-xpcom-xpt-files/,$(notdir $(subst .idl,.xpt,$(idl)))) $$<
1806 $$(QUIET)$(CP) $$< $$(VBOX_PATH_SDK)/bindings/xpcom/idl
1807endef
1808
1809$(foreach idl, $(XPCOM_IDLFILES), $(eval $(def_IDL)))
1810
1811# dummy target.
1812$(PATH_VBox-xpcom-string)/idl_ts: $$(addprefix $$(VBOX_PATH_SDK)/bindings/xpcom/include/,$$(notdir $$(subst .idl,.h,$$(XPCOM_IDLFILES))))
1813 $(call MSG_L1,IDL processing completed.)
1814 $(QUIET)$(MKDIR) -p $(dir $@)
1815 $(QUIET)$(APPEND) -t $@
1816
1817#
1818# HACK ALERT! Make sure main doesn't start using xpidl before we're done
1819# with the idl files here. The trick here is that we're using TARGET_xpidl,
1820# i.e. the copy residing in obj/, while VBOX_XPIDL is pointing to
1821# INSTARGET_xpidl which is the one in bin/.
1822#
1823$(VBOX_XPIDL): $$(PATH_VBox-xpcom-string)/idl_ts
1824
1825
1826#
1827# Generate linker map file filtering out unwanted global symbols.
1828#
1829$(PATH_TARGET)/xpcom-namespace-cleanup.map foo.map: $$(VBoxXPCOM_LIBS) $$(VBoxXPCOM_OBJS_)
1830 $(call MSG_L1, Creating linker map $@ for scrubbing the symbol namespace)
1831 $(QUIET)$(APPEND) -t $@ '{ local: *; global: '
1832 $(QUIET)$(VBOX_NM) -p -g $^ \
1833 | $(SED) -n \
1834 -e '/^$$/b' \
1835 -e '/:$$/b' \
1836 -e '/ U /b' \
1837 -e 's/^[^ ]* [A-Z] \(.*\)$$/\1/' \
1838 -e 's/\<_Z[^ ]*$$/&;/p' \
1839 -e 's/\<VBoxNs[^ ]*$$/&;/p' \
1840 -e 's/\<_edata$$/&;/p' \
1841 -e 's/\<_end$$/&;/p' \
1842 -e 's/\<_etext$$/&;/p'\
1843 -e 's/\<_fini$$/&;/p' \
1844 -e 's/\<_init$$/&;/p' \
1845 --append $@
1846 $(QUIET)$(APPEND) $@ '};'
1847
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