Makefile.kmk revision ed0d4ccac4cbe85936511b94a907111e824fc588
#
# Makefile for XPCOM.
#
#
# Copyright (C) 2006 InnoTek Systemberatung GmbH
#
# This file is part of VirtualBox Open Source Edition (OSE), as
# available from http://www.virtualbox.org. This file is free software;
# you can redistribute it and/or modify it under the terms of the GNU
# General Public License as published by the Free Software Foundation,
# in version 2 as it comes in the "COPYING" file of the VirtualBox OSE
# distribution. VirtualBox OSE is distributed in the hope that it will
# be useful, but WITHOUT ANY WARRANTY of any kind.
#
# If you received this file as part of a commercial VirtualBox
# distribution, then only the terms of your commercial VirtualBox
# license agreement apply instead of the previous paragraph.
#
DEPTH = ../../..
include $(PATH_KBUILD)/header.kmk
#
# Template for building the XPCOM libraries (shared).
#
TEMPLATE_XPCOM = XPCOM libraries (shared)
TEMPLATE_XPCOM_EXTENDS = VBOXR3NP
TEMPLATE_XPCOM_ASTOOL = $(TEMPLATE_VBOXR3NP_TOOL)
TEMPLATE_XPCOM_ASFLAGS = $(NO_SUCH_VARIABLE)
TEMPLATE_XPCOM_ASDEFS = $(NO_SUCH_VARIABLE)
TEMPLATE_XPCOM_CXXFLAGS = -pipe -ansi -Wall -Wno-unused -Wno-non-virtual-dtor \
$(VBOX_GCC_Wno-invalid-offsetof) -Wno-sign-compare -Wno-unused -Wno-ctor-dtor-privacy
TEMPLATE_XPCOM_CXXFLAGS.debug = -fno-inline
TEMPLATE_XPCOM_CXXFLAGS.darwin = -fpascal-strings -fshort-wchar -fno-common -fno-rtti
TEMPLATE_XPCOM_CXXFLAGS.l4 = -fno-exceptions -nostdinc
TEMPLATE_XPCOM_CXXFLAGS.linux = -pthread
TEMPLATE_XPCOM_CFLAGS = -pipe -Wall -Wno-unused -Wno-parentheses -Wno-uninitialized
TEMPLATE_XPCOM_CFLAGS.debug = -fno-inline
TEMPLATE_XPCOM_CFLAGS.l4 = -nostdinc
TEMPLATE_XPCOM_CFLAGS.linux = -pthread -ansi
TEMPLATE_XPCOM_DEFS = MOZILLA_CLIENT=1
TEMPLATE_XPCOM_DEFS.amd64 = HAVE_VA_LIST_AS_ARRAY HAVE_VA_COPY VA_COPY\(a\,b\)=__builtin_va_copy\(a\,b\)
TEMPLATE_XPCOM_DEFS.darwin = OSTYPE=\"Darwin8.8.1\" OSARCH=\"Darwin\" MOZ_DLL_SUFFIX=\".dylib\" XP_UNIX=1 XP_MACOSX=1
TEMPLATE_XPCOM_DEFS.linux = OSTYPE=\"Linux2.6\" OSARCH=\"Linux\" MOZ_DLL_SUFFIX=\".so\" XP_UNIX=1
TEMPLATE_XPCOM_DEFS.l4 = OSTYPE=\"L4ENV\" OSARCH=\"L4\" MOZ_DLL_SUFFIX=\".s.so\" XP_UNIX=1 L4ENV
TEMPLATE_XPCOM_DEFS.os2 = OSTYPE=\"OS/2 4.5\" OSARCH=\"OS/2\" MOZ_DLL_SUFFIX=\".dll\" XP_UNIX=1
-fshort-wchar -fno-rtti -fno-exceptions -fpascal-strings \
-framework CoreServices -framework CoreFoundation -framework Foundation -framework AppKit -framework Carbon
ifeq ($(filter os2 win,$(BUILD_TARGET)),)
TEMPLATE_XPCOM_CXXFLAGS += -fPIC
TEMPLATE_XPCOM_CFLAGS += -fPIC
TEMPLATE_XPCOM_LDFLAGS += -fPIC
TEMPLATE_XPCOM_DEFS += MOZ_PRESERVE_PIC
endif
TEMPLATE_XPCOM_INCS = $(PATH_TARGET) \
xpcom/ds \
xpcom/io \
$(PATH_BIN)/sdk/include \
$(PATH_BIN)/sdk/include/xpcom \
$(PATH_BIN)/sdk/include/xpcom/nsprpub \
$(PATH_BIN)/sdk/include/xpcom/string \
$(PATH_BIN)/sdk/include/xpcom/xpcom \
$(PATH_BIN)/sdk/include/xpcom/ipcd
TEMPLATE_XPCOM_INCS.l4 = $(L4_INCDIR) $(VBOX_L4_GCC3_INCS)
TEMPLATE_XPCOM_LDFLAGS.l4 = $(L4_DIR)/lib/x86_586/crt0.o \
-T$(L4_DIR)/lib/x86_586/main_rel.ld -nostdlib \
# -Wl,--whole-archive,--no-allow-shlib-undefined
TEMPLATE_XPCOM_LIBS.l4 = $(VBOX_GCC_LIBGCC)
TEMPLATE_XPCOM_ORDERDEPS = $(foreach hdrinst, $(filter %-HEADERS, $(INSTALLS)), $(TARGET_$(hdrinst)))
#
# Template for building the XPCOM executables
#
TEMPLATE_XPCOMEXE = XPCOM executable files (testcases)
TEMPLATE_XPCOMEXE_EXTENDS = XPCOM
## @todo undo -fPIC.
TEMPLATE_XPCOMEXE_INCS = $(PATH_TARGET) ipc/ipcd/shared/src \
$(PATH_BIN)/sdk/include \
$(PATH_BIN)/sdk/include/xpcom \
$(PATH_BIN)/sdk/include/xpcom/nsprpub \
$(PATH_BIN)/sdk/include/xpcom/string \
$(PATH_BIN)/sdk/include/xpcom/xpcom \
$(PATH_BIN)/sdk/include/xpcom/ipcd
TEMPLATE_XPCOMEXE_LIBS = \
$(TARGET_VBox-xpcom-ipcshared) \
$(TARGET_VBoxXPCOM)
TEMPLATE_XPCOMEXE_LIBS.linux = dl $(LIB_PTHREAD)
TEMPLATE_XPCOMEXE_LIBS.l4 = $(LIB_RUNTIME) $(VBOX_GCC_LIBGCC)
TEMPLATE_XPCOMEXE_LDFLAGS.darwin = -bind_at_load $(TEMPLATE_XPCOM_LDFLAGS.darwin)
TEMPLATE_XPCOMEXE_LDFLAGS.l4 = $(L4_DIR)/lib/x86_586/crt0.o \
-T$(L4_DIR)/lib/x86_586/main_dyn.ld -nostdlib -lgcc \
-Wl,--export-dynamic,--dynamic-linker=libld-l4.s.so \
-Wl,--rpath-link,$(L4_LIBDIR) \
# -Wl,--whole-archive,--no-allow-shlib-undefined
#
# Template for building XPCOM executables for running at build time.
#
# It extends the BLDPROG template in config.kmk but overrides CFLAGS
# and CXXFLAGS completely at the moment.
#
TEMPLATE_XPCOMBLDPROG = XPCOM Build programs executables
TEMPLATE_XPCOMBLDPROG_EXTENDS = BLDPROG
TEMPLATE_XPCOMBLDPROG_DEFS = $(TEMPLATE_BLDPROG_DEFS) $(TEMPLATE_XPCOMEXE_DEFS)
TEMPLATE_XPCOMBLDPROG_DEFS.$(BUILD_TARGET) = $(TEMPLATE_BLDPROG_DEFS.$(BUILD_TARGET)) $(TEMPLATE_XPCOMEXE_DEFS.$(BUILD_TARGET))
TEMPLATE_XPCOMBLDPROG_DEFS.$(BUILD_TARGET_ARCH) = $(TEMPLATE_BLDPROG_DEFS.$(BUILD_TARGET_ARCH)) $(TEMPLATE_XPCOMEXE_DEFS.$(BUILD_TARGET_ARCH))
TEMPLATE_XPCOMBLDPROG_CXXFLAGS = -ansi -Wall -Wno-non-virtual-dtor
TEMPLATE_XPCOMBLDPROG_CXXFLAGS.linux = -pthread
TEMPLATE_XPCOMBLDPROG_CFLAGS = -pipe -ansi -Wall -Wno-unused
TEMPLATE_XPCOMBLDPROG_CFLAGS.linux = -pthread
TEMPLATE_XPCOMBLDPROG_INCS = $(PATH_BIN)/sdk/include \
$(PATH_BIN)/sdk/include/xpcom \
$(PATH_BIN)/sdk/include/xpcom/nsprpub \
$(PATH_BIN)/sdk/include/xpcom/string \
$(PATH_BIN)/sdk/include/xpcom/xpcom \
$(PATH_BIN)/sdk/include/xpcom/ipcd
TEMPLATE_XPCOMBLDPROG_ORDERDEPS = $(TEMPLATE_XPCOM_ORDERDEPS)
#
# Header installs.
#
INSTALLS = \
NSPRPUB-HEADERS \
NSPRPUB-MD-HEADERS \
NSPRPUB-OBS-HEADERS \
NSPRPUB-PRIV-HEADERS \
STRING-HEADERS \
XPCOM-HEADERS \
IPCD-HEADERS
#
# The IDL compiler and typelib linker.
#
BLDPROGS = \
xpidl \
xpt_link
#
# We build several libraries so that any linker command line
# length restrictions limit will be avoided. (Solaris, Mac?)
#
LIBRARIES = \
VBox-xpcom-nspr \
VBox-xpcom-typelib \
VBox-xpcom-string \
VBox-xpcom-base \
VBox-xpcom-ds \
VBox-xpcom-io \
VBox-xpcom-components \
VBox-xpcom-threads \
VBox-xpcom-xptinfo \
VBox-xpcom-xptcall \
VBox-xpcom-proxy \
VBoxXPCOMGlue \
VBox-xpcom-ipcutils \
VBox-xpcom-ipcshared \
VBox-xpcom-ipcdlock \
VBox-xpcom-ipctransmgr \
VBox-xcpom-ipctmgrcom
DLLS = \
VBoxXPCOM \
VBoxXPCOMIPCC
ifdef VBOX_WITH_TESTCASES
PROGRAMS = \
tstnsIFileEnumerator \
tstnsIFileTest \
tstTestArray \
tstTestAtoms \
tstTestAutoLock \
tstTestCallTemplates \
tstTestCOMPtr \
tstTestCOMPtrEq \
tstTestCRT \
tstTestFactory \
tstTestHashtables \
tstTestID \
tstTestObserverService \
tstTestPipes \
tstTestServMgr \
tstTestThreads \
tstTestXPIDLString \
tstTestDeque \
tstTestAutoPtr \
tstTestMinStringAPI \
tstTestStrings
# tstTestPermanentAtoms
endif # VBOX_WITH_TESTCASES
PROGRAMS += VBoxXPCOMIPCD
OTHERS = \
$(PATH_BIN)/VBoxXPCOMBase.xpt
OTHER_CLEAN = \
$(PATH_TARGET)/VBox-xpcom-nspr/_pr_bld.h \
$(PATH_TARGET)/VBox-xpcom-nspr/_pl_bld.h \
$(PATH_BIN)/VBoxXPCOMBase.xpt
#
# SDK headers - lot's of files to install...
#
# Tip: If you are going to remove files here, you might
# wish to do a `kmk uninstall' first to avoid have
# obsoleted files in the $(INST_SDK) directory.
#
NSPRPUB-HEADERS_INST = $(INST_SDK)/include/xpcom/nsprpub/
NSPRPUB-HEADERS_IFFLAGS = -p -m 644
NSPRPUB-HEADERS_SOURCES = \
NSPRPUB-MD-HEADERS_INST = $(INST_SDK)/include/xpcom/nsprpub/md
NSPRPUB-MD-HEADERS_IFFLAGS = -p -m 644
NSPRPUB-MD-HEADERS_SOURCES = \
\
NSPRPUB-OBS-HEADERS_INST = $(INST_SDK)/include/xpcom/nsprpub/obsolete
NSPRPUB-OBS-HEADERS_IFFLAGS = -p -m 644
NSPRPUB-OBS-HEADERS_SOURCES = \
NSPRPUB-PRIV-HEADERS_INST = $(INST_SDK)/include/xpcom/nsprpub/private
NSPRPUB-PRIV-HEADERS_IFFLAGS = -p -m 644
NSPRPUB-PRIV-HEADERS_SOURCES = \
STRING-HEADERS_INST = $(INST_SDK)/include/xpcom/string
STRING-HEADERS_IFFLAGS = -p -m 644
STRING-HEADERS_SOURCES = \
XPCOM-HEADERS_INST = $(INST_SDK)/include/xpcom/xpcom
XPCOM-HEADERS_IFFLAGS = -p -m 644
XPCOM-HEADERS_SOURCES = \
IPCD-HEADERS_INST = $(INST_SDK)/include/xpcom/ipcd
IPCD-HEADERS_IFFLAGS = -p -m 644
IPCD-HEADERS_SOURCES = \
#
# The IDL compiler.
#
# We build it statically because we cannot rely on additional .a files
# like in the original build
#
xpidl_TEMPLATE = XPCOMBLDPROG
xpidl_DEFS = EXPORT_XPT_API
## @todo This assumes HOST == TARGET.
xpidl_INST = bin/ $(INST_SDK)/bin/
xpidl_SOURCES = \
# We do these ONCE.
libIDL_config := $(firstword $(shell which libIDL-config-2 libIDL-config 2> /dev/null))
libIDL_config_cflags := $(shell $(libIDL_config) --cflags)
libIDL_config_libs := $(shell $(libIDL_config) --libs)
xpidl_CFLAGS = \
$(libIDL_config_cflags)
xpidl_LDFLAGS = \
$(libIDL_config_libs)
#
# The XPT linker.
#
xpt_link_TEMPLATE = XPCOMBLDPROG
xpt_link_SOURCES = \
#
# The NSPR Library.
#
VBox-xpcom-nspr_TEMPLATE = XPCOM
VBox-xpcom-nspr_NOINST = 1
VBox-xpcom-nspr_DEFS = \
_NSPR_BUILD_ \
HAVE_LCHOWN=1 \
HAVE_STRERROR=1 \
FORCE_PR_LOG
HAVE_VISIBILITY_HIDDEN_ATTRIBUTE=1 \
HAVE_BSD_FLOCK=1 \
_PR_PTHREADS
HAVE_CVAR_BUILT_ON_SEM \
_PR_PTHREADS
# FIXME: LINUX should be defined by _linux.cfg
LINUX=1 \
_POSIX_SOURCE=1 \
_BSD_SOURCE=1 \
_SVID_SOURCE=1 \
_REENTRANT=1 \
_LARGEFILE64_SOURCE=1 \
HAVE_VISIBILITY_HIDDEN_ATTRIBUTE=1 \
HAVE_VISIBILITY_PRAGMA=1 \
HAVE_FCNTL_FILE_LOCKING=1 \
HAVE_CVAR_BUILT_ON_SEM \
_PR_PTHREADS
# _BSD_SOURCE is here to keep the Glibc header files happy and make them include the right things
# FIXME: L4 should be defined by _linux.cfg
L4=1 \
_REENTRANT=1 \
_LARGEFILE64_SOURCE=1 \
_POSIX_SOURCE=1 \
_BSD_SOURCE=1 \
HAVE_VISIBILITY_HIDDEN_ATTRIBUTE=1 \
HAVE_VISIBILITY_PRAGMA=1 \
HAVE_FCNTL_FILE_LOCKING=1 \
HAVE_CVAR_BUILT_ON_SEM
_PR_PTHREADS
_PR_PTHREADS
_PR_PTHREADS
VBox-xpcom-nspr_DEFS.x86 = i386=1
VBox-xpcom-nspr_DEFS.amd64 = i386=1
VBox-xpcom-nspr_DEFS.debug = NDEBUG
VBox-xpcom-nspr_INCS = \
$(PATH_TARGET)/VBox-xpcom-nspr
VBox-xpcom-nspr_SOURCES = \
nsprpub/pr/src/io/prfile.c /* why not for Linux? */ \
nsprpub/pr/src/io/prio.c /* "" "" "" "" */ \
nsprpub/pr/src/linking/prlink.c_DEFS = _GNU_SOURCE
nsprpub/pr/src/prvrsion.c_DEPS = $(PATH_VBox-xpcom-nspr)/_pr_bld.h
nsprpub/lib/ds/plvrsion.c_DEPS = $(PATH_VBox-xpcom-nspr)/_pl_bld.h
VBox-xpcom-typelib_TEMPLATE = XPCOM
VBox-xpcom-typelib_NOINST = 1
VBox-xpcom-typelib_SOURCES = \
VBox-xpcom-string_TEMPLATE = XPCOM
VBox-xpcom-string_NOINST = 1
VBox-xpcom-string_DEFS = _IMPL_NS_COM
VBox-xpcom-string_SOURCES = \
VBox-xpcom-base_TEMPLATE = XPCOM
VBox-xpcom-base_NOINST = 1
VBox-xpcom-base_SOURCES = \
VBox-xpcom-ds_TEMPLATE = XPCOM
VBox-xpcom-ds_NOINST = 1
VBox-xpcom-ds_SOURCES = \
# @todo what about MOZ_USER_DIR?
VBox-xpcom-io_TEMPLATE = XPCOM
VBox-xpcom-io_NOINST = 1
VBox-xpcom-io_DEFS = MOZ_USER_DIR=\".mozilla\"
VBox-xpcom-io_SOURCES = \
ifeq ($(filter-out freebsd linux netbsd openbsd solaris,$(BUILD_TARGET)),)
VBox-xpcom-io_SOURCES += \
endif
VBox-xpcom-components_TEMPLATE = XPCOM
VBox-xpcom-components_NOINST = 1
VBox-xpcom-components_DEFS = EXPORT_XPTI_API
VBox-xpcom-components_SOURCES = \
VBox-xpcom-threads_TEMPLATE = XPCOM
VBox-xpcom-threads_NOINST = 1
VBox-xpcom-threads_SOURCES = \
VBox-xpcom-xptinfo_TEMPLATE = XPCOM
VBox-xpcom-xptinfo_NOINST = 1
VBox-xpcom-xptinfo_DEFS = EXPORT_XPTI_API
VBox-xpcom-xptinfo_SOURCES = \
VBox-xpcom-xptcall_TEMPLATE = XPCOM
VBox-xpcom-xptcall_NOINST = 1
VBox-xpcom-xptcall_DEFS = EXPORT_XPTC_API
VBox-xpcom-xptcall_DEFS.darwin = KEEP_STACK_16_BYTE_ALIGNED
VBox-xpcom-xptcall_SOURCES = xpcom/reflect/xptcall/src/xptcall.cpp
VBox-xpcom-xptcall_SOURCES.darwin.x86 = xpcom/reflect/xptcall/src/md/unix/xptcinvoke_unixish_x86.cpp \
VBox-xpcom-xptcall_SOURCES.linux.x86 = xpcom/reflect/xptcall/src/md/unix/xptcinvoke_gcc_x86_unix.cpp \
VBox-xpcom-xptcall_SOURCES.linux.amd64 = xpcom/reflect/xptcall/src/md/unix/xptcinvoke_x86_64_linux.cpp \
VBox-xpcom-proxy_TEMPLATE = XPCOM
VBox-xpcom-proxy_NOINST = 1
VBox-xpcom-proxy_SOURCES = xpcom/proxy/src/nsProxyEvent.cpp \
# glue library which all client apps will link with
VBoxXPCOMGlue_TEMPLATE = XPCOM
VBoxXPCOMGlue_DEFS = XPCOM_GLUE
VBoxXPCOMGlue_SOURCES = xpcom/glue/nsCOMPtr.cpp \
VBoxXPCOMGlue_INST = lib/ $(INST_SDK)/lib/
#
# The VBoxXPCOM Shared Object, assembling all lib files.
#
VBoxXPCOM_TEMPLATE = XPCOM
VBoxXPCOM_DEFS = BUILD_DCONNECT="1"
VBoxXPCOM_SOURCES = \
VBoxXPCOM_LIBS = \
$(TARGET_VBox-xpcom-typelib) \
$(TARGET_VBox-xpcom-string) \
$(TARGET_VBox-xpcom-base) \
$(TARGET_VBox-xpcom-ds) \
$(TARGET_VBox-xpcom-io) \
$(TARGET_VBox-xpcom-components) \
$(TARGET_VBox-xpcom-threads) \
$(TARGET_VBox-xpcom-xptinfo) \
$(TARGET_VBox-xpcom-xptcall) \
$(TARGET_VBox-xpcom-proxy) \
$(TARGET_VBox-xpcom-nspr)
VBoxXPCOM_LDFLAGS.linux = -Wl,--whole-archive \
$(TARGET_VBox-xpcom-typelib) \
$(TARGET_VBox-xpcom-string) \
$(TARGET_VBox-xpcom-base) \
$(TARGET_VBox-xpcom-ds) \
$(TARGET_VBox-xpcom-io) \
$(TARGET_VBox-xpcom-components) \
$(TARGET_VBox-xpcom-threads) \
$(TARGET_VBox-xpcom-xptinfo) \
$(TARGET_VBox-xpcom-xptcall) \
$(TARGET_VBox-xpcom-proxy) \
$(TARGET_VBox-xpcom-nspr) \
-Wl,--no-whole-archive
#VBoxXPCOM_LIBS.l4 = $(L4_LIBDIR)/libxpcomstubs.a $(L4_LIBDIR)/../libuc_c++.a \
# $(VBOX_PATH_L4_GCC3_INSTALL)/libsupc++.a $(VBOX_PATH_L4_GCC3_INSTALL)/libgcc_eh.a
# EF heap
#VBoxXPCOM_LIBS += $(LIB_RUNTIME_EF)
#VBoxXPCOM_LDFLAGS = -Wl,--whole-archive $(VBoxXPCOM_LIBS) -Wl,--no-whole-archive $(LIB_RUNTIME)
ifdef VBOX_IPC_RELEASE_LOG
IPC_LOGGING = 1
else ifneq ($(BUILD_TYPE),release)
IPC_LOGGING = 1
endif
TEMPLATE_XPCOMIPC = XPCOM IPC libraries
TEMPLATE_XPCOMIPC_EXTENDS = XPCOM
TEMPLATE_XPCOMIPC_DEFS = $(TEMPLATE_XPCOM_DEFS) BUILD_DCONNECT="1"
ifdef IPC_LOGGING
TEMPLATE_XPCOMIPC_DEFS += IN_RING3 IPC_LOGGING
TEMPLATE_XPCOMIPC_LIBS = $(TEMPLATE_XPCOM_LIBS) $(LIB_RUNTIME)
endif
TEMPLATE_XPCOMIPC_LIBS.darwin = $(TARGET_VBoxXPCOM)
TEMPLATE_XPCOMIPCEXE = XPCOM IPC executables
TEMPLATE_XPCOMIPCEXE_EXTENDS = XPCOMEXE
TEMPLATE_XPCOMIPCEXE_DEFS = $(TEMPLATE_XPCOMEXE_DEFS) BUILD_DCONNECT="1"
ifdef IPC_LOGGING
TEMPLATE_XPCOMIPCEXE_DEFS += IN_RING3 IPC_LOGGING
TEMPLATE_XPCOMIPCEXE_LIBS = $(TEMPLATE_XPCOMEXE_LIBS) $(LIB_RUNTIME)
endif
VBox-xpcom-ipcutils_TEMPLATE = XPCOMIPC
VBox-xpcom-ipcutils_NOINST = 1
VBox-xpcom-ipcutils_SOURCES = \
VBox-xpcom-ipcshared_TEMPLATE = XPCOMIPC
VBox-xpcom-ipcshared_NOINST = 1
VBox-xpcom-ipcshared_SOURCES = \
VBox-xpcom-ipcdlock_TEMPLATE = XPCOMIPC
VBox-xpcom-ipcdlock_NOINST = 1
VBox-xpcom-ipcdlock_SOURCES = \
VBox-xpcom-ipctransmgr_TEMPLATE = XPCOMIPC
VBox-xpcom-ipctransmgr_NOINST = 1
VBox-xpcom-ipctransmgr_SOURCES = \
VBox-xcpom-ipctmgrcom_TEMPLATE = XPCOMIPC
VBox-xcpom-ipctmgrcom_NOINST = 1
VBox-xcpom-ipctmgrcom_SOURCES = \
# DCONNECT client shared object
VBoxXPCOMIPCC_TEMPLATE = XPCOMIPC
VBoxXPCOMIPCC_DEFS = HAVE_DEPENDENT_LIBS
VBoxXPCOMIPCC_SOURCES = \
VBoxXPCOMIPCC_LIBS = \
$(TARGET_VBox-xpcom-ipcutils) \
$(TARGET_VBox-xpcom-ipcshared) \
$(TARGET_VBox-xpcom-ipcdlock) \
$(TARGET_VBox-xpcom-ipctransmgr) \
$(TARGET_VBox-xcpom-ipctmgrcom)
# EF
#VBoxXPCOMIPCC_LIBS += $(LIB_RUNTIME)
# DCONNECT daemon executable
VBoxXPCOMIPCD_TEMPLATE = XPCOMIPCEXE
VBoxXPCOMIPCD_SOURCES = \
#
# testcases
#
tstnsIFileEnumerator_TEMPLATE = XPCOMEXE
tstnsIFileEnumerator_SOURCES = xpcom/tests/nsIFileEnumerator.cpp
tstnsIFileTest_TEMPLATE = XPCOMEXE
tstnsIFileTest_SOURCES = xpcom/tests/nsIFileTest.cpp
tstTestArray_TEMPLATE = XPCOMEXE
tstTestArray_SOURCES = xpcom/tests/TestArray.cpp
tstTestAtoms_TEMPLATE = XPCOMEXE
tstTestAtoms_SOURCES = xpcom/tests/TestAtoms.cpp
tstTestAutoLock_TEMPLATE = XPCOMEXE
tstTestAutoLock_SOURCES = xpcom/tests/TestAutoLock.cpp
tstTestCallTemplates_TEMPLATE = XPCOMEXE
tstTestCallTemplates_SOURCES = xpcom/tests/TestCallTemplates.cpp
tstTestCOMPtr_TEMPLATE = XPCOMEXE
tstTestCOMPtr_SOURCES = xpcom/tests/TestCOMPtr.cpp
tstTestCOMPtrEq_TEMPLATE = XPCOMEXE
tstTestCOMPtrEq_SOURCES = xpcom/tests/TestCOMPtrEq.cpp
tstTestCRT_TEMPLATE = XPCOMEXE
tstTestCRT_SOURCES = xpcom/tests/TestCRT.cpp
tstTestFactory_TEMPLATE = XPCOMEXE
tstTestFactory_SOURCES = xpcom/tests/TestFactory.cpp
tstTestHashtables_TEMPLATE = XPCOMEXE
tstTestHashtables_SOURCES = xpcom/tests/TestHashtables.cpp
tstTestID_TEMPLATE = XPCOMEXE
tstTestID_SOURCES = xpcom/tests/TestID.cpp
tstTestObserverService_TEMPLATE= XPCOMEXE
tstTestObserverService_SOURCES = xpcom/tests/TestObserverService.cpp
tstTestPermanentAtoms_TEMPLATE = XPCOMEXE
tstTestPermanentAtoms_SOURCES = xpcom/tests/TestPermanentAtoms.cpp
tstTestPipes_TEMPLATE = XPCOMEXE
tstTestPipes_SOURCES = xpcom/tests/TestPipes.cpp
tstTestServMgr_TEMPLATE = XPCOMEXE
tstTestServMgr_SOURCES = xpcom/tests/TestServMgr.cpp
tstTestServMgr_INCS = xpcom/tests/services
tstTestThreads_TEMPLATE = XPCOMEXE
tstTestThreads_SOURCES = xpcom/tests/TestThreads.cpp
tstTestXPIDLString_TEMPLATE = XPCOMEXE
tstTestXPIDLString_SOURCES = xpcom/tests/TestXPIDLString.cpp
tstTestDeque_TEMPLATE = XPCOMEXE
tstTestDeque_SOURCES = xpcom/tests/TestDeque.cpp
tstTestAutoPtr_TEMPLATE = XPCOMEXE
tstTestAutoPtr_SOURCES = xpcom/tests/TestAutoPtr.cpp
tstTestMinStringAPI_TEMPLATE = XPCOMEXE
tstTestMinStringAPI_SOURCES = xpcom/tests/TestMinStringAPI.cpp
tstTestStrings_TEMPLATE = XPCOMEXE
tstTestStrings_SOURCES = xpcom/tests/TestStrings.cpp
IDLFILES = \
OTHER_CLEAN += \
$(PATH_VBox-xpcom-string)/idl_ts \
$(addprefix $(PATH_BIN)/sdk/include/,$(notdir $(subst .idl,.h,$(IDLFILES)))) \
$(addprefix $(PATH_BIN)/sdk/include/,$(notdir $(subst .idl,.xpt,$(IDLFILES)))) \
$(addprefix $(PATH_BIN)/sdk/idl/,$(notdir $(IDLFILES)))
# generate rules
include $(PATH_KBUILD)/footer.kmk
XPTFILES = $(addprefix $(PATH_TARGET)/, \
OTHER_CLEAN += \
$(XPTFILES)
# combined typelib library
$(PATH_BIN)/VBoxXPCOMBase.xpt: $(XPTFILES)
$(call MSG_L1,Linking $@)
$(QUIET)$(TARGET_xpt_link) $@ $^
# generate build stamps
$(PATH_VBox-xpcom-nspr)/_pr_bld.h:
$(call MSG_L1,Generating $@)
$(QUIET)echo '#define _BUILD_STRING "$(shell date "+%Y-%m-%d %T")"' > $@
$(PATH_VBox-xpcom-nspr)/_pl_bld.h:
$(call MSG_L1,Generating $@)
$(QUIET)echo '#define _BUILD_STRING "$(shell date "+%Y-%m-%d %T")"' > $@
#
# Generate IDL rules.
#
##
# Define for compiling one IDL into a header and a typelib
# @param idl The filename with everything.
XPIDL_INCS = -I xpcom/base/ -I xpcom/ds/ -I xpcom/components/ -I xpcom/io/ -I xpcom/threads/ -I xpcom/reflect/xptinfo/public/
define def_IDL
$(addprefix $(PATH_BIN)/sdk/include/,$(notdir $(subst .idl,.h,$(idl)))) \
$(PATH_TARGET)/$(notdir $(subst .idl,.xpt,$(idl))): $(idl)
$$(call MSG_L1,xpidl $$<)
$$(QUIET)$(MKDIR) -p $(PATH_BIN)/sdk/include $(PATH_BIN)/sdk/idl
$$(QUIET)$$(TARGET_xpidl) -m header $(XPIDL_INCS) -e $$@ $$<
$$(QUIET)$$(TARGET_xpidl) -m typelib $(XPIDL_INCS) -e $(addprefix $(PATH_TARGET)/,$(notdir $(subst .idl,.xpt,$(idl)))) $$<
$$(QUIET)$(CP) $$< $$(PATH_BIN)/sdk/idl
endef
$(foreach idl, $(IDLFILES), $(eval $(def_IDL)))
# dummy target.
$(PATH_VBox-xpcom-string)/idl_ts: $(addprefix $(PATH_BIN)/sdk/include/,$(notdir $(subst .idl,.h,$(IDLFILES))))
$(call MSG_L1,IDL processing completed.)
$(QUIET)$(MKDIR) -p $(dir $@)
$(QUIET)$(ECHO_EXT) > $@
# Manual dependency...
xpcom/string/src/nsAString.cpp: $(PATH_VBox-xpcom-string)/idl_ts