VirtualBox

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

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

python integration cleanup

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