shithub: rgbds

Download patch

ref: f3c916ab96bcc23638cfb9464fe47e8fd87ba102
parent: fcd37b52b69fc652427cc8216a9a20c04143cc87
author: ISSOtm <[email protected]>
date: Wed Jul 22 15:17:11 EDT 2020

Allow env vars to override default CFLAGS etc.

Should make the work easier for downstream packagers

--- a/Makefile
+++ b/Makefile
@@ -32,17 +32,17 @@
 WARNFLAGS	:= -Wall
 
 # Overridable CFLAGS
-CFLAGS		:= -O3
+CFLAGS		?= -O3
 # Non-overridable CFLAGS
 REALCFLAGS	:= ${CFLAGS} ${WARNFLAGS} -std=gnu11 -D_POSIX_C_SOURCE=200809L \
 		   -Iinclude
 # Overridable LDFLAGS
-LDFLAGS		:=
+LDFLAGS		?=
 # Non-overridable LDFLAGS
 REALLDFLAGS	:= ${LDFLAGS} ${WARNFLAGS} \
 		   -DBUILD_VERSION_STRING=\"${VERSION_STRING}\"
 
-YFLAGS		:=
+YFLAGS		?=
 
 YACC		:= yacc
 RM		:= rm -rf