shithub: rgbds

Download patch

ref: add07259f4bf01b370380de5158c18a0a14950e9
parent: 36ca18bc7b3bb3461338efb7499739befe1b4a52
parent: 6d9399e3a047a82b84f43d3ab5a2c51c30a5c4cf
author: Eldred Habert <[email protected]>
date: Wed Jan 8 20:01:11 EST 2020

Merge pull request #465 from ISSOtm/rebuild_version

Always update version

--- a/Makefile
+++ b/Makefile
@@ -35,12 +35,12 @@
 CFLAGS		:= -g -O0
 # Non-overridable CFLAGS
 REALCFLAGS	:= ${CFLAGS} ${WARNFLAGS} -std=c11 -D_POSIX_C_SOURCE=200809L \
-		   -D_DEFAULT_SOURCE -Iinclude \
-		   -DBUILD_VERSION_STRING=\"${VERSION_STRING}\"
+		   -D_DEFAULT_SOURCE -Iinclude
 # Overridable LDFLAGS
 LDFLAGS		:=
 # Non-overridable LDFLAGS
-REALLDFLAGS	:= ${LDFLAGS} ${WARNFLAGS}
+REALLDFLAGS	:= ${LDFLAGS} ${WARNFLAGS} \
+		   -DBUILD_VERSION_STRING=\"${VERSION_STRING}\"
 
 YFLAGS		:=
 
@@ -67,8 +67,7 @@
 	src/asm/warning.o \
 	src/extern/err.o \
 	src/extern/getopt.o \
-	src/extern/utf8decoder.o \
-	src/version.o
+	src/extern/utf8decoder.o
 
 src/asm/globlex.o src/asm/lexer.o src/asm/constexpr.o: src/asm/asmy.h
 
@@ -83,14 +82,12 @@
 	src/link/symbol.o \
 	src/extern/err.o \
 	src/extern/getopt.o \
-	src/hashmap.o \
-	src/version.o
+	src/hashmap.o
 
 rgbfix_obj := \
 	src/fix/main.o \
 	src/extern/err.o \
-	src/extern/getopt.o \
-	src/version.o
+	src/extern/getopt.o
 
 rgbgfx_obj := \
 	src/gfx/gb.o \
@@ -97,20 +94,19 @@
 	src/gfx/main.o \
 	src/gfx/makepng.o \
 	src/extern/err.o \
-	src/extern/getopt.o \
-	src/version.o
+	src/extern/getopt.o
 
 rgbasm: ${rgbasm_obj}
-	$Q${CC} ${REALLDFLAGS} -o $@ ${rgbasm_obj} -lm
+	$Q${CC} ${REALLDFLAGS} -o $@ ${rgbasm_obj} ${REALCFLAGS} src/version.c -lm
 
 rgblink: ${rgblink_obj}
-	$Q${CC} ${REALLDFLAGS} -o $@ ${rgblink_obj}
+	$Q${CC} ${REALLDFLAGS} -o $@ ${rgblink_obj} ${REALCFLAGS} src/version.c
 
 rgbfix: ${rgbfix_obj}
-	$Q${CC} ${REALLDFLAGS} -o $@ ${rgbfix_obj}
+	$Q${CC} ${REALLDFLAGS} -o $@ ${rgbfix_obj} ${REALCFLAGS} src/version.c
 
 rgbgfx: ${rgbgfx_obj}
-	$Q${CC} ${REALLDFLAGS} ${PNGLDFLAGS} -o $@ ${rgbgfx_obj} ${PNGLDLIBS}
+	$Q${CC} ${REALLDFLAGS} ${PNGLDFLAGS} -o $@ ${rgbgfx_obj} ${REALCFLAGS} src/version.c ${PNGLDLIBS}
 
 # Rules to process files