]> git.sur5r.net Git - c128-kasse/commitdiff
Improve Makefile (#39) binlog
authorJakob Haufe <sur5r@sur5r.net>
Sun, 23 Sep 2018 09:04:00 +0000 (11:04 +0200)
committerMichael Stapelberg <stapelberg@users.noreply.github.com>
Sun, 23 Sep 2018 09:04:00 +0000 (11:04 +0200)
Check .git/index to (re)build include/version.h.

Makefile

index bf11dd85cc130a6a4234aa4aacffd2f56aefbd14..397c7ada629e02cea8fdb92a12eb964b489ff4b5 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -5,7 +5,7 @@ INCLUDES:=$(wildcard include/*.h) include/version.h include/charset_umlauts.h
 GV:=$(shell git describe --tags --always)
 CFLAGS= -I include -t c128 -g
 
-.PHONY: include/version.h include/charset_umlauts.h clean dist-clean format
+.PHONY: clean dist-clean format
 
 all: kasse itemz cat
 
@@ -23,11 +23,13 @@ build/%.o: test/%.c ${INCLUDES}
 build/%.o: test/%.s
        ${AS} ${CFLAGS} $< -o $@
 
-include/version.h:
+.git/index:
+
+include/version.h: .git/index
        mkdir -p build
        echo "#define GV \"${GV}\"" > $@
 
-include/charset_umlauts.h:
+include/charset_umlauts.h: assets/umlauts.pbm
        ./util/mkfont assets/umlauts.pbm chars_umlauts > $@
 
 kasse: build/config.o build/kasse.o build/general.o build/credit_manager.o build/c128time.o build/print.o build/vdc_patch_charset.o build/vdc_util.o build/globals.o