From 8f00a7471d3388083866a0aa2bb7f2a56148c776 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Viktor=20Szak=C3=A1ts?= Date: Thu, 12 Mar 2015 00:29:58 +0100 Subject: [PATCH] mingw build: allow to pass custom CFLAGS Allow to pass custom `CFLAGS` options via environment variable `LIBSSH2_CFLAG_EXTRAS`. Default and automatically added options of `GNUmakefile` have preference over custom ones. This addition is useful for passing f.e. custom CPU tuning or LTO optimization (`-flto -ffat-lto-objects`) options. The only current way to do this is to edit `GNUmakefile`. This patch makes it unnecessary. This is a mirror of similar libcurl patch: https://github.com/bagder/curl/pull/136 --- win32/GNUmakefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/win32/GNUmakefile b/win32/GNUmakefile index 0d95d81..da56ffa 100644 --- a/win32/GNUmakefile +++ b/win32/GNUmakefile @@ -110,7 +110,7 @@ endif -include $(OBJDIR)/version.inc # Global flags for all compilers -CFLAGS = $(OPT) -D$(DB) -DLIBSSH2_WIN32 # -DHAVE_CONFIG_H +CFLAGS = $(LIBSSH2_CFLAG_EXTRAS) $(OPT) -D$(DB) -DLIBSSH2_WIN32 # -DHAVE_CONFIG_H ifeq ($(CC),mwcc) LD = mwld