1
1

Guenter Knauf's Netware+Win32 updates after my recent changes

Этот коммит содержится в:
Daniel Stenberg 2007-02-08 14:34:41 +00:00
родитель 972d6d8bd4
Коммит f015b10b02
4 изменённых файлов: 123 добавлений и 117 удалений

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

@ -241,17 +241,16 @@ devclean: clean
-$(RM) -r $(DEVLDIR)
-$(RM) $(DEVLARC)
objclean: all
objclean:
-$(RM) -r $(OBJDIR)
testclean: clean
$(MAKE) -C test -f Makefile.netware clean
clean:
clean: objclean
-$(RM) libssh2_config.h
-$(RM) libssh2.imp
-$(RM) $(TARGET).nlm $(TARGET).$(LIBEXT)
-$(RM) -r $(OBJDIR)
$(OBJDIR):
@mkdir $@
@ -412,6 +411,7 @@ libssh2_config.h: Makefile.netware
@echo $(DL)#define HAVE_OPENSSL_ERR_H 1$(DL) >> $@
@echo $(DL)#define HAVE_OPENSSL_CRYPTO_H 1$(DL) >> $@
@echo $(DL)#define HAVE_OPENSSL_ENGINE_H 1$(DL) >> $@
@echo $(DL)#define HAVE_O_NONBLOCK 1$(DL) >> $@
@echo $(DL)#define HAVE_LIBSSL 1$(DL) >> $@
@echo $(DL)#define HAVE_LIBCRYPTO 1$(DL) >> $@
@echo $(DL)#define OPENSSL_NO_KRB5 1$(DL) >> $@
@ -494,6 +494,7 @@ libssh2.imp: Makefile.netware
@echo $(DL) libssh2_sftp_tell,$(DL) >> $@
@echo $(DL) libssh2_sftp_unlink_ex,$(DL) >> $@
@echo $(DL) libssh2_sftp_write,$(DL) >> $@
@echo $(DL) libssh2_trace,$(DL) >> $@
@echo $(DL) libssh2_userauth_authenticated,$(DL) >> $@
@echo $(DL) libssh2_userauth_keyboard_interactive_ex,$(DL) >> $@
@echo $(DL) libssh2_userauth_list,$(DL) >> $@

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

@ -22,16 +22,21 @@ ifndef OPENSSL_PATH
OPENSSL_PATH = ../../openssl-0.9.8d
endif
# Edit the var below to enable static linking of libssh2 and libz
LINK_STATIC = 1
# Edit the vars below to change NLM target settings.
#TARGETS = ssh2_sample sftp ssh2
TARGET = ssh2_sample
TARGETS = scp.nlm sftp.nlm ssh2.nlm
VERSION = $(LIBSSH2_VERSION)
COPYR = Copyright (c) 2004-2007, Sara Golemon <sarag@libssh2.org>
WWWURL = http://www.libssh2.org/
DESCR = libssh2 sample $(LIBSSH2_VERSION_STR) - $(WWWURL)
DESCR = libssh2 $(notdir $(@:.def=)) $(LIBSSH2_VERSION_STR) - $(WWWURL)
MTSAFE = YES
STACK = 64000
SCREEN = none
SCREEN = NONE
#SCREEN = libssh2 $(notdir $(@:.def=))
# Comment the line below if you dont want to load protected automatically.
LDRING = 3
# Edit the var below to point to your lib architecture.
ifndef LIBARCH
@ -72,7 +77,7 @@ CFLAGS = $(OPT) -D$(DB) -DNETWARE -nostdinc # -DHAVE_CONFIG_H
ifeq ($(CC),mwccnlm)
LD = mwldnlm
LDFLAGS = -nostdlib $(PRELUDE) $(OBJS) -o $@ -commandfile
LDFLAGS = -nostdlib $(PRELUDE) $(LDLIBS) $(<:.def=.o) -o $@ -commandfile
AR = mwldnlm
ARFLAGS = -type library -w nocmdline $(OBJS) -o
LIBEXT = lib
@ -125,8 +130,8 @@ endif
ifdef WITH_ZLIB
INCLUDES += -I$(ZLIB_PATH)
ifdef Z_LINK_STATIC
LDLIBS += @$(ZLIB_PATH)/nw/libz.$(LIBEXT)
ifdef LINK_STATIC
LDLIBS += $(ZLIB_PATH)/nw/libz.$(LIBEXT)
else
IMPORTS += @$(ZLIB_PATH)/nw/libz.imp
MODULES += libz.nlm
@ -153,23 +158,18 @@ endif
ifeq ($(MTSAFE),NO)
XDCOPT = -u
endif
ifdef XDCOPT
XDCDATA = $(OBJDIR)/$(TARGET).xdc
endif
ifeq ($(findstring linux,$(OSTYPE)),linux)
DL = '
#-include $(NDKBASE)/nlmconv/ncpfs.inc
endif
vpath %.c ../.. ../../example/simple
vpath %.c ../../example/simple
OBJS = $(OBJDIR)/$(TARGET).o $(LDLIBS)
.PRECIOUS: $(OBJDIR)/%.o $(OBJDIR)/%.def $(OBJDIR)/%.xdc
all: nlm
nlm: prebuild $(TARGET).nlm
all: prebuild $(TARGETS)
prebuild: $(OBJDIR) $(OBJDIR)/version.inc
@ -181,17 +181,16 @@ $(OBJDIR)/version.inc: ../../include/libssh2.h $(OBJDIR)
@echo Creating $@
@$(AWK) -f ../../get_ver.awk $< > $@
objclean: all
objclean:
-$(RM) -r $(OBJDIR)
clean:
-$(RM) $(TARGET).exe
-$(RM) -r $(OBJDIR)
clean: objclean
-$(RM) $(TARGETS)
$(OBJDIR):
@mkdir $@
$(TARGET).nlm: $(OBJDIR)/$(TARGET).def $(OBJS) $(XDCDATA)
%.nlm: $(OBJDIR)/%.def $(OBJDIR)/%.o $(OBJDIR)/%.xdc
@echo Linking $@
@-$(RM) $@
@$(LD) $(LDFLAGS) $<
@ -222,9 +221,15 @@ endif
ifeq ($(DB),DEBUG)
@echo $(DL)debug$(DL) >> $@
endif
@echo $(DL)threadname "$(TARGET)"$(DL) >> $@
ifdef XDCDATA
@echo $(DL)xdcdata $(XDCDATA)$(DL) >> $@
@echo $(DL)threadname "$(notdir $(@:.def=))"$(DL) >> $@
ifdef XDCOPT
@echo $(DL)xdcdata $(@:.def=.xdc)$(DL) >> $@
endif
ifeq ($(LDRING),0)
@echo $(DL)flag_on 16$(DL) >> $@
endif
ifeq ($(LDRING),3)
@echo $(DL)flag_on 512$(DL) >> $@
endif
ifeq ($(LIBARCH),CLIB)
@echo $(DL)start _Prelude$(DL) >> $@
@ -265,7 +270,7 @@ ifdef WITH_SSL
endif
@echo $(DL)input $(OBJS)$(DL) >> $@
@echo $(DL)input $(PRELUDE)$(DL) >> $@
@echo $(DL)output $(TARGET).nlm$(DL) >> $@
@echo $(DL)output $(notdir $(@:.def=.nlm))$(DL) >> $@
endif

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

@ -65,6 +65,7 @@ ZIP = zip -qzr9
# Global flags for all compilers
CFLAGS = $(OPT) -D$(DB) -DWIN32 -DLIBSSH2_WIN32 # -DHAVE_CONFIG_H
CFLAGS += -DHAVE_IOCTLSOCKET
ifeq ($(CC),mwcc)
LD = mwld
@ -109,8 +110,7 @@ endif
CFLAGS += $(INCLUDES)
#ifeq ($(findstring linux,$(OSTYPE)),linux)
ifdef __MSYS__
ifeq ($(findstring msys,$(OSTYPE)),msys)
DL = '
DS = /
else
@ -134,6 +134,7 @@ OBJECTS = \
scp.o \
session.o \
sftp.o \
transport.o \
userauth.o
OBJS := $(addprefix $(OBJDIR)/,$(OBJECTS))
@ -226,40 +227,40 @@ $(OBJDIR)/%.res: $(OBJDIR)/%.rc
@$(RC) $(RCFLAGS) $< -o $@
$(OBJDIR)/%.rc: Makefile.win32 $(OBJDIR)/version.inc
@echo 1 VERSIONINFO > $@
@echo FILEVERSION $(LIBSSH2_VERSION),0 >> $@
@echo PRODUCTVERSION $(LIBSSH2_VERSION),0 >> $@
@echo FILEFLAGSMASK 0x3fL >> $@
@echo FILEOS 0x40004L >> $@
@echo FILEFLAGS 0x0L >> $@
@echo FILETYPE 0x1L >> $@
@echo FILESUBTYPE 0x0L >> $@
@echo BEGIN >> $@
@echo BLOCK "StringFileInfo" >> $@
@echo BEGIN >> $@
@echo BLOCK "040904E4" >> $@
@echo BEGIN >> $@
@echo VALUE "LegalCopyright","$(COPYR)\0" >> $@
@echo $(DL)1 VERSIONINFO$(DL) > $@
@echo $(DL) FILEVERSION $(LIBSSH2_VERSION),0$(DL) >> $@
@echo $(DL) PRODUCTVERSION $(LIBSSH2_VERSION),0$(DL) >> $@
@echo $(DL) FILEFLAGSMASK 0x3fL$(DL) >> $@
@echo $(DL) FILEOS 0x40004L$(DL) >> $@
@echo $(DL) FILEFLAGS 0x0L$(DL) >> $@
@echo $(DL) FILETYPE 0x1L$(DL) >> $@
@echo $(DL) FILESUBTYPE 0x0L$(DL) >> $@
@echo $(DL)BEGIN$(DL) >> $@
@echo $(DL) BLOCK "StringFileInfo"$(DL) >> $@
@echo $(DL) BEGIN$(DL) >> $@
@echo $(DL) BLOCK "040904E4"$(DL) >> $@
@echo $(DL) BEGIN$(DL) >> $@
@echo $(DL) VALUE "LegalCopyright","$(COPYR)\0"$(DL) >> $@
ifdef COMPANY
@echo VALUE "CompanyName","$(COMPANY)\0" >> $@
@echo $(DL) VALUE "CompanyName","$(COMPANY)\0"$(DL) >> $@
endif
@echo VALUE "ProductName","$(notdir $(@:.rc=.dll))\0" >> $@
@echo VALUE "ProductVersion","$(LIBSSH2_VERSION_STR)\0" >> $@
@echo VALUE "License","Released under GPL.\0" >> $@
@echo VALUE "FileDescription","$(DESCR)\0" >> $@
@echo VALUE "FileVersion","$(LIBSSH2_VERSION_STR)\0" >> $@
@echo VALUE "InternalName","$(notdir $(@:.rc=))\0" >> $@
@echo VALUE "OriginalFilename","$(notdir $(@:.rc=.dll))\0" >> $@
@echo VALUE "WWW","$(WWWURL)\0" >> $@
@echo END >> $@
@echo END >> $@
@echo BLOCK "VarFileInfo" >> $@
@echo BEGIN >> $@
@echo VALUE "Translation", 0x409, 1252 >> $@
@echo END >> $@
@echo END >> $@
@echo $(DL) VALUE "ProductName","$(notdir $(@:.rc=.dll))\0"$(DL) >> $@
@echo $(DL) VALUE "ProductVersion","$(LIBSSH2_VERSION_STR)\0"$(DL) >> $@
@echo $(DL) VALUE "License","Released under GPL.\0"$(DL) >> $@
@echo $(DL) VALUE "FileDescription","$(DESCR)\0"$(DL) >> $@
@echo $(DL) VALUE "FileVersion","$(LIBSSH2_VERSION_STR)\0"$(DL) >> $@
@echo $(DL) VALUE "InternalName","$(notdir $(@:.rc=))\0"$(DL) >> $@
@echo $(DL) VALUE "OriginalFilename","$(notdir $(@:.rc=.dll))\0"$(DL) >> $@
@echo $(DL) VALUE "WWW","$(WWWURL)\0"$(DL) >> $@
@echo $(DL) END$(DL) >> $@
@echo $(DL) END$(DL) >> $@
@echo $(DL) BLOCK "VarFileInfo"$(DL) >> $@
@echo $(DL) BEGIN$(DL) >> $@
@echo $(DL) VALUE "Translation", 0x409, 1252$(DL) >> $@
@echo $(DL) END$(DL) >> $@
@echo $(DL)END$(DL) >> $@
ifdef ICON
@echo 10 ICON DISCARDABLE "$(ICON)" >> $@
@echo $(DL)10 ICON DISCARDABLE "$(ICON)"$(DL) >> $@
endif
$(DISTDIR)/readme.txt: Makefile.win32

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

@ -17,13 +17,15 @@ ifndef OPENSSL_PATH
OPENSSL_PATH = ../../openssl-0.9.8d
endif
# Edit the var below to enable static linking of libssh2 and libz
LINK_STATIC = 1
# Edit the vars below to change target settings.
#TARGETS = ssh2_sample sftp ssh2
TARGET = ssh2_sample
TARGETS = scp.exe sftp.exe ssh2.exe
VERSION = $(LIBSSH2_VERSION)
COPYR = (c) 2004-2007 Sara Golemon <sarag@libssh2.org>
WWWURL = http://www.libssh2.org/
DESCR = libssh2 sample $(LIBSSH2_VERSION_STR)
DESCR = libssh2 $(subst .def,,$(notdir $@)) $(LIBSSH2_VERSION_STR)
#STACK = 64000
# must be equal to DEBUG or NDEBUG
@ -85,22 +87,25 @@ endif
INCLUDES = -I. -I.. -I../../include
INCLUDES += -I$(OPENSSL_PATH)/outinc -I$(OPENSSL_PATH)/outinc/openssl
#LIBPATH += -L$(OPENSSL_PATH)/out
LIBPATH += -L..
ifdef LINK_STATIC
LDLIBS += ../libssh2.$(LIBEXT)
LDLIBS += -llibssh2
#LDLIBS += $(OPENSSL_PATH)/out/libcrypto.$(LIBEXT) $(OPENSSL_PATH)/out/libssl.$(LIBEXT)
else
LDLIBS += ../libssh2dll.$(LIBEXT)
LDLIBS += -llibssh2dll
#LDLIBS += $(OPENSSL_PATH)/out/libeay32.$(LIBEXT) $(OPENSSL_PATH)/out/libssl32.$(LIBEXT)
endif
#ifdef LINK_STATIC
#LDLIBS += $(OPENSSL_PATH)/out/libcrypto.$(LIBEXT) $(OPENSSL_PATH)/out/libssl.$(LIBEXT)
#else
#LDLIBS += $(OPENSSL_PATH)/out/libeay32.$(LIBEXT) $(OPENSSL_PATH)/out/libssl32.$(LIBEXT)
#endif
ifdef WITH_ZLIB
INCLUDES += -I$(ZLIB_PATH)
LDLIBS += $(ZLIB_PATH)/libz.$(LIBEXT)
#LIBPATH = -L$(ZLIB_PATH)
#ifdef LINK_STATIC
# LDLIBS += $(ZLIB_PATH)/libz.$(LIBEXT)
#else
# LDLIBS += $(ZLIB_PATH)/libzdll.$(LIBEXT)
#endif
endif
CFLAGS += $(INCLUDES)
@ -113,18 +118,14 @@ else
DS = \\
endif
vpath %.c ../.. ../../example/simple
vpath %.c ../../example/simple
#OBJS := $(addprefix $(OBJDIR)/,$(OBJECTS))
OBJS = $(OBJDIR)/$(TARGET).o
.PRECIOUS: $(OBJDIR)/%.o $(OBJDIR)/%.rc $(OBJDIR)/%.res
all: exe
exe: prebuild $(TARGET).exe
all: prebuild $(TARGETS)
prebuild: $(OBJDIR) $(OBJDIR)/version.inc
# libssh2_config.h
$(OBJDIR)/%.o: %.c
# @echo Compiling $<
@ -142,61 +143,59 @@ devclean: clean
-$(RM) -r $(DEVLDIR)
-$(RM) $(DEVLARC)
objclean: all
objclean:
-$(RM) -r $(OBJDIR)
clean:
# -$(RM) libssh2_config.h
-$(RM) $(TARGET).exe
-$(RM) -r $(OBJDIR)
clean: objclean
-$(RM) $(TARGETS)
$(OBJDIR):
@mkdir $@
$(TARGET).exe: $(OBJDIR)/$(TARGET).res $(OBJS)
%.exe: $(OBJDIR)/%.o $(OBJDIR)/%.res
@echo Linking $@
@-$(RM) $@
@$(LD) $(LDFLAGS) $^ -o $@ $(LIBPATH) $(LDLIBS)
$(LD) $(LDFLAGS) $^ -o $@ $(LIBPATH) $(LDLIBS)
$(OBJDIR)/%.res: $(OBJDIR)/%.rc
@echo Creating $@
@$(RC) $(RCFLAGS) $< -o $@
$(OBJDIR)/%.rc: Makefile.win32 $(OBJDIR)/version.inc
@echo 1 VERSIONINFO > $@
@echo FILEVERSION $(LIBSSH2_VERSION),0 >> $@
@echo PRODUCTVERSION $(LIBSSH2_VERSION),0 >> $@
@echo FILEFLAGSMASK 0x3fL >> $@
@echo FILEOS 0x40004L >> $@
@echo FILEFLAGS 0x0L >> $@
@echo FILETYPE 0x1L >> $@
@echo FILESUBTYPE 0x0L >> $@
@echo BEGIN >> $@
@echo BLOCK "StringFileInfo" >> $@
@echo BEGIN >> $@
@echo BLOCK "040904E4" >> $@
@echo BEGIN >> $@
@echo VALUE "LegalCopyright","$(COPYR)\0" >> $@
@echo $(DL)1 VERSIONINFO$(DL) > $@
@echo $(DL) FILEVERSION $(LIBSSH2_VERSION),0$(DL) >> $@
@echo $(DL) PRODUCTVERSION $(LIBSSH2_VERSION),0$(DL) >> $@
@echo $(DL) FILEFLAGSMASK 0x3fL$(DL) >> $@
@echo $(DL) FILEOS 0x40004L$(DL) >> $@
@echo $(DL) FILEFLAGS 0x0L$(DL) >> $@
@echo $(DL) FILETYPE 0x1L$(DL) >> $@
@echo $(DL) FILESUBTYPE 0x0L$(DL) >> $@
@echo $(DL)BEGIN$(DL) >> $@
@echo $(DL) BLOCK "StringFileInfo"$(DL) >> $@
@echo $(DL) BEGIN$(DL) >> $@
@echo $(DL) BLOCK "040904E4"$(DL) >> $@
@echo $(DL) BEGIN$(DL) >> $@
@echo $(DL) VALUE "LegalCopyright","$(COPYR)\0"$(DL) >> $@
ifdef COMPANY
@echo VALUE "CompanyName","$(COMPANY)\0" >> $@
@echo $(DL) VALUE "CompanyName","$(COMPANY)\0"$(DL) >> $@
endif
@echo VALUE "ProductName","$(notdir $(@:.rc=.exe))\0" >> $@
@echo VALUE "ProductVersion","$(LIBSSH2_VERSION_STR)\0" >> $@
@echo VALUE "License","Released under GPL.\0" >> $@
@echo VALUE "FileDescription","$(DESCR)\0" >> $@
@echo VALUE "FileVersion","$(LIBSSH2_VERSION_STR)\0" >> $@
@echo VALUE "InternalName","$(notdir $(@:.rc=))\0" >> $@
@echo VALUE "OriginalFilename","$(notdir $(@:.rc=.exe))\0" >> $@
@echo VALUE "WWW","$(WWWURL)\0" >> $@
@echo END >> $@
@echo END >> $@
@echo BLOCK "VarFileInfo" >> $@
@echo BEGIN >> $@
@echo VALUE "Translation", 0x409, 1252 >> $@
@echo END >> $@
@echo END >> $@
@echo $(DL) VALUE "ProductName","$(notdir $(@:.rc=.exe))\0"$(DL) >> $@
@echo $(DL) VALUE "ProductVersion","$(LIBSSH2_VERSION_STR)\0"$(DL) >> $@
@echo $(DL) VALUE "License","Released under GPL.\0"$(DL) >> $@
@echo $(DL) VALUE "FileDescription","$(DESCR)\0"$(DL) >> $@
@echo $(DL) VALUE "FileVersion","$(LIBSSH2_VERSION_STR)\0"$(DL) >> $@
@echo $(DL) VALUE "InternalName","$(notdir $(@:.rc=))\0"$(DL) >> $@
@echo $(DL) VALUE "OriginalFilename","$(notdir $(@:.rc=.exe))\0"$(DL) >> $@
@echo $(DL) VALUE "WWW","$(WWWURL)\0"$(DL) >> $@
@echo $(DL) END$(DL) >> $@
@echo $(DL) END$(DL) >> $@
@echo $(DL) BLOCK "VarFileInfo"$(DL) >> $@
@echo $(DL) BEGIN$(DL) >> $@
@echo $(DL) VALUE "Translation", 0x409, 1252$(DL) >> $@
@echo $(DL) END$(DL) >> $@
@echo $(DL)END$(DL) >> $@
ifdef ICON
@echo 10 ICON DISCARDABLE "$(ICON)" >> $@
@echo $(DL)10 ICON DISCARDABLE "$(ICON)"$(DL) >> $@
endif
help: $(OBJDIR)/version.inc