Makefile.kmk revision 59e30364f54880dd846c263711a2506d1182b1b5
5eda82e218d35ae0691febd531e1bfc0324cc4a6vboxsync# Sub-Makefile for the VBox web service.
5856c5b39318bc766ccd6f823f1349c80a3dcfaavboxsync# Warning! This is a seriously complicated makefile!
5856c5b39318bc766ccd6f823f1349c80a3dcfaavboxsync# Copyright (C) 2006-2012 Oracle Corporation
5856c5b39318bc766ccd6f823f1349c80a3dcfaavboxsync# This file is part of VirtualBox Open Source Edition (OSE), as
5856c5b39318bc766ccd6f823f1349c80a3dcfaavboxsync# available from http://www.virtualbox.org. This file is free software;
5856c5b39318bc766ccd6f823f1349c80a3dcfaavboxsync# you can redistribute it and/or modify it under the terms of the GNU
5856c5b39318bc766ccd6f823f1349c80a3dcfaavboxsync# General Public License (GPL) as published by the Free Software
5856c5b39318bc766ccd6f823f1349c80a3dcfaavboxsync# Foundation, in version 2 as it comes in the "COPYING" file of the
5856c5b39318bc766ccd6f823f1349c80a3dcfaavboxsync# VirtualBox OSE distribution. VirtualBox OSE is distributed in the
8f22303f06a6aeb6f4e186f9db1492ec13d9fcecvboxsync# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
8f22303f06a6aeb6f4e186f9db1492ec13d9fcecvboxsync# Define VBOX_GSOAP_INSTALLED to something if you have gSOAP's
8f22303f06a6aeb6f4e186f9db1492ec13d9fcecvboxsync# "wsdl2h" and "soapcpp2" executables on your PATH somewhere.
8f22303f06a6aeb6f4e186f9db1492ec13d9fcecvboxsync# Here's an overview how all this works. It's complicated. Essentially,
5856c5b39318bc766ccd6f823f1349c80a3dcfaavboxsync# lots of files get generated automatically from our XML XIDL file that
5856c5b39318bc766ccd6f823f1349c80a3dcfaavboxsync# describes the VirtualBox API (../idl/VirtualBox.xidl); as a result,
54c3620994786a33db473956c4e6c3c7d94ab695vboxsync# no manual coding is necessary when the API changes. All generated
5eda82e218d35ae0691febd531e1bfc0324cc4a6vboxsync# web service code gets adjusted automatically.
54c3620994786a33db473956c4e6c3c7d94ab695vboxsync# In more detail:
5856c5b39318bc766ccd6f823f1349c80a3dcfaavboxsync# 1) We use xsltproc and websrv-wsdl.xsl to generate a WSDL file from
54c3620994786a33db473956c4e6c3c7d94ab695vboxsync# our XML IDL file. WSDL (Web Service Description language) is an XML
54c3620994786a33db473956c4e6c3c7d94ab695vboxsync# industry standard that publicly describes a web service.
54c3620994786a33db473956c4e6c3c7d94ab695vboxsync# So, the WSDL generated here describes the VirtualBox web
54c3620994786a33db473956c4e6c3c7d94ab695vboxsync# service to third-party clients; for example, one can feed it to
54c3620994786a33db473956c4e6c3c7d94ab695vboxsync# Java or Perl or some other toolkit that understands WSDL and thus
54c3620994786a33db473956c4e6c3c7d94ab695vboxsync# easily write a short script that connects to the web service properly.
54c3620994786a33db473956c4e6c3c7d94ab695vboxsync# This WSDL file ends up in $(VBOXWEB_OUT_DIR)/vboxweb.wsdl.
54c3620994786a33db473956c4e6c3c7d94ab695vboxsync# 2) We use xsltproc and websrv-wsdl2gsoapH.xsl to generate a so-called
54c3620994786a33db473956c4e6c3c7d94ab695vboxsync# "gSoap header file": $(VBOXWEB_OUT_DIR)/gsoapH_from_xslt.h from
54c3620994786a33db473956c4e6c3c7d94ab695vboxsync# the WSDL previously generated.
54c3620994786a33db473956c4e6c3c7d94ab695vboxsync# This file looks like a C header file, but really isn't meant
1003ebeb480229ce94b8f381fbd03412f844b193vboxsync# to be included by a C compiler. Instead, it just happens to be the
1003ebeb480229ce94b8f381fbd03412f844b193vboxsync# format that gSOAP uses to specify SOAP interfaces instead of WSDL.
54c3620994786a33db473956c4e6c3c7d94ab695vboxsync# (The reason for this appears to be that gSOAP predates WSDL and
54c3620994786a33db473956c4e6c3c7d94ab695vboxsync# thus needed some format to describe the syntax of a web service.)
54c3620994786a33db473956c4e6c3c7d94ab695vboxsync# Note that gSOAP now also comes with its own WSDL-to-gsoap.h converter,
54c3620994786a33db473956c4e6c3c7d94ab695vboxsync# but the readme mentions some funny license restrictions, so instead we
54c3620994786a33db473956c4e6c3c7d94ab695vboxsync# have our own converter in XSLT.
54c3620994786a33db473956c4e6c3c7d94ab695vboxsync# 3) We then feed that pseudo-header file to gSOAP's soapcpp2 compiler,
54c3620994786a33db473956c4e6c3c7d94ab695vboxsync# which generates a ton of files in $(VBOXWEB_OUT_DIR), most importantly:
54c3620994786a33db473956c4e6c3c7d94ab695vboxsync# SOAP_CLIENT_H = $(VBOXWEB_OUT_DIR)/soapStub.h (header file for webservice clients)
54c3620994786a33db473956c4e6c3c7d94ab695vboxsync# SOAP_SERVER_H = $(VBOXWEB_OUT_DIR)/soapH.h (header file for webservice servers)
54c3620994786a33db473956c4e6c3c7d94ab695vboxsync# These are "real" header files that one can use to program a) a webservice client
54c3620994786a33db473956c4e6c3c7d94ab695vboxsync# and b) a webservice server. Of course to build b) one will have to write method
54c3620994786a33db473956c4e6c3c7d94ab695vboxsync# implementations with useful code that does something. This is where more
54c3620994786a33db473956c4e6c3c7d94ab695vboxsync# code generation via XSLT comes in:
54c3620994786a33db473956c4e6c3c7d94ab695vboxsync# 4) We use xsltproc to generate tons of C++ code directly from the XIDL that
54c3620994786a33db473956c4e6c3c7d94ab695vboxsync# maps each SOAP method to our COM methods. This large C++ file is
54c3620994786a33db473956c4e6c3c7d94ab695vboxsync# $(VBOXWEB_OUT_DIR)/methodmaps.cpp. The actual webservice executable (vboxwebsrv,
54c3620994786a33db473956c4e6c3c7d94ab695vboxsync# which acts as an HTTP server) is composed of this file, plus hard-coded
54c3620994786a33db473956c4e6c3c7d94ab695vboxsync# method implementations in vboxweb.cpp, plus gSOAP library code for the HTTP
1003ebeb480229ce94b8f381fbd03412f844b193vboxsyncSUB_DEPTH = ../../../..
1003ebeb480229ce94b8f381fbd03412f844b193vboxsyncinclude $(KBUILD_PATH)/subheader.kmk
1003ebeb480229ce94b8f381fbd03412f844b193vboxsync# Find the gSOAP toolkit.
54c3620994786a33db473956c4e6c3c7d94ab695vboxsync# Note! We're not using the gSOAP toolkit correctly. The main issue is that
54c3620994786a33db473956c4e6c3c7d94ab695vboxsync# compiling soapcpp2.cpp instead of using the library. So, in order
54c3620994786a33db473956c4e6c3c7d94ab695vboxsync# to make this work with a locally installed gSOAP toolkit there are
54c3620994786a33db473956c4e6c3c7d94ab695vboxsync# some hoops to jump thru to say the least... Shipping soapcpp2.cpp/h
54c3620994786a33db473956c4e6c3c7d94ab695vboxsync# is out of the question without also including the two soap tools.
54c3620994786a33db473956c4e6c3c7d94ab695vboxsync# Some observations on distros for OSE / configure:
54c3620994786a33db473956c4e6c3c7d94ab695vboxsync# The proposed gentoo ebuild screws up several things in the install phase
54c3620994786a33db473956c4e6c3c7d94ab695vboxsync# and thus fails to ship stdsoap2.cpp and relatives.
54c3620994786a33db473956c4e6c3c7d94ab695vboxsync# debian (2.7.9l-0.2) stuffs stdsoap2.cpp and a handful of the import files
54c3620994786a33db473956c4e6c3c7d94ab695vboxsync# fedora (2.7.12-fc10.x86_64) uses the default install layout and does not
54c3620994786a33db473956c4e6c3c7d94ab695vboxsync# ship stdsoap2.cpp and friends.
54c3620994786a33db473956c4e6c3c7d94ab695vboxsyncifeq ($(VBOX_GSOAP_INSTALLED),)
54c3620994786a33db473956c4e6c3c7d94ab695vboxsync VBOX_GSOAP_INSTALLED = 1
54c3620994786a33db473956c4e6c3c7d94ab695vboxsync VBOX_PATH_GSOAP := $(lastword $(sort $(wildcard $(KBUILD_DEVTOOLS)/common/gsoap/*)))
54c3620994786a33db473956c4e6c3c7d94ab695vboxsync ifeq ($(VBOX_PATH_GSOAP),)
54c3620994786a33db473956c4e6c3c7d94ab695vboxsync VBOX_PATH_GSOAP := $(lastword $(sort $(wildcard $(KBUILD_DEVTOOLS_HST)/gsoap/*)))
54c3620994786a33db473956c4e6c3c7d94ab695vboxsync if "$(VBOX_PATH_GSOAP)" == "" && defined(KBUILD_DEVTOOLS_HST)
54c3620994786a33db473956c4e6c3c7d94ab695vboxsync VBOX_PATH_GSOAP := $(lastword $(sort $(wildcard $(KBUILD_DEVTOOLS_HST_ALT)/gsoap/*)))
54c3620994786a33db473956c4e6c3c7d94ab695vboxsync ifeq ($(VBOX_PATH_GSOAP),)
54c3620994786a33db473956c4e6c3c7d94ab695vboxsync $(warning VBOX_PATH_GSOAP not found...)
54c3620994786a33db473956c4e6c3c7d94ab695vboxsync VBOX_GSOAP_INSTALLED =
54c3620994786a33db473956c4e6c3c7d94ab695vboxsync VBOX_PATH_GSOAP := $(VBOX_PATH_GSOAP)
54c3620994786a33db473956c4e6c3c7d94ab695vboxsyncVBOX_PATH_GSOAP_BIN := $(strip $(VBOX_PATH_GSOAP_BIN))
54c3620994786a33db473956c4e6c3c7d94ab695vboxsyncif "$(VBOX_PATH_GSOAP_BIN)" == ""
54c3620994786a33db473956c4e6c3c7d94ab695vboxsync VBOX_PATH_GSOAP_BIN := $(VBOX_PATH_GSOAP)/bin
54c3620994786a33db473956c4e6c3c7d94ab695vboxsync if "$(KBUILD_HOST)" == "darwin"
54c3620994786a33db473956c4e6c3c7d94ab695vboxsync VBOX_PATH_GSOAP_BIN := $(VBOX_PATH_GSOAP_BIN)/macosx
54c3620994786a33db473956c4e6c3c7d94ab695vboxsync else if "$(KBUILD_HOST)" == "win"
54c3620994786a33db473956c4e6c3c7d94ab695vboxsync VBOX_PATH_GSOAP_BIN := $(VBOX_PATH_GSOAP_BIN)/win32
54c3620994786a33db473956c4e6c3c7d94ab695vboxsync else if "$(KBUILD_HOST)" == "linux"
54c3620994786a33db473956c4e6c3c7d94ab695vboxsync VBOX_PATH_GSOAP_BIN := $(VBOX_PATH_GSOAP_BIN)/linux386
54c3620994786a33db473956c4e6c3c7d94ab695vboxsync else if "$(KBUILD_HOST)" == "solaris"
54c3620994786a33db473956c4e6c3c7d94ab695vboxsync if $(VBOX_SOLARIS_11_VERSION) >= 164
54c3620994786a33db473956c4e6c3c7d94ab695vboxsync VBOX_PATH_GSOAP_BIN := $(VBOX_PATH_GSOAP_BIN)/solaris11.x86
54c3620994786a33db473956c4e6c3c7d94ab695vboxsync VBOX_PATH_GSOAP_BIN := $(VBOX_PATH_GSOAP_BIN)/solaris.x86
54c3620994786a33db473956c4e6c3c7d94ab695vboxsync VBOX_PATH_GSOAP_BIN := $(VBOX_PATH_GSOAP_BIN)/$(KBUILD_HOST).x86
54c3620994786a33db473956c4e6c3c7d94ab695vboxsync if !exists($(VBOX_PATH_GSOAP_BIN))
54c3620994786a33db473956c4e6c3c7d94ab695vboxsync VBOX_PATH_GSOAP_BIN := $(VBOX_PATH_GSOAP)/bin
54c3620994786a33db473956c4e6c3c7d94ab695vboxsyncVBOX_SOAPCPP2 := $(VBOX_PATH_GSOAP_BIN)/soapcpp2$(HOSTSUFF_EXE)
1003ebeb480229ce94b8f381fbd03412f844b193vboxsyncVBOX_WSDL2H := $(VBOX_PATH_GSOAP_BIN)/wsdl2h$(HOSTSUFF_EXE)
1003ebeb480229ce94b8f381fbd03412f844b193vboxsyncVBOX_STUBMAKER = $(firstword $(which stubmaker stubmaker.pl) stubmaker_not_found)
1003ebeb480229ce94b8f381fbd03412f844b193vboxsyncVBOX_WSDL2PY = $(firstword $(which wsdl2py) wsdl2py_not_found)
54c3620994786a33db473956c4e6c3c7d94ab695vboxsyncVBOX_PATH_GSOAP_IMPORT := $(strip $(if $(VBOX_PATH_GSOAP_IMPORT),$(VBOX_PATH_GSOAP_IMPORT),$(VBOX_PATH_GSOAP)/import))
54c3620994786a33db473956c4e6c3c7d94ab695vboxsyncVBOX_GSOAP_INCS := $(strip $(if $(VBOX_GSOAP_INCS),$(VBOX_GSOAP_INCS),$(VBOX_PATH_GSOAP) $(VBOX_PATH_GSOAP_IMPORT) ))
54c3620994786a33db473956c4e6c3c7d94ab695vboxsync# note: $(if $(defined FOO)) does not work here!
54c3620994786a33db473956c4e6c3c7d94ab695vboxsyncVBOX_GSOAP_CXX_SOURCES := $(strip $(if-expr "$(origin VBOX_GSOAP_CXX_SOURCES)" != "undefined",$(VBOX_GSOAP_CXX_SOURCES),$(VBOX_PATH_GSOAP)/stdsoap2.cpp))
54c3620994786a33db473956c4e6c3c7d94ab695vboxsyncVBOX_GSOAP_CXX_LIBS := $(strip $(if-expr "$(origin VBOX_GSOAP_CXX_LIBS)" != "undefined",$(VBOX_GSOAP_CXX_LIBS),))
54c3620994786a33db473956c4e6c3c7d94ab695vboxsyncVBOXWEB_OUT_DIR := $(PATH_TARGET)/webservice
5eda82e218d35ae0691febd531e1bfc0324cc4a6vboxsyncBLDDIRS += $(VBOXWEB_OUT_DIR)
5eda82e218d35ae0691febd531e1bfc0324cc4a6vboxsync# The webservice location
54c3620994786a33db473956c4e6c3c7d94ab695vboxsyncVBOX_PATH_WEBSERVICE := $(PATH_SUB_CURRENT)
54c3620994786a33db473956c4e6c3c7d94ab695vboxsync# If this is set, all webservice files are considered out-of-date every time
54c3620994786a33db473956c4e6c3c7d94ab695vboxsync# this makefile is touched. Otherwise, set this to empty.
5eda82e218d35ae0691febd531e1bfc0324cc4a6vboxsyncRECOMPILE_ON_MAKEFILE_CURRENT := $(MAKEFILE_CURRENT)
VBOXWEB_IDL_SRC := $(VBOXWEB_OUT_DIR)/VirtualBox.xidl
VBOXWEB_WSDL = $(VBOX_PATH_SDK)/bindings/webservice/vboxweb.wsdl
VBOXWEBSERVICE_WSDL = $(VBOX_PATH_SDK)/bindings/webservice/vboxwebService.wsdl
VBOXWEB_TYPEMAP := $(VBOXWEB_OUT_DIR)/typemap.dat
VBOXWEB_GSOAPH_FROM_XSLT := $(VBOXWEB_OUT_DIR)/gsoapH_from_xslt.h
VBOXWEB_GSOAPH_FROM_GSOAP := $(VBOXWEB_OUT_DIR)/gsoapH_from_gsoap.h
VBOXWEB_SOAP_CLIENT_H := $(VBOXWEB_OUT_DIR)/soapStub.h
VBOXWEB_SOAP_SERVER_H := $(VBOXWEB_OUT_DIR)/soapH.h
vboxsoap_CXXFLAGS.win += -bigobj
$(VBOXWEB_OUT_DIR)/soapC.cpp
split-soapC_SOURCES = split-soapC.cpp
$(VBOXWEB_OUT_DIR)/soapC-1.cpp \
$(VBOXWEB_OUT_DIR)/soapC-2.cpp \
$(VBOXWEB_OUT_DIR)/soapC-3.cpp \
$(VBOXWEB_OUT_DIR)/soapC-4.cpp \
$(VBOXWEB_OUT_DIR)/soapC-5.cpp \
$(VBOXWEB_OUT_DIR)/soapC-6.cpp \
$(VBOXWEB_OUT_DIR)/soapC-7.cpp \
$(VBOXWEB_OUT_DIR)/soapC-8.cpp \
$(VBOXWEB_OUT_DIR)/soapC-9.cpp \
$(VBOXWEB_OUT_DIR)/soapC-10.cpp \
$(VBOXWEB_OUT_DIR)/soapC-11.cpp \
$(VBOXWEB_OUT_DIR)/soapC-12.cpp \
$(VBOXWEB_OUT_DIR)/soapC-13.cpp \
$(VBOXWEB_OUT_DIR)/soapC-14.cpp \
$(VBOXWEB_OUT_DIR)/soapC-15.cpp \
$(VBOXWEB_OUT_DIR)/soapC-16.cpp \
$(VBOXWEB_OUT_DIR)/soapC-17.cpp \
$(VBOXWEB_OUT_DIR)/soapC-18.cpp \
$(VBOXWEB_OUT_DIR)/soapC-19.cpp \
$(VBOXWEB_OUT_DIR)/soapC-20.cpp
$(VBOXWEB_OUT_DIR)/soapC-3.cpp_CXXFLAGS.win.x86 = -Og- # VCC70 says "function too large".
# This'll save a few seconds, but the compiler invocation currently makes it impracticable. This will
# be addressed in a future kBuild version, by adding PCH support or/and by adding some helpers to
vboxsoap_INTERMEDIATES += $(VBOXWEB_OUT_DIR)/soapH.h.gch
vboxsoap_CLEAN += $(VBOXWEB_OUT_DIR)/soapH.h.gch
g++ -x c++-header -g -g -Wall -pedantic -Wno-long-long -Wno-trigraphs -Wno-variadic-macros -pipe -O0 -fno-omit-frame-pointer -fno-strict-aliasing -fvisibility-inlines-hidden -fvisibility=hidden -DVBOX_HAVE_VISIBILITY_HIDDEN -mmacosx-version-min=10.4 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -m32 -I/Volumes/ScratchHFS/bird/vbox/svn/trunk/src/VBox/Main/webservice/gsoap -I/Volumes/ScratchHFS/bird/vbox/svn/trunk/out/darwin.x86/debug/obj/src/VBox/Main -I/Volumes/ScratchHFS/bird/vbox/svn/trunk/src/VBox/Main/webservice -I/Volumes/ScratchHFS/bird/vbox/svn/trunk/include -I/Volumes/ScratchHFS/bird/vbox/svn/trunk/out/darwin.x86/debug -DVBOX -DVBOX_WITH_DEBUGGER -DVBOX_WITH_DEBUGGER_GUI -DDEBUG -DDEBUG_bird -DDEBUG_USERNAME=bird -DRT_OS_DARWIN -D__DARWIN__ -DRT_ARCH_X86 -D__X86__ -DVBOX_WITH_HYBRID_32BIT_KERNEL -DIN_RING3 -DHC_ARCH_BITS=32 -DGC_ARCH_BITS=32 -DMAC_OS_X_VERSION_MIN_REQUIRED=1040 -DMAC_OS_X_VERSION_MAX_ALLOWED=1040 \
vboxwebsrv_CXXFLAGS.win += -bigobj
vboxwebsrv_LIBS.solaris += socket nsl
$(VBOXWEB_OUT_DIR)/methodmaps.cpp \
$(VBOXWEB_OUT_DIR)/soapServer.cpp \
$(VBOXWEB_OUT_DIR)/vboxweb-wsdl.c
$(VBOXWEB_OUT_DIR)/methodmaps.cpp \
$(VBOXWEB_OUT_DIR)/soapServer.cpp \
$(VBOXWEB_OUT_DIR)/vboxweb-wsdl.c
vboxweb.cpp_DEFS = \
VBOX_JWS_JAR = $(VBoxJWs-inst-jar_0_OUTDIR)/vboxjws.jar
VBOX_JWSDOC_JAR = $(VBoxJWs-inst-jar_0_OUTDIR)/vboxjws-doc.jar
VBOX_JWSSRC_JAR = $(VBoxJWs-inst-jar_0_OUTDIR)/vboxjws-src.jar
VBOX_GLUE_XSLT_DIR := $(PATH_ROOT)/src/VBox/Main/glue
VBOX_JAXLIB_DIR := $(PATH_ROOT)/src/VBox/Main/webservice/jaxlibs
VBoxJWs-inst-jar_INST = $(INST_SDK)bindings/webservice/java/jax-ws/
$(VBOX_JWS_GEN)/jwsglue.list \
$(VBOX_JWS_GEN)/jwsglue.list: \
$(VBOX_GLUE_XSLT_DIR)/glue-java.xsl \
--stringparam G_vboxDirPrefix org/virtualbox$(VBOX_API_SUFFIX)/ \
$(QUIET)$(MKDIR) -p $(VBOX_JWS_GEN)/java/org/virtualbox$(VBOX_API_SUFFIX)
$(QUIET)$(VBOX_FILESPLIT) $(VBOX_JWS_GEN)/merged.file $(VBOX_JWS_GEN)/java
$(VBOX_WSIMPORT) -Xnocompile -p $(VBOX_JAVA_PACKAGE).jaxws -d $(VBOX_JWS_GEN)/java $(VBOXWEBSERVICE_WSDL)
$$(VBOX_JWS_JAR): $(VBOX_JWS_GEN)/jwsglue.list $(VBOXWEB_WSDL) $(VBOXWEBSERVICE_WSDL) $(VBOX_JWS_GEN)/MANIFEST.MF | $$(dir $$@)
$(call MSG_TOOL,javac,$(notdir $@),jwsgen.list,)
@$(VBOX_JWS_GEN)/jwsglue.list \
$(QUIET)$(SED) -e "s/vboxweb.wsdl/vboxweb$(VBOX_API_SUFFIX).wsdl/" < $(VBOXWEBSERVICE_WSDL) > $(VBOX_JWS_JDEST)/vboxwebService$(VBOX_API_SUFFIX).wsdl
$(VBOX_JAR) cf $@ $(VBOX_JWS_GEN)/MANIFEST.MF -C $(VBOX_JWS_JDEST) .
$$(VBOX_JWSDOC_JAR): $(VBOX_JWS_GEN)/jwsglue.list $(VBOXWEB_WSDL) $(VBOXWEBSERVICE_WSDL) $$(VBOX_JWS_JAR) | $$(dir $$@)
$(call MSG_TOOL,javadoc,$(notdir $@),jwsgen.list,)
-sourcepath $(VBOX_JWS_GEN)/java org.virtualbox$(VBOX_API_SUFFIX) \
## @todo compile ../glue/tests/TestVBox.java to have sanity checking
webtest_CXXFLAGS.win += -bigobj
webtest_LIBS.solaris += nsl
$(VBOXWEB_OUT_DIR)/soapClient.cpp
$(VBOXWEB_OUT_DIR)/soapClient.cpp
VBOXWEB_GLUE_PYTHON = $(VBOX_PATH_SDK)/bindings/webservice/python/lib/VirtualBox_wrappers.py
VBOXWEB_WS_PYTHON = $(VBOX_PATH_SDK)/bindings/webservice/python/lib/VirtualBox_services.py
VBOXWEB_WS_PERL = $(VBOX_PATH_SDK)/bindings/webservice/perl/lib/vboxService.pm
VBOXWEB_WS_PHP = $(VBOX_PATH_SDK)/bindings/webservice/php/lib/vboxServiceWrappers.php
VBOXWEB_SAMPLES_JAXWS_DIR = $(VBOX_PATH_SDK)/bindings/webservice/java/jax-ws/samples
VBOXWEB_JAXWSSAMPLE = $(VBOXWEB_SAMPLES_JAXWS_DIR)/clienttest.java
VBOXWEB_METRICSAMPLE = $(VBOXWEB_SAMPLES_JAXWS_DIR)/metrictest.java
VBOXWEB_GLUE_JAVA_TMP = $(VBOXWEB_OUT_DIR)/glue-jaxws.java.tmp
VBOXWEB_PATH_SDK_GLUE_JAVA = $(VBOX_PATH_SDK)/bindings/webservice/java/jax-ws/src
VBOXWEB_JAVALIB = $(VBOX_PATH_SDK)/bindings/webservice/java/jax-ws/lib
VBOXWEB_JAVA15_JAR = $(VBOXWEB_JAVALIB)/vboxws_java15.jar
VBOXWEB_JAVA16_JAR = $(VBOXWEB_JAVALIB)/vboxws_java16.jar
vboxwebinst_INST = $(INST_SDK)bindings/webservice/
vboxwebinst_nox_INST = $(INST_SDK)bindings/webservice/
$(VBOXWEB_IDL_SRC): $(VBOXWEB_IDL_SRC_ORIG) $(VBOX_PATH_WEBSERVICE)/platform-xidl.xsl | $$(dir $$@)
$(call MSG_GENERATE,,$@,$(VBOXWEB_IDL_SRC) using platform-xidl.xsl)
$(QUIET)$(VBOX_XSLTPROC) $(VBOXWEB_XSLTPROC_VERBOSE) -o $@ $(VBOX_PATH_WEBSERVICE)/platform-xidl.xsl $<
$(VBOXWEB_WSDL): $(VBOXWEB_IDL_SRC) $(VBOX_PATH_WEBSERVICE)/websrv-wsdl.xsl $(VBOX_PATH_WEBSERVICE)/websrv-shared.inc.xsl $(RECOMPILE_ON_MAKEFILE_CURRENT) ## @todo | $$(dir $$@)
$(call MSG_GENERATE,,$@,$(VBOXWEB_IDL_SRC) using websrv-wsdl.xsl)
$(QUIET)$(VBOX_XSLTPROC) $(VBOXWEB_XSLTPROC_VERBOSE) -o $@ $(VBOX_PATH_WEBSERVICE)/websrv-wsdl.xsl $<
$(VBOXWEBSERVICE_WSDL): $(VBOXWEB_IDL_SRC) $(VBOX_PATH_WEBSERVICE)/websrv-wsdl-service.xsl $(VBOX_PATH_WEBSERVICE)/websrv-shared.inc.xsl $(RECOMPILE_ON_MAKEFILE_CURRENT) ## @todo | $$(dir $$@)
$(call MSG_GENERATE,,$@,$(VBOXWEB_IDL_SRC) using websrv-wsdl-service.xsl)
$(QUIET)$(VBOX_XSLTPROC) $(VBOXWEB_XSLTPROC_VERBOSE) -o $@ $(VBOX_PATH_WEBSERVICE)/websrv-wsdl-service.xsl $<
$(VBOXWEB_GLUE_PYTHON): $(VBOXWEB_IDL_SRC) $(VBOXWEB_WSDL) $(VBOXWEBSERVICE_WSDL) $(VBOX_PATH_WEBSERVICE)/websrv-python.xsl
$(call MSG_GENERATE,,$@,$(VBOXWEB_IDL_SRC) using websrv-python.xsl)
$(QUIET)$(VBOX_XSLTPROC) $(VBOXWEB_XSLTPROC_VERBOSE) -o $@ $(VBOX_PATH_WEBSERVICE)/websrv-python.xsl $<
$(QUIET)$(REDIRECT) -C $(@D) -- bash -c "$(VBOX_WSDL2PY) -b $(VBOXWEBSERVICE_WSDL) || $(VBOX_WSDL2PY) -b --file $(VBOXWEBSERVICE_WSDL)"
$(QUIET)$(SED) -e "s+http://www.virtualbox.org/Service+http://www.virtualbox.org/+" < $(VBOXWEB_WS_PERL) > $(VBOXWEB_WS_PERL).tmp
$(VBOXWEB_WS_PHP): $(VBOXWEB_IDL_SRC) $(VBOX_PATH_WEBSERVICE)/websrv-php.xsl
$(call MSG_GENERATE,,$@,$(VBOXWEB_IDL_SRC) using websrv-php.xsl)
$(QUIET)$(VBOX_XSLTPROC) $(VBOXWEB_XSLTPROC_VERBOSE) -o $@ $(VBOX_PATH_WEBSERVICE)/websrv-php.xsl $<
# generate typemap.dat (used by wsdl2h) from main XIDL file
$(VBOXWEB_TYPEMAP): $(VBOXWEB_IDL_SRC) $(VBOX_PATH_WEBSERVICE)/websrv-typemap.xsl $(VBOX_PATH_WEBSERVICE)/websrv-shared.inc.xsl $(RECOMPILE_ON_MAKEFILE_CURRENT) | $$(dir $$@)
$(call MSG_GENERATE,,$@,$(VBOXWEB_IDL_SRC) using websrv-typemap.xsl)
$(QUIET)$(VBOX_XSLTPROC) $(VBOXWEB_XSLTPROC_VERBOSE) -o $@ $(VBOX_PATH_WEBSERVICE)/websrv-typemap.xsl $<
$(VBOXWEB_GSOAPH_FROM_XSLT): $(VBOXWEB_WSDL) $(VBOX_PATH_WEBSERVICE)/websrv-wsdl2gsoapH.xsl $(VBOX_PATH_WEBSERVICE)/websrv-shared.inc.xsl $(RECOMPILE_ON_MAKEFILE_CURRENT) | $$(dir $$@)
$(call MSG_GENERATE,,$@,$(VBOXWEB_WSDL) using websrv-wsdl2gsoapH.xsl)
$(QUIET)$(VBOX_XSLTPROC) $(VBOXWEB_XSLTPROC_VERBOSE) -o $@ $(VBOX_PATH_WEBSERVICE)/websrv-wsdl2gsoapH.xsl $<
VBOX_NSMAP = $(VBOXWEB_OUT_DIR)/vboxwebsrv.nsmap
$(VBOX_NSMAP): $(VBOXWEB_IDL_SRC) $(VBOX_PATH_WEBSERVICE)/websrv-nsmap.xsl $(VBOX_PATH_WEBSERVICE)/websrv-shared.inc.xsl $(RECOMPILE_ON_MAKEFILE_CURRENT) | $$(dir $$@)
$(call MSG_GENERATE,,$@,$(VBOXWEB_IDL_SRC) using websrv-nsmap.xsl)
$(QUIET)$(VBOX_XSLTPROC) $(VBOXWEB_XSLTPROC_VERBOSE) -o $@ $(VBOX_PATH_WEBSERVICE)/websrv-nsmap.xsl $<
+ $(VBOXWEB_OUT_DIR)/soapH.h \
+ $(VBOXWEB_OUT_DIR)/soapStub.h \
+ $(VBOXWEB_OUT_DIR)/soapC.cpp \
+ $(VBOXWEB_OUT_DIR)/soapClient.cpp \
+ $(VBOXWEB_OUT_DIR)/soapServer.cpp \
: $(VBOXWEB_GSOAPH_FROM_GSOAP) $(VBOXWEB_GSOAPH_FROM_XSLT) $(VBOX_NSMAP) $(RECOMPILE_ON_MAKEFILE_CURRENT) | $$(dir $$@)
$(REDIRECT) -C $(VBOXWEB_OUT_DIR) -- $(VBOX_SOAPCPP2) $(VBOXWEB_SOAPCPP2_SKIP_FILES) -L -2 -w -I$(VBOX_PATH_GSOAP_IMPORT) $(GSOAPH_RELEVANT)
$(MV) -f $(wildcard $(VBOXWEB_OUT_DIR)/*.req.xml $(VBOXWEB_OUT_DIR)/*.res.xml) $(PATH_TARGET_SOAPDEMOXML)
$(MV) -f $(VBOXWEB_OUT_DIR)/vboxBinding.nsmap $(PATH_TARGET_SOAPDEMONSMAPS)
$(PATH_TARGET_SOAPDEMOHEADERS)/soapvboxBindingProxy.h \
$(PATH_TARGET_SOAPDEMOHEADERS)/soapvboxBindingObject.h: $(VBOXWEB_OUT_DIR)/gsoap_copy_all_ts
# soapcpp2 -L: don't generate soapClientLib/soapServerLib
# Split up the soapC.cpp monster into manageable bits that can be
$(VBOXWEB_OUT_DIR)/soapC-1.cpp \
+ $(VBOXWEB_OUT_DIR)/soapC-2.cpp \
+ $(VBOXWEB_OUT_DIR)/soapC-3.cpp \
+ $(VBOXWEB_OUT_DIR)/soapC-4.cpp \
+ $(VBOXWEB_OUT_DIR)/soapC-5.cpp \
+ $(VBOXWEB_OUT_DIR)/soapC-6.cpp \
+ $(VBOXWEB_OUT_DIR)/soapC-7.cpp \
+ $(VBOXWEB_OUT_DIR)/soapC-8.cpp \
+ $(VBOXWEB_OUT_DIR)/soapC-9.cpp \
+ $(VBOXWEB_OUT_DIR)/soapC-10.cpp \
+ $(VBOXWEB_OUT_DIR)/soapC-11.cpp \
+ $(VBOXWEB_OUT_DIR)/soapC-12.cpp \
+ $(VBOXWEB_OUT_DIR)/soapC-13.cpp \
+ $(VBOXWEB_OUT_DIR)/soapC-14.cpp \
+ $(VBOXWEB_OUT_DIR)/soapC-15.cpp \
+ $(VBOXWEB_OUT_DIR)/soapC-16.cpp \
+ $(VBOXWEB_OUT_DIR)/soapC-17.cpp \
+ $(VBOXWEB_OUT_DIR)/soapC-18.cpp \
+ $(VBOXWEB_OUT_DIR)/soapC-19.cpp \
+ $(VBOXWEB_OUT_DIR)/soapC-20.cpp \
: $(VBOXWEB_OUT_DIR)/soapC.cpp $$(split-soapC_1_TARGET) | $$(dir $$@)
$(split-soapC_1_TARGET) $(VBOXWEB_OUT_DIR)/soapC.cpp $(VBOXWEB_OUT_DIR) 20
# generate method maps in server: map wsdl operations to com/xpcom method calls
$(VBOXWEB_OUT_DIR)/methodmaps.cpp: $(VBOXWEB_IDL_SRC) $(VBOX_PATH_WEBSERVICE)/websrv-cpp.xsl $(VBOX_PATH_WEBSERVICE)/websrv-shared.inc.xsl $(RECOMPILE_ON_MAKEFILE_CURRENT) | $$(dir $$@)
$(call MSG_GENERATE,,$@,$(VBOXWEB_IDL_SRC) using websrv-cpp.xsl)
$(QUIET)$(VBOX_XSLTPROC) -o $@ $(VBOX_PATH_WEBSERVICE)/websrv-cpp.xsl $<
# generate C file which contains vboxweb.wsdl
$$(VBOXWEB_OUT_DIR)/vboxweb-wsdl.c: $(VBOXWEB_WSDL) $(VBOX_BIN2C)
$(VBOXWEB_JAXWSSAMPLE): $(VBOX_PATH_WEBSERVICE)/samples/java/jax-ws/clienttest.java
$(VBOXWEB_METRICSAMPLE): $(VBOX_PATH_WEBSERVICE)/samples/java/jax-ws/metrictest.java
include $(KBUILD_PATH)/subfooter.kmk