ref: 74673436a182e0fb4a6917d904f5cdfb7ef70ea4
parent: 481748c279e0ea021d8a192c244db680a86874c1
author: ISSOtm <[email protected]>
date: Sat Sep 7 08:06:46 EDT 2019
Separate LDFLAGS from CFLAGS
--- a/Makefile
+++ b/Makefile
@@ -33,6 +33,10 @@
# Non-overridable CFLAGS
REALCFLAGS := ${CFLAGS} ${WARNFLAGS} -std=c99 -D_POSIX_C_SOURCE=200809L \
-Iinclude -DBUILD_VERSION_STRING=\"${VERSION_STRING}\"
+# Overridable LDFLAGS
+LDFLAGS :=
+# Non-overridable LDFLAGS
+REALLDFLAGS := ${LDFLAGS} ${WARNFLAGS}
YFLAGS :=
LFLAGS := --nounistd
@@ -96,16 +100,16 @@
src/version.o
rgbasm: ${rgbasm_obj}
- $Q${CC} ${REALCFLAGS} -o $@ ${rgbasm_obj} -lm
+ $Q${CC} ${REALLDFLAGS} -o $@ ${rgbasm_obj} -lm
rgblink: ${rgblink_obj}
- $Q${CC} ${REALCFLAGS} -o $@ ${rgblink_obj}
+ $Q${CC} ${REALLDFLAGS} -o $@ ${rgblink_obj}
rgbfix: ${rgbfix_obj}
- $Q${CC} ${REALCFLAGS} -o $@ ${rgbfix_obj}
+ $Q${CC} ${REALLDFLAGS} -o $@ ${rgbfix_obj}
-rgbgfx: ${rgbgfx_obj}
- $Q${CC} ${REALCFLAGS} ${PNGLDFLAGS} -o $@ ${rgbgfx_obj} ${PNGLDLIBS}
+rgbgfx: ${rgblink_obj}
+ $Q${CC} ${REALLDFLAGS} ${PNGLDFLAGS} -o $@ ${rgblink_obj} ${PNGLDLIBS}
# Rules to process files