Guenter Knauf's Netware+Win32 updates after my recent changes
Этот коммит содержится в:
родитель
972d6d8bd4
Коммит
f015b10b02
@ -241,17 +241,16 @@ devclean: clean
|
|||||||
-$(RM) -r $(DEVLDIR)
|
-$(RM) -r $(DEVLDIR)
|
||||||
-$(RM) $(DEVLARC)
|
-$(RM) $(DEVLARC)
|
||||||
|
|
||||||
objclean: all
|
objclean:
|
||||||
-$(RM) -r $(OBJDIR)
|
-$(RM) -r $(OBJDIR)
|
||||||
|
|
||||||
testclean: clean
|
testclean: clean
|
||||||
$(MAKE) -C test -f Makefile.netware clean
|
$(MAKE) -C test -f Makefile.netware clean
|
||||||
|
|
||||||
clean:
|
clean: objclean
|
||||||
-$(RM) libssh2_config.h
|
-$(RM) libssh2_config.h
|
||||||
-$(RM) libssh2.imp
|
-$(RM) libssh2.imp
|
||||||
-$(RM) $(TARGET).nlm $(TARGET).$(LIBEXT)
|
-$(RM) $(TARGET).nlm $(TARGET).$(LIBEXT)
|
||||||
-$(RM) -r $(OBJDIR)
|
|
||||||
|
|
||||||
$(OBJDIR):
|
$(OBJDIR):
|
||||||
@mkdir $@
|
@mkdir $@
|
||||||
@ -412,6 +411,7 @@ libssh2_config.h: Makefile.netware
|
|||||||
@echo $(DL)#define HAVE_OPENSSL_ERR_H 1$(DL) >> $@
|
@echo $(DL)#define HAVE_OPENSSL_ERR_H 1$(DL) >> $@
|
||||||
@echo $(DL)#define HAVE_OPENSSL_CRYPTO_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_OPENSSL_ENGINE_H 1$(DL) >> $@
|
||||||
|
@echo $(DL)#define HAVE_O_NONBLOCK 1$(DL) >> $@
|
||||||
@echo $(DL)#define HAVE_LIBSSL 1$(DL) >> $@
|
@echo $(DL)#define HAVE_LIBSSL 1$(DL) >> $@
|
||||||
@echo $(DL)#define HAVE_LIBCRYPTO 1$(DL) >> $@
|
@echo $(DL)#define HAVE_LIBCRYPTO 1$(DL) >> $@
|
||||||
@echo $(DL)#define OPENSSL_NO_KRB5 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_tell,$(DL) >> $@
|
||||||
@echo $(DL) libssh2_sftp_unlink_ex,$(DL) >> $@
|
@echo $(DL) libssh2_sftp_unlink_ex,$(DL) >> $@
|
||||||
@echo $(DL) libssh2_sftp_write,$(DL) >> $@
|
@echo $(DL) libssh2_sftp_write,$(DL) >> $@
|
||||||
|
@echo $(DL) libssh2_trace,$(DL) >> $@
|
||||||
@echo $(DL) libssh2_userauth_authenticated,$(DL) >> $@
|
@echo $(DL) libssh2_userauth_authenticated,$(DL) >> $@
|
||||||
@echo $(DL) libssh2_userauth_keyboard_interactive_ex,$(DL) >> $@
|
@echo $(DL) libssh2_userauth_keyboard_interactive_ex,$(DL) >> $@
|
||||||
@echo $(DL) libssh2_userauth_list,$(DL) >> $@
|
@echo $(DL) libssh2_userauth_list,$(DL) >> $@
|
||||||
|
@ -22,16 +22,21 @@ ifndef OPENSSL_PATH
|
|||||||
OPENSSL_PATH = ../../openssl-0.9.8d
|
OPENSSL_PATH = ../../openssl-0.9.8d
|
||||||
endif
|
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.
|
# Edit the vars below to change NLM target settings.
|
||||||
#TARGETS = ssh2_sample sftp ssh2
|
TARGETS = scp.nlm sftp.nlm ssh2.nlm
|
||||||
TARGET = ssh2_sample
|
|
||||||
VERSION = $(LIBSSH2_VERSION)
|
VERSION = $(LIBSSH2_VERSION)
|
||||||
COPYR = Copyright (c) 2004-2007, Sara Golemon <sarag@libssh2.org>
|
COPYR = Copyright (c) 2004-2007, Sara Golemon <sarag@libssh2.org>
|
||||||
WWWURL = http://www.libssh2.org/
|
WWWURL = http://www.libssh2.org/
|
||||||
DESCR = libssh2 sample $(LIBSSH2_VERSION_STR) - $(WWWURL)
|
DESCR = libssh2 $(notdir $(@:.def=)) $(LIBSSH2_VERSION_STR) - $(WWWURL)
|
||||||
MTSAFE = YES
|
MTSAFE = YES
|
||||||
STACK = 64000
|
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.
|
# Edit the var below to point to your lib architecture.
|
||||||
ifndef LIBARCH
|
ifndef LIBARCH
|
||||||
@ -72,7 +77,7 @@ CFLAGS = $(OPT) -D$(DB) -DNETWARE -nostdinc # -DHAVE_CONFIG_H
|
|||||||
|
|
||||||
ifeq ($(CC),mwccnlm)
|
ifeq ($(CC),mwccnlm)
|
||||||
LD = mwldnlm
|
LD = mwldnlm
|
||||||
LDFLAGS = -nostdlib $(PRELUDE) $(OBJS) -o $@ -commandfile
|
LDFLAGS = -nostdlib $(PRELUDE) $(LDLIBS) $(<:.def=.o) -o $@ -commandfile
|
||||||
AR = mwldnlm
|
AR = mwldnlm
|
||||||
ARFLAGS = -type library -w nocmdline $(OBJS) -o
|
ARFLAGS = -type library -w nocmdline $(OBJS) -o
|
||||||
LIBEXT = lib
|
LIBEXT = lib
|
||||||
@ -125,8 +130,8 @@ endif
|
|||||||
|
|
||||||
ifdef WITH_ZLIB
|
ifdef WITH_ZLIB
|
||||||
INCLUDES += -I$(ZLIB_PATH)
|
INCLUDES += -I$(ZLIB_PATH)
|
||||||
ifdef Z_LINK_STATIC
|
ifdef LINK_STATIC
|
||||||
LDLIBS += @$(ZLIB_PATH)/nw/libz.$(LIBEXT)
|
LDLIBS += $(ZLIB_PATH)/nw/libz.$(LIBEXT)
|
||||||
else
|
else
|
||||||
IMPORTS += @$(ZLIB_PATH)/nw/libz.imp
|
IMPORTS += @$(ZLIB_PATH)/nw/libz.imp
|
||||||
MODULES += libz.nlm
|
MODULES += libz.nlm
|
||||||
@ -153,23 +158,18 @@ endif
|
|||||||
ifeq ($(MTSAFE),NO)
|
ifeq ($(MTSAFE),NO)
|
||||||
XDCOPT = -u
|
XDCOPT = -u
|
||||||
endif
|
endif
|
||||||
ifdef XDCOPT
|
|
||||||
XDCDATA = $(OBJDIR)/$(TARGET).xdc
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(findstring linux,$(OSTYPE)),linux)
|
ifeq ($(findstring linux,$(OSTYPE)),linux)
|
||||||
DL = '
|
DL = '
|
||||||
#-include $(NDKBASE)/nlmconv/ncpfs.inc
|
#-include $(NDKBASE)/nlmconv/ncpfs.inc
|
||||||
endif
|
endif
|
||||||
|
|
||||||
vpath %.c ../.. ../../example/simple
|
vpath %.c ../../example/simple
|
||||||
|
|
||||||
OBJS = $(OBJDIR)/$(TARGET).o $(LDLIBS)
|
.PRECIOUS: $(OBJDIR)/%.o $(OBJDIR)/%.def $(OBJDIR)/%.xdc
|
||||||
|
|
||||||
|
|
||||||
all: nlm
|
all: prebuild $(TARGETS)
|
||||||
|
|
||||||
nlm: prebuild $(TARGET).nlm
|
|
||||||
|
|
||||||
prebuild: $(OBJDIR) $(OBJDIR)/version.inc
|
prebuild: $(OBJDIR) $(OBJDIR)/version.inc
|
||||||
|
|
||||||
@ -181,17 +181,16 @@ $(OBJDIR)/version.inc: ../../include/libssh2.h $(OBJDIR)
|
|||||||
@echo Creating $@
|
@echo Creating $@
|
||||||
@$(AWK) -f ../../get_ver.awk $< > $@
|
@$(AWK) -f ../../get_ver.awk $< > $@
|
||||||
|
|
||||||
objclean: all
|
objclean:
|
||||||
-$(RM) -r $(OBJDIR)
|
-$(RM) -r $(OBJDIR)
|
||||||
|
|
||||||
clean:
|
clean: objclean
|
||||||
-$(RM) $(TARGET).exe
|
-$(RM) $(TARGETS)
|
||||||
-$(RM) -r $(OBJDIR)
|
|
||||||
|
|
||||||
$(OBJDIR):
|
$(OBJDIR):
|
||||||
@mkdir $@
|
@mkdir $@
|
||||||
|
|
||||||
$(TARGET).nlm: $(OBJDIR)/$(TARGET).def $(OBJS) $(XDCDATA)
|
%.nlm: $(OBJDIR)/%.def $(OBJDIR)/%.o $(OBJDIR)/%.xdc
|
||||||
@echo Linking $@
|
@echo Linking $@
|
||||||
@-$(RM) $@
|
@-$(RM) $@
|
||||||
@$(LD) $(LDFLAGS) $<
|
@$(LD) $(LDFLAGS) $<
|
||||||
@ -222,9 +221,15 @@ endif
|
|||||||
ifeq ($(DB),DEBUG)
|
ifeq ($(DB),DEBUG)
|
||||||
@echo $(DL)debug$(DL) >> $@
|
@echo $(DL)debug$(DL) >> $@
|
||||||
endif
|
endif
|
||||||
@echo $(DL)threadname "$(TARGET)"$(DL) >> $@
|
@echo $(DL)threadname "$(notdir $(@:.def=))"$(DL) >> $@
|
||||||
ifdef XDCDATA
|
ifdef XDCOPT
|
||||||
@echo $(DL)xdcdata $(XDCDATA)$(DL) >> $@
|
@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
|
endif
|
||||||
ifeq ($(LIBARCH),CLIB)
|
ifeq ($(LIBARCH),CLIB)
|
||||||
@echo $(DL)start _Prelude$(DL) >> $@
|
@echo $(DL)start _Prelude$(DL) >> $@
|
||||||
@ -265,7 +270,7 @@ ifdef WITH_SSL
|
|||||||
endif
|
endif
|
||||||
@echo $(DL)input $(OBJS)$(DL) >> $@
|
@echo $(DL)input $(OBJS)$(DL) >> $@
|
||||||
@echo $(DL)input $(PRELUDE)$(DL) >> $@
|
@echo $(DL)input $(PRELUDE)$(DL) >> $@
|
||||||
@echo $(DL)output $(TARGET).nlm$(DL) >> $@
|
@echo $(DL)output $(notdir $(@:.def=.nlm))$(DL) >> $@
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
||||||
|
@ -65,6 +65,7 @@ ZIP = zip -qzr9
|
|||||||
|
|
||||||
# Global flags for all compilers
|
# Global flags for all compilers
|
||||||
CFLAGS = $(OPT) -D$(DB) -DWIN32 -DLIBSSH2_WIN32 # -DHAVE_CONFIG_H
|
CFLAGS = $(OPT) -D$(DB) -DWIN32 -DLIBSSH2_WIN32 # -DHAVE_CONFIG_H
|
||||||
|
CFLAGS += -DHAVE_IOCTLSOCKET
|
||||||
|
|
||||||
ifeq ($(CC),mwcc)
|
ifeq ($(CC),mwcc)
|
||||||
LD = mwld
|
LD = mwld
|
||||||
@ -109,8 +110,7 @@ endif
|
|||||||
|
|
||||||
CFLAGS += $(INCLUDES)
|
CFLAGS += $(INCLUDES)
|
||||||
|
|
||||||
#ifeq ($(findstring linux,$(OSTYPE)),linux)
|
ifeq ($(findstring msys,$(OSTYPE)),msys)
|
||||||
ifdef __MSYS__
|
|
||||||
DL = '
|
DL = '
|
||||||
DS = /
|
DS = /
|
||||||
else
|
else
|
||||||
@ -134,6 +134,7 @@ OBJECTS = \
|
|||||||
scp.o \
|
scp.o \
|
||||||
session.o \
|
session.o \
|
||||||
sftp.o \
|
sftp.o \
|
||||||
|
transport.o \
|
||||||
userauth.o
|
userauth.o
|
||||||
|
|
||||||
OBJS := $(addprefix $(OBJDIR)/,$(OBJECTS))
|
OBJS := $(addprefix $(OBJDIR)/,$(OBJECTS))
|
||||||
@ -226,40 +227,40 @@ $(OBJDIR)/%.res: $(OBJDIR)/%.rc
|
|||||||
@$(RC) $(RCFLAGS) $< -o $@
|
@$(RC) $(RCFLAGS) $< -o $@
|
||||||
|
|
||||||
$(OBJDIR)/%.rc: Makefile.win32 $(OBJDIR)/version.inc
|
$(OBJDIR)/%.rc: Makefile.win32 $(OBJDIR)/version.inc
|
||||||
@echo 1 VERSIONINFO > $@
|
@echo $(DL)1 VERSIONINFO$(DL) > $@
|
||||||
@echo FILEVERSION $(LIBSSH2_VERSION),0 >> $@
|
@echo $(DL) FILEVERSION $(LIBSSH2_VERSION),0$(DL) >> $@
|
||||||
@echo PRODUCTVERSION $(LIBSSH2_VERSION),0 >> $@
|
@echo $(DL) PRODUCTVERSION $(LIBSSH2_VERSION),0$(DL) >> $@
|
||||||
@echo FILEFLAGSMASK 0x3fL >> $@
|
@echo $(DL) FILEFLAGSMASK 0x3fL$(DL) >> $@
|
||||||
@echo FILEOS 0x40004L >> $@
|
@echo $(DL) FILEOS 0x40004L$(DL) >> $@
|
||||||
@echo FILEFLAGS 0x0L >> $@
|
@echo $(DL) FILEFLAGS 0x0L$(DL) >> $@
|
||||||
@echo FILETYPE 0x1L >> $@
|
@echo $(DL) FILETYPE 0x1L$(DL) >> $@
|
||||||
@echo FILESUBTYPE 0x0L >> $@
|
@echo $(DL) FILESUBTYPE 0x0L$(DL) >> $@
|
||||||
@echo BEGIN >> $@
|
@echo $(DL)BEGIN$(DL) >> $@
|
||||||
@echo BLOCK "StringFileInfo" >> $@
|
@echo $(DL) BLOCK "StringFileInfo"$(DL) >> $@
|
||||||
@echo BEGIN >> $@
|
@echo $(DL) BEGIN$(DL) >> $@
|
||||||
@echo BLOCK "040904E4" >> $@
|
@echo $(DL) BLOCK "040904E4"$(DL) >> $@
|
||||||
@echo BEGIN >> $@
|
@echo $(DL) BEGIN$(DL) >> $@
|
||||||
@echo VALUE "LegalCopyright","$(COPYR)\0" >> $@
|
@echo $(DL) VALUE "LegalCopyright","$(COPYR)\0"$(DL) >> $@
|
||||||
ifdef COMPANY
|
ifdef COMPANY
|
||||||
@echo VALUE "CompanyName","$(COMPANY)\0" >> $@
|
@echo $(DL) VALUE "CompanyName","$(COMPANY)\0"$(DL) >> $@
|
||||||
endif
|
endif
|
||||||
@echo VALUE "ProductName","$(notdir $(@:.rc=.dll))\0" >> $@
|
@echo $(DL) VALUE "ProductName","$(notdir $(@:.rc=.dll))\0"$(DL) >> $@
|
||||||
@echo VALUE "ProductVersion","$(LIBSSH2_VERSION_STR)\0" >> $@
|
@echo $(DL) VALUE "ProductVersion","$(LIBSSH2_VERSION_STR)\0"$(DL) >> $@
|
||||||
@echo VALUE "License","Released under GPL.\0" >> $@
|
@echo $(DL) VALUE "License","Released under GPL.\0"$(DL) >> $@
|
||||||
@echo VALUE "FileDescription","$(DESCR)\0" >> $@
|
@echo $(DL) VALUE "FileDescription","$(DESCR)\0"$(DL) >> $@
|
||||||
@echo VALUE "FileVersion","$(LIBSSH2_VERSION_STR)\0" >> $@
|
@echo $(DL) VALUE "FileVersion","$(LIBSSH2_VERSION_STR)\0"$(DL) >> $@
|
||||||
@echo VALUE "InternalName","$(notdir $(@:.rc=))\0" >> $@
|
@echo $(DL) VALUE "InternalName","$(notdir $(@:.rc=))\0"$(DL) >> $@
|
||||||
@echo VALUE "OriginalFilename","$(notdir $(@:.rc=.dll))\0" >> $@
|
@echo $(DL) VALUE "OriginalFilename","$(notdir $(@:.rc=.dll))\0"$(DL) >> $@
|
||||||
@echo VALUE "WWW","$(WWWURL)\0" >> $@
|
@echo $(DL) VALUE "WWW","$(WWWURL)\0"$(DL) >> $@
|
||||||
@echo END >> $@
|
@echo $(DL) END$(DL) >> $@
|
||||||
@echo END >> $@
|
@echo $(DL) END$(DL) >> $@
|
||||||
@echo BLOCK "VarFileInfo" >> $@
|
@echo $(DL) BLOCK "VarFileInfo"$(DL) >> $@
|
||||||
@echo BEGIN >> $@
|
@echo $(DL) BEGIN$(DL) >> $@
|
||||||
@echo VALUE "Translation", 0x409, 1252 >> $@
|
@echo $(DL) VALUE "Translation", 0x409, 1252$(DL) >> $@
|
||||||
@echo END >> $@
|
@echo $(DL) END$(DL) >> $@
|
||||||
@echo END >> $@
|
@echo $(DL)END$(DL) >> $@
|
||||||
ifdef ICON
|
ifdef ICON
|
||||||
@echo 10 ICON DISCARDABLE "$(ICON)" >> $@
|
@echo $(DL)10 ICON DISCARDABLE "$(ICON)"$(DL) >> $@
|
||||||
endif
|
endif
|
||||||
|
|
||||||
$(DISTDIR)/readme.txt: Makefile.win32
|
$(DISTDIR)/readme.txt: Makefile.win32
|
||||||
|
@ -17,13 +17,15 @@ ifndef OPENSSL_PATH
|
|||||||
OPENSSL_PATH = ../../openssl-0.9.8d
|
OPENSSL_PATH = ../../openssl-0.9.8d
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
# Edit the var below to enable static linking of libssh2 and libz
|
||||||
|
LINK_STATIC = 1
|
||||||
|
|
||||||
# Edit the vars below to change target settings.
|
# Edit the vars below to change target settings.
|
||||||
#TARGETS = ssh2_sample sftp ssh2
|
TARGETS = scp.exe sftp.exe ssh2.exe
|
||||||
TARGET = ssh2_sample
|
|
||||||
VERSION = $(LIBSSH2_VERSION)
|
VERSION = $(LIBSSH2_VERSION)
|
||||||
COPYR = (c) 2004-2007 Sara Golemon <sarag@libssh2.org>
|
COPYR = (c) 2004-2007 Sara Golemon <sarag@libssh2.org>
|
||||||
WWWURL = http://www.libssh2.org/
|
WWWURL = http://www.libssh2.org/
|
||||||
DESCR = libssh2 sample $(LIBSSH2_VERSION_STR)
|
DESCR = libssh2 $(subst .def,,$(notdir $@)) $(LIBSSH2_VERSION_STR)
|
||||||
#STACK = 64000
|
#STACK = 64000
|
||||||
|
|
||||||
# must be equal to DEBUG or NDEBUG
|
# must be equal to DEBUG or NDEBUG
|
||||||
@ -85,22 +87,25 @@ endif
|
|||||||
|
|
||||||
INCLUDES = -I. -I.. -I../../include
|
INCLUDES = -I. -I.. -I../../include
|
||||||
INCLUDES += -I$(OPENSSL_PATH)/outinc -I$(OPENSSL_PATH)/outinc/openssl
|
INCLUDES += -I$(OPENSSL_PATH)/outinc -I$(OPENSSL_PATH)/outinc/openssl
|
||||||
|
#LIBPATH += -L$(OPENSSL_PATH)/out
|
||||||
|
LIBPATH += -L..
|
||||||
|
|
||||||
ifdef LINK_STATIC
|
ifdef LINK_STATIC
|
||||||
LDLIBS += ../libssh2.$(LIBEXT)
|
LDLIBS += -llibssh2
|
||||||
|
#LDLIBS += $(OPENSSL_PATH)/out/libcrypto.$(LIBEXT) $(OPENSSL_PATH)/out/libssl.$(LIBEXT)
|
||||||
else
|
else
|
||||||
LDLIBS += ../libssh2dll.$(LIBEXT)
|
LDLIBS += -llibssh2dll
|
||||||
|
#LDLIBS += $(OPENSSL_PATH)/out/libeay32.$(LIBEXT) $(OPENSSL_PATH)/out/libssl32.$(LIBEXT)
|
||||||
endif
|
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
|
ifdef WITH_ZLIB
|
||||||
INCLUDES += -I$(ZLIB_PATH)
|
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
|
endif
|
||||||
|
|
||||||
CFLAGS += $(INCLUDES)
|
CFLAGS += $(INCLUDES)
|
||||||
@ -113,18 +118,14 @@ else
|
|||||||
DS = \\
|
DS = \\
|
||||||
endif
|
endif
|
||||||
|
|
||||||
vpath %.c ../.. ../../example/simple
|
vpath %.c ../../example/simple
|
||||||
|
|
||||||
#OBJS := $(addprefix $(OBJDIR)/,$(OBJECTS))
|
.PRECIOUS: $(OBJDIR)/%.o $(OBJDIR)/%.rc $(OBJDIR)/%.res
|
||||||
OBJS = $(OBJDIR)/$(TARGET).o
|
|
||||||
|
|
||||||
|
|
||||||
all: exe
|
all: prebuild $(TARGETS)
|
||||||
|
|
||||||
exe: prebuild $(TARGET).exe
|
|
||||||
|
|
||||||
prebuild: $(OBJDIR) $(OBJDIR)/version.inc
|
prebuild: $(OBJDIR) $(OBJDIR)/version.inc
|
||||||
# libssh2_config.h
|
|
||||||
|
|
||||||
$(OBJDIR)/%.o: %.c
|
$(OBJDIR)/%.o: %.c
|
||||||
# @echo Compiling $<
|
# @echo Compiling $<
|
||||||
@ -142,61 +143,59 @@ devclean: clean
|
|||||||
-$(RM) -r $(DEVLDIR)
|
-$(RM) -r $(DEVLDIR)
|
||||||
-$(RM) $(DEVLARC)
|
-$(RM) $(DEVLARC)
|
||||||
|
|
||||||
objclean: all
|
objclean:
|
||||||
-$(RM) -r $(OBJDIR)
|
-$(RM) -r $(OBJDIR)
|
||||||
|
|
||||||
clean:
|
clean: objclean
|
||||||
# -$(RM) libssh2_config.h
|
-$(RM) $(TARGETS)
|
||||||
-$(RM) $(TARGET).exe
|
|
||||||
-$(RM) -r $(OBJDIR)
|
|
||||||
|
|
||||||
$(OBJDIR):
|
$(OBJDIR):
|
||||||
@mkdir $@
|
@mkdir $@
|
||||||
|
|
||||||
$(TARGET).exe: $(OBJDIR)/$(TARGET).res $(OBJS)
|
%.exe: $(OBJDIR)/%.o $(OBJDIR)/%.res
|
||||||
@echo Linking $@
|
@echo Linking $@
|
||||||
@-$(RM) $@
|
@-$(RM) $@
|
||||||
@$(LD) $(LDFLAGS) $^ -o $@ $(LIBPATH) $(LDLIBS)
|
$(LD) $(LDFLAGS) $^ -o $@ $(LIBPATH) $(LDLIBS)
|
||||||
|
|
||||||
$(OBJDIR)/%.res: $(OBJDIR)/%.rc
|
$(OBJDIR)/%.res: $(OBJDIR)/%.rc
|
||||||
@echo Creating $@
|
@echo Creating $@
|
||||||
@$(RC) $(RCFLAGS) $< -o $@
|
@$(RC) $(RCFLAGS) $< -o $@
|
||||||
|
|
||||||
$(OBJDIR)/%.rc: Makefile.win32 $(OBJDIR)/version.inc
|
$(OBJDIR)/%.rc: Makefile.win32 $(OBJDIR)/version.inc
|
||||||
@echo 1 VERSIONINFO > $@
|
@echo $(DL)1 VERSIONINFO$(DL) > $@
|
||||||
@echo FILEVERSION $(LIBSSH2_VERSION),0 >> $@
|
@echo $(DL) FILEVERSION $(LIBSSH2_VERSION),0$(DL) >> $@
|
||||||
@echo PRODUCTVERSION $(LIBSSH2_VERSION),0 >> $@
|
@echo $(DL) PRODUCTVERSION $(LIBSSH2_VERSION),0$(DL) >> $@
|
||||||
@echo FILEFLAGSMASK 0x3fL >> $@
|
@echo $(DL) FILEFLAGSMASK 0x3fL$(DL) >> $@
|
||||||
@echo FILEOS 0x40004L >> $@
|
@echo $(DL) FILEOS 0x40004L$(DL) >> $@
|
||||||
@echo FILEFLAGS 0x0L >> $@
|
@echo $(DL) FILEFLAGS 0x0L$(DL) >> $@
|
||||||
@echo FILETYPE 0x1L >> $@
|
@echo $(DL) FILETYPE 0x1L$(DL) >> $@
|
||||||
@echo FILESUBTYPE 0x0L >> $@
|
@echo $(DL) FILESUBTYPE 0x0L$(DL) >> $@
|
||||||
@echo BEGIN >> $@
|
@echo $(DL)BEGIN$(DL) >> $@
|
||||||
@echo BLOCK "StringFileInfo" >> $@
|
@echo $(DL) BLOCK "StringFileInfo"$(DL) >> $@
|
||||||
@echo BEGIN >> $@
|
@echo $(DL) BEGIN$(DL) >> $@
|
||||||
@echo BLOCK "040904E4" >> $@
|
@echo $(DL) BLOCK "040904E4"$(DL) >> $@
|
||||||
@echo BEGIN >> $@
|
@echo $(DL) BEGIN$(DL) >> $@
|
||||||
@echo VALUE "LegalCopyright","$(COPYR)\0" >> $@
|
@echo $(DL) VALUE "LegalCopyright","$(COPYR)\0"$(DL) >> $@
|
||||||
ifdef COMPANY
|
ifdef COMPANY
|
||||||
@echo VALUE "CompanyName","$(COMPANY)\0" >> $@
|
@echo $(DL) VALUE "CompanyName","$(COMPANY)\0"$(DL) >> $@
|
||||||
endif
|
endif
|
||||||
@echo VALUE "ProductName","$(notdir $(@:.rc=.exe))\0" >> $@
|
@echo $(DL) VALUE "ProductName","$(notdir $(@:.rc=.exe))\0"$(DL) >> $@
|
||||||
@echo VALUE "ProductVersion","$(LIBSSH2_VERSION_STR)\0" >> $@
|
@echo $(DL) VALUE "ProductVersion","$(LIBSSH2_VERSION_STR)\0"$(DL) >> $@
|
||||||
@echo VALUE "License","Released under GPL.\0" >> $@
|
@echo $(DL) VALUE "License","Released under GPL.\0"$(DL) >> $@
|
||||||
@echo VALUE "FileDescription","$(DESCR)\0" >> $@
|
@echo $(DL) VALUE "FileDescription","$(DESCR)\0"$(DL) >> $@
|
||||||
@echo VALUE "FileVersion","$(LIBSSH2_VERSION_STR)\0" >> $@
|
@echo $(DL) VALUE "FileVersion","$(LIBSSH2_VERSION_STR)\0"$(DL) >> $@
|
||||||
@echo VALUE "InternalName","$(notdir $(@:.rc=))\0" >> $@
|
@echo $(DL) VALUE "InternalName","$(notdir $(@:.rc=))\0"$(DL) >> $@
|
||||||
@echo VALUE "OriginalFilename","$(notdir $(@:.rc=.exe))\0" >> $@
|
@echo $(DL) VALUE "OriginalFilename","$(notdir $(@:.rc=.exe))\0"$(DL) >> $@
|
||||||
@echo VALUE "WWW","$(WWWURL)\0" >> $@
|
@echo $(DL) VALUE "WWW","$(WWWURL)\0"$(DL) >> $@
|
||||||
@echo END >> $@
|
@echo $(DL) END$(DL) >> $@
|
||||||
@echo END >> $@
|
@echo $(DL) END$(DL) >> $@
|
||||||
@echo BLOCK "VarFileInfo" >> $@
|
@echo $(DL) BLOCK "VarFileInfo"$(DL) >> $@
|
||||||
@echo BEGIN >> $@
|
@echo $(DL) BEGIN$(DL) >> $@
|
||||||
@echo VALUE "Translation", 0x409, 1252 >> $@
|
@echo $(DL) VALUE "Translation", 0x409, 1252$(DL) >> $@
|
||||||
@echo END >> $@
|
@echo $(DL) END$(DL) >> $@
|
||||||
@echo END >> $@
|
@echo $(DL)END$(DL) >> $@
|
||||||
ifdef ICON
|
ifdef ICON
|
||||||
@echo 10 ICON DISCARDABLE "$(ICON)" >> $@
|
@echo $(DL)10 ICON DISCARDABLE "$(ICON)"$(DL) >> $@
|
||||||
endif
|
endif
|
||||||
|
|
||||||
help: $(OBJDIR)/version.inc
|
help: $(OBJDIR)/version.inc
|
||||||
|
Загрузка…
Ссылка в новой задаче
Block a user