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