windows build: fix build errors
Fixes various link errors with VS2010 Reported-by: "kdekker" Fixes #272
Этот коммит содержится в:
родитель
fa15fded72
Коммит
c49cc8411f
@ -4,15 +4,25 @@
|
||||
|
||||
CFLAGS=$(CFLAGS)
|
||||
|
||||
AR = lib
|
||||
ARFLAGS = -nologo /LTCG
|
||||
|
||||
RESOURCE=$(INTDIR)\libssh2.res
|
||||
|
||||
DLL=libssh2$(SUFFIX).dll
|
||||
STATICLIB=$(INTDIR)\libssh2.lib
|
||||
|
||||
!if "$(BUILD_STATIC_LIB)" == ""
|
||||
all: $(DLL)
|
||||
!else
|
||||
all: $(STATICLIB)
|
||||
!endif
|
||||
|
||||
$(DLL): $(OBJECTS) $(RESOURCE)
|
||||
$(CC) -o $(DLL) $(DLLFLAGS) $(OBJECTS) $(RESOURCE) $(LIBS)
|
||||
|
||||
$(STATICLIB): $(OBJECTS)
|
||||
$(AR) $(ARFLAGS) -out:$@ $(OBJECTS)
|
||||
|
||||
$(RESOURCE): win32\libssh2.rc
|
||||
$(RC) $(RCFLAGS) /Fo"$@" $?
|
||||
|
||||
|
@ -1,10 +1,20 @@
|
||||
|
||||
# Tweak these for your system
|
||||
OPENSSLINC=..\openssl-0.9.8y\inc32
|
||||
OPENSSLLIB=..\openssl-0.9.8y\out32dll
|
||||
!if "$(OPENSSLINC)" == ""
|
||||
OPENSSLINC=..\openssl-0.9.8x\inc32
|
||||
!endif
|
||||
|
||||
!if "$(OPENSSLLIB)" == ""
|
||||
OPENSSLLIB=..\openssl-0.9.8x\out32dll
|
||||
!endif
|
||||
|
||||
!if "$(ZLIBINC)" == ""
|
||||
ZLIBINC=-DLIBSSH2_HAVE_ZLIB=1 /I..\zlib-1.2.7
|
||||
!endif
|
||||
|
||||
!if "$(ZLIBLIB)" == ""
|
||||
ZLIBLIB=..\zlib-1.2.7
|
||||
!endif
|
||||
|
||||
!if "$(TARGET)" == ""
|
||||
TARGET=Release
|
||||
@ -15,15 +25,15 @@ SUFFIX=_debug
|
||||
CPPFLAGS=/Od /MDd
|
||||
DLLFLAGS=/DEBUG /LDd
|
||||
!else
|
||||
CPPFLAGS=/Og /Oi /O2 /Oy /GF /Y- /MD /DNDEBUG
|
||||
CPPFLAGS=/Oi /O2 /Oy /GF /Y- /MD /DNDEBUG
|
||||
DLLFLAGS=/DEBUG /LD
|
||||
!endif
|
||||
|
||||
CPPFLAGS=/nologo /GL /Zi /EHsc $(CPPFLAGS) /Iwin32 /Iinclude /I$(OPENSSLINC) $(ZLIBINC) -DLIBSSH2_WIN32
|
||||
CPPFLAGS=/nologo /GL /Zi /EHsc $(CPPFLAGS) /Iwin32 /Iinclude /I$(OPENSSLINC) $(ZLIBINC)
|
||||
CFLAGS=$(CPPFLAGS)
|
||||
RCFLAGS=/Iinclude
|
||||
DLLFLAGS=$(CFLAGS) $(DLLFLAGS)
|
||||
LIBS=$(OPENSSLLIB)\libeay32.lib $(OPENSSLLIB)\ssleay32.lib ws2_32.lib user32.lib $(ZLIBLIB)\zlib.lib
|
||||
LIBS=$(OPENSSLLIB)\libeay32.lib $(OPENSSLLIB)\ssleay32.lib $(ZLIBLIB)\zlib.lib ws2_32.lib user32.lib advapi32.lib gdi32.lib
|
||||
|
||||
INTDIR=$(TARGET)\$(SUBDIR)
|
||||
|
||||
|
Загрузка…
Ссылка в новой задаче
Block a user