NMake build: added support for WinCNG build.
This commit is contained in:
parent
e4ba5fabec
commit
6a3b5487cb
@ -1,7 +1,10 @@
|
|||||||
!include "win32/config.mk"
|
!include "win32/config.mk"
|
||||||
|
|
||||||
# only OpenSSL is supported with this build system
|
!if "$(WITH_WINCNG)" == "1"
|
||||||
|
!include "Makefile.WinCNG.inc"
|
||||||
|
!else
|
||||||
!include "Makefile.OpenSSL.inc"
|
!include "Makefile.OpenSSL.inc"
|
||||||
|
!endif
|
||||||
!include "Makefile.inc"
|
!include "Makefile.inc"
|
||||||
|
|
||||||
OBJECTS=$(CSOURCES:.c=.obj)
|
OBJECTS=$(CSOURCES:.c=.obj)
|
||||||
@ -14,6 +17,7 @@ all-sub: win32\objects.mk
|
|||||||
|
|
||||||
clean:
|
clean:
|
||||||
-rmdir 2>NUL /s/q $(TARGET)
|
-rmdir 2>NUL /s/q $(TARGET)
|
||||||
|
-del 2>NUL win32\objects.mk
|
||||||
|
|
||||||
real-clean vclean: clean
|
real-clean vclean: clean
|
||||||
-del 2>NUL libssh2.dll
|
-del 2>NUL libssh2.dll
|
||||||
@ -21,7 +25,6 @@ real-clean vclean: clean
|
|||||||
-del 2>NUL libssh2.ilk
|
-del 2>NUL libssh2.ilk
|
||||||
-del 2>NUL libssh2.lib
|
-del 2>NUL libssh2.lib
|
||||||
-del 2>NUL *.pdb
|
-del 2>NUL *.pdb
|
||||||
-del 2>NUL win32\objects.mk
|
|
||||||
|
|
||||||
win32\objects.mk: Makefile.inc
|
win32\objects.mk: Makefile.inc
|
||||||
@echo OBJECTS = \>$@
|
@echo OBJECTS = \>$@
|
||||||
|
@ -1,19 +1,19 @@
|
|||||||
|
|
||||||
# Tweak these for your system
|
# Tweak these for your system
|
||||||
!if "$(OPENSSLINC)" == ""
|
!if "$(OPENSSLINC)" == ""
|
||||||
OPENSSLINC=..\openssl-0.9.8x\inc32
|
OPENSSLINC=..\openssl-0.9.8zc\inc32
|
||||||
!endif
|
!endif
|
||||||
|
|
||||||
!if "$(OPENSSLLIB)" == ""
|
!if "$(OPENSSLLIB)" == ""
|
||||||
OPENSSLLIB=..\openssl-0.9.8x\out32dll
|
OPENSSLLIB=..\openssl-0.9.8zc\out32dll
|
||||||
!endif
|
!endif
|
||||||
|
|
||||||
!if "$(ZLIBINC)" == ""
|
!if "$(ZLIBINC)" == ""
|
||||||
ZLIBINC=-DLIBSSH2_HAVE_ZLIB=1 /I..\zlib-1.2.7
|
ZLIBINC=..\zlib-1.2.8
|
||||||
!endif
|
!endif
|
||||||
|
|
||||||
!if "$(ZLIBLIB)" == ""
|
!if "$(ZLIBLIB)" == ""
|
||||||
ZLIBLIB=..\zlib-1.2.7
|
ZLIBLIB=..\zlib-1.2.8
|
||||||
!endif
|
!endif
|
||||||
|
|
||||||
!if "$(TARGET)" == ""
|
!if "$(TARGET)" == ""
|
||||||
@ -29,11 +29,25 @@ CPPFLAGS=/Oi /O2 /Oy /GF /Y- /MD /DNDEBUG
|
|||||||
DLLFLAGS=/DEBUG /LD
|
DLLFLAGS=/DEBUG /LD
|
||||||
!endif
|
!endif
|
||||||
|
|
||||||
CPPFLAGS=/nologo /GL /Zi /EHsc $(CPPFLAGS) /Iwin32 /Iinclude /DLIBSSH2_OPENSSL /I$(OPENSSLINC) $(ZLIBINC)
|
CPPFLAGS=/nologo /GL /Zi /EHsc $(CPPFLAGS) /Iwin32 /Iinclude
|
||||||
|
|
||||||
|
!if "$(WITH_WINCNG)" == "1"
|
||||||
|
CPPFLAGS=$(CPPFLAGS) /DLIBSSH2_WINCNG
|
||||||
|
# LIBS=bcrypt.lib crypt32.lib
|
||||||
|
!else
|
||||||
|
CPPFLAGS=$(CPPFLAGS) /DLIBSSH2_OPENSSL /I$(OPENSSLINC)
|
||||||
|
LIBS=$(OPENSSLLIB)\libeay32.lib $(OPENSSLLIB)\ssleay32.lib
|
||||||
|
!endif
|
||||||
|
|
||||||
|
!if "$(WITH_ZLIB)" == "1"
|
||||||
|
CPPFLAGS=$(CPPFLAGS) /DLIBSSH2_HAVE_ZLIB /I$(ZLIBINC)
|
||||||
|
LIBS=$(ZLIBLIB)\zlib.lib
|
||||||
|
!endif
|
||||||
|
|
||||||
CFLAGS=$(CPPFLAGS)
|
CFLAGS=$(CPPFLAGS)
|
||||||
RCFLAGS=/Iinclude
|
RCFLAGS=/Iinclude
|
||||||
DLLFLAGS=$(CFLAGS) $(DLLFLAGS)
|
DLLFLAGS=$(CFLAGS) $(DLLFLAGS)
|
||||||
LIBS=$(OPENSSLLIB)\libeay32.lib $(OPENSSLLIB)\ssleay32.lib $(ZLIBLIB)\zlib.lib ws2_32.lib user32.lib advapi32.lib gdi32.lib
|
LIBS=$(LIBS) ws2_32.lib user32.lib advapi32.lib gdi32.lib
|
||||||
|
|
||||||
INTDIR=$(TARGET)\$(SUBDIR)
|
INTDIR=$(TARGET)\$(SUBDIR)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user