[16120] | 1 | # $Id: Makefile.kmk 99040 2023-03-18 21:03:42Z vboxsync $
|
---|
| 2 | ## @file
|
---|
| 3 | # Sub-Makefile for the VBox web service.
|
---|
| 4 | #
|
---|
| 5 | # Warning! This is a seriously complicated makefile!
|
---|
| 6 | #
|
---|
| 7 |
|
---|
| 8 | #
|
---|
[98103] | 9 | # Copyright (C) 2007-2023 Oracle and/or its affiliates.
|
---|
[16120] | 10 | #
|
---|
[96407] | 11 | # This file is part of VirtualBox base platform packages, as
|
---|
| 12 | # available from https://www.virtualbox.org.
|
---|
[16120] | 13 | #
|
---|
[96407] | 14 | # This program is free software; you can redistribute it and/or
|
---|
| 15 | # modify it under the terms of the GNU General Public License
|
---|
| 16 | # as published by the Free Software Foundation, in version 3 of the
|
---|
| 17 | # License.
|
---|
| 18 | #
|
---|
| 19 | # This program is distributed in the hope that it will be useful, but
|
---|
| 20 | # WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
| 21 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
---|
| 22 | # General Public License for more details.
|
---|
| 23 | #
|
---|
| 24 | # You should have received a copy of the GNU General Public License
|
---|
| 25 | # along with this program; if not, see <https://www.gnu.org/licenses>.
|
---|
| 26 | #
|
---|
| 27 | # SPDX-License-Identifier: GPL-3.0-only
|
---|
| 28 | #
|
---|
[16120] | 29 |
|
---|
| 30 | # Define VBOX_GSOAP_INSTALLED to something if you have gSOAP's
|
---|
| 31 | # "wsdl2h" and "soapcpp2" executables on your PATH somewhere.
|
---|
| 32 |
|
---|
| 33 | #
|
---|
[26370] | 34 | # Here's an overview how all this works. It's complicated. Essentially,
|
---|
| 35 | # lots of files get generated automatically from our XML XIDL file that
|
---|
| 36 | # describes the VirtualBox API (../idl/VirtualBox.xidl); as a result,
|
---|
| 37 | # no manual coding is necessary when the API changes. All generated
|
---|
| 38 | # web service code gets adjusted automatically.
|
---|
| 39 | #
|
---|
| 40 | # In more detail:
|
---|
| 41 | #
|
---|
[16120] | 42 | # 1) We use xsltproc and websrv-wsdl.xsl to generate a WSDL file from
|
---|
[26370] | 43 | # our XML IDL file. WSDL (Web Service Description language) is an XML
|
---|
| 44 | # industry standard that publicly describes a web service.
|
---|
| 45 | # So, the WSDL generated here describes the VirtualBox web
|
---|
| 46 | # service to third-party clients; for example, one can feed it to
|
---|
| 47 | # Java or Perl or some other toolkit that understands WSDL and thus
|
---|
| 48 | # easily write a short script that connects to the web service properly.
|
---|
[16120] | 49 | # This WSDL file ends up in $(VBOXWEB_OUT_DIR)/vboxweb.wsdl.
|
---|
| 50 | #
|
---|
[31649] | 51 | # 2) We use xsltproc and websrv-wsdl2gsoapH.xsl to generate a so-called
|
---|
| 52 | # "gSoap header file": $(VBOXWEB_OUT_DIR)/gsoapH_from_xslt.h from
|
---|
| 53 | # the WSDL previously generated.
|
---|
[26370] | 54 | # This file looks like a C header file, but really isn't meant
|
---|
[16120] | 55 | # to be included by a C compiler. Instead, it just happens to be the
|
---|
[26370] | 56 | # format that gSOAP uses to specify SOAP interfaces instead of WSDL.
|
---|
| 57 | # (The reason for this appears to be that gSOAP predates WSDL and
|
---|
| 58 | # thus needed some format to describe the syntax of a web service.)
|
---|
[16120] | 59 | #
|
---|
[26370] | 60 | # Note that gSOAP now also comes with its own WSDL-to-gsoap.h converter,
|
---|
| 61 | # but the readme mentions some funny license restrictions, so instead we
|
---|
[16120] | 62 | # have our own converter in XSLT.
|
---|
| 63 | #
|
---|
[26370] | 64 | # 3) We then feed that pseudo-header file to gSOAP's soapcpp2 compiler,
|
---|
| 65 | # which generates a ton of files in $(VBOXWEB_OUT_DIR), most importantly:
|
---|
[16120] | 66 | #
|
---|
| 67 | # SOAP_CLIENT_H = $(VBOXWEB_OUT_DIR)/soapStub.h (header file for webservice clients)
|
---|
| 68 | # SOAP_SERVER_H = $(VBOXWEB_OUT_DIR)/soapH.h (header file for webservice servers)
|
---|
| 69 | #
|
---|
| 70 | # These are "real" header files that one can use to program a) a webservice client
|
---|
| 71 | # and b) a webservice server. Of course to build b) one will have to write method
|
---|
| 72 | # implementations with useful code that does something. This is where more
|
---|
| 73 | # code generation via XSLT comes in:
|
---|
| 74 | #
|
---|
[31649] | 75 | # 4) We use xsltproc to generate tons of C++ code directly from the XIDL that
|
---|
[26370] | 76 | # maps each SOAP method to our COM methods. This large C++ file is
|
---|
[16120] | 77 | # $(VBOXWEB_OUT_DIR)/methodmaps.cpp. The actual webservice executable (vboxwebsrv,
|
---|
[26370] | 78 | # which acts as an HTTP server) is composed of this file, plus hard-coded
|
---|
[16120] | 79 | # method implementations in vboxweb.cpp, plus gSOAP library code for the HTTP
|
---|
| 80 | # server.
|
---|
| 81 | #
|
---|
| 82 |
|
---|
| 83 | SUB_DEPTH = ../../../..
|
---|
| 84 | include $(KBUILD_PATH)/subheader.kmk
|
---|
| 85 |
|
---|
| 86 | #
|
---|
[16990] | 87 | # Find the gSOAP toolkit.
|
---|
[16120] | 88 | #
|
---|
[16991] | 89 | # Note! We're not using the gSOAP toolkit correctly. The main issue is that
|
---|
| 90 | # compiling soapcpp2.cpp instead of using the library. So, in order
|
---|
| 91 | # to make this work with a locally installed gSOAP toolkit there are
|
---|
| 92 | # some hoops to jump thru to say the least... Shipping soapcpp2.cpp/h
|
---|
| 93 | # is out of the question without also including the two soap tools.
|
---|
| 94 | #
|
---|
[16993] | 95 | # Some observations on distros for OSE / configure:
|
---|
| 96 | # The proposed gentoo ebuild screws up several things in the install phase
|
---|
| 97 | # and thus fails to ship stdsoap2.cpp and relatives.
|
---|
| 98 | #
|
---|
| 99 | # debian (2.7.9l-0.2) stuffs stdsoap2.cpp and a handful of the import files
|
---|
| 100 | # into /usr/include/gsoap.
|
---|
| 101 | #
|
---|
| 102 | # fedora (2.7.12-fc10.x86_64) uses the default install layout and does not
|
---|
| 103 | # ship stdsoap2.cpp and friends.
|
---|
| 104 | #
|
---|
[16120] | 105 | ifeq ($(VBOX_GSOAP_INSTALLED),)
|
---|
| 106 | VBOX_GSOAP_INSTALLED = 1
|
---|
[95954] | 107 | VBOX_PATH_GSOAP := $(firstfile $(rversortfiles $(qwildcard ,$(KBUILD_DEVTOOLS)/common/gsoap/*)))
|
---|
[16120] | 108 | ifeq ($(VBOX_PATH_GSOAP),)
|
---|
[95954] | 109 | VBOX_PATH_GSOAP := $(firstfile $(rversortfiles $(qwildcard ,$(KBUILD_DEVTOOLS_HST)/gsoap/*)))
|
---|
[16120] | 110 | endif
|
---|
[16991] | 111 | if "$(VBOX_PATH_GSOAP)" == "" && defined(KBUILD_DEVTOOLS_HST)
|
---|
[95954] | 112 | VBOX_PATH_GSOAP := $(firstfile $(rversortfiles $(qwildcard ,$(KBUILD_DEVTOOLS_HST_ALT)/gsoap/*)))
|
---|
[16991] | 113 | endif
|
---|
[16120] | 114 | ifeq ($(VBOX_PATH_GSOAP),)
|
---|
| 115 | $(warning VBOX_PATH_GSOAP not found...)
|
---|
[16990] | 116 | VBOX_GSOAP_INSTALLED =
|
---|
[16120] | 117 | endif
|
---|
| 118 | else
|
---|
[16990] | 119 | VBOX_PATH_GSOAP := $(VBOX_PATH_GSOAP)
|
---|
[16120] | 120 | endif
|
---|
[16991] | 121 | VBOX_PATH_GSOAP_BIN := $(strip $(VBOX_PATH_GSOAP_BIN))
|
---|
| 122 | if "$(VBOX_PATH_GSOAP_BIN)" == ""
|
---|
| 123 | VBOX_PATH_GSOAP_BIN := $(VBOX_PATH_GSOAP)/bin
|
---|
[98431] | 124 | if "$(KBUILD_HOST)" == "darwin"
|
---|
[16991] | 125 | VBOX_PATH_GSOAP_BIN := $(VBOX_PATH_GSOAP_BIN)/macosx
|
---|
| 126 | else if "$(KBUILD_HOST)" == "win"
|
---|
| 127 | VBOX_PATH_GSOAP_BIN := $(VBOX_PATH_GSOAP_BIN)/win32
|
---|
| 128 | else
|
---|
[16992] | 129 | VBOX_PATH_GSOAP_BIN := $(VBOX_PATH_GSOAP_BIN)/$(KBUILD_HOST).x86
|
---|
[16991] | 130 | endif
|
---|
| 131 | if !exists($(VBOX_PATH_GSOAP_BIN))
|
---|
| 132 | VBOX_PATH_GSOAP_BIN := $(VBOX_PATH_GSOAP)/bin
|
---|
| 133 | endif
|
---|
| 134 | endif
|
---|
| 135 | VBOX_SOAPCPP2 := $(VBOX_PATH_GSOAP_BIN)/soapcpp2$(HOSTSUFF_EXE)
|
---|
| 136 | VBOX_WSDL2H := $(VBOX_PATH_GSOAP_BIN)/wsdl2h$(HOSTSUFF_EXE)
|
---|
[18147] | 137 | VBOX_STUBMAKER = $(firstword $(which stubmaker stubmaker.pl) stubmaker_not_found)
|
---|
[63940] | 138 | # Keep in mind that Python ZSI only exists for Python 2.x, so this hardcodes
|
---|
| 139 | # some things. If you want to build using Python 3.x only you need to disable
|
---|
| 140 | # the creation of the Python webservice bindings anyway.
|
---|
| 141 | if "$(KBUILD_HOST)" != "win"
|
---|
[98431] | 142 | VBOX_WSDL2PY = $(firstword $(which wsdl2py) wsdl2py_not_found)
|
---|
[63940] | 143 | else
|
---|
[98431] | 144 | VBOX_WSDL2PY = $(firstword $(wildcard C:/Python27/Scripts/wsdl2py.exe) wsdl2py_not_found)
|
---|
[63940] | 145 | endif
|
---|
[16991] | 146 |
|
---|
[16990] | 147 | VBOX_PATH_GSOAP_IMPORT := $(strip $(if $(VBOX_PATH_GSOAP_IMPORT),$(VBOX_PATH_GSOAP_IMPORT),$(VBOX_PATH_GSOAP)/import))
|
---|
[18801] | 148 | VBOX_GSOAP_INCS := $(strip $(if $(VBOX_GSOAP_INCS),$(VBOX_GSOAP_INCS),$(VBOX_PATH_GSOAP) $(VBOX_PATH_GSOAP_IMPORT) ))
|
---|
| 149 | # note: $(if $(defined FOO)) does not work here!
|
---|
| 150 | VBOX_GSOAP_CXX_SOURCES := $(strip $(if-expr "$(origin VBOX_GSOAP_CXX_SOURCES)" != "undefined",$(VBOX_GSOAP_CXX_SOURCES),$(VBOX_PATH_GSOAP)/stdsoap2.cpp))
|
---|
| 151 | VBOX_GSOAP_CXX_LIBS := $(strip $(if-expr "$(origin VBOX_GSOAP_CXX_LIBS)" != "undefined",$(VBOX_GSOAP_CXX_LIBS),))
|
---|
[16120] | 152 |
|
---|
| 153 |
|
---|
| 154 | #
|
---|
| 155 | # Globals
|
---|
| 156 | #
|
---|
| 157 | VBOXWEB_OUT_DIR := $(PATH_TARGET)/webservice
|
---|
| 158 | BLDDIRS += $(VBOXWEB_OUT_DIR)
|
---|
| 159 |
|
---|
| 160 | # The webservice location
|
---|
| 161 | VBOX_PATH_WEBSERVICE := $(PATH_SUB_CURRENT)
|
---|
| 162 |
|
---|
[45483] | 163 | # The IDL subdirectory (contains some XSLT files)
|
---|
| 164 | VBOX_PATH_IDL := $(abspath $(PATH_SUB_CURRENT)/../idl)
|
---|
| 165 |
|
---|
[16120] | 166 | # If this is set, all webservice files are considered out-of-date every time
|
---|
[31649] | 167 | # this makefile is touched. Otherwise, set this to empty.
|
---|
[16120] | 168 | RECOMPILE_ON_MAKEFILE_CURRENT := $(MAKEFILE_CURRENT)
|
---|
| 169 |
|
---|
| 170 | PATH_TARGET_SOAPDEMOXML := $(VBOXWEB_OUT_DIR)/demo_soapxml
|
---|
| 171 | PATH_TARGET_SOAPDEMOHEADERS := $(VBOXWEB_OUT_DIR)/demo_headers
|
---|
| 172 | PATH_TARGET_SOAPDEMONSMAPS := $(VBOXWEB_OUT_DIR)/demo_namespacemaps
|
---|
| 173 | PATH_TARGET_WEBTEST := $(VBOXWEB_OUT_DIR)/webtest
|
---|
| 174 |
|
---|
[38796] | 175 | # the original XIDL file (has to include documentation as we need it):
|
---|
| 176 | VBOXWEB_IDL_SRC_ORIG := $(VBOX_XIDL_FILE_SRC)
|
---|
[42540] | 177 | # the original XIDL file without documentation
|
---|
| 178 | VBOXWEB_IDL_SRC_STRIPPED := $(VBOX_XIDL_FILE)
|
---|
| 179 | # platform-specific XIDL file generated from $(VBOXWEB_IDL_SRC_STRIPPED):
|
---|
[16120] | 180 | VBOXWEB_IDL_SRC := $(VBOXWEB_OUT_DIR)/VirtualBox.xidl
|
---|
[31649] | 181 |
|
---|
[46483] | 182 | VBOXWEB_WSDL = $(VBOXWEB_OUT_DIR)/vboxweb.wsdl
|
---|
| 183 | VBOXWEBSERVICE_WSDL = $(VBOXWEB_OUT_DIR)/vboxwebService.wsdl
|
---|
[16120] | 184 |
|
---|
| 185 | VBOXWEB_TYPEMAP := $(VBOXWEB_OUT_DIR)/typemap.dat
|
---|
| 186 |
|
---|
| 187 | VBOXWEB_GSOAPH_FROM_XSLT := $(VBOXWEB_OUT_DIR)/gsoapH_from_xslt.h
|
---|
| 188 | ifdef VBOX_GSOAP_INSTALLED
|
---|
| 189 | VBOXWEB_GSOAPH_FROM_GSOAP := $(VBOXWEB_OUT_DIR)/gsoapH_from_gsoap.h
|
---|
| 190 | else
|
---|
| 191 | VBOXWEB_GSOAPH_FROM_GSOAP :=
|
---|
| 192 | endif
|
---|
| 193 | VBOXWEB_SOAP_CLIENT_H := $(VBOXWEB_OUT_DIR)/soapStub.h
|
---|
| 194 | VBOXWEB_SOAP_SERVER_H := $(VBOXWEB_OUT_DIR)/soapH.h
|
---|
| 195 |
|
---|
| 196 |
|
---|
| 197 | ifdef VBOX_GSOAP_VERBOSE
|
---|
| 198 | VBOXWEB_XSLTPROC_VERBOSE = --stringparam G_argDebug '1'
|
---|
| 199 | VBOXWEB_WSDL_VERBOSE = -v
|
---|
| 200 | else
|
---|
| 201 | VBOXWEB_SOAPCPP2_SKIP_FILES = -x
|
---|
| 202 | endif
|
---|
| 203 |
|
---|
| 204 |
|
---|
| 205 | ## @todo VBOXWEB_GSOAPH_FROM_XSLT should probably be a indirect dep of something.
|
---|
| 206 | VBOXWEB_OTHERS += \
|
---|
| 207 | $(VBOXWEB_GSOAPH_FROM_XSLT)
|
---|
| 208 |
|
---|
| 209 |
|
---|
[83223] | 210 | # GCC 9.2 doesn't cope ver well with the split soapC.cpp files (internal error).
|
---|
| 211 | # Seemingly, the issue goes away when we strip inline functions from soapH.h.
|
---|
| 212 | ifdef VBOX_WITHOUT_NOINLINE_SOAPH
|
---|
| 213 | if !defined(VBOX_WITHOUT_SPLIT_SOAPC) && !defined(VBOX_WITH_SPLIT_SOAPC) && $(VBOX_GCC_VERSION_CXX) >= 90200
|
---|
| 214 | $(info Triggering VBOX_WITHOUT_SPLIT_SOAPC because of VBOX_GCC_VERSION_CXX=$(VBOX_GCC_VERSION_CXX) and VBOX_WITHOUT_NOINLINE_SOAPH)
|
---|
| 215 | VBOX_WITHOUT_SPLIT_SOAPC := 1
|
---|
| 216 | endif
|
---|
[83213] | 217 | endif
|
---|
| 218 |
|
---|
[98233] | 219 | #
|
---|
| 220 | # Template that disables -fvisibility=hidden as the SOAP stuff does not
|
---|
| 221 | # properly set the visibility attributes (or at least it didn't).
|
---|
| 222 | #
|
---|
| 223 | TEMPLATE_VBoxWebR3Exe = Webservices without -fvisibility=hidden
|
---|
| 224 | TEMPLATE_VBoxWebR3Exe_EXTENDS = VBoxR3Exe
|
---|
| 225 | TEMPLATE_VBoxWebR3Exe_DEFS.win += WIN32_LEAN_AND_MEAN $(TEMPLATE_VBoxR3Exe_DEFS.win) # Makes the redefinition warnings go away.
|
---|
[98431] | 226 | TEMPLATE_VBoxWebR3Exe_CXXFLAGS = $(filter-out $(VBOX_GCC_fvisibility-hidden) $(VBOX_GCC_fvisibility-inlines-hidden), \
|
---|
[99040] | 227 | $(TEMPLATE_VBoxR3Exe_CXXFLAGS))
|
---|
[83214] | 228 | ifn1of ($(KBUILD_TARGET), win)
|
---|
[98431] | 229 | TEMPLATE_VBoxWebR3Exe_CXXFLAGS += $(VBOX_GCC_Wno-misleading-indentation)
|
---|
[83214] | 230 | endif
|
---|
[84411] | 231 | if "$(VBOX_VCC_TOOL_STEM)" >= "VCC140"
|
---|
[83817] | 232 | # -wd4774: string(532): warning C4774: 'sprintf_s' : format string expected in argument 3 is not a string literal
|
---|
| 233 | # -wd4458: stdsoap2.h(2644): warning C4458: declaration of 'type' hides class member
|
---|
[85121] | 234 | # -wd5039: x509v3.h(883): warning C5039: 'OPENSSL_sk_set_cmp_func': pointer or reference to potentially throwing function passed to 'extern "C"' function under -EHc. Undefined behavior may occur if this function throws an exception.
|
---|
[83889] | 235 | # soapc-1.cpp(182) : warning C4883: 'soap_getelement': function size suppresses optimizations
|
---|
[98233] | 236 | TEMPLATE_VBoxWebR3Exe_CXXFLAGS.win = $(TEMPLATE_VBoxR3Exe_CXXFLAGS.win) -wd4774 -wd4458 -wd4883 -wd5039
|
---|
[83817] | 237 | endif
|
---|
[16120] | 238 |
|
---|
[98233] | 239 |
|
---|
[16120] | 240 | ifdef VBOX_GSOAP_INSTALLED
|
---|
| 241 | ifndef VBOX_ONLY_SDK
|
---|
[62767] | 242 | #
|
---|
[83223] | 243 | # soapC and soapH-noinline file splitter.
|
---|
| 244 | #
|
---|
| 245 | BLDPROGS += split-soapC
|
---|
| 246 | split-soapC_TEMPLATE = VBoxBldProg
|
---|
| 247 | split-soapC_SOURCES = split-soapC.cpp
|
---|
| 248 |
|
---|
| 249 | #
|
---|
[62767] | 250 | # vboxsoap - Library used by both the programs (save build time).
|
---|
| 251 | #
|
---|
| 252 | LIBRARIES += vboxsoap
|
---|
[98233] | 253 | vboxsoap_TEMPLATE = VBoxWebR3Exe
|
---|
[83652] | 254 | ifndef VBOX_WITHOUT_PRECOMPILED_HEADERS
|
---|
| 255 | ifeq ($(KBUILD_TARGET),win)
|
---|
| 256 | vboxsoap_USES = vccprecomp
|
---|
| 257 | vboxsoap_PCH_HDR := $(VBOXWEB_SOAP_SERVER_H)
|
---|
| 258 | vboxsoap_CXXFLAGS += -Zm127
|
---|
| 259 | endif
|
---|
[63936] | 260 | endif
|
---|
[62767] | 261 | vboxsoap_CXXFLAGS += $(VBOX_C_CXX_FLAGS_NO_UNUSED_PARAMETERS)
|
---|
| 262 | vboxsoap_CXXFLAGS.win += -bigobj
|
---|
[63980] | 263 | vboxsoap_CXXFLAGS.win += -wd4702 # soapc-4.cpp(16) : warning C4702: unreachable code
|
---|
[62767] | 264 | ifn1of ($(KBUILD_TARGET), win)
|
---|
[83223] | 265 | vboxsoap_CXXFLAGS += -Wno-shadow -Wno-parentheses $(VBOX_GCC_Wno-literal-suffix) \
|
---|
| 266 | $(VBOX_GCC_Wno-stringop-overflow) $(VBOX_GCC_Wno-stringop-truncation) \
|
---|
[95283] | 267 | $(VBOX_GCC_Wno-vla) -Wno-format -Wno-deprecated-declarations $(VBOX_GCC_fno-printf-return-value)
|
---|
[75908] | 268 | ifn1of ($(KBUILD_TYPE), debug) # Save time+memory by using -O0 instead of -O2.
|
---|
[75909] | 269 | vboxsoap_CXXFLAGS += -O0 ## @todo this could be interesting for g++ (not clang++): -fcprop-registers
|
---|
[75904] | 270 | endif
|
---|
[62767] | 271 | endif
|
---|
| 272 | vboxsoap_INCS := \
|
---|
| 273 | $(VBOX_GSOAP_INCS) \
|
---|
| 274 | $(VBOXWEB_OUT_DIR) \
|
---|
| 275 | $(PATH_SUB_CURRENT)
|
---|
| 276 | ifdef VBOX_WITH_WEBSERVICES_SSL
|
---|
| 277 | vboxsoap_DEFS += WITH_OPENSSL
|
---|
[98241] | 278 | vboxsoap_SDKS += VBoxOpenSsl
|
---|
[62767] | 279 | endif
|
---|
| 280 | ifdef VBOX_WITHOUT_SPLIT_SOAPC
|
---|
| 281 | vboxsoap_SOURCES = \
|
---|
| 282 | $(VBOXWEB_OUT_DIR)/soapC.cpp
|
---|
| 283 | else
|
---|
| 284 | vboxsoap_SOURCES = \
|
---|
[98431] | 285 | $(VBOXWEB_OUT_DIR)/soapC-1.cpp \
|
---|
| 286 | $(VBOXWEB_OUT_DIR)/soapC-2.cpp \
|
---|
| 287 | $(VBOXWEB_OUT_DIR)/soapC-3.cpp \
|
---|
| 288 | $(VBOXWEB_OUT_DIR)/soapC-4.cpp \
|
---|
| 289 | $(VBOXWEB_OUT_DIR)/soapC-5.cpp \
|
---|
| 290 | $(VBOXWEB_OUT_DIR)/soapC-6.cpp \
|
---|
| 291 | $(VBOXWEB_OUT_DIR)/soapC-7.cpp \
|
---|
| 292 | $(VBOXWEB_OUT_DIR)/soapC-8.cpp \
|
---|
| 293 | $(VBOXWEB_OUT_DIR)/soapC-9.cpp \
|
---|
| 294 | $(VBOXWEB_OUT_DIR)/soapC-10.cpp \
|
---|
| 295 | $(VBOXWEB_OUT_DIR)/soapC-11.cpp \
|
---|
| 296 | $(VBOXWEB_OUT_DIR)/soapC-12.cpp \
|
---|
| 297 | $(VBOXWEB_OUT_DIR)/soapC-13.cpp \
|
---|
| 298 | $(VBOXWEB_OUT_DIR)/soapC-14.cpp \
|
---|
| 299 | $(VBOXWEB_OUT_DIR)/soapC-15.cpp \
|
---|
| 300 | $(VBOXWEB_OUT_DIR)/soapC-16.cpp \
|
---|
| 301 | $(VBOXWEB_OUT_DIR)/soapC-17.cpp \
|
---|
| 302 | $(VBOXWEB_OUT_DIR)/soapC-18.cpp \
|
---|
| 303 | $(VBOXWEB_OUT_DIR)/soapC-19.cpp \
|
---|
| 304 | $(VBOXWEB_OUT_DIR)/soapC-20.cpp \
|
---|
| 305 | $(VBOXWEB_OUT_DIR)/soapC-21.cpp \
|
---|
| 306 | $(VBOXWEB_OUT_DIR)/soapC-22.cpp \
|
---|
| 307 | $(VBOXWEB_OUT_DIR)/soapC-23.cpp \
|
---|
| 308 | $(VBOXWEB_OUT_DIR)/soapC-24.cpp \
|
---|
| 309 | $(VBOXWEB_OUT_DIR)/soapC-25.cpp \
|
---|
| 310 | $(VBOXWEB_OUT_DIR)/soapC-26.cpp \
|
---|
| 311 | $(VBOXWEB_OUT_DIR)/soapC-27.cpp \
|
---|
| 312 | $(VBOXWEB_OUT_DIR)/soapC-28.cpp \
|
---|
| 313 | $(VBOXWEB_OUT_DIR)/soapC-29.cpp
|
---|
[62767] | 314 | endif
|
---|
[83223] | 315 | ifndef VBOX_WITHOUT_NOINLINE_SOAPH
|
---|
| 316 | vboxsoap_SOURCES += \
|
---|
| 317 | $(VBOXWEB_OUT_DIR)/soapH-noinline-1.cpp \
|
---|
| 318 | $(VBOXWEB_OUT_DIR)/soapH-noinline-2.cpp \
|
---|
| 319 | $(VBOXWEB_OUT_DIR)/soapH-noinline-3.cpp \
|
---|
| 320 | $(VBOXWEB_OUT_DIR)/soapH-noinline-4.cpp \
|
---|
| 321 | $(VBOXWEB_OUT_DIR)/soapH-noinline-5.cpp \
|
---|
| 322 | $(VBOXWEB_OUT_DIR)/soapH-noinline-6.cpp \
|
---|
| 323 | $(VBOXWEB_OUT_DIR)/soapH-noinline-7.cpp \
|
---|
| 324 | $(VBOXWEB_OUT_DIR)/soapH-noinline-8.cpp \
|
---|
| 325 | $(VBOXWEB_OUT_DIR)/soapH-noinline-9.cpp \
|
---|
| 326 | $(VBOXWEB_OUT_DIR)/soapH-noinline-10.cpp \
|
---|
| 327 | $(VBOXWEB_OUT_DIR)/soapH-noinline-11.cpp \
|
---|
| 328 | $(VBOXWEB_OUT_DIR)/soapH-noinline-12.cpp
|
---|
| 329 | endif
|
---|
[62767] | 330 | vboxsoap_CLEAN := $(vboxsoap_SOURCES) # lazy bird
|
---|
[69773] | 331 | vboxsoap_SOURCES <= \
|
---|
[62767] | 332 | $(VBOX_GSOAP_CXX_SOURCES)
|
---|
| 333 | vboxsoap_ORDERDEPS = \
|
---|
| 334 | $(VBOXWEB_IDL_SRC) \
|
---|
| 335 | $(VBOXWEB_OUT_DIR)/gsoap_copy_all_ts
|
---|
| 336 | ifn1of ($(KBUILD_TARGET), win)
|
---|
[63742] | 337 | $(VBOX_GSOAP_CXX_SOURCES)_CXXFLAGS = \
|
---|
[98431] | 338 | -Wno-format \
|
---|
| 339 | $(VBOX_GCC_Wno-int-in-bool-context) \
|
---|
| 340 | $(VBOX_GCC_Wno-logical-op)
|
---|
[62767] | 341 | # currently necessary when compiling against OpenSSL 1.0 due to a missing
|
---|
| 342 | # typecase from 'const v3_ext_method*' to 'aka v3_ext_method*'.
|
---|
| 343 | $(VBOX_GSOAP_CXX_SOURCES)_CXXFLAGS += -fpermissive
|
---|
[83213] | 344 | # Necessary with gcc 9.2.1 for some reason:
|
---|
| 345 | $(VBOX_GSOAP_CXX_SOURCES)_CXXFLAGS += -Wno-deprecated-declarations
|
---|
[62767] | 346 | endif
|
---|
[16120] | 347 |
|
---|
[62767] | 348 | if "$(KBUILD_TARGET)" == "win" && "$(VBOX_GSOAP_CXX_SOURCES)" != ""
|
---|
| 349 | $(VBOX_GSOAP_CXX_SOURCES)_CXXFLAGS.win += -wd4668 # preprocessor / windows.h
|
---|
| 350 | $(VBOX_GSOAP_CXX_SOURCES)_CXXFLAGS.win += -wd4211 # nonstandard extension used: redefined extern to static
|
---|
| 351 | $(VBOX_GSOAP_CXX_SOURCES)_CXXFLAGS.win += -wd4310 # cast truncates constant value
|
---|
[66832] | 352 | if1of ($(VBOX_VCC_TOOL_STEM), VCC120)
|
---|
| 353 | $(VBOX_GSOAP_CXX_SOURCES)_CXXFLAGS.win += -wd4056 # v2.8.36/stdsoap2.cpp(14008) : warning C4056: overflow in floating-point constant arithmetic
|
---|
| 354 | $(VBOX_GSOAP_CXX_SOURCES)_CXXFLAGS.win += -wd4756 # v2.8.36/stdsoap2.cpp(14008) : warning C4756: overflow in constant arithmetic
|
---|
| 355 | endif
|
---|
[84411] | 356 | if "$(VBOX_VCC_TOOL_STEM)" >= "VCC140"
|
---|
[83817] | 357 | $(VBOX_GSOAP_CXX_SOURCES)_CXXFLAGS.win += -wd4456 # stdsoap2.cpp(3127): warning C4456: declaration of 'i' hides previous local declaration
|
---|
| 358 | endif
|
---|
[62767] | 359 | endif
|
---|
[16120] | 360 |
|
---|
[62767] | 361 | ifdef VBOX_SOAP_PRECOMPILED_HEADER
|
---|
| 362 | # This'll save a few seconds, but the compiler invocation currently makes it impracticable. This will
|
---|
| 363 | # be addressed in a future kBuild version, by adding PCH support or/and by adding some helpers to
|
---|
| 364 | # gather the required data (DEFS,INCS,CXXTOOL,CXXFLAGS).
|
---|
| 365 | vboxsoap_INTERMEDIATES += $(VBOXWEB_OUT_DIR)/soapH.h.gch
|
---|
| 366 | vboxsoap_CXXFLAGS += -Winvalid-pch -H
|
---|
| 367 | vboxsoap_CLEAN += $(VBOXWEB_OUT_DIR)/soapH.h.gch
|
---|
| 368 |
|
---|
| 369 | $(VBOXWEB_OUT_DIR)/soapH.h.gch: $(VBOXWEB_OUT_DIR)/soapH.h
|
---|
| 370 | g++ -x c++-header -g -g -Wall -pedantic -Wno-long-long -Wno-trigraphs -Wno-variadic-macros -pipe -O0 -fno-omit-frame-pointer \
|
---|
| 371 | -fno-strict-aliasing -fvisibility-inlines-hidden -fvisibility=hidden -DVBOX_HAVE_VISIBILITY_HIDDEN \
|
---|
| 372 | -mmacosx-version-min=10.4 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -m32 \
|
---|
| 373 | -I/Volumes/ScratchHFS/bird/vbox/svn/trunk/src/VBox/Main/webservice/gsoap \
|
---|
| 374 | -I/Volumes/ScratchHFS/bird/vbox/svn/trunk/out/darwin.x86/debug/obj/src/VBox/Main \
|
---|
| 375 | -I/Volumes/ScratchHFS/bird/vbox/svn/trunk/src/VBox/Main/webservice \
|
---|
| 376 | -I/Volumes/ScratchHFS/bird/vbox/svn/trunk/include -I/Volumes/ScratchHFS/bird/vbox/svn/trunk/out/darwin.x86/debug
|
---|
[99029] | 377 | \-DVBOX -DVBOX_WITH_DEBUGGER -DVBOX_WITH_DEBUGGER_GUI -DDEBUG -DDEBUG_bird -DDEBUG_USERNAME=bird -DRT_OS_DARWIN \
|
---|
[62767] | 378 | -D__DARWIN__ -DRT_ARCH_X86 -D__X86__ -DVBOX_WITH_HYBRID_32BIT_KERNEL -DIN_RING3 -DHC_ARCH_BITS=32 -DGC_ARCH_BITS=32 \
|
---|
| 379 | -DMAC_OS_X_VERSION_MIN_REQUIRED=1040 -DMAC_OS_X_VERSION_MAX_ALLOWED=1040 \
|
---|
[16120] | 380 | $< -o $@
|
---|
[62767] | 381 | endif
|
---|
[69846] | 382 |
|
---|
| 383 | # Tweak for systems with too many CPUs compared to memory.
|
---|
| 384 | ifdef VBOX_WITH_SOAP_NOT_PARALLEL
|
---|
| 385 | .NOTPARALLEL: $$(vboxsoap_2_OBJS)
|
---|
| 386 | endif
|
---|
[16120] | 387 | endif # !VBOX_ONLY_SDK
|
---|
| 388 |
|
---|
| 389 |
|
---|
| 390 | ifndef VBOX_ONLY_SDK
|
---|
[98431] | 391 | #
|
---|
| 392 | # vboxwebsrv - webservice server process
|
---|
| 393 | #
|
---|
| 394 | PROGRAMS += vboxwebsrv
|
---|
| 395 | vboxwebsrv_TEMPLATE = VBoxMainClientExe
|
---|
| 396 | vboxwebsrv_DEFS += SOCKET_CLOSE_ON_EXEC
|
---|
| 397 | vboxwebsrv_DEFS.win += WIN32_LEAN_AND_MEAN
|
---|
| 398 | vboxwebsrv_INCS = \
|
---|
| 399 | $(VBOX_GSOAP_INCS) \
|
---|
| 400 | $(VBOXWEB_OUT_DIR) \
|
---|
| 401 | .
|
---|
| 402 | vboxwebsrv_CXXFLAGS.win += -bigobj
|
---|
| 403 | if "$(VBOX_VCC_TOOL_STEM)" >= "VCC140"
|
---|
| 404 | vboxwebsrv_CXXFLAGS.win += -wd4774 # string(532): warning C4774: 'sprintf_s' : format string expected in argument 3 is not a string literal
|
---|
| 405 | vboxwebsrv_CXXFLAGS.win += -wd4458 # stdsoap2.h(2644): warning C4458: declaration of 'type' hides class member
|
---|
| 406 | vboxwebsrv_CXXFLAGS.win += -wd5039 # x509v3.h(883): warning C5039: 'OPENSSL_sk_set_cmp_func': pointer or reference to potentially throwing function passed to 'extern "C"' function under -EHc. Undefined behavior may occur if this function throws an exception.
|
---|
[75904] | 407 | endif
|
---|
[98431] | 408 | ifn1of ($(KBUILD_TARGET), win)
|
---|
| 409 | vboxwebsrv_CXXFLAGS += -Wno-shadow $(VBOX_GCC_Wno-literal-suffix) $(VBOX_GCC_Wno-misleading-indentation)
|
---|
| 410 | ifn1of ($(KBUILD_TYPE), debug) # Save time+memory by using -O1 instead of -O2.
|
---|
| 411 | vboxwebsrv_CXXFLAGS += -O0
|
---|
| 412 | endif
|
---|
| 413 | endif
|
---|
| 414 | vboxwebsrv_LIBS += \
|
---|
| 415 | $(PATH_STAGE_LIB)/vboxsoap$(VBOX_SUFF_LIB) \
|
---|
| 416 | $(VBOX_GSOAP_CXX_LIBS) \
|
---|
| 417 | $(LIB_RUNTIME)
|
---|
| 418 | vboxwebsrv_LIBS.solaris += socket nsl
|
---|
| 419 | ifdef VBOX_WITH_WEBSERVICES_SSL
|
---|
| 420 | vboxwebsrv_DEFS += WITH_OPENSSL
|
---|
| 421 | vboxwebsrv_SDKS += VBoxOpenSsl
|
---|
| 422 | endif
|
---|
| 423 | vboxwebsrv_SOURCES = \
|
---|
| 424 | vboxweb.cpp \
|
---|
| 425 | $(VBOXWEB_OUT_DIR)/methodmaps.cpp \
|
---|
| 426 | $(VBOXWEB_OUT_DIR)/soapServer.cpp \
|
---|
| 427 | $(VBOXWEB_OUT_DIR)/vboxweb-wsdl.c
|
---|
| 428 | vboxwebsrv_SOURCES.win = \
|
---|
| 429 | VBoxWebSrv.rc
|
---|
| 430 | vboxwebsrv_CLEAN = \
|
---|
| 431 | $(VBOXWEB_OUT_DIR)/methodmaps.cpp \
|
---|
| 432 | $(VBOXWEB_OUT_DIR)/soapServer.cpp \
|
---|
| 433 | $(VBOXWEB_OUT_DIR)/vboxweb-wsdl.c
|
---|
| 434 | vboxwebsrv_ORDERDEPS = $(VBOXWEB_OUT_DIR)/gsoap_copy_all_ts
|
---|
[16120] | 435 | endif # !VBOX_ONLY_SDK
|
---|
| 436 |
|
---|
[36612] | 437 | ifdef VBOX_WITH_JWS
|
---|
[98431] | 438 | INSTALLS += VBoxJWs-inst-jar
|
---|
[16120] | 439 |
|
---|
[98431] | 440 | #
|
---|
| 441 | # Java glue JAR files
|
---|
| 442 | #
|
---|
| 443 | VBOX_JWS_JAR = $(VBoxJWs-inst-jar_0_OUTDIR)/vboxjws.jar
|
---|
| 444 | VBOX_JWSDOC_JAR = $(VBoxJWs-inst-jar_0_OUTDIR)/vboxjws-doc.jar
|
---|
| 445 | VBOX_JWSSRC_JAR = $(VBoxJWs-inst-jar_0_OUTDIR)/vboxjws-src.jar
|
---|
| 446 | VBOX_JWS_TARGET := $(PATH_TARGET)/vboxjws-gen
|
---|
| 447 | VBOX_JWS_GEN = $(VBOX_JWS_TARGET)/jwsgen
|
---|
| 448 | VBOX_JWS_GEN_RAWSRC = $(VBOX_JWS_GEN)/merged.file
|
---|
| 449 | VBOX_JWS_JDEST := $(VBOX_JWS_TARGET)/jdest
|
---|
| 450 | VBOX_JWSDOC_JDEST := $(VBOX_JWS_TARGET)/jdest-doc
|
---|
| 451 | VBOX_GLUE_XSLT_DIR := $(PATH_ROOT)/src/VBox/Main/glue
|
---|
| 452 | VBOX_JAXLIB_DIR := $(PATH_ROOT)/src/VBox/Main/webservice/jaxlibs
|
---|
[30880] | 453 |
|
---|
[98431] | 454 | VBoxJWs-inst-jar_INST = $(INST_SDK)bindings/webservice/java/jax-ws/
|
---|
| 455 | VBoxJWs-inst-jar_MODE = a+r,u+w
|
---|
| 456 | VBoxJWs-inst-jar_SOURCES = \
|
---|
| 457 | $(VBOX_JWS_JAR) \
|
---|
| 458 | $(VBOX_JWSDOC_JAR) \
|
---|
| 459 | $(VBOX_JWSSRC_JAR)
|
---|
| 460 | VBoxJWs-inst-jar_CLEAN = \
|
---|
| 461 | $(VBOX_JWS_JAR) \
|
---|
| 462 | $(VBOX_JWSDOC_JAR) \
|
---|
| 463 | $(VBOX_JWSSRC_JAR) \
|
---|
| 464 | $(VBOX_JWS_GEN)/jwsglue.list \
|
---|
| 465 | $(VBOX_JWSDOC_JDEST)/package-list \
|
---|
| 466 | $(wildcard \
|
---|
[99040] | 467 | $(VBOX_JWS_GEN)/java/*/*/*.java \
|
---|
| 468 | $(VBOX_JWS_GEN)/java/*/*/*/*.java \
|
---|
| 469 | $(VBOX_JWS_JDEST)/*.class \
|
---|
| 470 | $(VBOX_JWS_JDEST)/*/*.class \
|
---|
| 471 | $(VBOX_JWS_JDEST)/*/*/*.class \
|
---|
| 472 | $(VBOX_JWS_JDEST)/*/*/*/*.class \
|
---|
| 473 | $(VBOX_JWSDOC_JDEST)/*.html \
|
---|
| 474 | $(VBOX_JWSDOC_JDEST)/*.css \
|
---|
| 475 | $(VBOX_JWSDOC_JDEST)/*/*.gif \
|
---|
| 476 | $(VBOX_JWSDOC_JDEST)/*/*/*.html \
|
---|
| 477 | $(VBOX_JWSDOC_JDEST)/*/*/*/*.html \
|
---|
| 478 | )
|
---|
[98431] | 479 | VBoxJWs-inst-jar_BLDDIRS += $(VBOX_JWS_GEN)/java
|
---|
| 480 | VBoxJWs-inst-jar_GENERATEDSOURCES = $(addprefix $(VBoxJWs-inst-jar_BLDDIRS)/,$(VBoxJWS_VBOX_JWSGLUEFILES))
|
---|
[30880] | 481 |
|
---|
[98431] | 482 | VBoxJWSGlue_KMK = $(PATH_OUT)/vboxjwsglue.kmk
|
---|
| 483 | include $(VBoxJWSGlue_KMK)
|
---|
[46478] | 484 |
|
---|
[98431] | 485 | $(VBoxJWSGlue_KMK).ts +| $(VBoxJWSGlue_KMK): $(VBOXWEB_IDL_SRC_ORIG) $(VBOX_GLUE_XSLT_DIR)/glue-java.xsl $(VBOX_VERSION_STAMP)
|
---|
[46478] | 486 | $(call MSG_GENERATE,,$(VBoxJWSGlue_KMK))
|
---|
| 487 | $(QUIET)$(RM) -f $@
|
---|
| 488 | $(QUIET)$(MKDIR) -p $(@D)
|
---|
| 489 | $(QUIET)$(VBOX_XSLTPROC) \
|
---|
| 490 | --stringparam filelistonly VBoxJWS_VBOX_JWSGLUEFILES \
|
---|
| 491 | --stringparam G_vboxApiSuffix $(VBOX_API_SUFFIX) \
|
---|
| 492 | --stringparam G_vboxGlueStyle jaxws \
|
---|
| 493 | --stringparam G_vboxDirPrefix org/virtualbox$(VBOX_API_SUFFIX)/ \
|
---|
| 494 | -o $@ $(VBOX_GLUE_XSLT_DIR)/glue-java.xsl $<
|
---|
| 495 | $(QUIET)$(CP) --changed -fv $@ $(VBoxJWSGlue_KMK)
|
---|
| 496 |
|
---|
[98431] | 497 | $(VBOX_JWS_GEN_RAWSRC) \
|
---|
| 498 | +| $(VBoxJWs-inst-jar_GENERATEDSOURCES): \
|
---|
| 499 | $(VBOXWEB_IDL_SRC_ORIG) \
|
---|
| 500 | $(VBOX_GLUE_XSLT_DIR)/glue-java.xsl \
|
---|
| 501 | $(VBOX_FILESPLIT) \
|
---|
| 502 | $(VBOX_VERSION_STAMP)
|
---|
[30880] | 503 | $(call MSG_L1,Generating JAX-WS Java glue files from XIDL)
|
---|
[46478] | 504 | $(QUIET)$(RM) -f $(filter-out $(VBoxJWs-inst-jar_GENERATEDSOURCES),$(wildcard $(VBOX_JWS_GEN)/java/*/*/*.java))
|
---|
[46484] | 505 | $(QUIET)$(MKDIR) -p $(@D)
|
---|
[30880] | 506 | $(QUIET)$(VBOX_XSLTPROC) \
|
---|
[46478] | 507 | --stringparam filelistonly "" \
|
---|
[30880] | 508 | --stringparam G_vboxApiSuffix $(VBOX_API_SUFFIX) \
|
---|
| 509 | --stringparam G_vboxGlueStyle jaxws \
|
---|
[38796] | 510 | --stringparam G_vboxDirPrefix org/virtualbox$(VBOX_API_SUFFIX)/ \
|
---|
[46478] | 511 | -o $(VBOX_JWS_GEN_RAWSRC) $(VBOX_GLUE_XSLT_DIR)/glue-java.xsl $<
|
---|
[38796] | 512 | $(QUIET)$(MKDIR) -p $(VBOX_JWS_GEN)/java/org/virtualbox$(VBOX_API_SUFFIX)
|
---|
[46478] | 513 | $(QUIET)$(VBOX_FILESPLIT) $(VBOX_JWS_GEN_RAWSRC) $(VBOX_JWS_GEN)/java
|
---|
| 514 |
|
---|
[98431] | 515 | ## @todo somehow also find out the authoritative list of files generated by
|
---|
| 516 | # wsimport (before running it), then we could rely on proper dependencies
|
---|
| 517 | # instead of creating jwsglue.list. Would allow avoiding a lot of unnecessary
|
---|
| 518 | # compilation with incremental builds, when almost nothing changed in the IDL
|
---|
| 519 | # file. Currently everything is recompiled if only one file is changed.
|
---|
| 520 | $(VBOX_JWS_GEN)/jwsglue.list.ts +| $(VBOX_JWS_GEN)/jwsglue.list: \
|
---|
| 521 | $(VBOXWEB_IDL_SRC) \
|
---|
| 522 | $(VBOX_FILESPLIT) \
|
---|
| 523 | $(VBOXWEBSERVICE_WSDL) \
|
---|
| 524 | $(VBOXWEB_WSDL) \
|
---|
| 525 | $(VBoxJWs-inst-jar_GENERATEDSOURCES) \
|
---|
| 526 | | $(VBOX_JWS_GEN)/java/
|
---|
[49615] | 527 | $(QUIET)$(RM) -f -- $(wildcard $(VBOX_JWS_GEN)/java/*/*/*/*.java)
|
---|
[46478] | 528 | $(call MSG_GENERATE,,$(VBOX_JWS_GEN)/jwsglue.list,JAX-WS for Java 1.6 bindings using $(VBOXWEBSERVICE_WSDL))
|
---|
[38796] | 529 | $(VBOX_WSIMPORT) -Xnocompile -p $(VBOX_JAVA_PACKAGE).jaxws -d $(VBOX_JWS_GEN)/java $(VBOXWEBSERVICE_WSDL)
|
---|
[46478] | 530 | $(QUIET)echo $(VBoxJWs-inst-jar_GENERATEDSOURCES) > $@
|
---|
[38796] | 531 | $(QUIET)echo $(VBOX_JWS_GEN)/java/*/*/*/*.java >> $@
|
---|
[46478] | 532 | $(QUIET)$(CP) --changed -fv $@ $(VBOX_JWS_GEN)/jwsglue.list
|
---|
[30880] | 533 |
|
---|
[98431] | 534 | $$(VBOX_JWS_JAR): $(VBOX_JWS_GEN)/jwsglue.list $(VBOXWEB_WSDL) $(VBOXWEBSERVICE_WSDL) $(VBOX_JWS_GEN)/MANIFEST.MF | $$(dir $$@)
|
---|
[30880] | 535 | $(call MSG_TOOL,javac,$(notdir $@),jwsgen.list,)
|
---|
| 536 | $(QUIET)$(RM) -Rf $(VBOX_JWS_JDEST)
|
---|
| 537 | $(QUIET)$(MKDIR) -p $(VBOX_JWS_JDEST)
|
---|
| 538 | $(call MSG_L1,Compiling bridge code)
|
---|
[71822] | 539 | $(VBOX_JAVAC) $(VBOX_JAVAC_OPTS) $(VBOX_JAVA_WS_OPTS) \
|
---|
[30880] | 540 | @$(VBOX_JWS_GEN)/jwsglue.list \
|
---|
[77066] | 541 | -d $(VBOX_JWS_JDEST) -classpath $(VBOX_JWS_JDEST)$(VBOX_SEP)$(VBOX_JAVA_WS_EXTRA_JARS)
|
---|
[30880] | 542 | $(QUIET)$(SED) -e "s/vboxweb.wsdl/vboxweb$(VBOX_API_SUFFIX).wsdl/" < $(VBOXWEBSERVICE_WSDL) > $(VBOX_JWS_JDEST)/vboxwebService$(VBOX_API_SUFFIX).wsdl
|
---|
| 543 | $(QUIET)$(CP) -f $(VBOXWEB_WSDL) $(VBOX_JWS_JDEST)/vboxweb$(VBOX_API_SUFFIX).wsdl
|
---|
| 544 | $(call MSG_LINK,$(notdir $@),$@)
|
---|
[43585] | 545 | $(VBOX_JAR) cfm $@ $(VBOX_JWS_GEN)/MANIFEST.MF -C $(VBOX_JWS_JDEST) .
|
---|
[30880] | 546 |
|
---|
[98431] | 547 | $(VBOX_JWS_GEN)/MANIFEST.MF: $(VBOX_PATH_WEBSERVICE)/MANIFEST.MF.in
|
---|
[38796] | 548 | $(QUIET)$(RM) -f -- $@
|
---|
| 549 | $(QUIET)$(MKDIR) -p $(VBOX_JWS_GEN)
|
---|
| 550 | $(QUIET)$(SED) \
|
---|
| 551 | -e 's/@VBOX_VERSION_STRING@/$(VBOX_VERSION_STRING)/' \
|
---|
| 552 | -e 's/@VBOX_VERSION_MAJOR@/$(VBOX_VERSION_MAJOR)/' \
|
---|
| 553 | -e 's/@VBOX_VERSION_MINOR@/$(VBOX_VERSION_MINOR)/' \
|
---|
| 554 | -e 's/@VBOX_API_SUFFIX@/$(VBOX_API_SUFFIX)/' \
|
---|
| 555 | < $< > $@
|
---|
| 556 |
|
---|
[98431] | 557 | $$(VBOX_JWSDOC_JAR): $(VBOX_JWS_GEN)/jwsglue.list $$(VBoxJWs-inst-jar_GENERATEDSOURCES) $(VBOXWEB_WSDL) $(VBOXWEBSERVICE_WSDL) $$(VBOX_JWS_JAR) | $$(dir $$@)
|
---|
[38796] | 558 | $(call MSG_TOOL,javadoc,$(notdir $@),jwsgen.list,)
|
---|
| 559 | $(QUIET)$(RM) -Rf $(VBOX_JWSDOC_JDEST)
|
---|
| 560 | $(QUIET)$(MKDIR) -p $(VBOX_JWSDOC_JDEST)
|
---|
| 561 | $(call MSG_L1,Generating javadoc html documentation)
|
---|
[71822] | 562 | $(VBOX_JAVADOC) $(VBOX_JAVADOC_OPTS) $(VBOX_JAVA_WS_OPTS) -quiet \
|
---|
[38799] | 563 | -sourcepath $(VBOX_JWS_GEN)/java org.virtualbox$(VBOX_API_SUFFIX) \
|
---|
[77066] | 564 | -d $(VBOX_JWSDOC_JDEST) -classpath $(VBOX_SEP)$(VBOX_JAVA_WS_EXTRA_JARS)
|
---|
[38796] | 565 | $(call MSG_LINK,$(notdir $@),$@)
|
---|
| 566 | $(VBOX_JAR) cf $@ -C $(VBOX_JWSDOC_JDEST) .
|
---|
| 567 |
|
---|
[98431] | 568 | $$(VBOX_JWSSRC_JAR): $$(VBOX_JWS_JAR) | $$(dir $$@)
|
---|
[38796] | 569 | $(call MSG_LINK,$(notdir $@),$@)
|
---|
| 570 | $(VBOX_JAR) cf $@ -C $(VBOX_JWS_GEN)/java .
|
---|
| 571 |
|
---|
[98431] | 572 | ## @todo compile ../glue/tests/TestVBox.java to have sanity checking
|
---|
[38914] | 573 |
|
---|
[36612] | 574 | endif # VBOX_WITH_JWS
|
---|
[30880] | 575 |
|
---|
[16120] | 576 | ifndef VBOX_ONLY_SDK
|
---|
[98431] | 577 | #
|
---|
| 578 | # webtest - webservice sample client in C++
|
---|
| 579 | #
|
---|
| 580 | PROGRAMS += webtest
|
---|
| 581 | webtest_TEMPLATE = VBoxWebR3Exe
|
---|
| 582 | webtest_CXXFLAGS.win += -bigobj
|
---|
| 583 | ifn1of ($(KBUILD_TARGET), win)
|
---|
| 584 | webtest_CXXFLAGS += -Wno-shadow
|
---|
| 585 | endif
|
---|
| 586 | webtest_INCS := \
|
---|
| 587 | $(VBOX_GSOAP_INCS) \
|
---|
| 588 | $(VBOXWEB_OUT_DIR) \
|
---|
| 589 | .
|
---|
| 590 | webtest_LIBS += \
|
---|
| 591 | $(PATH_STAGE_LIB)/vboxsoap$(VBOX_SUFF_LIB) \
|
---|
| 592 | $(VBOX_GSOAP_CXX_LIBS) \
|
---|
| 593 | $(LIB_RUNTIME)
|
---|
| 594 | webtest_LIBS.solaris += nsl
|
---|
| 595 | ifdef VBOX_WITH_WEBSERVICES_SSL
|
---|
| 596 | webtest_DEFS += WITH_OPENSSL
|
---|
| 597 | webtest_SDKS += VBoxOpenSsl
|
---|
| 598 | endif
|
---|
| 599 | webtest_SOURCES = \
|
---|
| 600 | webtest.cpp \
|
---|
| 601 | $(VBOXWEB_OUT_DIR)/soapClient.cpp
|
---|
| 602 | webtest_CLEAN = \
|
---|
| 603 | $(VBOXWEB_OUT_DIR)/soapClient.cpp
|
---|
[16120] | 604 |
|
---|
[98431] | 605 | webtest_ORDERDEPS = $(VBOXWEB_OUT_DIR)/gsoap_copy_all_ts
|
---|
[16120] | 606 | endif # !VBOX_ONLY_SDK
|
---|
| 607 |
|
---|
| 608 |
|
---|
| 609 | #
|
---|
| 610 | # Additional mess to cleanup (applies to both webtest and vboxwebsrv).
|
---|
| 611 | #
|
---|
| 612 | ## @todo figure out whether the SDK really needs this or not...
|
---|
| 613 | OTHER_CLEAN += \
|
---|
[98431] | 614 | $(wildcard $(VBOXWEB_OUT_DIR)/soap*.h) \
|
---|
| 615 | $(wildcard $(VBOXWEB_OUT_DIR)/soap*.cpp) \
|
---|
| 616 | $(wildcard $(VBOXWEB_OUT_DIR)/*.nsmap) \
|
---|
| 617 | $(VBOXWEB_GSOAPH_FROM_XSLT) \
|
---|
| 618 | $(VBOXWEB_GSOAPH_FROM_GSOAP) \
|
---|
| 619 | $(VBOXWEB_SOAP_CLIENT_H) \
|
---|
| 620 | $(VBOXWEB_SOAP_SERVER_H) \
|
---|
| 621 | $(VBOXWEB_OUT_DIR)/gsoap_generate_all_ts \
|
---|
| 622 | $(VBOXWEB_OUT_DIR)/gsoap_copy_all_ts \
|
---|
| 623 | $(wildcard $(PATH_TARGET_SOAPDEMOXML)/*) \
|
---|
| 624 | $(PATH_TARGET_SOAPDEMOXML)/dummy_file \
|
---|
| 625 | $(wildcard $(PATH_TARGET_SOAPDEMOHEADERS)/*) \
|
---|
| 626 | $(PATH_TARGET_SOAPDEMOHEADERS)/dummy_file \
|
---|
| 627 | $(wildcard $(PATH_TARGET_SOAPDEMONSMAPS)/*) \
|
---|
| 628 | $(PATH_TARGET_SOAPDEMONSMAPS)/dummy_file
|
---|
[16120] | 629 |
|
---|
| 630 | endif # VBOX_GSOAP_INSTALLED
|
---|
| 631 |
|
---|
| 632 |
|
---|
[63940] | 633 | if defined(VBOX_ONLY_SDK) && ("$(KBUILD_TARGET)" != "win" || defined(VBOX_FORCE_SDK))
|
---|
[16120] | 634 | #
|
---|
[31649] | 635 | # Globals relevant to the SDK.
|
---|
[16120] | 636 | #
|
---|
| 637 | VBOXWEB_GLUE_PYTHON = $(VBOX_PATH_SDK)/bindings/webservice/python/lib/VirtualBox_wrappers.py
|
---|
[63940] | 638 | # The following 3 files are generated by Python ZSI 2.1_a1 (alpha version
|
---|
| 639 | # shipped by many Linux distributions). Only the first two are actually used.
|
---|
| 640 | # The 4th and 5th file is created by ZSI 2.0 (released in 2007), and gets
|
---|
| 641 | # renamed to the 1st/2nd file for simplicity reasons.
|
---|
| 642 | # ZSI 1.x used different file names. Not worth supporting any more. If you're
|
---|
| 643 | # curious, check the VirtualBox 4.3 sources.
|
---|
[59491] | 644 | VBOXWEB_WS_PYTHON = $(VBOX_PATH_SDK)/bindings/webservice/python/lib/VirtualBox_client.py
|
---|
| 645 | VBOXWEB_WS_PYTHON_TYPES = $(VBOX_PATH_SDK)/bindings/webservice/python/lib/VirtualBox_types.py
|
---|
| 646 | VBOXWEB_WS_PYTHON_SERVER = $(VBOX_PATH_SDK)/bindings/webservice/python/lib/VirtualBox_server.py
|
---|
[63940] | 647 | VBOXWEB_WS_PYTHON_ALTERNATIVE = $(VBOX_PATH_SDK)/bindings/webservice/python/lib/VirtualBox_services.py
|
---|
[17717] | 648 | VBOXWEB_WS_PERL = $(VBOX_PATH_SDK)/bindings/webservice/perl/lib/vboxService.pm
|
---|
[23890] | 649 | VBOXWEB_WS_PHP = $(VBOX_PATH_SDK)/bindings/webservice/php/lib/vboxServiceWrappers.php
|
---|
[16120] | 650 | VBOXWEB_SAMPLES_JAXWS_DIR = $(VBOX_PATH_SDK)/bindings/webservice/java/jax-ws/samples
|
---|
| 651 | VBOXWEB_JAXWSSAMPLE = $(VBOXWEB_SAMPLES_JAXWS_DIR)/clienttest.java
|
---|
| 652 | VBOXWEB_METRICSAMPLE = $(VBOXWEB_SAMPLES_JAXWS_DIR)/metrictest.java
|
---|
| 653 |
|
---|
[98431] | 654 | VBOXWEB_OTHERS += \
|
---|
| 655 | $(if $(VBOX_WITH_PYTHON),$(VBOXWEB_GLUE_PYTHON),) \
|
---|
| 656 | $(if $(VBOX_WITH_PYTHON),$(VBOXWEB_WS_PYTHON),) \
|
---|
| 657 | $(if $(VBOX_WITH_PYTHON),$(VBOXWEB_WS_PYTHON_TYPES),) \
|
---|
| 658 | $(if $(VBOX_WITH_PERL),$(VBOXWEB_WS_PERL),) \
|
---|
| 659 | $(if $(VBOX_WITH_PHP),$(VBOXWEB_WS_PHP),)
|
---|
[31232] | 660 |
|
---|
[16120] | 661 |
|
---|
[19020] | 662 | #
|
---|
| 663 | # Install sample code.
|
---|
| 664 | #
|
---|
| 665 | INSTALLS += vboxwebinst
|
---|
| 666 | vboxwebinst_INST = $(INST_SDK)bindings/webservice/
|
---|
| 667 | vboxwebinst_MODE = a+rx,u+w
|
---|
| 668 | vboxwebinst_SOURCES = \
|
---|
[98431] | 669 | $(if $(VBOX_WITH_PERL),samples/perl/clienttest.pl=>perl/samples/clienttest.pl,) \
|
---|
| 670 | $(if $(VBOX_WITH_PHP),samples/php/clienttest.php=>php/samples/clienttest.php,) \
|
---|
| 671 | $(if $(VBOX_WITH_PYTHON),samples/python/clienttest.py=>python/samples/clienttest.py,)
|
---|
[36612] | 672 |
|
---|
| 673 | INSTALLS += vboxwebinst_nox
|
---|
| 674 | vboxwebinst_nox_INST = $(INST_SDK)bindings/webservice/
|
---|
| 675 | vboxwebinst_nox_MODE = a+r,u+w
|
---|
| 676 | vboxwebinst_nox_SOURCES = \
|
---|
[98431] | 677 | $(if $(VBOX_WITH_PYTHON),samples/python/Makefile=>python/samples/Makefile,) \
|
---|
| 678 | $(if $(VBOX_WITH_PYTHON),samples/python/Makefile.glue=>python/lib/Makefile,) \
|
---|
| 679 | $(if ($VBOX_WITH_JWS),$(PATH_ROOT)/COPYING.LIB=>java/jax-ws/COPYING.LIB,)
|
---|
[18887] | 680 |
|
---|
[46483] | 681 | INSTALLS += vboxwebinst_wsdl
|
---|
| 682 | vboxwebinst_wsdl_INST = $(INST_SDK)bindings/webservice/
|
---|
| 683 | vboxwebinst_wsdl_MODE = a+r,u+w
|
---|
| 684 | vboxwebinst_wsdl_SOURCES = \
|
---|
[98431] | 685 | $(VBOXWEB_WSDL)=>vboxweb.wsdl \
|
---|
| 686 | $(VBOXWEBSERVICE_WSDL)=>vboxwebService.wsdl
|
---|
[46483] | 687 |
|
---|
[61379] | 688 | INSTALLS += vboxwebinst_webtest
|
---|
[61914] | 689 | vboxwebinst_webtest_INST = $(INST_SDK)bindings/webservice/
|
---|
[61379] | 690 | vboxwebinst_webtest_MODE = a+r,u+w
|
---|
| 691 | vboxwebinst_webtest_SOURCES = \
|
---|
[98431] | 692 | $(VBOX_PATH_WEBSERVICE)/websrv-wsdl2gsoapH.xsl=>xsl/websrv-wsdl2gsoapH.xsl \
|
---|
| 693 | $(VBOX_PATH_WEBSERVICE)/websrv-nsmap.xsl=>xsl/websrv-nsmap.xsl \
|
---|
| 694 | $(VBOX_PATH_IDL)/typemap-shared.inc.xsl=>idl/typemap-shared.inc.xsl \
|
---|
| 695 | $(VBOX_PATH_WEBSERVICE)/split-soapC.cpp=>tools/split-soapC.cpp \
|
---|
| 696 | $(VBOX_PATH_WEBSERVICE)/webtest.cpp=>cpp/samples/webtest/webtest.cpp \
|
---|
| 697 | $(VBOX_PATH_WEBSERVICE)/Makefile.webtest=>cpp/samples/webtest/Makefile
|
---|
[61379] | 698 |
|
---|
[16120] | 699 | endif # VBOX_ONLY_SDK
|
---|
| 700 |
|
---|
| 701 | #
|
---|
| 702 | # Update the OTHERS and OTHER_CLEAN lists with VBOXWEB_OTHERS and some more stuff.
|
---|
| 703 | #
|
---|
| 704 | # We can't just built up OTHERS and append it to OTHER_CLEAN because we're sharing
|
---|
[34609] | 705 | # OTHERS with all the other VBox makefiles, thus VBOXWEB_OTHERS.
|
---|
[16120] | 706 | #
|
---|
| 707 | OTHERS += $(VBOXWEB_OTHERS)
|
---|
| 708 | OTHER_CLEAN += \
|
---|
[19020] | 709 | $(VBOXWEB_OTHERS) \
|
---|
[98431] | 710 | $(if $(VBOX_WITH_PYTHON),$(VBOXWEB_WS_PYTHON_SERVER),) \
|
---|
[46483] | 711 | $(VBOXWEB_WSDL) \
|
---|
| 712 | $(VBOXWEBSERVICE_WSDL) \
|
---|
[16120] | 713 | $(VBOXWEB_TYPEMAP) \
|
---|
| 714 | $(VBOXWEB_IDL_SRC)
|
---|
| 715 |
|
---|
| 716 | # generate platform-specific XIDL file from original XIDL file
|
---|
[42540] | 717 | $(VBOXWEB_IDL_SRC): $(VBOXWEB_IDL_SRC_STRIPPED) $(VBOX_PATH_WEBSERVICE)/platform-xidl.xsl | $$(dir $$@)
|
---|
[16120] | 718 | $(call MSG_GENERATE,,$@,$(VBOXWEB_IDL_SRC) using platform-xidl.xsl)
|
---|
[38161] | 719 | $(QUIET)$(RM) -f -- $@
|
---|
[16120] | 720 | $(QUIET)$(VBOX_XSLTPROC) $(VBOXWEB_XSLTPROC_VERBOSE) -o $@ $(VBOX_PATH_WEBSERVICE)/platform-xidl.xsl $<
|
---|
| 721 |
|
---|
| 722 | # generate WSDL from main XIDL file
|
---|
[46483] | 723 | $(VBOXWEB_WSDL): $(VBOXWEB_IDL_SRC) $(VBOX_PATH_WEBSERVICE)/websrv-wsdl.xsl $(VBOX_PATH_IDL)/typemap-shared.inc.xsl $(RECOMPILE_ON_MAKEFILE_CURRENT) | $$(dir $$@)
|
---|
[38161] | 724 | $(call MSG_GENERATE,,$@,$(VBOXWEB_IDL_SRC) using websrv-wsdl.xsl)
|
---|
| 725 | $(QUIET)$(RM) -f -- $@
|
---|
[16120] | 726 | $(QUIET)$(VBOX_XSLTPROC) $(VBOXWEB_XSLTPROC_VERBOSE) -o $@ $(VBOX_PATH_WEBSERVICE)/websrv-wsdl.xsl $<
|
---|
| 727 |
|
---|
[47392] | 728 | $(VBOXWEBSERVICE_WSDL): $(VBOXWEB_IDL_SRC) $(VBOX_PATH_WEBSERVICE)/websrv-wsdl-service.xsl $(VBOX_PATH_IDL)/typemap-shared.inc.xsl $(RECOMPILE_ON_MAKEFILE_CURRENT) | $$(dir $$@)
|
---|
[38161] | 729 | $(call MSG_GENERATE,,$@,$(VBOXWEB_IDL_SRC) using websrv-wsdl-service.xsl)
|
---|
| 730 | $(QUIET)$(RM) -f -- $@
|
---|
[16120] | 731 | $(QUIET)$(VBOX_XSLTPROC) $(VBOXWEB_XSLTPROC_VERBOSE) -o $@ $(VBOX_PATH_WEBSERVICE)/websrv-wsdl-service.xsl $<
|
---|
| 732 |
|
---|
| 733 | ifdef VBOX_ONLY_SDK
|
---|
| 734 |
|
---|
[98431] | 735 | $(VBOXWEB_GLUE_PYTHON): $(VBOXWEB_IDL_SRC) $(VBOXWEB_WSDL) $(VBOXWEBSERVICE_WSDL) $(VBOX_PATH_WEBSERVICE)/websrv-python.xsl
|
---|
[16120] | 736 | $(call MSG_GENERATE,,$@,$(VBOXWEB_IDL_SRC) using websrv-python.xsl)
|
---|
[38161] | 737 | $(QUIET)$(RM) -f -- $@
|
---|
[16120] | 738 | $(QUIET)$(MKDIR) -p $(@D)
|
---|
| 739 | $(QUIET)$(VBOX_XSLTPROC) $(VBOXWEB_XSLTPROC_VERBOSE) -o $@ $(VBOX_PATH_WEBSERVICE)/websrv-python.xsl $<
|
---|
| 740 |
|
---|
[98431] | 741 | $(VBOXWEB_WS_PYTHON) \
|
---|
| 742 | + $(VBOXWEB_WS_PYTHON_TYPES): $(VBOXWEB_WSDL) $(VBOXWEBSERVICE_WSDL)
|
---|
[16120] | 743 | $(call MSG_GENERATE,,$@, WS Python bindings)
|
---|
[38161] | 744 | $(QUIET)$(RM) -f -- $@
|
---|
[16120] | 745 | $(QUIET)$(MKDIR) -p $(@D)
|
---|
[98431] | 746 | # Change directory to the "source", as otherwise ZSI 2.0 has trouble finding
|
---|
| 747 | # the 2nd WSDL file included in the main one. ZSI 2.1 is smarter, but some
|
---|
| 748 | # versions floating around (especially on Linux) lack the --file option.
|
---|
| 749 | if "$(KBUILD_HOST)" != "win"
|
---|
[63941] | 750 | $(QUIET)$(REDIRECT) -C $(dir $(VBOXWEBSERVICE_WSDL)) -- $(SHELL) -c "$(VBOX_WSDL2PY) -b --output-dir $(@D) $(VBOXWEBSERVICE_WSDL) || $(VBOX_WSDL2PY) -b --file $(VBOXWEBSERVICE_WSDL) --output-dir $(@D)"
|
---|
[98431] | 751 | else
|
---|
[63940] | 752 | $(QUIET)$(REDIRECT) -C $(dir $(VBOXWEBSERVICE_WSDL)) -- $(VBOX_WSDL2PY) -b --file $(subst /,\\\\,$(VBOXWEBSERVICE_WSDL)) --output-dir $(@D)
|
---|
[98431] | 753 | endif
|
---|
| 754 | # Hack: some wsdl2py versions generate VirtualBox_client.py, some generate
|
---|
| 755 | # VirtualBox_services.py. Standardize on the former.
|
---|
[63940] | 756 | -$(QUIET)$(MV) -f $(VBOXWEB_WS_PYTHON_ALTERNATIVE) $(VBOXWEB_WS_PYTHON)
|
---|
[98431] | 757 | # We do not ever need the VirtualBox_server.py file. Delete it immediately
|
---|
| 758 | # so that it will not get packaged in the SDK.
|
---|
[59491] | 759 | $(QUIET)$(RM) -f -- $(VBOXWEB_WS_PYTHON_SERVER)
|
---|
[16120] | 760 | $(QUIET)$(APPEND) $@ ''
|
---|
| 761 |
|
---|
[98431] | 762 | $(VBOXWEB_WS_PERL): $(VBOXWEB_WSDL) $(VBOXWEBSERVICE_WSDL)
|
---|
[17717] | 763 | $(call MSG_GENERATE,,$@, WS Perl bindings)
|
---|
| 764 | $(QUIET)$(MKDIR) -p $(@D)
|
---|
[17738] | 765 | $(QUIET)$(REDIRECT) -C $(@D) -- $(VBOX_STUBMAKER) file://$(VBOXWEBSERVICE_WSDL)
|
---|
[98431] | 766 | # Ugly, ugly, ugly, make me right once
|
---|
[53937] | 767 | $(QUIET)$(SED) -e "s+http://www.virtualbox.org/Service+http://www.virtualbox.org/+" --output $(VBOXWEB_WS_PERL).tmp $(VBOXWEB_WS_PERL)
|
---|
[18609] | 768 | $(QUIET)$(MV) $(VBOXWEB_WS_PERL).tmp $(VBOXWEB_WS_PERL)
|
---|
[17717] | 769 | $(QUIET)$(APPEND) $@ ''
|
---|
| 770 |
|
---|
[98431] | 771 | $(VBOXWEB_WS_PHP): $(VBOXWEB_IDL_SRC) $(VBOX_PATH_WEBSERVICE)/websrv-php.xsl
|
---|
[23890] | 772 | $(call MSG_GENERATE,,$@,$(VBOXWEB_IDL_SRC) using websrv-php.xsl)
|
---|
[38161] | 773 | $(QUIET)$(RM) -f -- $@
|
---|
[23890] | 774 | $(QUIET)$(MKDIR) -p $(@D)
|
---|
| 775 | $(QUIET)$(VBOX_XSLTPROC) $(VBOXWEB_XSLTPROC_VERBOSE) -o $@ $(VBOX_PATH_WEBSERVICE)/websrv-php.xsl $<
|
---|
| 776 |
|
---|
[16120] | 777 | endif # VBOX_ONLY_SDK
|
---|
| 778 |
|
---|
| 779 | # generate typemap.dat (used by wsdl2h) from main XIDL file
|
---|
[45483] | 780 | $(VBOXWEB_TYPEMAP): $(VBOXWEB_IDL_SRC) $(VBOX_PATH_WEBSERVICE)/websrv-typemap.xsl $(VBOX_PATH_IDL)/typemap-shared.inc.xsl $(RECOMPILE_ON_MAKEFILE_CURRENT) | $$(dir $$@)
|
---|
[16120] | 781 | $(call MSG_GENERATE,,$@,$(VBOXWEB_IDL_SRC) using websrv-typemap.xsl)
|
---|
[38161] | 782 | $(QUIET)$(RM) -f -- $@
|
---|
[16120] | 783 | $(QUIET)$(VBOX_XSLTPROC) $(VBOXWEB_XSLTPROC_VERBOSE) -o $@ $(VBOX_PATH_WEBSERVICE)/websrv-typemap.xsl $<
|
---|
| 784 |
|
---|
| 785 | # generate gsoap pseudo-C header file from that WSDL; once via XSLT...
|
---|
[45483] | 786 | $(VBOXWEB_GSOAPH_FROM_XSLT): $(VBOXWEB_WSDL) $(VBOX_PATH_WEBSERVICE)/websrv-wsdl2gsoapH.xsl $(VBOX_PATH_IDL)/typemap-shared.inc.xsl $(RECOMPILE_ON_MAKEFILE_CURRENT) | $$(dir $$@)
|
---|
[16120] | 787 | $(call MSG_GENERATE,,$@,$(VBOXWEB_WSDL) using websrv-wsdl2gsoapH.xsl)
|
---|
[38161] | 788 | $(QUIET)$(RM) -f -- $@
|
---|
[16120] | 789 | $(QUIET)$(VBOX_XSLTPROC) $(VBOXWEB_XSLTPROC_VERBOSE) -o $@ $(VBOX_PATH_WEBSERVICE)/websrv-wsdl2gsoapH.xsl $<
|
---|
| 790 |
|
---|
[38161] | 791 | VBOX_NSMAP = $(VBOXWEB_OUT_DIR)/vboxwebsrv.nsmap
|
---|
[45483] | 792 | $(VBOX_NSMAP): $(VBOXWEB_IDL_SRC) $(VBOX_PATH_WEBSERVICE)/websrv-nsmap.xsl $(VBOX_PATH_IDL)/typemap-shared.inc.xsl $(RECOMPILE_ON_MAKEFILE_CURRENT) | $$(dir $$@)
|
---|
[16120] | 793 | $(call MSG_GENERATE,,$@,$(VBOXWEB_IDL_SRC) using websrv-nsmap.xsl)
|
---|
[38161] | 794 | $(QUIET)$(RM) -f -- $@
|
---|
[16120] | 795 | $(QUIET)$(VBOX_XSLTPROC) $(VBOXWEB_XSLTPROC_VERBOSE) -o $@ $(VBOX_PATH_WEBSERVICE)/websrv-nsmap.xsl $<
|
---|
| 796 |
|
---|
| 797 | ifdef VBOX_GSOAP_INSTALLED
|
---|
[98431] | 798 | # ... and once with the gSOAP tool (just for comparison, we don't use it for licensing reasons)
|
---|
| 799 | $(VBOXWEB_GSOAPH_FROM_GSOAP): $(VBOXWEB_WSDL) $(VBOXWEB_TYPEMAP) | $$(dir $$@)
|
---|
[16120] | 800 | $(call MSG_GENERATE,,$@,)
|
---|
[38161] | 801 | $(QUIET)$(RM) -f -- $@
|
---|
[16120] | 802 | $(VBOX_WSDL2H) $(VBOXWEB_WSDL_VERBOSE) -t$(VBOXWEB_TYPEMAP) -nvbox -o $@ $<
|
---|
| 803 |
|
---|
[98431] | 804 | # this sets the gsoap header that we use for further compilation; if stuff works, then the
|
---|
| 805 | # one we generate via XSLT produces the same end result as the one from the gSOAP tool;
|
---|
| 806 | # with this variable we can swap for testing, but shipped code must use VBOXWEB_GSOAPH_FROM_XSLT
|
---|
| 807 | GSOAPH_RELEVANT = $(VBOXWEB_GSOAPH_FROM_XSLT)
|
---|
[16120] | 808 |
|
---|
[98431] | 809 | # wsdl2h -v: verbose
|
---|
| 810 | # wsdl2h -e: don't qualify enum names
|
---|
| 811 | # wsdl2h -n<prefix>: namespace header prefix
|
---|
[16120] | 812 |
|
---|
[98431] | 813 | ## @todo change this to state explicitly what will be generated?
|
---|
[16120] | 814 |
|
---|
[98431] | 815 | #
|
---|
| 816 | # Generate server and client code from gsoap pseudo-C header file.
|
---|
| 817 | #
|
---|
| 818 | # Options for soapcpp2:
|
---|
| 819 | # -2: generate SOAP 1.2 calls
|
---|
| 820 | # -L: don't generate soapClientLib/soapServerLib
|
---|
| 821 | # -w: don't generate WSDL and schema files
|
---|
| 822 | # -x: don't generate sample XML files (VBOXWEB_SOAPCPP2_SKIP_FILES).
|
---|
| 823 | #
|
---|
| 824 | $(VBOXWEB_OUT_DIR)/gsoap_generate_all_ts \
|
---|
| 825 | + $(VBOXWEB_OUT_DIR)/soapH.h \
|
---|
| 826 | $(if-expr !defined(VBOX_WITHOUT_NOINLINE_SOAPH), \
|
---|
| 827 | + $(VBOXWEB_OUT_DIR)/soapH-noinline-1.cpp \
|
---|
| 828 | + $(VBOXWEB_OUT_DIR)/soapH-noinline-2.cpp \
|
---|
| 829 | + $(VBOXWEB_OUT_DIR)/soapH-noinline-3.cpp \
|
---|
| 830 | + $(VBOXWEB_OUT_DIR)/soapH-noinline-4.cpp \
|
---|
| 831 | + $(VBOXWEB_OUT_DIR)/soapH-noinline-5.cpp \
|
---|
| 832 | + $(VBOXWEB_OUT_DIR)/soapH-noinline-6.cpp \
|
---|
| 833 | + $(VBOXWEB_OUT_DIR)/soapH-noinline-7.cpp \
|
---|
| 834 | + $(VBOXWEB_OUT_DIR)/soapH-noinline-8.cpp \
|
---|
| 835 | + $(VBOXWEB_OUT_DIR)/soapH-noinline-9.cpp \
|
---|
| 836 | + $(VBOXWEB_OUT_DIR)/soapH-noinline-10.cpp \
|
---|
| 837 | + $(VBOXWEB_OUT_DIR)/soapH-noinline-11.cpp \
|
---|
| 838 | + $(VBOXWEB_OUT_DIR)/soapH-noinline-12.cpp,) \
|
---|
| 839 | + $(VBOXWEB_SOAP_CLIENT_H) \
|
---|
| 840 | + $(VBOXWEB_OUT_DIR)/soapC.cpp \
|
---|
| 841 | + $(VBOXWEB_OUT_DIR)/soapClient.cpp \
|
---|
| 842 | + $(VBOXWEB_OUT_DIR)/soapServer.cpp: \
|
---|
| 843 | $(VBOXWEB_GSOAPH_FROM_GSOAP) $(VBOXWEB_GSOAPH_FROM_XSLT) $(VBOX_NSMAP) \
|
---|
| 844 | $(VBOX_PATH_WEBSERVICE)/stdsoap2.sed \
|
---|
| 845 | $(VBOX_PATH_WEBSERVICE)/soap-header-to-inline-source-file.sed \
|
---|
| 846 | $(VBOX_PATH_WEBSERVICE)/soap-header-strip-inline.sed \
|
---|
| 847 | $$(split-soapC_1_TARGET) \
|
---|
| 848 | $(RECOMPILE_ON_MAKEFILE_CURRENT) | $$(dir $$@)
|
---|
[16120] | 849 | $(call MSG_GENERATE,,lots of files,$(GSOAPH_RELEVANT))
|
---|
| 850 | $(RM) -f $@
|
---|
[31649] | 851 | $(REDIRECT) -C $(VBOXWEB_OUT_DIR) -- $(VBOX_SOAPCPP2) $(VBOXWEB_SOAPCPP2_SKIP_FILES) -L -2 -w -I$(VBOX_PATH_GSOAP_IMPORT) $(GSOAPH_RELEVANT)
|
---|
[98431] | 852 | ifeq ($(KBUILD_TARGET),win) # MSC -Wall workaround.
|
---|
[62767] | 853 | $(CP) -f "$(VBOXWEB_SOAP_CLIENT_H)" "$(VBOXWEB_SOAP_CLIENT_H).tmp"
|
---|
| 854 | $(SED) -f $(VBOX_PATH_WEBSERVICE)/stdsoap2.sed --output "$(VBOXWEB_SOAP_CLIENT_H)" "$(VBOXWEB_SOAP_CLIENT_H).tmp"
|
---|
| 855 | $(RM) -f "$(VBOXWEB_SOAP_CLIENT_H).tmp"
|
---|
[98431] | 856 | endif
|
---|
| 857 | ifndef VBOX_WITHOUT_NOINLINE_SOAPH
|
---|
[83223] | 858 | $(MV) -f -- "$(VBOXWEB_OUT_DIR)/soapH.h" "$(VBOXWEB_OUT_DIR)/soapH.h.tmp"
|
---|
| 859 | $(SED) -f $(VBOX_PATH_WEBSERVICE)/soap-header-to-inline-source-file.sed \
|
---|
| 860 | --output "$(VBOXWEB_OUT_DIR)/soapH-noinline.cpp" \
|
---|
| 861 | "$(VBOXWEB_OUT_DIR)/soapH.h.tmp"
|
---|
| 862 | $(split-soapC_1_TARGET) $(VBOXWEB_OUT_DIR)/soapH-noinline.cpp $(VBOXWEB_OUT_DIR)/soapH-noinline- 12
|
---|
| 863 | $(SED) -f $(VBOX_PATH_WEBSERVICE)/soap-header-strip-inline.sed \
|
---|
| 864 | --output "$(VBOXWEB_OUT_DIR)/soapH.h" \
|
---|
| 865 | "$(VBOXWEB_OUT_DIR)/soapH.h.tmp"
|
---|
| 866 | $(RM) -f -- "$(VBOXWEB_OUT_DIR)/soapH.h.tmp" "$(VBOXWEB_OUT_DIR)/soapH-noinline.cpp"
|
---|
[98431] | 867 | endif
|
---|
[16120] | 868 | $(APPEND) $@ done
|
---|
| 869 |
|
---|
[98431] | 870 | # Copy the generated headers and stuff. This was split into a separate rule
|
---|
| 871 | # way back because we thought we could use $(wildcard ) and avoid the shell,
|
---|
| 872 | # however we cannot as it is subject to caching. Let the shell do the globbing.
|
---|
| 873 | # GSOAP versions 2.8 and later do not generate the unneeded soapvbox*.h files
|
---|
| 874 | # any more. Ignoring the exit code is the simple solution, accepting the error.
|
---|
| 875 | $(VBOXWEB_OUT_DIR)/gsoap_copy_all_ts: $(VBOXWEB_OUT_DIR)/gsoap_generate_all_ts | $$(dir $$@)
|
---|
[16120] | 876 | $(RM) -f $@
|
---|
| 877 | $(MKDIR) -p $(PATH_TARGET_SOAPDEMOXML) $(PATH_TARGET_SOAPDEMOHEADERS) $(PATH_TARGET_SOAPDEMONSMAPS)
|
---|
[98431] | 878 | ifdef VBOX_GSOAP_VERBOSE
|
---|
[49615] | 879 | $(MV_EXT) -f -- $(VBOXWEB_OUT_DIR)/*.req.xml $(VBOXWEB_OUT_DIR)/*.res.xml $(PATH_TARGET_SOAPDEMOXML)/
|
---|
[98431] | 880 | endif
|
---|
[58239] | 881 | -$(MV_EXT) -f -- $(VBOXWEB_OUT_DIR)/soapvbox*.h $(PATH_TARGET_SOAPDEMOHEADERS)/
|
---|
[49615] | 882 | $(MV_EXT) -f -- $(VBOXWEB_OUT_DIR)/vboxBinding.nsmap $(PATH_TARGET_SOAPDEMONSMAPS)/
|
---|
[16120] | 883 | $(APPEND) $@ done
|
---|
| 884 |
|
---|
[98431] | 885 | $(PATH_TARGET_SOAPDEMONSMAPS) \
|
---|
| 886 | $(PATH_TARGET_SOAPDEMOHEADERS)/soapvboxBindingProxy.h \
|
---|
| 887 | $(PATH_TARGET_SOAPDEMOHEADERS)/soapvboxBindingObject.h: $(VBOXWEB_OUT_DIR)/gsoap_copy_all_ts
|
---|
[16120] | 888 |
|
---|
[98431] | 889 | hack: $(VBOXWEB_OUT_DIR)/gsoap_copy_all_ts
|
---|
[16120] | 890 |
|
---|
[98431] | 891 | ifndef VBOX_WITHOUT_SPLIT_SOAPC
|
---|
| 892 | #
|
---|
| 893 | # Split up the soapC.cpp monster into manageable bits that can be
|
---|
| 894 | # built in parallel and without exhausting all available memory.
|
---|
| 895 | #
|
---|
| 896 | $(VBOXWEB_OUT_DIR)/soapC-1.cpp \
|
---|
| 897 | + $(VBOXWEB_OUT_DIR)/soapC-2.cpp \
|
---|
| 898 | + $(VBOXWEB_OUT_DIR)/soapC-3.cpp \
|
---|
| 899 | + $(VBOXWEB_OUT_DIR)/soapC-4.cpp \
|
---|
| 900 | + $(VBOXWEB_OUT_DIR)/soapC-5.cpp \
|
---|
| 901 | + $(VBOXWEB_OUT_DIR)/soapC-6.cpp \
|
---|
| 902 | + $(VBOXWEB_OUT_DIR)/soapC-7.cpp \
|
---|
| 903 | + $(VBOXWEB_OUT_DIR)/soapC-8.cpp \
|
---|
| 904 | + $(VBOXWEB_OUT_DIR)/soapC-9.cpp \
|
---|
| 905 | + $(VBOXWEB_OUT_DIR)/soapC-10.cpp \
|
---|
| 906 | + $(VBOXWEB_OUT_DIR)/soapC-11.cpp \
|
---|
| 907 | + $(VBOXWEB_OUT_DIR)/soapC-12.cpp \
|
---|
| 908 | + $(VBOXWEB_OUT_DIR)/soapC-13.cpp \
|
---|
| 909 | + $(VBOXWEB_OUT_DIR)/soapC-14.cpp \
|
---|
| 910 | + $(VBOXWEB_OUT_DIR)/soapC-15.cpp \
|
---|
| 911 | + $(VBOXWEB_OUT_DIR)/soapC-16.cpp \
|
---|
| 912 | + $(VBOXWEB_OUT_DIR)/soapC-17.cpp \
|
---|
| 913 | + $(VBOXWEB_OUT_DIR)/soapC-18.cpp \
|
---|
| 914 | + $(VBOXWEB_OUT_DIR)/soapC-19.cpp \
|
---|
| 915 | + $(VBOXWEB_OUT_DIR)/soapC-20.cpp \
|
---|
| 916 | + $(VBOXWEB_OUT_DIR)/soapC-21.cpp \
|
---|
| 917 | + $(VBOXWEB_OUT_DIR)/soapC-22.cpp \
|
---|
| 918 | + $(VBOXWEB_OUT_DIR)/soapC-23.cpp \
|
---|
| 919 | + $(VBOXWEB_OUT_DIR)/soapC-24.cpp \
|
---|
| 920 | + $(VBOXWEB_OUT_DIR)/soapC-25.cpp \
|
---|
| 921 | + $(VBOXWEB_OUT_DIR)/soapC-26.cpp \
|
---|
| 922 | + $(VBOXWEB_OUT_DIR)/soapC-27.cpp \
|
---|
| 923 | + $(VBOXWEB_OUT_DIR)/soapC-28.cpp \
|
---|
| 924 | + $(VBOXWEB_OUT_DIR)/soapC-29.cpp: \
|
---|
| 925 | $(VBOXWEB_OUT_DIR)/soapC.cpp $$(split-soapC_1_TARGET) | $$(dir $$@)
|
---|
[49615] | 926 | $(RM) -f -- $(wildcard $(VBOXWEB_OUT_DIR)/soapC-?.cpp $(VBOXWEB_OUT_DIR)/soapC-??.cpp)
|
---|
[83223] | 927 | $(split-soapC_1_TARGET) $(VBOXWEB_OUT_DIR)/soapC.cpp $(VBOXWEB_OUT_DIR)/soapC- 29
|
---|
[98431] | 928 | endif # !VBOX_WITHOUT_SPLIT_SOAPC
|
---|
[16120] | 929 |
|
---|
| 930 | endif # VBOX_GSOAP_INSTALLED
|
---|
| 931 |
|
---|
| 932 |
|
---|
| 933 |
|
---|
| 934 | # generate method maps in server: map wsdl operations to com/xpcom method calls
|
---|
[45483] | 935 | $(VBOXWEB_OUT_DIR)/methodmaps.cpp: $(VBOXWEB_IDL_SRC) $(VBOX_PATH_WEBSERVICE)/websrv-cpp.xsl $(VBOX_PATH_IDL)/typemap-shared.inc.xsl $(RECOMPILE_ON_MAKEFILE_CURRENT) | $$(dir $$@)
|
---|
[16120] | 936 | $(call MSG_GENERATE,,$@,$(VBOXWEB_IDL_SRC) using websrv-cpp.xsl)
|
---|
| 937 | $(QUIET)$(VBOX_XSLTPROC) -o $@ $(VBOX_PATH_WEBSERVICE)/websrv-cpp.xsl $<
|
---|
| 938 |
|
---|
[38802] | 939 | # generate C file which contains vboxweb.wsdl
|
---|
| 940 | $$(VBOXWEB_OUT_DIR)/vboxweb-wsdl.c: $(VBOXWEB_WSDL) $(VBOX_BIN2C)
|
---|
| 941 | $(call MSG_TOOL,bin2c,vboxweb-wsdl,$<,$@)
|
---|
[45075] | 942 | $(QUIET)$(VBOX_BIN2C) -ascii VBoxWebWSDL $< $@
|
---|
[16120] | 943 |
|
---|
[38802] | 944 |
|
---|
[16120] | 945 | ifdef VBOX_ONLY_SDK
|
---|
| 946 |
|
---|
[98431] | 947 | $(VBOXWEB_JAXWSSAMPLE): $(VBOX_PATH_WEBSERVICE)/samples/java/jax-ws/clienttest.java
|
---|
[38161] | 948 | $(QUIET)$(RM) -f -- $@
|
---|
[16120] | 949 | $(QUIET)$(MKDIR) -p $(VBOXWEB_SAMPLES_JAXWS_DIR)
|
---|
[18609] | 950 | $(QUIET)$(SED) -e 's/{VBOX_API_SUFFIX}/$(VBOX_API_SUFFIX)/' < $< > $@
|
---|
[16120] | 951 |
|
---|
[98431] | 952 | $(VBOXWEB_METRICSAMPLE): $(VBOX_PATH_WEBSERVICE)/samples/java/jax-ws/metrictest.java
|
---|
[38161] | 953 | $(QUIET)$(RM) -f -- $@
|
---|
[16120] | 954 | $(QUIET)$(MKDIR) -p $(VBOXWEB_SAMPLES_JAXWS_DIR)
|
---|
[18609] | 955 | $(QUIET)$(SED) -e 's/{VBOX_API_SUFFIX}/$(VBOX_API_SUFFIX)/' < $< > $@
|
---|
[16120] | 956 |
|
---|
| 957 | endif # VBOX_ONLY_SDK
|
---|
| 958 |
|
---|
[41477] | 959 | include $(FILE_KBUILD_SUB_FOOTER)
|
---|
[84490] | 960 |
|
---|