+.PHONY: include/version.h include/charset_umlauts.h clean dist-clean format
+
+all: kasse itemz cat
+
+build/%.o: src/%.c ${INCLUDES}
+ ${CC} ${CFLAGS} -O $< -o build/$(addsuffix .s,$(shell basename $< .c))
+ ${AS} ${CFLAGS} build/$(addsuffix .s,$(shell basename $< .c)) -o $@
+
+build/%.o: src/%.s
+ ${AS} ${CFLAGS} $< -o $@
+
+include/version.h:
+ mkdir -p build
+ echo "#define GV \"${GV}\"" > $@
+
+include/charset_umlauts.h:
+ ./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
+ ${LD} -Ln $@.lbl -t c128 $^ -o $@
+
+itemz: build/config.o build/itemz.o build/general.o build/credit_manager.o build/c128time.o build/print.o
+ ${LD} -Ln $@.lbl -t c128 $^ -o $@
+
+cat: build/general.o build/cat.o
+ ${LD} -Ln $@.lbl -t c128 $^ -o $@
+
+charmap: build/print_charmap.o build/vdc_util.o build/vdc_patch_charset.o
+ ${LD} -Ln $@.lbl -t c128 $^ -o $@
+
+ascii: build/print_ascii.o
+ ${LD} -Ln $@.lbl -t c128 $^ -o $@