From 6e777ea835c4c83d2a4c1d8e33d0d6a9ec0bfad0 Mon Sep 17 00:00:00 2001 From: Dima Krasner Date: Thu, 20 Nov 2014 21:04:42 +0200 Subject: [PATCH] Respect CFLAGS, LDFLAGS and CPPFLAGS. --- Makefile | 2 +- src/Makefile | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 9abc3c0..c1f8658 100644 --- a/Makefile +++ b/Makefile @@ -27,7 +27,7 @@ DESTDIR = PREFIX = /usr/local CURSES = ncursesw -LDFLAGS = -s +LDFLAGS ?= -s ifeq (Windows_NT,$(OS)) ifeq (,$(findstring CYGWIN,$(UNAME_S))) diff --git a/src/Makefile b/src/Makefile index ac4888e..333ed8d 100644 --- a/src/Makefile +++ b/src/Makefile @@ -22,8 +22,9 @@ UNAME_S := $(shell uname -s 2>/dev/null || echo not) SOURCES = $(wildcard *.c) OBJECTS = $(SOURCES:.c=.o) -CFLAGS = -O3 -Wall -CPPFLAGS = -I../include +CFLAGS ?= -O3 +CFLAGS += -Wall +CPPFLAGS += -I../include ifeq ($(DEBUG),1) CFLAGS := -O0 -Wall -g -- 2.20.1