From b792ce833f537b3e58f23cc52e195ab08e1555f9 Mon Sep 17 00:00:00 2001 From: Dmitry Marakasov Date: Fri, 3 Nov 2017 18:49:29 +0300 Subject: [PATCH] Respect user-set compiler and linker flags --- Makefile | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index d1dd9fe..f06f89d 100644 --- a/Makefile +++ b/Makefile @@ -1,14 +1,15 @@ -CC = gcc -CFLAGS = -W -Wall -pedantic -ansi -std=c99 -g - -LDFLAGS = -lncursesw +CC ?= gcc +CFLAGS ?= -g +CFLAGS += -W -Wall -pedantic -ansi -std=c99 -g # OS X installs ncurses with wide character support, but not as "libncurses" ifeq ($(shell uname -s),Darwin) - LDFLAGS = -lncurses + LDFLAGS += -lncurses +else + LDFLAGS += -lncursesw endif -PREFIX = /usr/local +PREFIX ?= /usr/local EXECUTABLE = ttysolitaire SRC_DIR = src