From b433cc22425e0afdfcf923e71989efa055b2d26a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juhani=20Krekel=C3=A4?= Date: Thu, 28 Jul 2022 01:48:37 +0300 Subject: [PATCH] Properly handle CFLAGS et al --- Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 2b61e30..e9ab4ff 100644 --- a/Makefile +++ b/Makefile @@ -2,6 +2,8 @@ PREFIX ?= /local EXEC_PREFIX ?= $(PREFIX) BINDIR ?= $(EXEC_PREFIX)/bin +CFLAGS ?= -O3 -Wall -Wextra -pedantic + .SUFFIXES: .SUFFIXES: .inc .txt @@ -31,7 +33,7 @@ TILES = player_stand_tile.inc \ all: $(NAME) $(NAME): $(NAME).c $(TILES) - $(CC) -O3 -Wall -Wextra -Werror -pedantic -o $@ $< -ldisplay + $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ $< -ldisplay .txt.inc: ./tile_compiler.py $< > $@