Makefile: Factor out the `CFLAGS'.
authorMark Wooding <mdw@distorted.org.uk>
Sat, 19 Mar 2022 14:07:15 +0000 (14:07 +0000)
committerMark Wooding <mdw@distorted.org.uk>
Sat, 19 Mar 2022 14:07:15 +0000 (14:07 +0000)
Makes overriding from the command line less awful.

Makefile

index 836a7f4..f68c312 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -19,7 +19,10 @@ v-tag                         = $(call v-tag_$V,$1)
 v-tag_0                         = @printf "  %-8s %s\n" "$1" "$@";
 
 CC                      = gcc
-CFLAGS                  = -O2 -g -pedantic -Wall -Werror
+OPTIMIZE                = -O2
+DEBUG                   = -g
+WARN                    = -pedantic -Wall -Werror
+CFLAGS                  = $(OPTIMIZE) $(DEBUG) $(WARN)
 
 LD                      = gcc
 LDFLAGS                         =