VirtualBox

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

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

The proper way of building on leopard.

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