VirtualBox

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

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

TEMPLATE_VBOXBLDPROG_DEFS.darwin: added; TEMPLATE_XPCOMBLDPROG_LDFLAGS.darwin: work with opional 10.5 SDK

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