[69385] | 1 | # $Id: Makefile.webtest 98103 2023-01-17 14:15:46Z vboxsync $
|
---|
| 2 | ## @files
|
---|
| 3 | # ???
|
---|
[61379] | 4 | #
|
---|
[69385] | 5 |
|
---|
| 6 | #
|
---|
[98103] | 7 | # Copyright (C) 2016-2023 Oracle and/or its affiliates.
|
---|
[61379] | 8 | #
|
---|
[96407] | 9 | # This file is part of VirtualBox base platform packages, as
|
---|
| 10 | # available from https://www.virtualbox.org.
|
---|
[61379] | 11 | #
|
---|
[96407] | 12 | # This program is free software; you can redistribute it and/or
|
---|
| 13 | # modify it under the terms of the GNU General Public License
|
---|
| 14 | # as published by the Free Software Foundation, in version 3 of the
|
---|
| 15 | # License.
|
---|
| 16 | #
|
---|
| 17 | # This program is distributed in the hope that it will be useful, but
|
---|
| 18 | # WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
| 19 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
---|
| 20 | # General Public License for more details.
|
---|
| 21 | #
|
---|
| 22 | # You should have received a copy of the GNU General Public License
|
---|
| 23 | # along with this program; if not, see <https://www.gnu.org/licenses>.
|
---|
| 24 | #
|
---|
| 25 | # SPDX-License-Identifier: GPL-3.0-only
|
---|
| 26 | #
|
---|
[61379] | 27 |
|
---|
| 28 | XSLTPROC = xsltproc
|
---|
| 29 | ifeq ($(PATH_GSOAP),)
|
---|
| 30 | PATH_GSOAP = $(lastword $(sort $(wildcard $(KBUILD_DEVTOOLS)/common/gsoap/*)))
|
---|
| 31 | endif
|
---|
| 32 | PATH_GSOAP_BIN := $(strip $(PATH_GSOAP))
|
---|
| 33 | ifeq ($(PATH_GSOAP_BIN),)
|
---|
| 34 | PATH_GSOAP_BIN = /usr/bin
|
---|
| 35 | endif
|
---|
| 36 | SOAPCPP2 = $(PATH_GSOAP_BIN)/soapcpp2
|
---|
| 37 |
|
---|
| 38 | ifneq ($(MAKECMDGOALS),clean)
|
---|
| 39 | ifeq ($(wildcard $(PATH_GSOAP)/stdsoap2.cpp),)
|
---|
| 40 | $(error Fix PATH_GSOAP!)
|
---|
| 41 | endif
|
---|
| 42 | endif
|
---|
| 43 |
|
---|
| 44 | WEBSRVWSDL2GSOAPH = ../../../xsl/websrv-wsdl2gsoapH.xsl
|
---|
| 45 | WEBSRVNSMAPXSL = ../../../xsl/websrv-nsmap.xsl
|
---|
| 46 | VBOXWEBIDLSRC = ../../../../VirtualBox.xidl
|
---|
| 47 | VBOXWEBWSDL = ../../../vboxweb.wsdl
|
---|
| 48 | SPLITSOAPCCPP = ../../../tools/split-soapC.cpp
|
---|
| 49 | 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)
|
---|
| 50 | SOAPCO = $(patsubst %.cpp,%.o,$(SOAPCCPP))
|
---|
| 51 |
|
---|
| 52 | webtest: webtest.o soapClient.o $(SOAPCO) stdsoap2.o
|
---|
| 53 | $(CXX) -O2 -o $@ $^ -lssl -lcrypto
|
---|
| 54 |
|
---|
| 55 | webtest.o: webtest.cpp soapC.cpp vboxwebsrv.nsmap
|
---|
| 56 | $(CXX) -O2 -DWITH_OPENSSL -c -o $@ $< -I$(PATH_GSOAP)
|
---|
| 57 |
|
---|
| 58 | soapClient.o: soapC.cpp
|
---|
| 59 | $(CXX) -O2 -c -o $@ soapClient.cpp -I$(PATH_GSOAP)
|
---|
| 60 |
|
---|
| 61 | $(SOAPCO): soapC-%.o: soapC-%.cpp
|
---|
| 62 | $(CXX) -O0 -c -o $@ $< -I$(PATH_GSOAP)
|
---|
| 63 |
|
---|
| 64 | soapC.cpp: gsoapH_from_xslt.h
|
---|
| 65 | $(SOAPCPP2) -x -L -2 -w -I$(PATH_GSOAP)/import $^
|
---|
| 66 |
|
---|
| 67 | stdsoap2.o: $(PATH_GSOAP)/stdsoap2.cpp
|
---|
| 68 | $(CXX) -O2 -DWITH_OPENSSL -c -o $@ $<
|
---|
| 69 |
|
---|
| 70 | gsoapH_from_xslt.h:
|
---|
| 71 | $(XSLTPROC) -o $@ $(WEBSRVWSDL2GSOAPH) $(VBOXWEBWSDL)
|
---|
| 72 |
|
---|
[69386] | 73 | vboxwebsrv.nsmap:
|
---|
[61379] | 74 | $(XSLTPROC) -o $@ $(WEBSRVNSMAPXSL) $(VBOXWEBIDLSRC)
|
---|
| 75 |
|
---|
| 76 | $(subst soapC,%,$(SOAPCCPP)): split-soapC %.cpp
|
---|
| 77 | ./split-soapC soapC.cpp . 20
|
---|
| 78 |
|
---|
| 79 | split-soapC: $(SPLITSOAPCCPP)
|
---|
| 80 | $(CXX) -O2 -o $@ $<
|
---|
| 81 |
|
---|
| 82 | .PHONY: clean
|
---|
| 83 | clean:
|
---|
| 84 | rm -f gsoapH_from_xslt.h
|
---|
| 85 | rm -f soapStub.h soapServer.cpp soapC.cpp soapClient.cpp
|
---|
| 86 | rm -f soapH.h soapvboxBindingObject.h soapvboxBindingProxy.h
|
---|
| 87 | rm -f vboxBinding.nsmap
|
---|
| 88 | rm -f vboxwebsrv.nsmap
|
---|
| 89 | rm -f split-soapC
|
---|
| 90 | rm -f $(SOAPCCPP) $(SOAPCO)
|
---|
| 91 | rm -f soapClient.o stdsoap2.o
|
---|
| 92 | rm -f webtest.o webtest
|
---|
| 93 | rm -f soapC-split-done
|
---|
[69385] | 94 |
|
---|