diff --git a/NMakefile b/NMakefile index 51948cc..b9e4a93 100644 --- a/NMakefile +++ b/NMakefile @@ -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 diff --git a/src/NMakefile b/src/NMakefile index aabceab..2844eb8 100644 --- a/src/NMakefile +++ b/src/NMakefile @@ -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" diff --git a/win32/config.mk b/win32/config.mk index 2c355e8..64b95b3 100644 --- a/win32/config.mk +++ b/win32/config.mk @@ -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)