VirtualBox

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

Last change on this file since 31586 was 31234, checked in by vboxsync, 15 years ago

Java: few final touches

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