From a9b3fe2e19ef28a6420281b0cc3be448ad43472f Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Mon, 26 Aug 2013 14:57:27 -0700 Subject: [PATCH] windows: tweak Makefile.mingw for easier usage Default CC to `gcc` instead of `cc` because at least on the mingw installation I had there was no `cc` executable. This avoids having to type `CC=gcc` in all the `make` commands. Also append to `CFLAGS` instead of defining if not previously defined. These flags are required to build libuv, so they should not be overridden if other extra CFLAGS are supplied via the command line as well. --- Makefile.mingw | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/Makefile.mingw b/Makefile.mingw index 189104a3..28a1e274 100644 --- a/Makefile.mingw +++ b/Makefile.mingw @@ -12,14 +12,16 @@ # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -CFLAGS = -Wall \ - -Wextra \ - -Wno-unused-parameter \ - -Iinclude \ - -Isrc \ - -Isrc/win \ - -DWIN32_LEAN_AND_MEAN \ - -D_WIN32_WINNT=0x0600 +CC = gcc + +CFLAGS += -Wall \ + -Wextra \ + -Wno-unused-parameter \ + -Iinclude \ + -Isrc \ + -Isrc/win \ + -DWIN32_LEAN_AND_MEAN \ + -D_WIN32_WINNT=0x0600 INCLUDES = include/stdint-msvc2008.h \ include/tree.h \