Makefile.kmk revision 827d97355f09240dfc41f4cd46ef1bd8391a32db
5828e9d7f59d4682a58585195d67153abdabacfcvboxsync# $Id$
5828e9d7f59d4682a58585195d67153abdabacfcvboxsync## @file
5828e9d7f59d4682a58585195d67153abdabacfcvboxsync# Sub-Makefile for Java bindings
5828e9d7f59d4682a58585195d67153abdabacfcvboxsync#
5828e9d7f59d4682a58585195d67153abdabacfcvboxsync
5828e9d7f59d4682a58585195d67153abdabacfcvboxsync#
5828e9d7f59d4682a58585195d67153abdabacfcvboxsync# Copyright (C) 2010 Oracle Corporation
5828e9d7f59d4682a58585195d67153abdabacfcvboxsync#
5828e9d7f59d4682a58585195d67153abdabacfcvboxsync# This file is part of VirtualBox Open Source Edition (OSE), as
5828e9d7f59d4682a58585195d67153abdabacfcvboxsync# available from http://www.virtualbox.org. This file is free software;
5828e9d7f59d4682a58585195d67153abdabacfcvboxsync# you can redistribute it and/or modify it under the terms of the GNU
5828e9d7f59d4682a58585195d67153abdabacfcvboxsync# General Public License (GPL) as published by the Free Software
5828e9d7f59d4682a58585195d67153abdabacfcvboxsync# Foundation, in version 2 as it comes in the "COPYING" file of the
5828e9d7f59d4682a58585195d67153abdabacfcvboxsync# VirtualBox OSE distribution. VirtualBox OSE is distributed in the
5828e9d7f59d4682a58585195d67153abdabacfcvboxsync# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
5828e9d7f59d4682a58585195d67153abdabacfcvboxsync#
5828e9d7f59d4682a58585195d67153abdabacfcvboxsync
5828e9d7f59d4682a58585195d67153abdabacfcvboxsyncSUB_DEPTH = ../../../..
5828e9d7f59d4682a58585195d67153abdabacfcvboxsyncinclude $(KBUILD_PATH)/subheader.kmk
5828e9d7f59d4682a58585195d67153abdabacfcvboxsync
5828e9d7f59d4682a58585195d67153abdabacfcvboxsyncVBOX_JXPCOM_SRC := $(PATH_SUB_CURRENT)
5828e9d7f59d4682a58585195d67153abdabacfcvboxsync
63405971350d5cc0efe5f322bf782a1c29838c74vboxsyncifndef VBOX_ONLY_SDK
63405971350d5cc0efe5f322bf782a1c29838c74vboxsync
5828e9d7f59d4682a58585195d67153abdabacfcvboxsyncifeq ($(KBUILD_TARGET), darwin)
5828e9d7f59d4682a58585195d67153abdabacfcvboxsync VBOX_JAVA_HOME = /System/Library/Frameworks/JavaVM.framework/Versions/1.5.0
5828e9d7f59d4682a58585195d67153abdabacfcvboxsync VBOX_JAVAC = $(VBOX_JAVA_HOME)/Commands/javac
5828e9d7f59d4682a58585195d67153abdabacfcvboxsync VBOX_JAVAH = $(VBOX_JAVA_HOME)/Commands/javah
5828e9d7f59d4682a58585195d67153abdabacfcvboxsync VBOX_JAR = $(VBOX_JAVA_HOME)/Commands/jar
5828e9d7f59d4682a58585195d67153abdabacfcvboxsync VBOX_JAVA_INC = $(VBOX_JAVA_HOME)/Headers
5828e9d7f59d4682a58585195d67153abdabacfcvboxsyncelse
1ec5a5157645798be8b5f57f197700bb86765b44vboxsync ifeq ($(KBUILD_TARGET), linux)
1ec5a5157645798be8b5f57f197700bb86765b44vboxsync VBOX_JAVA_HOME ?= /usr/lib/jvm/java-1.5.0-sun
1ec5a5157645798be8b5f57f197700bb86765b44vboxsync endif
1ec5a5157645798be8b5f57f197700bb86765b44vboxsync ifeq ($(KBUILD_TARGET), solaris)
1ec5a5157645798be8b5f57f197700bb86765b44vboxsync # VBOX_JAVA_HOME ?= /usr/jdk/jdk1.5.0
1ec5a5157645798be8b5f57f197700bb86765b44vboxsync VBOX_JAVA_HOME ?= /usr/java
1ec5a5157645798be8b5f57f197700bb86765b44vboxsync endif
5828e9d7f59d4682a58585195d67153abdabacfcvboxsync VBOX_JAVAC = $(VBOX_JAVA_HOME)/bin/javac
5828e9d7f59d4682a58585195d67153abdabacfcvboxsync VBOX_JAVAH = $(VBOX_JAVA_HOME)/bin/javah
5828e9d7f59d4682a58585195d67153abdabacfcvboxsync VBOX_JAR = $(VBOX_JAVA_HOME)/bin/jar
5828e9d7f59d4682a58585195d67153abdabacfcvboxsync # correct for targets we care about
5828e9d7f59d4682a58585195d67153abdabacfcvboxsync VBOX_MD_OS = $(KBUILD_TARGET)
5828e9d7f59d4682a58585195d67153abdabacfcvboxsync VBOX_JAVA_INC = $(VBOX_JAVA_HOME)/include \
5828e9d7f59d4682a58585195d67153abdabacfcvboxsync $(VBOX_JAVA_HOME)/include/$(VBOX_MD_OS)
5828e9d7f59d4682a58585195d67153abdabacfcvboxsyncendif
5828e9d7f59d4682a58585195d67153abdabacfcvboxsync
5828e9d7f59d4682a58585195d67153abdabacfcvboxsyncVBOX_JXPCOM_TARGET = $(PATH_TARGET)/vboxjxpcom
5828e9d7f59d4682a58585195d67153abdabacfcvboxsyncVBOX_JXPCOM_JDEST := $(VBOX_JXPCOM_TARGET)/jdest
5828e9d7f59d4682a58585195d67153abdabacfcvboxsync
5828e9d7f59d4682a58585195d67153abdabacfcvboxsyncVBOX_JXPCOM_GENH = \
5828e9d7f59d4682a58585195d67153abdabacfcvboxsync $(VBOX_JXPCOM_JDEST)/org_mozilla_xpcom_internal_XPCOMImpl.h \
5828e9d7f59d4682a58585195d67153abdabacfcvboxsync $(VBOX_JXPCOM_JDEST)/org_mozilla_xpcom_internal_GREImpl.h \
5828e9d7f59d4682a58585195d67153abdabacfcvboxsync $(VBOX_JXPCOM_JDEST)/org_mozilla_xpcom_internal_MozillaImpl.h \
5828e9d7f59d4682a58585195d67153abdabacfcvboxsync $(VBOX_JXPCOM_JDEST)/org_mozilla_xpcom_internal_XPCOMJavaProxy.h \
5828e9d7f59d4682a58585195d67153abdabacfcvboxsync $(VBOX_JXPCOM_JDEST)/org_mozilla_xpcom_internal_JavaXPCOMMethods.h \
1ec5a5157645798be8b5f57f197700bb86765b44vboxsync $(VBOX_JXPCOM_JDEST)/org_mozilla_xpcom_ProfileLock.h
5828e9d7f59d4682a58585195d67153abdabacfcvboxsync
5828e9d7f59d4682a58585195d67153abdabacfcvboxsyncVBoxJXpcom_TEMPLATE = XPCOM
5828e9d7f59d4682a58585195d67153abdabacfcvboxsyncVBoxJXpcom_CXXFLAGS = -Wno-write-strings
5828e9d7f59d4682a58585195d67153abdabacfcvboxsyncVBoxJXpcom_DEFS = \
5828e9d7f59d4682a58585195d67153abdabacfcvboxsync EXPORT_XPTI_API \
5828e9d7f59d4682a58585195d67153abdabacfcvboxsync EXPORT_XPT_API \
5828e9d7f59d4682a58585195d67153abdabacfcvboxsync VBOX_WITH_XPCOM
5828e9d7f59d4682a58585195d67153abdabacfcvboxsyncVBoxJXpcom_DEFS.darwin = XP_MACOSX
5828e9d7f59d4682a58585195d67153abdabacfcvboxsyncVBoxJXpcom_NAME = libvboxjxpcom
5828e9d7f59d4682a58585195d67153abdabacfcvboxsyncVBoxJXpcom_DLLSUFF.darwin = .jnilib
5828e9d7f59d4682a58585195d67153abdabacfcvboxsyncVBoxJXpcom_INCS = \
5828e9d7f59d4682a58585195d67153abdabacfcvboxsync src \
5828e9d7f59d4682a58585195d67153abdabacfcvboxsync $(VBOX_JAVA_INC) \
5828e9d7f59d4682a58585195d67153abdabacfcvboxsync $(VBOX_PATH_XPCOM_SRC)/xpcom/glue \
5828e9d7f59d4682a58585195d67153abdabacfcvboxsync $(VBOX_PATH_XPCOM_SRC)/xpcom/build \
5828e9d7f59d4682a58585195d67153abdabacfcvboxsync $(VBOX_JXPCOM_JDEST)
5828e9d7f59d4682a58585195d67153abdabacfcvboxsyncVBoxJXpcom_SOURCES = \
5828e9d7f59d4682a58585195d67153abdabacfcvboxsync src/nsAppFileLocProviderProxy.cpp \
5828e9d7f59d4682a58585195d67153abdabacfcvboxsync src/nsJavaWrapper.cpp \
5828e9d7f59d4682a58585195d67153abdabacfcvboxsync src/nsJavaXPCOMBindingUtils.cpp \
5828e9d7f59d4682a58585195d67153abdabacfcvboxsync src/nsJavaXPTCStub.cpp \
5828e9d7f59d4682a58585195d67153abdabacfcvboxsync src/nsJavaXPTCStubWeakRef.cpp \
5828e9d7f59d4682a58585195d67153abdabacfcvboxsync src/nsJavaXPCOMGlue.cpp \
5828e9d7f59d4682a58585195d67153abdabacfcvboxsync src/nsJavaInterfaces.cpp
5828e9d7f59d4682a58585195d67153abdabacfcvboxsyncVBoxJXpcom_LIBS = \
5828e9d7f59d4682a58585195d67153abdabacfcvboxsync $(PATH_LIB)/VBoxCOM$(VBOX_SUFF_LIB) \
1ec5a5157645798be8b5f57f197700bb86765b44vboxsync $(PATH_BIN)/VBoxXPCOM$(VBOX_SUFF_DLL)
5828e9d7f59d4682a58585195d67153abdabacfcvboxsync
e86b61a73c007051e5d85795d3f533fdf10f38a0vboxsync#VBoxJXpcom_ORDERDEPS = $(VBOX_JXPCOM_GENH)
5828e9d7f59d4682a58585195d67153abdabacfcvboxsync
5828e9d7f59d4682a58585195d67153abdabacfcvboxsyncDLLS += VBoxJXpcom
5828e9d7f59d4682a58585195d67153abdabacfcvboxsync
d69930a3cf6b803abb7b78052fed26021afbc602vboxsyncifndef VBOX_WITH_JAVA_SUPPORT_IN_XPIDL
d69930a3cf6b803abb7b78052fed26021afbc602vboxsyncif 1
d69930a3cf6b803abb7b78052fed26021afbc602vboxsync #
d69930a3cf6b803abb7b78052fed26021afbc602vboxsync # genjifaces - using VBoxXPCOM and associates.
d69930a3cf6b803abb7b78052fed26021afbc602vboxsync #
d69930a3cf6b803abb7b78052fed26021afbc602vboxsync PROGRAMS += genjifaces
d69930a3cf6b803abb7b78052fed26021afbc602vboxsync TEMPLATE_XPCOMEXEBLD = XPCOM Build executable
d69930a3cf6b803abb7b78052fed26021afbc602vboxsync TEMPLATE_XPCOMEXEBLD_EXTENDS = XPCOMBLDPROG
d69930a3cf6b803abb7b78052fed26021afbc602vboxsync TEMPLATE_XPCOMEXEBLD_EXTENDS_BY = appending
d69930a3cf6b803abb7b78052fed26021afbc602vboxsync TEMPLATE_XPCOMEXEBLD_CXXFLAGS = $(TEMPLATE_XPCOM_CXXFLAGS)
d69930a3cf6b803abb7b78052fed26021afbc602vboxsync TEMPLATE_XPCOMEXEBLD_INCS = \
d69930a3cf6b803abb7b78052fed26021afbc602vboxsync $(TEMPLATE_XPCOM_INCS) \
d69930a3cf6b803abb7b78052fed26021afbc602vboxsync $(VBOX_PATH_XPCOM_SRC) \
d69930a3cf6b803abb7b78052fed26021afbc602vboxsync $(VBOX_PATH_XPCOM_SRC)/xpcom/build \
d69930a3cf6b803abb7b78052fed26021afbc602vboxsync $(VBOX_PATH_XPCOM_SRC)/xpcom/ds
d69930a3cf6b803abb7b78052fed26021afbc602vboxsync TEMPLATE_XPCOMEXEBLD_DEFS = VBOX_WITH_XPCOM
d69930a3cf6b803abb7b78052fed26021afbc602vboxsync TEMPLATE_XPCOMEXEBLD_LIBS = $(VBoxXPCOM_LIBS) $(PATH_LIB)/VBoxCOM$(VBOX_SUFF_LIB)
63405971350d5cc0efe5f322bf782a1c29838c74vboxsync # This is OK on Linux even with hardening
63405971350d5cc0efe5f322bf782a1c29838c74vboxsync TEMPLATE_XPCOMEXEBLD_LIBS.linux = $(PATH_BIN)/VBoxXPCOM$(VBOX_SUFF_DLL)
d69930a3cf6b803abb7b78052fed26021afbc602vboxsync TEMPLATE_XPCOMEXEBLD_INCS.darwin = $(TEMPLATE_XPCOM_INCS.darwin)
63405971350d5cc0efe5f322bf782a1c29838c74vboxsync TEMPLATE_XPCOMEXEBLD_LDFLAGS.darwin = \
63405971350d5cc0efe5f322bf782a1c29838c74vboxsync -framework CoreServices \
63405971350d5cc0efe5f322bf782a1c29838c74vboxsync -framework CoreFoundation \
63405971350d5cc0efe5f322bf782a1c29838c74vboxsync -framework Foundation \
63405971350d5cc0efe5f322bf782a1c29838c74vboxsync -framework AppKit \
63405971350d5cc0efe5f322bf782a1c29838c74vboxsync -framework Carbon
827d97355f09240dfc41f4cd46ef1bd8391a32dbvboxsync TEMPLATE_XPCOMEXEBLD_LDFLAGS.linux = '$(VBOX_GCC_RPATH_OPT)$$(VBOX_ORIGIN)'
0cc77e36e179cad0d6a745df63cf232b63e5f9bcvboxsync
d69930a3cf6b803abb7b78052fed26021afbc602vboxsync ifeq ($(KBUILD_TARGET),darwin)
d69930a3cf6b803abb7b78052fed26021afbc602vboxsync define preprocess_exebld
d69930a3cf6b803abb7b78052fed26021afbc602vboxsync $(shell install_name_tool -change $(VBOX_DYLD_EXECUTABLE_PATH)/VBoxRT.dylib $(PATH_BIN)/VBoxRT.dylib $(1))
d69930a3cf6b803abb7b78052fed26021afbc602vboxsync endef
d69930a3cf6b803abb7b78052fed26021afbc602vboxsync else
d69930a3cf6b803abb7b78052fed26021afbc602vboxsync define preprocess_exebld
d69930a3cf6b803abb7b78052fed26021afbc602vboxsync endef
d69930a3cf6b803abb7b78052fed26021afbc602vboxsync endif
d69930a3cf6b803abb7b78052fed26021afbc602vboxsync
d69930a3cf6b803abb7b78052fed26021afbc602vboxsync genjifaces_TEMPLATE = XPCOMEXEBLD
d69930a3cf6b803abb7b78052fed26021afbc602vboxsync genjifaces_INCS = \
d69930a3cf6b803abb7b78052fed26021afbc602vboxsync src
d69930a3cf6b803abb7b78052fed26021afbc602vboxsync genjifaces_DEFS = \
63405971350d5cc0efe5f322bf782a1c29838c74vboxsync EXPORT_XPTI_API \
d69930a3cf6b803abb7b78052fed26021afbc602vboxsync EXPORT_XPT_API
8ec3da5b3a4d49bbfa31886ed3ff20e4f1dee2a4vboxsync
d69930a3cf6b803abb7b78052fed26021afbc602vboxsync genjifaces_SOURCES = \
63405971350d5cc0efe5f322bf782a1c29838c74vboxsync ../xpcom/build/nsStringAPI.cpp \
d69930a3cf6b803abb7b78052fed26021afbc602vboxsync ../xpcom/build/nsXPComInit.cpp \
d69930a3cf6b803abb7b78052fed26021afbc602vboxsync tools/genifaces/GenerateJavaInterfaces.cpp \
d69930a3cf6b803abb7b78052fed26021afbc602vboxsync src/nsFileStreams.cpp
d69930a3cf6b803abb7b78052fed26021afbc602vboxsync genjifaces_INST = $(INST_BIN)
d69930a3cf6b803abb7b78052fed26021afbc602vboxsync genjifaces_DEPS = $(PATH_TARGET)/VBox-xpcom-idl-timestamp
d69930a3cf6b803abb7b78052fed26021afbc602vboxsync GENJIFACES_BIN := $(PATH_BIN)/genjifaces$(HOSTSUFF_EXE)
d69930a3cf6b803abb7b78052fed26021afbc602vboxsync
d69930a3cf6b803abb7b78052fed26021afbc602vboxsyncelse
d69930a3cf6b803abb7b78052fed26021afbc602vboxsync #
d69930a3cf6b803abb7b78052fed26021afbc602vboxsync # genjifaces - as a build program. Eventually we should probably do it this way,
d69930a3cf6b803abb7b78052fed26021afbc602vboxsync # unless the xpidl hack is preferred instead.
d69930a3cf6b803abb7b78052fed26021afbc602vboxsync #
d69930a3cf6b803abb7b78052fed26021afbc602vboxsync BLDPROGS += genjifaces
d69930a3cf6b803abb7b78052fed26021afbc602vboxsync genjifaces_TEMPLATE = XPCOMBLDPROG
d69930a3cf6b803abb7b78052fed26021afbc602vboxsync genjifaces_DEFS = \
d69930a3cf6b803abb7b78052fed26021afbc602vboxsync EXPORT_XPTI_API \
d69930a3cf6b803abb7b78052fed26021afbc602vboxsync EXPORT_XPT_API \
d69930a3cf6b803abb7b78052fed26021afbc602vboxsync VBOX_WITH_XPCOM \
d69930a3cf6b803abb7b78052fed26021afbc602vboxsync _IMPL_NS_COM \
d69930a3cf6b803abb7b78052fed26021afbc602vboxsync XPCOM_GLUE \
d69930a3cf6b803abb7b78052fed26021afbc602vboxsync XPCOM_GLUE_NO_DYNAMIC_LOADING \
d69930a3cf6b803abb7b78052fed26021afbc602vboxsync $(filter-out VBOX_USE_IPRT_IN_NSPR,$(VBox-xpcom-nspr_DEFS))
d69930a3cf6b803abb7b78052fed26021afbc602vboxsync genjifaces_DEFS.$(KBUILD_HOST) += \
d69930a3cf6b803abb7b78052fed26021afbc602vboxsync $(VBox-xpcom-nspr_DEFS.$(KBUILD_HOST))
d69930a3cf6b803abb7b78052fed26021afbc602vboxsync genjifaces_DEFS.$(KBUILD_HOST).$(KBUILD_HOST_ARCH) += \
d69930a3cf6b803abb7b78052fed26021afbc602vboxsync $(VBox-xpcom-nspr_DEFS.$(KBUILD_HOST).$(KBUILD_HOST_ARCH))
d69930a3cf6b803abb7b78052fed26021afbc602vboxsync genjifaces_DEFPATH := $(abspath $(PATH_SUB_CURRENT)/..)
d69930a3cf6b803abb7b78052fed26021afbc602vboxsync genjifaces_INCS = \
d69930a3cf6b803abb7b78052fed26021afbc602vboxsync java/src
d69930a3cf6b803abb7b78052fed26021afbc602vboxsync genjifaces_INCS += \
d69930a3cf6b803abb7b78052fed26021afbc602vboxsync $(TEMPLATE_XPCOM_INCS) \
d69930a3cf6b803abb7b78052fed26021afbc602vboxsync $(VBox-xpcom-nspr_INCS) \
d69930a3cf6b803abb7b78052fed26021afbc602vboxsync genjifaces_INCS.$(KBUILD_HOST) += \
d69930a3cf6b803abb7b78052fed26021afbc602vboxsync $(TEMPLATE_XPCOM_INCS.$(KBUILD_HOST)) \
d69930a3cf6b803abb7b78052fed26021afbc602vboxsync $(VBox-xpcom-nspr_INCS.$(KBUILD_HOST))
d69930a3cf6b803abb7b78052fed26021afbc602vboxsync genjifaces_SOURCES = \
d69930a3cf6b803abb7b78052fed26021afbc602vboxsync java/tools/genifaces/GenerateJavaInterfaces.cpp \
d69930a3cf6b803abb7b78052fed26021afbc602vboxsync java/src/nsFileStreams.cpp
d69930a3cf6b803abb7b78052fed26021afbc602vboxsync genjifaces_SOURCES += \
d69930a3cf6b803abb7b78052fed26021afbc602vboxsync xpcom/build/nsXPComInit.cpp \
d69930a3cf6b803abb7b78052fed26021afbc602vboxsync xpcom/build/nsStringAPI.cpp \
d69930a3cf6b803abb7b78052fed26021afbc602vboxsync $(VBox-xpcom-string_SOURCES) \
d69930a3cf6b803abb7b78052fed26021afbc602vboxsync $(VBox-xpcom-base_SOURCES) \
d69930a3cf6b803abb7b78052fed26021afbc602vboxsync $(VBox-xpcom-ds_SOURCES) \
d69930a3cf6b803abb7b78052fed26021afbc602vboxsync $(VBox-xpcom-threads_SOURCES) \
d69930a3cf6b803abb7b78052fed26021afbc602vboxsync xpcom/io/nsNativeCharsetUtils.cpp \
d69930a3cf6b803abb7b78052fed26021afbc602vboxsync xpcom/io/nsUnicharInputStream.cpp \
d69930a3cf6b803abb7b78052fed26021afbc602vboxsync \
d69930a3cf6b803abb7b78052fed26021afbc602vboxsync $(VBox-xpcom-nspr_SOURCES) \
d69930a3cf6b803abb7b78052fed26021afbc602vboxsync \
d69930a3cf6b803abb7b78052fed26021afbc602vboxsync $(VBoxXPCOMGlue_COMMON_SOURCES) \
d69930a3cf6b803abb7b78052fed26021afbc602vboxsync xpcom/glue/standalone/nsXPCOMGlue.cpp \
d69930a3cf6b803abb7b78052fed26021afbc602vboxsync xpcom/glue/standalone/nsGREDirServiceProvider.cpp
d69930a3cf6b803abb7b78052fed26021afbc602vboxsync genjifaces_LDFLAGS.darwin = \
d69930a3cf6b803abb7b78052fed26021afbc602vboxsync -framework CoreServices \
d69930a3cf6b803abb7b78052fed26021afbc602vboxsync -framework CoreFoundation \
d69930a3cf6b803abb7b78052fed26021afbc602vboxsync -framework Foundation \
d69930a3cf6b803abb7b78052fed26021afbc602vboxsync -framework AppKit \
d69930a3cf6b803abb7b78052fed26021afbc602vboxsync -framework Carbon
d69930a3cf6b803abb7b78052fed26021afbc602vboxsync genjifaces_DEPS = $(PATH_TARGET)/VBox-xpcom-idl-timestamp
d69930a3cf6b803abb7b78052fed26021afbc602vboxsyncendif
d69930a3cf6b803abb7b78052fed26021afbc602vboxsyncendif # !VBOX_WITH_JAVA_SUPPORT_IN_XPIDL
5828e9d7f59d4682a58585195d67153abdabacfcvboxsync
5828e9d7f59d4682a58585195d67153abdabacfcvboxsync#
5828e9d7f59d4682a58585195d67153abdabacfcvboxsync# Install JAR files
5828e9d7f59d4682a58585195d67153abdabacfcvboxsync#
5828e9d7f59d4682a58585195d67153abdabacfcvboxsyncINSTALLS += VBoxJXpcom-inst-jar
5828e9d7f59d4682a58585195d67153abdabacfcvboxsync
5828e9d7f59d4682a58585195d67153abdabacfcvboxsyncVBOX_JXPCOM_JAR = $(VBOX_JXPCOM_TARGET)/vboxjxpcom.jar
5828e9d7f59d4682a58585195d67153abdabacfcvboxsyncVBOX_JXPCOM_JSRC = $(VBOX_JXPCOM_SRC)/src/org/mozilla/xpcom
5828e9d7f59d4682a58585195d67153abdabacfcvboxsyncVBOX_JXPCOM_JGEN = $(PATH_TARGET)/vboxjgen
5828e9d7f59d4682a58585195d67153abdabacfcvboxsync
5828e9d7f59d4682a58585195d67153abdabacfcvboxsyncVBoxJXpcom-inst-jar_INST = $(INST_SDK)bindings/xpcom/java
5828e9d7f59d4682a58585195d67153abdabacfcvboxsyncVBoxJXpcom-inst-jar_SOURCES = $(VBOX_JXPCOM_JAR)
5828e9d7f59d4682a58585195d67153abdabacfcvboxsync
5828e9d7f59d4682a58585195d67153abdabacfcvboxsyncJXPCOM_JAR_SRC= $(VBOX_JXPCOM_JSRC)/IXPCOM.java \
5828e9d7f59d4682a58585195d67153abdabacfcvboxsync $(VBOX_JXPCOM_JSRC)/Mozilla.java \
5828e9d7f59d4682a58585195d67153abdabacfcvboxsync $(VBOX_JXPCOM_JSRC)/VersionComparator.java \
5828e9d7f59d4682a58585195d67153abdabacfcvboxsync $(VBOX_JXPCOM_JSRC)/GREVersionRange.java \
5828e9d7f59d4682a58585195d67153abdabacfcvboxsync $(VBOX_JXPCOM_JSRC)/IAppFileLocProvider.java \
5828e9d7f59d4682a58585195d67153abdabacfcvboxsync $(VBOX_JXPCOM_JSRC)/ProfileLock.java \
5828e9d7f59d4682a58585195d67153abdabacfcvboxsync $(VBOX_JXPCOM_JSRC)/IGRE.java \
5828e9d7f59d4682a58585195d67153abdabacfcvboxsync $(VBOX_JXPCOM_JSRC)/IJavaXPCOMUtils.java \
5828e9d7f59d4682a58585195d67153abdabacfcvboxsync $(VBOX_JXPCOM_JSRC)/XPCOMException.java \
5828e9d7f59d4682a58585195d67153abdabacfcvboxsync $(VBOX_JXPCOM_JSRC)/IMozilla.java \
5828e9d7f59d4682a58585195d67153abdabacfcvboxsync $(VBOX_JXPCOM_JSRC)/XPCOMInitializationException.java \
5828e9d7f59d4682a58585195d67153abdabacfcvboxsync $(VBOX_JXPCOM_JSRC)/INIParser.java \
5828e9d7f59d4682a58585195d67153abdabacfcvboxsync $(VBOX_JXPCOM_JSRC)/internal/GREImpl.java \
5828e9d7f59d4682a58585195d67153abdabacfcvboxsync $(VBOX_JXPCOM_JSRC)/internal/JavaXPCOMMethods.java \
5828e9d7f59d4682a58585195d67153abdabacfcvboxsync $(VBOX_JXPCOM_JSRC)/internal/MozillaImpl.java \
5828e9d7f59d4682a58585195d67153abdabacfcvboxsync $(VBOX_JXPCOM_JSRC)/internal/XPCOMImpl.java \
5828e9d7f59d4682a58585195d67153abdabacfcvboxsync $(VBOX_JXPCOM_JSRC)/internal/XPCOMJavaProxyBase.java \
5828e9d7f59d4682a58585195d67153abdabacfcvboxsync $(VBOX_JXPCOM_JSRC)/internal/XPCOMJavaProxy.java
5828e9d7f59d4682a58585195d67153abdabacfcvboxsync
d69930a3cf6b803abb7b78052fed26021afbc602vboxsyncifndef VBOX_WITH_JAVA_SUPPORT_IN_XPIDL
5828e9d7f59d4682a58585195d67153abdabacfcvboxsyncVBOX_JXPCOM_GEN = $(VBOX_JXPCOM_TARGET)/jxpcomgen
d69930a3cf6b803abb7b78052fed26021afbc602vboxsyncelse
d69930a3cf6b803abb7b78052fed26021afbc602vboxsyncVBOX_JXPCOM_GEN = $(VBOX_JXPCOM_TARGET)/jxpcomgen-idl
d69930a3cf6b803abb7b78052fed26021afbc602vboxsyncendif
5828e9d7f59d4682a58585195d67153abdabacfcvboxsync
5828e9d7f59d4682a58585195d67153abdabacfcvboxsyncVBOX_JXPCOM_NSERROR = $(VBOX_JXPCOM_GEN)/java/XPCOMError.java
5828e9d7f59d4682a58585195d67153abdabacfcvboxsyncVBOX_JXPCOM_MGR = $(VBOX_JXPCOM_SRC)/src/org/virtualbox/VirtualBoxManager.java
5828e9d7f59d4682a58585195d67153abdabacfcvboxsync
5828e9d7f59d4682a58585195d67153abdabacfcvboxsync$(VBOX_JXPCOM_GENH): $(VBOX_JXPCOM_JAR)
5828e9d7f59d4682a58585195d67153abdabacfcvboxsync $(VBOX_JAVAH) -classpath $(VBOX_JXPCOM_JDEST) -d $(VBOX_JXPCOM_JDEST) \
5828e9d7f59d4682a58585195d67153abdabacfcvboxsync org.mozilla.xpcom.internal.XPCOMImpl \
5828e9d7f59d4682a58585195d67153abdabacfcvboxsync org.mozilla.xpcom.internal.GREImpl \
5828e9d7f59d4682a58585195d67153abdabacfcvboxsync org.mozilla.xpcom.internal.MozillaImpl \
5828e9d7f59d4682a58585195d67153abdabacfcvboxsync org.mozilla.xpcom.internal.XPCOMJavaProxy \
5828e9d7f59d4682a58585195d67153abdabacfcvboxsync org.mozilla.xpcom.ProfileLock \
5828e9d7f59d4682a58585195d67153abdabacfcvboxsync org.mozilla.xpcom.internal.JavaXPCOMMethods
5828e9d7f59d4682a58585195d67153abdabacfcvboxsync
5828e9d7f59d4682a58585195d67153abdabacfcvboxsync$(VBOX_JXPCOM_GEN)/java:
5828e9d7f59d4682a58585195d67153abdabacfcvboxsync $(QUIET)$(MKDIR) -p $(VBOX_JXPCOM_GEN)/java
5828e9d7f59d4682a58585195d67153abdabacfcvboxsync
d69930a3cf6b803abb7b78052fed26021afbc602vboxsync$(VBOX_JXPCOM_NSERROR): $(VBOX_PATH_XPCOM_SRC)/xpcom/base/nsError.h $(VBOX_JXPCOM_SRC)/tools/gen-nsError.pl | $(VBOX_JXPCOM_GEN)/java
5828e9d7f59d4682a58585195d67153abdabacfcvboxsync perl $(VBOX_JXPCOM_SRC)/tools/gen-nsError.pl < $< > $@
5828e9d7f59d4682a58585195d67153abdabacfcvboxsync
d69930a3cf6b803abb7b78052fed26021afbc602vboxsyncifndef VBOX_WITH_JAVA_SUPPORT_IN_XPIDL
63405971350d5cc0efe5f322bf782a1c29838c74vboxsyncVBOX_TEMP_HOME=$(shell echo /tmp/vboxhome$$$$)
d69930a3cf6b803abb7b78052fed26021afbc602vboxsync$(VBOX_JXPCOM_GEN)/jxpcomgen.list: $(GENJIFACES_BIN) $(PATH_TARGET)/VBox-xpcom-xpt-files/VBoxXPCOMBase.xpt | $(VBOX_JXPCOM_GEN)/java
5828e9d7f59d4682a58585195d67153abdabacfcvboxsync $(QUIET)echo Generating Java interface files
8ec3da5b3a4d49bbfa31886ed3ff20e4f1dee2a4vboxsync $(call preprocess_exebld,$(GENJIFACES_BIN))
63405971350d5cc0efe5f322bf782a1c29838c74vboxsync $(QUIET) $(MKDIR) -p $(VBOX_TEMP_HOME)
63405971350d5cc0efe5f322bf782a1c29838c74vboxsync VBOX_USER_HOME=$(VBOX_TEMP_HOME) $(GENJIFACES_BIN) -d $(VBOX_JXPCOM_GEN)/java
63405971350d5cc0efe5f322bf782a1c29838c74vboxsync $(QUIET) rm -rf $(VBOX_TEMP_HOME)
5828e9d7f59d4682a58585195d67153abdabacfcvboxsync $(QUIET)echo $$(ls $(VBOX_JXPCOM_GEN)/java/*.java) > $@
d69930a3cf6b803abb7b78052fed26021afbc602vboxsyncelse # VBOX_WITH_JAVA_SUPPORT_IN_XPIDL
d69930a3cf6b803abb7b78052fed26021afbc602vboxsync## @todo this doesn't work properly as a sub-makefile yet (XPIDL_INCS, XPCOM_IDLFILES).
d69930a3cf6b803abb7b78052fed26021afbc602vboxsync$(VBOX_JXPCOM_GEN)/jxpcomgen.list: \
d69930a3cf6b803abb7b78052fed26021afbc602vboxsync $(VBOX_PATH_SDK)/bindings/xpcom/idl/VirtualBox_XPCOM.idl \
d69930a3cf6b803abb7b78052fed26021afbc602vboxsync $$(XPCOM_IDLFILES) \
d69930a3cf6b803abb7b78052fed26021afbc602vboxsync $(VBOX_XPIDL) \
d69930a3cf6b803abb7b78052fed26021afbc602vboxsync | $(VBOX_JXPCOM_GEN)/java
d69930a3cf6b803abb7b78052fed26021afbc602vboxsync $(call MSG_L1,Generating Java interface files from IDL)
d69930a3cf6b803abb7b78052fed26021afbc602vboxsync $(QUIET)$(RM) -f $(filter-out %/XPCOMError.java, $(wildcard $(VBOX_JXPCOM_GEN)/java/*.java))
d69930a3cf6b803abb7b78052fed26021afbc602vboxsync $(foreach idl, $(VBOX_PATH_SDK)/bindings/xpcom/idl/VirtualBox_XPCOM.idl $(XPCOM_IDLFILES)\
d69930a3cf6b803abb7b78052fed26021afbc602vboxsync , $(NLTAB)$(TARGET_xpidl) -m java $(XPIDL_INCS) -e $(VBOX_JXPCOM_GEN)/java/$(basename $(notdir $(idl))).java $(idl) )
4724d1f258d4beb2e28dda6ab3b6ce18b59ca4fdvboxsync $(ECHO_EXT) $(VBOX_JXPCOM_GEN)/java/*.java > $@
d69930a3cf6b803abb7b78052fed26021afbc602vboxsyncendif # VBOX_WITH_JAVA_SUPPORT_IN_XPIDL
5828e9d7f59d4682a58585195d67153abdabacfcvboxsync
5828e9d7f59d4682a58585195d67153abdabacfcvboxsync$(VBOX_JXPCOM_JAR): $(JXPCOM_JAR_SRC) $(VBOX_JXPCOM_GEN)/jxpcomgen.list $(VBOX_JXPCOM_NSERROR) $(VBOX_JXPCOM_MGR)
5828e9d7f59d4682a58585195d67153abdabacfcvboxsync $(QUIET)$(RM) -Rf $(VBOX_JXPCOM_JDEST)
5828e9d7f59d4682a58585195d67153abdabacfcvboxsync $(QUIET)$(MKDIR) -p $(VBOX_JXPCOM_JDEST)
5828e9d7f59d4682a58585195d67153abdabacfcvboxsync $(VBOX_JAVAC) @$ $(VBOX_JXPCOM_GEN)/jxpcomgen.list \
5828e9d7f59d4682a58585195d67153abdabacfcvboxsync -d $(VBOX_JXPCOM_JDEST) -classpath $(VBOX_JXPCOM_JDEST)
d69930a3cf6b803abb7b78052fed26021afbc602vboxsync $(VBOX_JAVAC) $(JXPCOM_JAR_SRC) \
5828e9d7f59d4682a58585195d67153abdabacfcvboxsync $(VBOX_JXPCOM_NSERROR) $(VBOX_JXPCOM_MGR) \
5828e9d7f59d4682a58585195d67153abdabacfcvboxsync -d $(VBOX_JXPCOM_JDEST) -classpath $(VBOX_JXPCOM_JDEST)
5828e9d7f59d4682a58585195d67153abdabacfcvboxsync $(VBOX_JAR) cf $@ -C $(VBOX_JXPCOM_TARGET)/jdest .
5828e9d7f59d4682a58585195d67153abdabacfcvboxsync
63405971350d5cc0efe5f322bf782a1c29838c74vboxsyncelse # VBOX_ONLY_SDK
5828e9d7f59d4682a58585195d67153abdabacfcvboxsync #
5828e9d7f59d4682a58585195d67153abdabacfcvboxsync # Install sample code.
5828e9d7f59d4682a58585195d67153abdabacfcvboxsync #
5828e9d7f59d4682a58585195d67153abdabacfcvboxsync INSTALLS += jxpcomsample
5828e9d7f59d4682a58585195d67153abdabacfcvboxsync jxpcomsample_INST = $(INST_SDK)bindings/xpcom/java
5828e9d7f59d4682a58585195d67153abdabacfcvboxsync jxpcomsample_MODE = a+rx,u+w
5828e9d7f59d4682a58585195d67153abdabacfcvboxsync jxpcomsample_SOURCES = \
5828e9d7f59d4682a58585195d67153abdabacfcvboxsync tests/TestVBox.java=>samples/TestVBox.java \
4bb958832c4a30a04071f1c518cf3b06a52498cfvboxsync tests/Makefile=>samples/Makefile
63405971350d5cc0efe5f322bf782a1c29838c74vboxsyncendif # VBOX_ONLY_SDK
5828e9d7f59d4682a58585195d67153abdabacfcvboxsync
5828e9d7f59d4682a58585195d67153abdabacfcvboxsyncinclude $(KBUILD_PATH)/subfooter.kmk