aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile19
1 files changed, 14 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index 92b1611..4973550 100644
--- a/Makefile
+++ b/Makefile
@@ -13,9 +13,14 @@ SYS=atari
#COPT=-Oirs
COPT=-O
-# This is used for embedding the date and git hash in the game binary.
-# It'll appear on the "name your firm" screen.
-VERSION="v0.99alpha-`date +%Y%m%d`-`git rev-parse --short HEAD 2>/dev/null || echo UNKNOWN`"
+# This is used for embedding the date and git info in the game binary.
+# It'll appear on the title screen.
+VER=0.99alpha
+TODAY=`date +%Y%m%d`
+#BRANCH=`( git branch 2> /dev/null || echo ' NOGIT' )| cut -d' ' -f2`
+REV=`git rev-parse --short HEAD 2>/dev/null || echo UNKNOWN`
+#VERSION="v$(VER)-$(TODAY)-$(BRANCH)-$(REV)"
+VERSION="v$(VER)-$(TODAY)-$(REV)"
# for older cc65, we need a custom linker file.
#CFLAGS=-t $(SYS) -C custom.cfg -I. -L. $(COPT)
@@ -30,7 +35,8 @@ VERSION="v0.99alpha-`date +%Y%m%d`-`git rev-parse --short HEAD 2>/dev/null || ec
# and I never missed it.
# The meaning of the -l flag is different between cc65-2.13.3
# and the later github cc65, so it's been removed here.
-CFLAGS=-t $(SYS) -T -I. -L. -DVERSION=\"$(VERSION)\" -Wl -D__SYSTEM_CHECK__=1 -Wl -D__RESERVED_MEMORY__=1056 $(COPT)
+#CFLAGS=-t $(SYS) -T -I. -L. -DVERSION=\"$(VERSION)\" -Wl -D__SYSTEM_CHECK__=1 -Wl -D__RESERVED_MEMORY__=1056 $(COPT)
+CFLAGS=-t $(SYS) -T -I. -L. -Wl -D__SYSTEM_CHECK__=1 -Wl -D__RESERVED_MEMORY__=1056 $(COPT)
AS=ca65
ASFLAGS=
AR=ar65
@@ -87,9 +93,12 @@ titledata.xex: newtitle.pl newtitle.png
# since it's a lot easier to homebrew an init segment than it is
# to get cc65 to build an init segment (would need a custom linker
# script at least).
-newtitle.xex: newtitle.s
+newtitle.xex: newtitle.s ver.dat
cl65 -o newtitle.xex -t none newtitle.s
+ver.dat: mkver.pl
+ perl mkver.pl $(VERSION) > ver.dat
+
# former textmode title screen, was generated by TITLE.LST. Replaced
# by graphical title screen.
#title.xex: TITLE.DAT