diff options
author | illusory-dream <37270118+illusory-dream@users.noreply.github.com> | 2022-02-26 02:07:00 +0800 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2022-02-26 14:17:15 +0100 |
commit | 2cadc890ce99959e410e66c57f9bc147cbc5e644 (patch) | |
tree | ad87d137cbb8dd061007766f1dbcdea7a3b1f36a | |
parent | 05be234b82a768a79d9a3e8ff68e5dda715171d4 (diff) | |
download | curl-2cadc890ce99959e410e66c57f9bc147cbc5e644.tar.gz |
winbuild: add parameter WITH_SSH
For building with libssh
Closes #8514
-rw-r--r-- | winbuild/Makefile.vc | 14 | ||||
-rw-r--r-- | winbuild/MakefileBuild.vc | 29 | ||||
-rw-r--r-- | winbuild/README.md | 1 |
3 files changed, 42 insertions, 2 deletions
diff --git a/winbuild/Makefile.vc b/winbuild/Makefile.vc index 098561333..54da51e10 100644 --- a/winbuild/Makefile.vc +++ b/winbuild/Makefile.vc @@ -5,7 +5,7 @@ # | (__| |_| | _ <| |___ # \___|\___/|_| \_\_____| # -# Copyright (C) 1999 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al. +# Copyright (C) 1999 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. The terms @@ -178,6 +178,14 @@ USE_SSH2 = true SSH2 = static !ENDIF +!IF "$(WITH_SSH)"=="dll" +USE_SSH = true +SSH = dll +!ELSEIF "$(WITH_SSH)"=="static" +USE_SSH = true +SSH = static +!ENDIF + CONFIG_NAME_LIB = $(CONFIG_NAME_LIB)-vc$(VC)-$(MACHINE) !IF "$(DEBUG)"=="yes" @@ -212,6 +220,10 @@ CONFIG_NAME_LIB = $(CONFIG_NAME_LIB)-zlib-$(ZLIB) CONFIG_NAME_LIB = $(CONFIG_NAME_LIB)-ssh2-$(SSH2) !ENDIF +!IF "$(USE_SSH)"=="true" +CONFIG_NAME_LIB = $(CONFIG_NAME_LIB)-ssh-$(SSH) +!ENDIF + !IF "$(USE_IPV6)"=="true" CONFIG_NAME_LIB = $(CONFIG_NAME_LIB)-ipv6 !ENDIF diff --git a/winbuild/MakefileBuild.vc b/winbuild/MakefileBuild.vc index fa26d7f16..c4b8fc94b 100644 --- a/winbuild/MakefileBuild.vc +++ b/winbuild/MakefileBuild.vc @@ -5,7 +5,7 @@ # | (__| |_| | _ <| |___
# \___|\___/|_| \_\_____|
#
-# Copyright (C) 1999 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
+# Copyright (C) 1999 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
@@ -288,6 +288,27 @@ SSH2_CFLAGS = $(SSH2_CFLAGS) /I$(SSH2_INC_DIR) !ENDIF
+!IFDEF SSH_PATH
+SSH_INC_DIR= $(SSH_PATH)\include
+SSH_LIB_DIR= $(SSH_PATH)\lib
+SSH_LFLAGS = $(SSH_LFLAGS) "/LIBPATH:$(SSH_LIB_DIR)"
+!ELSE
+SSH_LIB_DIR= $(DEVEL_LIB)
+SSH_INC_DIR= $(DEVEL_INCLUDE)
+!ENDIF
+
+!IF "$(WITH_SSH)"=="dll" || "$(WITH_SSH)"=="static"
+SSH_LIBS = ssh.lib
+USE_SSH = true
+SSH = $(WITH_SSH)
+!ENDIF
+
+!IFDEF USE_SSH
+SSH_CFLAGS = /DHAVE_LIBSSH /DHAVE_LIBSSH_LIBSSH_H /DLIBSSH_WIN32 /DLIBSSH_LIBRARY /DUSE_LIBSSH /DCURL_USE_LIBSSH
+SSH_CFLAGS = $(SSH_CFLAGS) /I$(SSH_INC_DIR)
+!ENDIF
+
+
!IFNDEF USE_IDN
USE_IDN = true
!ELSEIF "$(USE_IDN)"=="yes"
@@ -449,6 +470,11 @@ CFLAGS = $(CFLAGS) $(SSH2_CFLAGS) LFLAGS = $(LFLAGS) $(SSH2_LFLAGS) $(SSH2_LIBS)
!ENDIF
+!IF "$(USE_SSH)"=="true"
+CFLAGS = $(CFLAGS) $(SSH_CFLAGS)
+LFLAGS = $(LFLAGS) $(SSH_LFLAGS) $(SSH_LIBS)
+!ENDIF
+
!IF "$(USE_IDN)"=="true"
CFLAGS = $(CFLAGS) $(IDN_CFLAGS)
!ENDIF
@@ -521,6 +547,7 @@ $(TARGET): $(LIB_OBJS) $(LIB_DIROBJ) $(DIRDIST) @echo Using NGHTTP2: $(USE_NGHTTP2)
@echo Using c-ares: $(USE_CARES)
@echo Using SSH2: $(USE_SSH2)
+ @echo Using SSH: $(USE_SSH)
@echo Using ZLIB: $(USE_ZLIB)
@echo Using IDN: $(USE_IDN)
@echo Using IPv6: $(USE_IPV6)
diff --git a/winbuild/README.md b/winbuild/README.md index 3684a382d..7bbbc5c6c 100644 --- a/winbuild/README.md +++ b/winbuild/README.md @@ -83,6 +83,7 @@ where `<options>` is one or many of: - `WITH_MBEDTLS=<dll/static>` - Enable mbedTLS support, DLL or static
- `WITH_CARES=<dll/static>` - Enable c-ares support, DLL or static
- `WITH_ZLIB=<dll/static>` - Enable zlib support, DLL or static
+ - `WITH_SSH=<dll/static>` - Enable libSSH support, DLL or static
- `WITH_SSH2=<dll/static>` - Enable libSSH2 support, DLL or static
- `WITH_PREFIX=<dir>` - Where to install the build
- `ENABLE_SSPI=<yes/no>` - Enable SSPI support, defaults to yes
|