1 | # $Id: Makefile.webtest 76553 2019-01-01 01:45:53Z vboxsync $
|
---|
2 | ## @files
|
---|
3 | # ???
|
---|
4 | #
|
---|
5 |
|
---|
6 | #
|
---|
7 | # Copyright (C) 2016-2019 Oracle Corporation
|
---|
8 | #
|
---|
9 | # This file is part of VirtualBox Open Source Edition (OSE), as
|
---|
10 | # available from http://www.virtualbox.org. This file is free software;
|
---|
11 | # you can redistribute it and/or modify it under the terms of the GNU
|
---|
12 | # General Public License (GPL) as published by the Free Software
|
---|
13 | # Foundation, in version 2 as it comes in the "COPYING" file of the
|
---|
14 | # VirtualBox OSE distribution. VirtualBox OSE is distributed in the
|
---|
15 | # hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
|
---|
16 | #
|
---|
17 |
|
---|
18 | XSLTPROC = xsltproc
|
---|
19 | ifeq ($(PATH_GSOAP),)
|
---|
20 | PATH_GSOAP = $(lastword $(sort $(wildcard $(KBUILD_DEVTOOLS)/common/gsoap/*)))
|
---|
21 | endif
|
---|
22 | PATH_GSOAP_BIN := $(strip $(PATH_GSOAP))
|
---|
23 | ifeq ($(PATH_GSOAP_BIN),)
|
---|
24 | PATH_GSOAP_BIN = /usr/bin
|
---|
25 | endif
|
---|
26 | SOAPCPP2 = $(PATH_GSOAP_BIN)/soapcpp2
|
---|
27 |
|
---|
28 | ifneq ($(MAKECMDGOALS),clean)
|
---|
29 | ifeq ($(wildcard $(PATH_GSOAP)/stdsoap2.cpp),)
|
---|
30 | $(error Fix PATH_GSOAP!)
|
---|
31 | endif
|
---|
32 | endif
|
---|
33 |
|
---|
34 | WEBSRVWSDL2GSOAPH = ../../../xsl/websrv-wsdl2gsoapH.xsl
|
---|
35 | WEBSRVNSMAPXSL = ../../../xsl/websrv-nsmap.xsl
|
---|
36 | VBOXWEBIDLSRC = ../../../../VirtualBox.xidl
|
---|
37 | VBOXWEBWSDL = ../../../vboxweb.wsdl
|
---|
38 | SPLITSOAPCCPP = ../../../tools/split-soapC.cpp
|
---|
39 | SOAPCCPP = $(foreach num,1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20,soapC-$(num).cpp)
|
---|
40 | SOAPCO = $(patsubst %.cpp,%.o,$(SOAPCCPP))
|
---|
41 |
|
---|
42 | webtest: webtest.o soapClient.o $(SOAPCO) stdsoap2.o
|
---|
43 | $(CXX) -O2 -o $@ $^ -lssl -lcrypto
|
---|
44 |
|
---|
45 | webtest.o: webtest.cpp soapC.cpp vboxwebsrv.nsmap
|
---|
46 | $(CXX) -O2 -DWITH_OPENSSL -c -o $@ $< -I$(PATH_GSOAP)
|
---|
47 |
|
---|
48 | soapClient.o: soapC.cpp
|
---|
49 | $(CXX) -O2 -c -o $@ soapClient.cpp -I$(PATH_GSOAP)
|
---|
50 |
|
---|
51 | $(SOAPCO): soapC-%.o: soapC-%.cpp
|
---|
52 | $(CXX) -O0 -c -o $@ $< -I$(PATH_GSOAP)
|
---|
53 |
|
---|
54 | soapC.cpp: gsoapH_from_xslt.h
|
---|
55 | $(SOAPCPP2) -x -L -2 -w -I$(PATH_GSOAP)/import $^
|
---|
56 |
|
---|
57 | stdsoap2.o: $(PATH_GSOAP)/stdsoap2.cpp
|
---|
58 | $(CXX) -O2 -DWITH_OPENSSL -c -o $@ $<
|
---|
59 |
|
---|
60 | gsoapH_from_xslt.h:
|
---|
61 | $(XSLTPROC) -o $@ $(WEBSRVWSDL2GSOAPH) $(VBOXWEBWSDL)
|
---|
62 |
|
---|
63 | vboxwebsrv.nsmap:
|
---|
64 | $(XSLTPROC) -o $@ $(WEBSRVNSMAPXSL) $(VBOXWEBIDLSRC)
|
---|
65 |
|
---|
66 | $(subst soapC,%,$(SOAPCCPP)): split-soapC %.cpp
|
---|
67 | ./split-soapC soapC.cpp . 20
|
---|
68 |
|
---|
69 | split-soapC: $(SPLITSOAPCCPP)
|
---|
70 | $(CXX) -O2 -o $@ $<
|
---|
71 |
|
---|
72 | .PHONY: clean
|
---|
73 | clean:
|
---|
74 | rm -f gsoapH_from_xslt.h
|
---|
75 | rm -f soapStub.h soapServer.cpp soapC.cpp soapClient.cpp
|
---|
76 | rm -f soapH.h soapvboxBindingObject.h soapvboxBindingProxy.h
|
---|
77 | rm -f vboxBinding.nsmap
|
---|
78 | rm -f vboxwebsrv.nsmap
|
---|
79 | rm -f split-soapC
|
---|
80 | rm -f $(SOAPCCPP) $(SOAPCO)
|
---|
81 | rm -f soapClient.o stdsoap2.o
|
---|
82 | rm -f webtest.o webtest
|
---|
83 | rm -f soapC-split-done
|
---|
84 |
|
---|