VirtualBox

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

Last change on this file since 16392 was 16392, checked in by vboxsync, 16 years ago

XPCOM-darwin/amd64: Use nsLocalFileUnix.cpp instead of nsLocalFileOSX.cpp.

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