From 25bf542b46cfe292b23cd6ade49431cef407cae3 Mon Sep 17 00:00:00 2001 From: onyx-and-iris Date: Thu, 27 Jun 2024 22:57:35 +0100 Subject: [PATCH] add conditional override var LOG_USE_COLOR to makefile --- makefile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/makefile b/makefile index 97adc96..a2e61f2 100644 --- a/makefile +++ b/makefile @@ -9,7 +9,12 @@ EXE := $(BIN_DIR)/$(program).exe SRC := $(wildcard $(SRC_DIR)/*.c) OBJ := $(SRC:$(SRC_DIR)/%.c=$(OBJ_DIR)/%.o) -CPPFLAGS := -Iinclude -MMD -MP +LOG_USE_COLOR ?= yes +ifeq ($(LOG_USE_COLOR), yes) + CPPFLAGS := -Iinclude -MMD -MP -DLOG_USE_COLOR +else + CPPFLAGS := -Iinclude -MMD -MP +endif CFLAGS = -O -Wall -W -pedantic -ansi -std=c99 LDFLAGS := -Llib LDLIBS := -lm