VirtualBox

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

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

API/xpcom: add the map file to the linker options, don't override

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