From 16ba23bb073f5d0291547f73a2534d7254d1d69a Mon Sep 17 00:00:00 2001 From: Michael Stapelberg Date: Sun, 1 Nov 2009 14:22:13 +0100 Subject: [PATCH] Add git version string --- Makefile | 5 ++++- src/kasse.c | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index e9d2d8a..b6e523f 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,10 @@ INCLUDES:=$(wildcard include/*.h) +GV:=$(shell git describe --tags --always) + +CFLAGS += -DGV=\"${GV}\" src/%.o: src/%.c ${INCLUDES} - cc65 -O -I include -t c128 $< + cc65 ${CFLAGS} -O -I include -t c128 $< ca65 -I include -t c128 src/$$(basename $< .c).s test/%.o: test/%.c diff --git a/src/kasse.c b/src/kasse.c index 03a082a..c792c60 100644 --- a/src/kasse.c +++ b/src/kasse.c @@ -41,7 +41,7 @@ static void print_screen() { cprintf("Einnahme %ld konnte nicht umgerechnet werden\r\n", money); exit(1); } - cprintf("C128-Kassenprogramm (phil_fry, sECuRE, sur5r)\r\ + cprintf("C128-Kassenprogramm (phil_fry, sECuRE, sur5r) v:" GV "\r\ \r\nUhrzeit: %s (wird nicht aktualisiert)\r\ Eingenommen: %s, Verkauft: %ld Flaschen, Drucken: %s\r\n\r\n", time, profit, items_sold, (printing == 1 ? "ein" : "aus")); -- 2.39.5