Fixed MSVC NMakefile.

Added missing source files; added resource for DLL.
This commit is contained in:
Guenter Knauf 2012-10-24 02:37:55 +02:00
parent b31e35aba6
commit de7b5d3bc0
3 changed files with 21 additions and 12 deletions

View File

@ -7,13 +7,13 @@ all-sub:
-for %D in ($(SUBDIRS)) do $(MAKE) /nologo /f %D/NMakefile BUILD=$(BUILD) SUBDIR=%D all-sub
clean:
-rmdir /s/q $(TARGET)
-rmdir 2>NUL /s/q $(TARGET)
real-clean: clean
-del libssh2.dll
-del libssh2.exp
-del libssh2.ilk
-del libssh2.lib
-del *.pdb
real-clean vclean: clean
-del 2>NUL libssh2.dll
-del 2>NUL libssh2.exp
-del 2>NUL libssh2.ilk
-del 2>NUL libssh2.lib
-del 2>NUL *.pdb

View File

@ -3,6 +3,7 @@
CFLAGS=$(CFLAGS)
OBJECTS = \
$(INTDIR)\agent.obj \
$(INTDIR)\channel.obj \
$(INTDIR)\comp.obj \
$(INTDIR)\crypt.obj \
@ -10,6 +11,7 @@ OBJECTS = \
$(INTDIR)\hostkey.obj \
$(INTDIR)\keepalive.obj \
$(INTDIR)\kex.obj \
$(INTDIR)\knownhost.obj \
$(INTDIR)\mac.obj \
$(INTDIR)\misc.obj \
$(INTDIR)\openssl.obj \
@ -20,14 +22,20 @@ OBJECTS = \
$(INTDIR)\session.obj \
$(INTDIR)\sftp.obj \
$(INTDIR)\transport.obj \
$(INTDIR)\userauth.obj
$(INTDIR)\userauth.obj \
$(INTDIR)\version.obj
RESOURCE=$(INTDIR)\libssh2.res
DLL=libssh2$(SUFFIX).dll
$(DLL): $(OBJECTS)
$(CC) -o $(DLL) $(DLLFLAGS) $(OBJECTS) $(LIBS)
all: $(DLL)
$(DLL): $(OBJECTS) $(RESOURCE)
$(CC) -o $(DLL) $(DLLFLAGS) $(OBJECTS) $(RESOURCE) $(LIBS)
$(RESOURCE): win32\libssh2.rc
$(RC) $(RCFLAGS) /Fo"$@" $?
!include "win32/rules.mk"

View File

@ -21,8 +21,9 @@ DLLFLAGS=/DEBUG /LD
CPPFLAGS=/nologo /GL /Zi /EHsc $(CPPFLAGS) /Iwin32 /Iinclude /I$(OPENSSLINC) $(ZLIBINC) -DLIBSSH2_WIN32
CFLAGS=$(CPPFLAGS)
RCFLAGS=/Iinclude
DLLFLAGS=$(CFLAGS) $(DLLFLAGS)
LIBS=$(OPENSSLLIB)\libeay32.lib $(OPENSSLLIB)\ssleay32.lib ws2_32.lib $(ZLIBLIB)\zlib.lib
LIBS=$(OPENSSLLIB)\libeay32.lib $(OPENSSLLIB)\ssleay32.lib ws2_32.lib user32.lib $(ZLIBLIB)\zlib.lib
INTDIR=$(TARGET)\$(SUBDIR)