VirtualBox

source: vbox/trunk/src/VBox/Main/webservice/Makefile.kmk@ 40130

Last change on this file since 40130 was 40130, checked in by vboxsync, 13 years ago

Main/webservice+doc/manual: Add SSL support to the webservice, and also add an optional parameter which ensures the authentication setting is correct. Update manual and SDK reference.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 29.5 KB
Line 
1# $Id: Makefile.kmk 40130 2012-02-14 15:17:35Z vboxsync $
2## @file
3# Sub-Makefile for the VBox web service.
4#
5# Warning! This is a seriously complicated makefile!
6#
7
8#
9# Copyright (C) 2006-2012 Oracle Corporation
10#
11# This file is part of VirtualBox Open Source Edition (OSE), as
12# available from http://www.virtualbox.org. This file is free software;
13# you can redistribute it and/or modify it under the terms of the GNU
14# General Public License (GPL) as published by the Free Software
15# Foundation, in version 2 as it comes in the "COPYING" file of the
16# VirtualBox OSE distribution. VirtualBox OSE is distributed in the
17# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
18#
19
20# Define VBOX_GSOAP_INSTALLED to something if you have gSOAP's
21# "wsdl2h" and "soapcpp2" executables on your PATH somewhere.
22
23#
24# Here's an overview how all this works. It's complicated. Essentially,
25# lots of files get generated automatically from our XML XIDL file that
26# describes the VirtualBox API (../idl/VirtualBox.xidl); as a result,
27# no manual coding is necessary when the API changes. All generated
28# web service code gets adjusted automatically.
29#
30# In more detail:
31#
32# 1) We use xsltproc and websrv-wsdl.xsl to generate a WSDL file from
33# our XML IDL file. WSDL (Web Service Description language) is an XML
34# industry standard that publicly describes a web service.
35# So, the WSDL generated here describes the VirtualBox web
36# service to third-party clients; for example, one can feed it to
37# Java or Perl or some other toolkit that understands WSDL and thus
38# easily write a short script that connects to the web service properly.
39# This WSDL file ends up in $(VBOXWEB_OUT_DIR)/vboxweb.wsdl.
40#
41# 2) We use xsltproc and websrv-wsdl2gsoapH.xsl to generate a so-called
42# "gSoap header file": $(VBOXWEB_OUT_DIR)/gsoapH_from_xslt.h from
43# the WSDL previously generated.
44# This file looks like a C header file, but really isn't meant
45# to be included by a C compiler. Instead, it just happens to be the
46# format that gSOAP uses to specify SOAP interfaces instead of WSDL.
47# (The reason for this appears to be that gSOAP predates WSDL and
48# thus needed some format to describe the syntax of a web service.)
49#
50# Note that gSOAP now also comes with its own WSDL-to-gsoap.h converter,
51# but the readme mentions some funny license restrictions, so instead we
52# have our own converter in XSLT.
53#
54# 3) We then feed that pseudo-header file to gSOAP's soapcpp2 compiler,
55# which generates a ton of files in $(VBOXWEB_OUT_DIR), most importantly:
56#
57# SOAP_CLIENT_H = $(VBOXWEB_OUT_DIR)/soapStub.h (header file for webservice clients)
58# SOAP_SERVER_H = $(VBOXWEB_OUT_DIR)/soapH.h (header file for webservice servers)
59#
60# These are "real" header files that one can use to program a) a webservice client
61# and b) a webservice server. Of course to build b) one will have to write method
62# implementations with useful code that does something. This is where more
63# code generation via XSLT comes in:
64#
65# 4) We use xsltproc to generate tons of C++ code directly from the XIDL that
66# maps each SOAP method to our COM methods. This large C++ file is
67# $(VBOXWEB_OUT_DIR)/methodmaps.cpp. The actual webservice executable (vboxwebsrv,
68# which acts as an HTTP server) is composed of this file, plus hard-coded
69# method implementations in vboxweb.cpp, plus gSOAP library code for the HTTP
70# server.
71#
72
73SUB_DEPTH = ../../../..
74include $(KBUILD_PATH)/subheader.kmk
75
76#
77# Find the gSOAP toolkit.
78#
79# Note! We're not using the gSOAP toolkit correctly. The main issue is that
80# compiling soapcpp2.cpp instead of using the library. So, in order
81# to make this work with a locally installed gSOAP toolkit there are
82# some hoops to jump thru to say the least... Shipping soapcpp2.cpp/h
83# is out of the question without also including the two soap tools.
84#
85# Some observations on distros for OSE / configure:
86# The proposed gentoo ebuild screws up several things in the install phase
87# and thus fails to ship stdsoap2.cpp and relatives.
88#
89# debian (2.7.9l-0.2) stuffs stdsoap2.cpp and a handful of the import files
90# into /usr/include/gsoap.
91#
92# fedora (2.7.12-fc10.x86_64) uses the default install layout and does not
93# ship stdsoap2.cpp and friends.
94#
95ifeq ($(VBOX_GSOAP_INSTALLED),)
96 VBOX_GSOAP_INSTALLED = 1
97 VBOX_PATH_GSOAP := $(lastword $(sort $(wildcard $(KBUILD_DEVTOOLS)/common/gsoap/*)))
98 ifeq ($(VBOX_PATH_GSOAP),)
99 VBOX_PATH_GSOAP := $(lastword $(sort $(wildcard $(KBUILD_DEVTOOLS_HST)/gsoap/*)))
100 endif
101 if "$(VBOX_PATH_GSOAP)" == "" && defined(KBUILD_DEVTOOLS_HST)
102 VBOX_PATH_GSOAP := $(lastword $(sort $(wildcard $(KBUILD_DEVTOOLS_HST_ALT)/gsoap/*)))
103 endif
104 ifeq ($(VBOX_PATH_GSOAP),)
105 $(warning VBOX_PATH_GSOAP not found...)
106 VBOX_GSOAP_INSTALLED =
107 endif
108else
109 VBOX_PATH_GSOAP := $(VBOX_PATH_GSOAP)
110endif
111VBOX_PATH_GSOAP_BIN := $(strip $(VBOX_PATH_GSOAP_BIN))
112if "$(VBOX_PATH_GSOAP_BIN)" == ""
113 VBOX_PATH_GSOAP_BIN := $(VBOX_PATH_GSOAP)/bin
114 if "$(KBUILD_HOST)" == "darwin"
115 VBOX_PATH_GSOAP_BIN := $(VBOX_PATH_GSOAP_BIN)/macosx
116 else if "$(KBUILD_HOST)" == "win"
117 VBOX_PATH_GSOAP_BIN := $(VBOX_PATH_GSOAP_BIN)/win32
118 else if "$(KBUILD_HOST)" == "linux"
119 VBOX_PATH_GSOAP_BIN := $(VBOX_PATH_GSOAP_BIN)/linux386
120 else if "$(KBUILD_HOST)" == "solaris"
121 if $(VBOX_SOLARIS_11_VERSION) >= 164
122 VBOX_PATH_GSOAP_BIN := $(VBOX_PATH_GSOAP_BIN)/solaris11.x86
123 else
124 VBOX_PATH_GSOAP_BIN := $(VBOX_PATH_GSOAP_BIN)/solaris.x86
125 endif
126 else
127 VBOX_PATH_GSOAP_BIN := $(VBOX_PATH_GSOAP_BIN)/$(KBUILD_HOST).x86
128 endif
129 if !exists($(VBOX_PATH_GSOAP_BIN))
130 VBOX_PATH_GSOAP_BIN := $(VBOX_PATH_GSOAP)/bin
131 endif
132endif
133VBOX_SOAPCPP2 := $(VBOX_PATH_GSOAP_BIN)/soapcpp2$(HOSTSUFF_EXE)
134VBOX_WSDL2H := $(VBOX_PATH_GSOAP_BIN)/wsdl2h$(HOSTSUFF_EXE)
135VBOX_STUBMAKER = $(firstword $(which stubmaker stubmaker.pl) stubmaker_not_found)
136VBOX_WSDL2PY = $(firstword $(which wsdl2py) wsdl2py_not_found)
137
138VBOX_PATH_GSOAP_IMPORT := $(strip $(if $(VBOX_PATH_GSOAP_IMPORT),$(VBOX_PATH_GSOAP_IMPORT),$(VBOX_PATH_GSOAP)/import))
139VBOX_GSOAP_INCS := $(strip $(if $(VBOX_GSOAP_INCS),$(VBOX_GSOAP_INCS),$(VBOX_PATH_GSOAP) $(VBOX_PATH_GSOAP_IMPORT) ))
140# note: $(if $(defined FOO)) does not work here!
141VBOX_GSOAP_CXX_SOURCES := $(strip $(if-expr "$(origin VBOX_GSOAP_CXX_SOURCES)" != "undefined",$(VBOX_GSOAP_CXX_SOURCES),$(VBOX_PATH_GSOAP)/stdsoap2.cpp))
142VBOX_GSOAP_CXX_LIBS := $(strip $(if-expr "$(origin VBOX_GSOAP_CXX_LIBS)" != "undefined",$(VBOX_GSOAP_CXX_LIBS),))
143
144
145#
146# Globals
147#
148VBOXWEB_OUT_DIR := $(PATH_TARGET)/webservice
149BLDDIRS += $(VBOXWEB_OUT_DIR)
150
151# The webservice location
152VBOX_PATH_WEBSERVICE := $(PATH_SUB_CURRENT)
153
154# If this is set, all webservice files are considered out-of-date every time
155# this makefile is touched. Otherwise, set this to empty.
156RECOMPILE_ON_MAKEFILE_CURRENT := $(MAKEFILE_CURRENT)
157
158PATH_TARGET_SOAPDEMOXML := $(VBOXWEB_OUT_DIR)/demo_soapxml
159PATH_TARGET_SOAPDEMOHEADERS := $(VBOXWEB_OUT_DIR)/demo_headers
160PATH_TARGET_SOAPDEMONSMAPS := $(VBOXWEB_OUT_DIR)/demo_namespacemaps
161PATH_TARGET_WEBTEST := $(VBOXWEB_OUT_DIR)/webtest
162
163# the original XIDL file (has to include documentation as we need it):
164VBOXWEB_IDL_SRC_ORIG := $(VBOX_XIDL_FILE_SRC)
165# platform-specific XIDL file generated from $(VBOXWEB_IDL_SRC):
166VBOXWEB_IDL_SRC := $(VBOXWEB_OUT_DIR)/VirtualBox.xidl
167
168VBOXWEB_WSDL = $(VBOX_PATH_SDK)/bindings/webservice/vboxweb.wsdl
169VBOXWEBSERVICE_WSDL = $(VBOX_PATH_SDK)/bindings/webservice/vboxwebService.wsdl
170
171VBOXWEB_TYPEMAP := $(VBOXWEB_OUT_DIR)/typemap.dat
172
173VBOXWEB_GSOAPH_FROM_XSLT := $(VBOXWEB_OUT_DIR)/gsoapH_from_xslt.h
174ifdef VBOX_GSOAP_INSTALLED
175 VBOXWEB_GSOAPH_FROM_GSOAP := $(VBOXWEB_OUT_DIR)/gsoapH_from_gsoap.h
176else
177 VBOXWEB_GSOAPH_FROM_GSOAP :=
178endif
179VBOXWEB_SOAP_CLIENT_H := $(VBOXWEB_OUT_DIR)/soapStub.h
180VBOXWEB_SOAP_SERVER_H := $(VBOXWEB_OUT_DIR)/soapH.h
181
182
183ifdef VBOX_GSOAP_VERBOSE
184 VBOXWEB_XSLTPROC_VERBOSE = --stringparam G_argDebug '1'
185 VBOXWEB_WSDL_VERBOSE = -v
186else
187 VBOXWEB_SOAPCPP2_SKIP_FILES = -x
188endif
189
190
191## @todo VBOXWEB_GSOAPH_FROM_XSLT should probably be a indirect dep of something.
192VBOXWEB_OTHERS += \
193 $(VBOXWEB_GSOAPH_FROM_XSLT)
194
195
196
197ifdef VBOX_GSOAP_INSTALLED
198 ifndef VBOX_ONLY_SDK
199 #
200 # vboxsoap - Library used by both the programs (save build time).
201 #
202 LIBRARIES += vboxsoap
203 vboxsoap_TEMPLATE = VBOXR3EXE
204 ifdef VBOX_USE_VCC80
205 vboxsoap_CXXFLAGS.win += -bigobj
206 endif
207 ifn1of ($(KBUILD_TARGET), win)
208 vboxsoap_CXXFLAGS += -Wno-shadow
209 endif
210 vboxsoap_INCS := \
211 $(VBOX_GSOAP_INCS) \
212 $(VBOXWEB_OUT_DIR) \
213 $(PATH_SUB_CURRENT)
214 ifdef VBOX_WITH_WEBSERVICES_SSL
215 vboxsoap_DEFS += WITH_OPENSSL
216 vboxsoap_SDKS += VBOX_OPENSSL2
217 endif
218 ifdef VBOX_WITHOUT_SPLIT_SOAPC
219 vboxsoap_SOURCES = \
220 $(VBOXWEB_OUT_DIR)/soapC.cpp
221 else
222 BLDPROGS += split-soapC
223 split-soapC_TEMPLATE = VBOXBLDPROG
224 split-soapC_SOURCES = split-soapC.cpp
225
226 vboxsoap_SOURCES = \
227 $(VBOXWEB_OUT_DIR)/soapC-1.cpp \
228 $(VBOXWEB_OUT_DIR)/soapC-2.cpp \
229 $(VBOXWEB_OUT_DIR)/soapC-3.cpp \
230 $(VBOXWEB_OUT_DIR)/soapC-4.cpp \
231 $(VBOXWEB_OUT_DIR)/soapC-5.cpp \
232 $(VBOXWEB_OUT_DIR)/soapC-6.cpp \
233 $(VBOXWEB_OUT_DIR)/soapC-7.cpp \
234 $(VBOXWEB_OUT_DIR)/soapC-8.cpp \
235 $(VBOXWEB_OUT_DIR)/soapC-9.cpp \
236 $(VBOXWEB_OUT_DIR)/soapC-10.cpp \
237 $(VBOXWEB_OUT_DIR)/soapC-11.cpp \
238 $(VBOXWEB_OUT_DIR)/soapC-12.cpp \
239 $(VBOXWEB_OUT_DIR)/soapC-13.cpp \
240 $(VBOXWEB_OUT_DIR)/soapC-14.cpp \
241 $(VBOXWEB_OUT_DIR)/soapC-15.cpp \
242 $(VBOXWEB_OUT_DIR)/soapC-16.cpp \
243 $(VBOXWEB_OUT_DIR)/soapC-17.cpp \
244 $(VBOXWEB_OUT_DIR)/soapC-18.cpp \
245 $(VBOXWEB_OUT_DIR)/soapC-19.cpp \
246 $(VBOXWEB_OUT_DIR)/soapC-20.cpp
247 endif
248 vboxsoap_CLEAN := $(vboxsoap_SOURCES) # lazy bird
249 vboxsoap_SOURCES += \
250 $(VBOX_GSOAP_CXX_SOURCES)
251 vboxsoap_ORDERDEPS = \
252 $(VBOXWEB_IDL_SRC) \
253 $(VBOXWEB_OUT_DIR)/gsoap_copy_all_ts
254 ifn1of ($(KBUILD_TARGET), win)
255 $(VBOX_GSOAP_CXX_SOURCES)_CXXFLAGS = -Wno-format
256 endif
257 $(VBOXWEB_OUT_DIR)/soapC-3.cpp_CXXFLAGS.win.x86 = -Og- # VCC70 says "function too large".
258
259ifdef VBOX_SOAP_PRECOMPILED_HEADER
260 # This'll save a few seconds, but the compiler invocation currently makes it impracticable. This will
261 # be addressed in a future kBuild version, by adding PCH support or/and by adding some helpers to
262 # gather the required data (DEFS,INCS,CXXTOOL,CXXFLAGS).
263 vboxsoap_INTERMEDIATES += $(VBOXWEB_OUT_DIR)/soapH.h.gch
264 vboxsoap_CXXFLAGS += -Winvalid-pch -H
265 vboxsoap_CLEAN += $(VBOXWEB_OUT_DIR)/soapH.h.gch
266
267$(VBOXWEB_OUT_DIR)/soapH.h.gch: $(VBOXWEB_OUT_DIR)/soapH.h
268 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 \
269 $< -o $@
270endif
271 endif # !VBOX_ONLY_SDK
272
273
274 ifndef VBOX_ONLY_SDK
275 #
276 # vboxwebsrv - webservice server process
277 #
278 PROGRAMS += vboxwebsrv
279 vboxwebsrv_TEMPLATE = VBOXMAINCLIENTEXE
280 vboxwebsrv_DEFS += SOCKET_CLOSE_ON_EXEC
281 vboxwebsrv_INCS = \
282 $(VBOX_GSOAP_INCS) \
283 $(VBOXWEB_OUT_DIR) \
284 .
285 ifdef VBOX_USE_VCC80
286 vboxwebsrv_CXXFLAGS.win += -bigobj
287 endif
288 ifn1of ($(KBUILD_TARGET), win)
289 vboxwebsrv_CXXFLAGS += -Wno-shadow
290 endif
291 vboxwebsrv_LIBS += \
292 $(PATH_STAGE_LIB)/vboxsoap$(VBOX_SUFF_LIB) \
293 $(VBOX_GSOAP_CXX_LIBS) \
294 $(LIB_RUNTIME)
295 vboxwebsrv_LIBS.solaris += socket nsl
296 ifdef VBOX_WITH_WEBSERVICES_SSL
297 vboxwebsrv_DEFS += WITH_OPENSSL
298 vboxwebsrv_SDKS += VBOX_OPENSSL2
299 endif
300 vboxwebsrv_SOURCES = \
301 vboxweb.cpp \
302 $(VBOXWEB_OUT_DIR)/methodmaps.cpp \
303 $(VBOXWEB_OUT_DIR)/soapServer.cpp \
304 $(VBOXWEB_OUT_DIR)/vboxweb-wsdl.c
305 vboxwebsrv_CLEAN = \
306 $(VBOXWEB_OUT_DIR)/methodmaps.cpp \
307 $(VBOXWEB_OUT_DIR)/soapServer.cpp \
308 $(VBOXWEB_OUT_DIR)/vboxweb-wsdl.c
309
310 vboxweb.cpp_DEFS = \
311 VBOX_BUILD_TARGET=\"$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH)\" \
312 $(if $(VBOX_BLEEDING_EDGE),VBOX_BLEEDING_EDGE=\"$(VBOX_BLEEDING_EDGE)\",)
313
314 vboxwebsrv_ORDERDEPS = $(VBOXWEB_OUT_DIR)/gsoap_copy_all_ts
315 endif # !VBOX_ONLY_SDK
316
317 ifdef VBOX_WITH_JWS
318INSTALLS += VBoxJWs-inst-jar
319
320#
321# Java glue JAR files
322#
323VBOX_JWS_JAR = $(VBoxJWs-inst-jar_0_OUTDIR)/vboxjws.jar
324VBOX_JWSDOC_JAR = $(VBoxJWs-inst-jar_0_OUTDIR)/vboxjws-doc.jar
325VBOX_JWSSRC_JAR = $(VBoxJWs-inst-jar_0_OUTDIR)/vboxjws-src.jar
326VBOX_JWS_TARGET := $(PATH_TARGET)/vboxjws-gen
327VBOX_JWS_GEN = $(VBOX_JWS_TARGET)/jwsgen
328VBOX_JWS_JDEST := $(VBOX_JWS_TARGET)/jdest
329VBOX_JWSDOC_JDEST := $(VBOX_JWS_TARGET)/jdest-doc
330VBOX_GLUE_XSLT_DIR := $(PATH_ROOT)/src/VBox/Main/glue
331VBOX_JAXLIB_DIR := $(PATH_ROOT)/src/VBox/Main/webservice/jaxlibs
332
333VBoxJWs-inst-jar_INST = $(INST_SDK)bindings/webservice/java/jax-ws/
334VBoxJWs-inst-jar_MODE = a+r,u+w
335VBoxJWs-inst-jar_SOURCES = \
336 $(VBOX_JWS_JAR) \
337 $(VBOX_JWSDOC_JAR) \
338 $(VBOX_JWSSRC_JAR)
339VBoxJWs-inst-jar_CLEAN = \
340 $(VBOX_JWS_JAR) \
341 $(VBOX_JWSDOC_JAR) \
342 $(VBOX_JWSSRC_JAR) \
343 $(VBOX_JWS_GEN)/jwsglue.list \
344 $(VBOX_JWSDOC_JDEST)/package-list \
345 $(wildcard \
346 $(VBOX_JWS_GEN)/java/*/*/*.java \
347 $(VBOX_JWS_GEN)/java/*/*/*/*.java \
348 $(VBOX_JWS_JDEST)/*.class \
349 $(VBOX_JWS_JDEST)/*/*.class \
350 $(VBOX_JWS_JDEST)/*/*/*.class \
351 $(VBOX_JWS_JDEST)/*/*/*/*.class \
352 $(VBOX_JWSDOC_JDEST)/*.html \
353 $(VBOX_JWSDOC_JDEST)/*.css \
354 $(VBOX_JWSDOC_JDEST)/*/*.gif \
355 $(VBOX_JWSDOC_JDEST)/*/*/*.html \
356 $(VBOX_JWSDOC_JDEST)/*/*/*/*.html \
357 )
358VBoxJWs-inst-jar_BLDDIRS += $(VBOX_JWS_GEN)/java
359
360$(VBOX_JWS_GEN)/jwsglue.list: \
361 $(VBOXWEB_IDL_SRC_ORIG) \
362 $(VBOX_GLUE_XSLT_DIR)/glue-java.xsl \
363 $(VBOX_FILESPLIT) \
364 $(VBOXWEBSERVICE_WSDL) \
365 $(VBOXWEB_WSDL) \
366 | $(VBOX_JWS_GEN)/java/
367 $(call MSG_L1,Generating JAX-WS Java glue files from XIDL)
368 $(RM) -f $(wildcard $(VBOX_JWS_GEN)/java/*/*/*.java) $(wildcard $(VBOX_JWS_GEN)/java/*/*/*/*.java)
369 $(QUIET)$(VBOX_XSLTPROC) \
370 --stringparam G_vboxApiSuffix $(VBOX_API_SUFFIX) \
371 --stringparam G_vboxGlueStyle jaxws \
372 --stringparam G_vboxDirPrefix org/virtualbox$(VBOX_API_SUFFIX)/ \
373 -o $(VBOX_JWS_GEN)/merged.file $(VBOX_GLUE_XSLT_DIR)/glue-java.xsl $<
374 $(QUIET)$(MKDIR) -p $(VBOX_JWS_GEN)/java/org/virtualbox$(VBOX_API_SUFFIX)
375 $(QUIET)$(VBOX_FILESPLIT) $(VBOX_JWS_GEN)/merged.file $(VBOX_JWS_GEN)/java
376 $(call MSG_GENERATE,,$@,JAX-WS for Java 1.6 bindings using $(VBOXWEBSERVICE_WSDL))
377 $(VBOX_WSIMPORT) -Xnocompile -p $(VBOX_JAVA_PACKAGE).jaxws -d $(VBOX_JWS_GEN)/java $(VBOXWEBSERVICE_WSDL)
378 $(QUIET)echo $(VBOX_JWS_GEN)/java/*/*/*.java > $@
379 $(QUIET)echo $(VBOX_JWS_GEN)/java/*/*/*/*.java >> $@
380
381$$(VBOX_JWS_JAR): $(VBOX_JWS_GEN)/jwsglue.list $(VBOXWEB_WSDL) $(VBOXWEBSERVICE_WSDL) $(VBOX_JWS_GEN)/MANIFEST.MF | $$(dir $$@)
382 $(call MSG_TOOL,javac,$(notdir $@),jwsgen.list,)
383 $(QUIET)$(RM) -Rf $(VBOX_JWS_JDEST)
384 $(QUIET)$(MKDIR) -p $(VBOX_JWS_JDEST)
385 $(call MSG_L1,Compiling bridge code)
386 $(VBOX_JAVAC) $(VBOX_JAVAC_OPTS) \
387 @$(VBOX_JWS_GEN)/jwsglue.list \
388 -d $(VBOX_JWS_JDEST) -classpath $(VBOX_JWS_JDEST)
389 $(QUIET)$(SED) -e "s/vboxweb.wsdl/vboxweb$(VBOX_API_SUFFIX).wsdl/" < $(VBOXWEBSERVICE_WSDL) > $(VBOX_JWS_JDEST)/vboxwebService$(VBOX_API_SUFFIX).wsdl
390 $(QUIET)$(CP) -f $(VBOXWEB_WSDL) $(VBOX_JWS_JDEST)/vboxweb$(VBOX_API_SUFFIX).wsdl
391 $(call MSG_LINK,$(notdir $@),$@)
392 $(VBOX_JAR) cf $@ $(VBOX_JWS_GEN)/MANIFEST.MF -C $(VBOX_JWS_JDEST) .
393
394$(VBOX_JWS_GEN)/MANIFEST.MF: $(VBOX_PATH_WEBSERVICE)/MANIFEST.MF.in
395 $(QUIET)$(RM) -f -- $@
396 $(QUIET)$(MKDIR) -p $(VBOX_JWS_GEN)
397 $(QUIET)$(SED) \
398 -e 's/@VBOX_VERSION_STRING@/$(VBOX_VERSION_STRING)/' \
399 -e 's/@VBOX_VERSION_MAJOR@/$(VBOX_VERSION_MAJOR)/' \
400 -e 's/@VBOX_VERSION_MINOR@/$(VBOX_VERSION_MINOR)/' \
401 -e 's/@VBOX_API_SUFFIX@/$(VBOX_API_SUFFIX)/' \
402 < $< > $@
403
404$$(VBOX_JWSDOC_JAR): $(VBOX_JWS_GEN)/jwsglue.list $(VBOXWEB_WSDL) $(VBOXWEBSERVICE_WSDL) $$(VBOX_JWS_JAR) | $$(dir $$@)
405 $(call MSG_TOOL,javadoc,$(notdir $@),jwsgen.list,)
406 $(QUIET)$(RM) -Rf $(VBOX_JWSDOC_JDEST)
407 $(QUIET)$(MKDIR) -p $(VBOX_JWSDOC_JDEST)
408 $(call MSG_L1,Generating javadoc html documentation)
409 $(VBOX_JAVADOC) $(VBOX_JAVADOC_OPTS) -quiet \
410 -sourcepath $(VBOX_JWS_GEN)/java org.virtualbox$(VBOX_API_SUFFIX) \
411 -d $(VBOX_JWSDOC_JDEST)
412 $(call MSG_LINK,$(notdir $@),$@)
413 $(VBOX_JAR) cf $@ -C $(VBOX_JWSDOC_JDEST) .
414
415$$(VBOX_JWSSRC_JAR): $$(VBOX_JWS_JAR) | $$(dir $$@)
416 $(call MSG_LINK,$(notdir $@),$@)
417 $(VBOX_JAR) cf $@ -C $(VBOX_JWS_GEN)/java .
418
419## @todo compile ../glue/tests/TestVBox.java to have sanity checking
420
421 endif # VBOX_WITH_JWS
422
423 ifndef VBOX_ONLY_SDK
424 #
425 # webtest - webservice sample client in C++
426 #
427 PROGRAMS += webtest
428 webtest_TEMPLATE = VBOXR3EXE
429 ifdef VBOX_USE_VCC80
430 webtest_CXXFLAGS.win += -bigobj
431 endif
432 ifn1of ($(KBUILD_TARGET), win)
433 webtest_CXXFLAGS += -Wno-shadow
434 endif
435 webtest_INCS := \
436 $(VBOX_GSOAP_INCS) \
437 $(VBOXWEB_OUT_DIR) \
438 .
439 webtest_LIBS += \
440 $(PATH_STAGE_LIB)/vboxsoap$(VBOX_SUFF_LIB) \
441 $(VBOX_GSOAP_CXX_LIBS) \
442 $(LIB_RUNTIME)
443 webtest_LIBS.solaris += nsl
444 ifdef VBOX_WITH_WEBSERVICES_SSL
445 webtest_DEFS += WITH_OPENSSL
446 webtest_SDKS += VBOX_OPENSSL2
447 endif
448 webtest_SOURCES = \
449 webtest.cpp \
450 $(VBOXWEB_OUT_DIR)/soapClient.cpp
451 webtest_CLEAN = \
452 $(VBOXWEB_OUT_DIR)/soapClient.cpp
453
454 webtest_ORDERDEPS = $(VBOXWEB_OUT_DIR)/gsoap_copy_all_ts
455 endif # !VBOX_ONLY_SDK
456
457
458 #
459 # Additional mess to cleanup (applies to both webtest and vboxwebsrv).
460 #
461 ## @todo figure out whether the SDK really needs this or not...
462 OTHER_CLEAN += \
463 $(wildcard $(VBOXWEB_OUT_DIR)/soap*.h) \
464 $(wildcard $(VBOXWEB_OUT_DIR)/soap*.cpp) \
465 $(wildcard $(VBOXWEB_OUT_DIR)/*.nsmap) \
466 $(VBOXWEB_GSOAPH_FROM_XSLT) \
467 $(VBOXWEB_GSOAPH_FROM_GSOAP) \
468 $(VBOXWEB_SOAP_CLIENT_H) \
469 $(VBOXWEB_SOAP_SERVER_H) \
470 $(VBOXWEB_OUT_DIR)/gsoap_generate_all_ts \
471 $(VBOXWEB_OUT_DIR)/gsoap_copy_all_ts \
472 $(wildcard $(PATH_TARGET_SOAPDEMOXML)/*) \
473 $(PATH_TARGET_SOAPDEMOXML)/dummy_file \
474 $(wildcard $(PATH_TARGET_SOAPDEMOHEADERS)/*) \
475 $(PATH_TARGET_SOAPDEMOHEADERS)/dummy_file \
476 $(wildcard $(PATH_TARGET_SOAPDEMONSMAPS)/*) \
477 $(PATH_TARGET_SOAPDEMONSMAPS)/dummy_file
478
479endif # VBOX_GSOAP_INSTALLED
480
481
482ifdef VBOX_ONLY_SDK
483 #
484 # Globals relevant to the SDK.
485 #
486 VBOXWEB_GLUE_PYTHON = $(VBOX_PATH_SDK)/bindings/webservice/python/lib/VirtualBox_wrappers.py
487 VBOXWEB_WS_PYTHON = $(VBOX_PATH_SDK)/bindings/webservice/python/lib/VirtualBox_services.py
488 VBOXWEB_WS_PERL = $(VBOX_PATH_SDK)/bindings/webservice/perl/lib/vboxService.pm
489 VBOXWEB_WS_PHP = $(VBOX_PATH_SDK)/bindings/webservice/php/lib/vboxServiceWrappers.php
490 VBOXWEB_SAMPLES_JAXWS_DIR = $(VBOX_PATH_SDK)/bindings/webservice/java/jax-ws/samples
491 VBOXWEB_JAXWSSAMPLE = $(VBOXWEB_SAMPLES_JAXWS_DIR)/clienttest.java
492 VBOXWEB_METRICSAMPLE = $(VBOXWEB_SAMPLES_JAXWS_DIR)/metrictest.java
493
494 VBOXWEB_GLUE_JAVA_TMP = $(VBOXWEB_OUT_DIR)/glue-jaxws.java.tmp
495 VBOXWEB_PATH_SDK_GLUE_JAVA = $(VBOX_PATH_SDK)/bindings/webservice/java/jax-ws/src
496 VBOXWEB_JAVALIB = $(VBOX_PATH_SDK)/bindings/webservice/java/jax-ws/lib
497 VBOXWEB_JAVA15_JAR = $(VBOXWEB_JAVALIB)/vboxws_java15.jar
498 VBOXWEB_JAVA16_JAR = $(VBOXWEB_JAVALIB)/vboxws_java16.jar
499
500 define find_java_files
501 $(shell find $(1) -name \*.java)
502 endef
503
504 VBOXWEB_OTHERS += \
505 $(VBOXWEB_GLUE_PYTHON) \
506 $(VBOXWEB_WS_PYTHON) \
507 $(VBOXWEB_WS_PERL) \
508 $(VBOXWEB_WS_PHP) \
509 $(VBOXWEB_PYTHONWSSAMPLE) \
510 $(PATH_ROOT)
511
512
513 #
514 # Install sample code.
515 #
516 INSTALLS += vboxwebinst
517 vboxwebinst_INST = $(INST_SDK)bindings/webservice/
518 vboxwebinst_MODE = a+rx,u+w
519 vboxwebinst_SOURCES = \
520 samples/perl/clienttest.pl=>perl/samples/clienttest.pl \
521 samples/php/clienttest.php=>php/samples/clienttest.php
522
523 INSTALLS += vboxwebinst_nox
524 vboxwebinst_nox_INST = $(INST_SDK)bindings/webservice/
525 vboxwebinst_nox_MODE = a+r,u+w
526 vboxwebinst_nox_SOURCES = \
527 samples/python/Makefile=>python/samples/Makefile \
528 samples/python/Makefile.glue=>python/lib/Makefile \
529 $(PATH_ROOT)/COPYING.LIB=>java/jax-ws/COPYING.LIB
530
531endif # VBOX_ONLY_SDK
532
533## @todo VBOXWEB_WSDL and VBOXWEBSERVICE_WSDL should be an install target.
534VBOXWEB_OTHERS += \
535 $(VBOXWEB_WSDL) \
536 $(VBOXWEBSERVICE_WSDL)
537
538#
539# Update the OTHERS and OTHER_CLEAN lists with VBOXWEB_OTHERS and some more stuff.
540#
541# We can't just built up OTHERS and append it to OTHER_CLEAN because we're sharing
542# OTHERS with all the other VBox makefiles, thus VBOXWEB_OTHERS.
543#
544OTHERS += $(VBOXWEB_OTHERS)
545OTHER_CLEAN += \
546 $(VBOXWEB_OTHERS) \
547 $(VBOXWEB_TYPEMAP) \
548 $(VBOXWEB_IDL_SRC)
549
550# generate platform-specific XIDL file from original XIDL file
551$(VBOXWEB_IDL_SRC): $(VBOXWEB_IDL_SRC_ORIG) $(VBOX_PATH_WEBSERVICE)/platform-xidl.xsl | $$(dir $$@)
552 $(call MSG_GENERATE,,$@,$(VBOXWEB_IDL_SRC) using platform-xidl.xsl)
553 $(QUIET)$(RM) -f -- $@
554 $(QUIET)$(VBOX_XSLTPROC) $(VBOXWEB_XSLTPROC_VERBOSE) -o $@ $(VBOX_PATH_WEBSERVICE)/platform-xidl.xsl $<
555
556# generate WSDL from main XIDL file
557$(VBOXWEB_WSDL): $(VBOXWEB_IDL_SRC) $(VBOX_PATH_WEBSERVICE)/websrv-wsdl.xsl $(VBOX_PATH_WEBSERVICE)/websrv-shared.inc.xsl $(RECOMPILE_ON_MAKEFILE_CURRENT) ## @todo | $$(dir $$@)
558 $(call MSG_GENERATE,,$@,$(VBOXWEB_IDL_SRC) using websrv-wsdl.xsl)
559 $(QUIET)$(RM) -f -- $@
560 $(QUIET)$(MKDIR) -p $(@D)
561 $(QUIET)$(VBOX_XSLTPROC) $(VBOXWEB_XSLTPROC_VERBOSE) -o $@ $(VBOX_PATH_WEBSERVICE)/websrv-wsdl.xsl $<
562
563$(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 $$@)
564 $(call MSG_GENERATE,,$@,$(VBOXWEB_IDL_SRC) using websrv-wsdl-service.xsl)
565 $(QUIET)$(RM) -f -- $@
566 $(QUIET)$(MKDIR) -p $(@D)
567 $(QUIET)$(VBOX_XSLTPROC) $(VBOXWEB_XSLTPROC_VERBOSE) -o $@ $(VBOX_PATH_WEBSERVICE)/websrv-wsdl-service.xsl $<
568
569ifdef VBOX_ONLY_SDK
570
571$(VBOXWEB_GLUE_PYTHON): $(VBOXWEB_IDL_SRC) $(VBOXWEB_WSDL) $(VBOXWEBSERVICE_WSDL) $(VBOX_PATH_WEBSERVICE)/websrv-python.xsl
572 $(call MSG_GENERATE,,$@,$(VBOXWEB_IDL_SRC) using websrv-python.xsl)
573 $(QUIET)$(RM) -f -- $@
574 $(QUIET)$(MKDIR) -p $(@D)
575 $(QUIET)$(VBOX_XSLTPROC) $(VBOXWEB_XSLTPROC_VERBOSE) -o $@ $(VBOX_PATH_WEBSERVICE)/websrv-python.xsl $<
576
577$(VBOXWEB_WS_PYTHON): $(VBOXWEB_WSDL) $(VBOXWEBSERVICE_WSDL)
578 $(call MSG_GENERATE,,$@, WS Python bindings)
579 $(QUIET)$(RM) -f -- $@
580 $(QUIET)$(MKDIR) -p $(@D)
581# Try both w/o and with --file option
582 $(QUIET)$(REDIRECT) -C $(@D) -- bash -c "$(VBOX_WSDL2PY) -b $(VBOXWEBSERVICE_WSDL) || $(VBOX_WSDL2PY) -b --file $(VBOXWEBSERVICE_WSDL)"
583 $(QUIET)$(APPEND) $@ ''
584
585$(VBOXWEB_WS_PERL): $(VBOXWEB_WSDL) $(VBOXWEBSERVICE_WSDL)
586 $(call MSG_GENERATE,,$@, WS Perl bindings)
587 $(QUIET)$(MKDIR) -p $(@D)
588 $(QUIET)$(REDIRECT) -C $(@D) -- $(VBOX_STUBMAKER) file://$(VBOXWEBSERVICE_WSDL)
589# Ugly, ugly, ugly, make me right once
590 $(QUIET)$(SED) -e "s+http://www.virtualbox.org/Service+http://www.virtualbox.org/+" < $(VBOXWEB_WS_PERL) > $(VBOXWEB_WS_PERL).tmp
591 $(QUIET)$(MV) $(VBOXWEB_WS_PERL).tmp $(VBOXWEB_WS_PERL)
592 $(QUIET)$(APPEND) $@ ''
593
594$(VBOXWEB_WS_PHP): $(VBOXWEB_IDL_SRC) $(VBOX_PATH_WEBSERVICE)/websrv-php.xsl
595 $(call MSG_GENERATE,,$@,$(VBOXWEB_IDL_SRC) using websrv-php.xsl)
596 $(QUIET)$(RM) -f -- $@
597 $(QUIET)$(MKDIR) -p $(@D)
598 $(QUIET)$(VBOX_XSLTPROC) $(VBOXWEB_XSLTPROC_VERBOSE) -o $@ $(VBOX_PATH_WEBSERVICE)/websrv-php.xsl $<
599
600endif # VBOX_ONLY_SDK
601
602# generate typemap.dat (used by wsdl2h) from main XIDL file
603$(VBOXWEB_TYPEMAP): $(VBOXWEB_IDL_SRC) $(VBOX_PATH_WEBSERVICE)/websrv-typemap.xsl $(VBOX_PATH_WEBSERVICE)/websrv-shared.inc.xsl $(RECOMPILE_ON_MAKEFILE_CURRENT) | $$(dir $$@)
604 $(call MSG_GENERATE,,$@,$(VBOXWEB_IDL_SRC) using websrv-typemap.xsl)
605 $(QUIET)$(RM) -f -- $@
606 $(QUIET)$(VBOX_XSLTPROC) $(VBOXWEB_XSLTPROC_VERBOSE) -o $@ $(VBOX_PATH_WEBSERVICE)/websrv-typemap.xsl $<
607
608# generate gsoap pseudo-C header file from that WSDL; once via XSLT...
609$(VBOXWEB_GSOAPH_FROM_XSLT): $(VBOXWEB_WSDL) $(VBOX_PATH_WEBSERVICE)/websrv-wsdl2gsoapH.xsl $(VBOX_PATH_WEBSERVICE)/websrv-shared.inc.xsl $(RECOMPILE_ON_MAKEFILE_CURRENT) | $$(dir $$@)
610 $(call MSG_GENERATE,,$@,$(VBOXWEB_WSDL) using websrv-wsdl2gsoapH.xsl)
611 $(QUIET)$(RM) -f -- $@
612 $(QUIET)$(VBOX_XSLTPROC) $(VBOXWEB_XSLTPROC_VERBOSE) -o $@ $(VBOX_PATH_WEBSERVICE)/websrv-wsdl2gsoapH.xsl $<
613
614VBOX_NSMAP = $(VBOXWEB_OUT_DIR)/vboxwebsrv.nsmap
615$(VBOX_NSMAP): $(VBOXWEB_IDL_SRC) $(VBOX_PATH_WEBSERVICE)/websrv-nsmap.xsl $(VBOX_PATH_WEBSERVICE)/websrv-shared.inc.xsl $(RECOMPILE_ON_MAKEFILE_CURRENT) | $$(dir $$@)
616 $(call MSG_GENERATE,,$@,$(VBOXWEB_IDL_SRC) using websrv-nsmap.xsl)
617 $(QUIET)$(RM) -f -- $@
618 $(QUIET)$(VBOX_XSLTPROC) $(VBOXWEB_XSLTPROC_VERBOSE) -o $@ $(VBOX_PATH_WEBSERVICE)/websrv-nsmap.xsl $<
619
620ifdef VBOX_GSOAP_INSTALLED
621# ... and once with the gSOAP tool (just for comparison, we don't use it for licensing reasons)
622$(VBOXWEB_GSOAPH_FROM_GSOAP): $(VBOXWEB_WSDL) $(VBOXWEB_TYPEMAP) | $$(dir $$@)
623 $(call MSG_GENERATE,,$@,)
624 $(QUIET)$(RM) -f -- $@
625 $(VBOX_WSDL2H) $(VBOXWEB_WSDL_VERBOSE) -t$(VBOXWEB_TYPEMAP) -nvbox -o $@ $<
626
627# this sets the gsoap header that we use for further compilation; if stuff works, then the
628# one we generate via XSLT produces the same end result as the one from the gSOAP tool;
629# with this variable we can swap for testing, but shipped code must use VBOXWEB_GSOAPH_FROM_XSLT
630GSOAPH_RELEVANT = $(VBOXWEB_GSOAPH_FROM_XSLT)
631
632# wsdl2h -v: verbose
633# wsdl2h -e: don't qualify enum names
634# wsdl2h -n<prefix>: namespace header prefix
635
636## @todo change this to state explicitly what will be generated?
637
638# generate server and client code from gsoap pseudo-C header file
639$(VBOXWEB_OUT_DIR)/gsoap_generate_all_ts \
640+ $(VBOXWEB_OUT_DIR)/soapH.h \
641+ $(VBOXWEB_OUT_DIR)/soapStub.h \
642+ $(VBOXWEB_OUT_DIR)/soapC.cpp \
643+ $(VBOXWEB_OUT_DIR)/soapClient.cpp \
644+ $(VBOXWEB_OUT_DIR)/soapServer.cpp \
645: $(VBOXWEB_GSOAPH_FROM_GSOAP) $(VBOXWEB_GSOAPH_FROM_XSLT) $(VBOX_NSMAP) $(RECOMPILE_ON_MAKEFILE_CURRENT) | $$(dir $$@)
646 $(call MSG_GENERATE,,lots of files,$(GSOAPH_RELEVANT))
647 $(RM) -f $@
648 $(REDIRECT) -C $(VBOXWEB_OUT_DIR) -- $(VBOX_SOAPCPP2) $(VBOXWEB_SOAPCPP2_SKIP_FILES) -L -2 -w -I$(VBOX_PATH_GSOAP_IMPORT) $(GSOAPH_RELEVANT)
649 $(APPEND) $@ done
650
651# copy the generated headers and stuff. This has to be a separate rule if we
652# want to use wildcard (all commands are expaned when the rule is evaluated).
653$(VBOXWEB_OUT_DIR)/gsoap_copy_all_ts: $(VBOXWEB_OUT_DIR)/gsoap_generate_all_ts | $$(dir $$@)
654 $(RM) -f $@
655 $(MKDIR) -p $(PATH_TARGET_SOAPDEMOXML) $(PATH_TARGET_SOAPDEMOHEADERS) $(PATH_TARGET_SOAPDEMONSMAPS)
656ifdef VBOX_GSOAP_VERBOSE
657 $(MV) -f $(wildcard $(VBOXWEB_OUT_DIR)/*.req.xml $(VBOXWEB_OUT_DIR)/*.res.xml) $(PATH_TARGET_SOAPDEMOXML)
658endif
659 $(MV) -f $(wildcard $(VBOXWEB_OUT_DIR)/soapvbox*.h) $(PATH_TARGET_SOAPDEMOHEADERS)
660 $(MV) -f $(VBOXWEB_OUT_DIR)/vboxBinding.nsmap $(PATH_TARGET_SOAPDEMONSMAPS)
661 $(APPEND) $@ done
662
663$(PATH_TARGET_SOAPDEMONSMAPS) \
664$(PATH_TARGET_SOAPDEMOHEADERS)/soapvboxBindingProxy.h \
665$(PATH_TARGET_SOAPDEMOHEADERS)/soapvboxBindingObject.h: $(VBOXWEB_OUT_DIR)/gsoap_copy_all_ts
666
667# soapcpp2 -2: generate SOAP 1.2 calls
668# soapcpp2 -S: server-side code only
669# soapcpp2 -L: don't generate soapClientLib/soapServerLib
670# soapcpp2 -w: don't generate WSDL and schema files
671# soapcpp2 -x: don't generate sample XML files
672
673ifndef VBOX_WITHOUT_SPLIT_SOAPC
674#
675# Split up the soapC.cpp monster into manageable bits that can be
676# built in parallel and without exhausting all available memory.
677#
678$(VBOXWEB_OUT_DIR)/soapC-1.cpp \
679+ $(VBOXWEB_OUT_DIR)/soapC-2.cpp \
680+ $(VBOXWEB_OUT_DIR)/soapC-3.cpp \
681+ $(VBOXWEB_OUT_DIR)/soapC-4.cpp \
682+ $(VBOXWEB_OUT_DIR)/soapC-5.cpp \
683+ $(VBOXWEB_OUT_DIR)/soapC-6.cpp \
684+ $(VBOXWEB_OUT_DIR)/soapC-7.cpp \
685+ $(VBOXWEB_OUT_DIR)/soapC-8.cpp \
686+ $(VBOXWEB_OUT_DIR)/soapC-9.cpp \
687+ $(VBOXWEB_OUT_DIR)/soapC-10.cpp \
688+ $(VBOXWEB_OUT_DIR)/soapC-11.cpp \
689+ $(VBOXWEB_OUT_DIR)/soapC-12.cpp \
690+ $(VBOXWEB_OUT_DIR)/soapC-13.cpp \
691+ $(VBOXWEB_OUT_DIR)/soapC-14.cpp \
692+ $(VBOXWEB_OUT_DIR)/soapC-15.cpp \
693+ $(VBOXWEB_OUT_DIR)/soapC-16.cpp \
694+ $(VBOXWEB_OUT_DIR)/soapC-17.cpp \
695+ $(VBOXWEB_OUT_DIR)/soapC-18.cpp \
696+ $(VBOXWEB_OUT_DIR)/soapC-19.cpp \
697+ $(VBOXWEB_OUT_DIR)/soapC-20.cpp \
698: $(VBOXWEB_OUT_DIR)/soapC.cpp $$(split-soapC_1_TARGET) | $$(dir $$@)
699 $(RM) -f $(wildcard $(VBOXWEB_OUT_DIR)/soapC-?.cpp $(VBOXWEB_OUT_DIR)/soapC-??.cpp)
700 $(split-soapC_1_TARGET) $(VBOXWEB_OUT_DIR)/soapC.cpp $(VBOXWEB_OUT_DIR) 20
701endif # !VBOX_WITHOUT_SPLIT_SOAPC
702
703endif # VBOX_GSOAP_INSTALLED
704
705
706
707# generate method maps in server: map wsdl operations to com/xpcom method calls
708$(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 $$@)
709 $(call MSG_GENERATE,,$@,$(VBOXWEB_IDL_SRC) using websrv-cpp.xsl)
710 $(QUIET)$(VBOX_XSLTPROC) -o $@ $(VBOX_PATH_WEBSERVICE)/websrv-cpp.xsl $<
711
712# generate C file which contains vboxweb.wsdl
713$$(VBOXWEB_OUT_DIR)/vboxweb-wsdl.c: $(VBOXWEB_WSDL) $(VBOX_BIN2C)
714 $(call MSG_TOOL,bin2c,vboxweb-wsdl,$<,$@)
715 $(QUIET)$(VBOX_BIN2C) -export -ascii VBoxWebWSDL $< $@
716
717
718ifdef VBOX_ONLY_SDK
719
720$(VBOXWEB_JAXWSSAMPLE): $(VBOX_PATH_WEBSERVICE)/samples/java/jax-ws/clienttest.java
721 $(QUIET)$(RM) -f -- $@
722 $(QUIET)$(MKDIR) -p $(VBOXWEB_SAMPLES_JAXWS_DIR)
723 $(QUIET)$(SED) -e 's/{VBOX_API_SUFFIX}/$(VBOX_API_SUFFIX)/' < $< > $@
724
725$(VBOXWEB_METRICSAMPLE): $(VBOX_PATH_WEBSERVICE)/samples/java/jax-ws/metrictest.java
726 $(QUIET)$(RM) -f -- $@
727 $(QUIET)$(MKDIR) -p $(VBOXWEB_SAMPLES_JAXWS_DIR)
728 $(QUIET)$(SED) -e 's/{VBOX_API_SUFFIX}/$(VBOX_API_SUFFIX)/' < $< > $@
729
730endif # VBOX_ONLY_SDK
731
732include $(KBUILD_PATH)/subfooter.kmk
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette