From: Dima Krasner Date: Thu, 20 Nov 2014 19:04:42 +0000 (+0200) Subject: Respect CFLAGS, LDFLAGS and CPPFLAGS. X-Git-Url: https://git.danieliu.xyz/?p=smdp.git;a=commitdiff_plain;h=6e777ea835c4c83d2a4c1d8e33d0d6a9ec0bfad0 Respect CFLAGS, LDFLAGS and CPPFLAGS. --- 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