GNUmakefile: add support for LIBSSH2_LDFLAG_EXTRAS

It is similar to existing LIBSSH2_CFLAG_EXTRAS, but for
extra linker options.

Also delete some line/file ending whitespace.

closes #27
This commit is contained in:
Viktor Szakats 2015-06-18 14:45:22 +02:00 committed by Daniel Stenberg
parent 9af7eb48dc
commit a4d995af0d

View File

@ -111,11 +111,12 @@ endif
# Global flags for all compilers # Global flags for all compilers
CFLAGS = $(LIBSSH2_CFLAG_EXTRAS) $(OPT) -D$(DB) -DLIBSSH2_WIN32 # -DHAVE_CONFIG_H CFLAGS = $(LIBSSH2_CFLAG_EXTRAS) $(OPT) -D$(DB) -DLIBSSH2_WIN32 # -DHAVE_CONFIG_H
LDFLAGS = $(LIBSSH2_LDFLAG_EXTRAS)
ifeq ($(CC),mwcc) ifeq ($(CC),mwcc)
LD = mwld LD = mwld
RC = mwwinrc RC = mwwinrc
LDFLAGS = -nostdlib LDFLAGS += -nostdlib
AR = $(LD) AR = $(LD)
ARFLAGS = -nostdlib -library -o ARFLAGS = -nostdlib -library -o
LIBEXT = lib LIBEXT = lib
@ -130,7 +131,7 @@ CFLAGS += -w on,nounused,nounusedexpr # -ansi strict
else else
LD = $(CROSSPREFIX)gcc LD = $(CROSSPREFIX)gcc
RC = $(CROSSPREFIX)windres RC = $(CROSSPREFIX)windres
LDFLAGS = -s -shared -Wl,--output-def,$(TARGET).def,--out-implib,$(TARGET)dll.a LDFLAGS += -s -shared -Wl,--output-def,$(TARGET).def,--out-implib,$(TARGET)dll.a
AR = $(CROSSPREFIX)ar AR = $(CROSSPREFIX)ar
ARFLAGS = -cq ARFLAGS = -cq
LIBEXT = a LIBEXT = a
@ -226,7 +227,7 @@ prebuild: $(OBJDIR) $(OBJDIR)/version.inc
test: all test: all
$(MAKE) -C test -f GNUmakefile $(MAKE) -C test -f GNUmakefile
$(OBJDIR)/%.o: %.c $(OBJDIR)/%.o: %.c
# @echo Compiling $< # @echo Compiling $<
$(CC) $(CFLAGS) -c $< -o $@ $(CC) $(CFLAGS) -c $< -o $@
@ -342,5 +343,3 @@ help: $(OBJDIR)/version.inc
@echo $(DL)$(MAKE) objclean$(DL) @echo $(DL)$(MAKE) objclean$(DL)
@echo $(DL)$(MAKE) test$(DL) @echo $(DL)$(MAKE) test$(DL)
@echo $(DL)===========================================================$(DL) @echo $(DL)===========================================================$(DL)