1
1

win32: Added WinCNG targets to generated Visual Studio project

Inspired by Bob Kast's reports, this commit enables the compilation
of libssh2 with WinCNG using the generated Visual Studio project files.
This commit adds WinCNG support to parts of the existing Win32 build
infrastructure, until new build systems, like pre-defined VS project
files or CMake files may be added.

This commit and b20bfeb3e519119a48509a1099c06d65aa7da1d7 raise one
question: How to handle build systems, like VS project files, that
need to include all source files regardless of the desired target,
including all supported crypto backends? For now the mentioned commit
added a check for LIBSSH2_OPENSSL to openssl.c and with this commit
the supported crypto backends are hardcoded within Makefile.am.
Этот коммит содержится в:
Marc Hoersken 2014-05-18 00:07:59 +02:00
родитель ee547fe90d
Коммит fc94046e6e
3 изменённых файлов: 128 добавлений и 16 удалений

Просмотреть файл

@ -75,8 +75,9 @@ gen-coverage:
coverage: init-coverage build-coverage gen-coverage coverage: init-coverage build-coverage gen-coverage
# DSP/VCPROJ generation adapted from libcurl # DSP/VCPROJ generation adapted from libcurl
# only OpenSSL is supported with this build system # only OpenSSL and WinCNG are supported with this build system
include Makefile.OpenSSL.inc CRYPTO_CSOURCES = openssl.c wincng.c
CRYPTO_HHEADERS = openssl.h wincng.h
# Makefile.inc provides the CSOURCES and HHEADERS defines # Makefile.inc provides the CSOURCES and HHEADERS defines
include Makefile.inc include Makefile.inc

Просмотреть файл

@ -18,6 +18,7 @@
#define HAVE_GETTIMEOFDAY #define HAVE_GETTIMEOFDAY
#endif #endif
#define HAVE_LIBCRYPT32
#define HAVE_WINSOCK2_H #define HAVE_WINSOCK2_H
#define HAVE_IOCTLSOCKET #define HAVE_IOCTLSOCKET
#define HAVE_SELECT #define HAVE_SELECT

Просмотреть файл

@ -1,12 +1,12 @@
# Microsoft Developer Studio Project File - Name="libssh2" - Package Owner=<4> # Microsoft Developer Studio Project File - Name="libssh2" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00 # Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT ** # ** DO NOT EDIT **
# only OpenSSL is supported with this build system # only OpenSSL and WinCNG are supported with this build system
# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 # TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
# TARGTYPE "Win32 (x86) Static Library" 0x0104 # TARGTYPE "Win32 (x86) Static Library" 0x0104
CFG=libssh2 - Win32 Debug CFG=libssh2 - Win32 OpenSSL Debug
!MESSAGE This is not a valid makefile. To build this project using NMAKE, !MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run !MESSAGE use the Export Makefile command and run
!MESSAGE !MESSAGE
@ -19,10 +19,14 @@ CFG=libssh2 - Win32 Debug
!MESSAGE !MESSAGE
!MESSAGE Possible choices for configuration are: !MESSAGE Possible choices for configuration are:
!MESSAGE !MESSAGE
!MESSAGE "libssh2 - Win32 DLL Release" (based on "Win32 (x86) Dynamic-Link Library") !MESSAGE "libssh2 - Win32 OpenSSL DLL Release" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE "libssh2 - Win32 DLL Debug" (based on "Win32 (x86) Dynamic-Link Library") !MESSAGE "libssh2 - Win32 OpenSSL DLL Debug" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE "libssh2 - Win32 LIB Release" (based on "Win32 (x86) Static Library") !MESSAGE "libssh2 - Win32 OpenSSL LIB Release" (based on "Win32 (x86) Static Library")
!MESSAGE "libssh2 - Win32 LIB Debug" (based on "Win32 (x86) Static Library") !MESSAGE "libssh2 - Win32 OpenSSL LIB Debug" (based on "Win32 (x86) Static Library")
!MESSAGE "libssh2 - Win32 WinCNG DLL Release" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE "libssh2 - Win32 WinCNG DLL Debug" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE "libssh2 - Win32 WinCNG LIB Release" (based on "Win32 (x86) Static Library")
!MESSAGE "libssh2 - Win32 WinCNG LIB Debug" (based on "Win32 (x86) Static Library")
!MESSAGE !MESSAGE
# Begin Project # Begin Project
@ -33,7 +37,7 @@ CPP=cl.exe
MTL=midl.exe MTL=midl.exe
RSC=rc.exe RSC=rc.exe
!IF "$(CFG)" == "libssh2 - Win32 DLL Release" !IF "$(CFG)" == "libssh2 - Win32 OpenSSL DLL Release"
# PROP BASE Use_MFC 0 # PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0 # PROP BASE Use_Debug_Libraries 0
@ -60,7 +64,7 @@ LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
# ADD LINK32 gdi32.lib advapi32.lib user32.lib kernel32.lib ws2_32.lib libeay32.lib zlib.lib /nologo /dll /map /debug /machine:I386 # ADD LINK32 gdi32.lib advapi32.lib user32.lib kernel32.lib ws2_32.lib libeay32.lib zlib.lib /nologo /dll /map /debug /machine:I386
!ELSEIF "$(CFG)" == "libssh2 - Win32 DLL Debug" !ELSEIF "$(CFG)" == "libssh2 - Win32 OpenSSL DLL Debug"
# PROP BASE Use_MFC 0 # PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1 # PROP BASE Use_Debug_Libraries 1
@ -88,7 +92,7 @@ LINK32=link.exe
# ADD LINK32 gdi32.lib advapi32.lib user32.lib kernel32.lib ws2_32.lib libeay32.lib zlib.lib /nologo /dll /incremental:no /map /debug /machine:I386 /pdbtype:sept # ADD LINK32 gdi32.lib advapi32.lib user32.lib kernel32.lib ws2_32.lib libeay32.lib zlib.lib /nologo /dll /incremental:no /map /debug /machine:I386 /pdbtype:sept
# SUBTRACT LINK32 /nodefaultlib # SUBTRACT LINK32 /nodefaultlib
!ELSEIF "$(CFG)" == "libssh2 - Win32 LIB Release" !ELSEIF "$(CFG)" == "libssh2 - Win32 OpenSSL LIB Release"
# PROP BASE Use_MFC 0 # PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0 # PROP BASE Use_Debug_Libraries 0
@ -112,7 +116,7 @@ LIB32=link.exe -lib
# ADD LIB32 /nologo # ADD LIB32 /nologo
# ADD LIB32 /nologo /out:"Release_lib\libssh2.lib" # ADD LIB32 /nologo /out:"Release_lib\libssh2.lib"
!ELSEIF "$(CFG)" == "libssh2 - Win32 LIB Debug" !ELSEIF "$(CFG)" == "libssh2 - Win32 OpenSSL LIB Debug"
# PROP BASE Use_MFC 0 # PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1 # PROP BASE Use_Debug_Libraries 1
@ -135,12 +139,118 @@ LIB32=link.exe -lib
# ADD BASE LIB32 /nologo # ADD BASE LIB32 /nologo
# ADD LIB32 /nologo /out:"Debug_lib\libssh2d.lib" # ADD LIB32 /nologo /out:"Debug_lib\libssh2d.lib"
!ELSEIF "$(CFG)" == "libssh2 - Win32 WinCNG LIB Debug"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "Release_dll"
# PROP BASE Intermediate_Dir "Release_dll"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "Release_dll"
# PROP Intermediate_Dir "Release_dll"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "LIBSSH2_WIN32" /D "LIBSSH2_WINCNG" /D "_MBCS" /D "_LIB" /YX /FD /c
# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\win32" /I "..\include" /D "WIN32" /D "NDEBUG" /D "LIBSSH2_WIN32" /D "LIBSSH2_WINCNG" /D "_MBCS" /D "_LIB" /YX /FD /c
# SUBTRACT CPP /YX
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC /l 0x409 /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
# ADD LINK32 gdi32.lib advapi32.lib user32.lib kernel32.lib ws2_32.lib crypt32.lib bcrypt.lib /nologo /dll /map /debug /machine:I386
!ELSEIF "$(CFG)" == "libssh2 - Win32 WinCNG DLL Debug"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "Debug_dll"
# PROP BASE Intermediate_Dir "Debug_dll"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "Debug_dll"
# PROP Intermediate_Dir "Debug_dll"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "LIBSSH2_WIN32" /D "LIBSSH2_WINCNG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
# ADD CPP /nologo /MD /W3 /Gm /GX /ZI /Od /I "..\win32" /I "..\include" /D "WIN32" /D "_DEBUG" /D "LIBSSH2_WIN32" /D "LIBSSH2_WINCNG" /D "_MBCS" /D "_LIB" /D "LIBSSH2DEBUG" /YX /FD /GZ /c
# SUBTRACT CPP /WX /YX
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC /l 0x409 /d "_DEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
# ADD LINK32 gdi32.lib advapi32.lib user32.lib kernel32.lib ws2_32.lib crypt32.lib bcrypt.lib /nologo /dll /incremental:no /map /debug /machine:I386 /pdbtype:sept
# SUBTRACT LINK32 /nodefaultlib
!ELSEIF "$(CFG)" == "libssh2 - Win32 WinCNG LIB Release"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "Release_lib"
# PROP BASE Intermediate_Dir "Release_lib"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "Release_lib"
# PROP Intermediate_Dir "Release_lib"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "LIBSSH2_WIN32" /D "LIBSSH2_WINCNG" /D "_MBCS" /D "_LIB" /YX /FD /c
# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\win32" /I "..\include" /D "WIN32" /D "NDEBUG" /D "LIBSSH2_WIN32" /D "LIBSSH2_WINCNG" /D "_MBCS" /D "_LIB" /YX /FD /c
# ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC /l 0x409 /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LIB32=link.exe -lib
# ADD BASE LIB32 /nologo
# ADD LIB32 /nologo
# ADD LIB32 /nologo /out:"Release_lib\libssh2.lib"
!ELSEIF "$(CFG)" == "libssh2 - Win32 WinCNG LIB Debug"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "Debug_lib"
# PROP BASE Intermediate_Dir "Debug_lib"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "Debug_lib"
# PROP Intermediate_Dir "Debug_lib"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "LIBSSH2_WIN32" /D "LIBSSH2_WINCNG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
# ADD CPP /nologo /MD /W3 /Gm /GX /ZI /Od /I "..\win32" /I "..\include" /D "WIN32" /D "_DEBUG" /D "LIBSSH2_WIN32" /D "LIBSSH2_WINCNG" /D "_MBCS" /D "_LIB" /D "LIBSSH2DEBUG" /YX /FD /GZ /c
# ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC /l 0x409 /d "_DEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LIB32=link.exe -lib
# ADD BASE LIB32 /nologo
# ADD LIB32 /nologo /out:"Debug_lib\libssh2d.lib"
!ENDIF !ENDIF
# Begin Target # Begin Target
# Name "libssh2 - Win32 DLL Release" # Name "libssh2 - Win32 OpenSSL DLL Release"
# Name "libssh2 - Win32 DLL Debug" # Name "libssh2 - Win32 OpenSSL DLL Debug"
# Name "libssh2 - Win32 LIB Release" # Name "libssh2 - Win32 OpenSSL LIB Release"
# Name "libssh2 - Win32 LIB Debug" # Name "libssh2 - Win32 OpenSSL LIB Debug"
# Name "libssh2 - Win32 WinCNG DLL Release"
# Name "libssh2 - Win32 WinCNG DLL Debug"
# Name "libssh2 - Win32 WinCNG LIB Release"
# Name "libssh2 - Win32 WinCNG LIB Debug"