]> git.sur5r.net Git - c128-kasse/blobdiff - Makefile
fix prototypes
[c128-kasse] / Makefile
index 526c5670bb5cf0451174fc29da469dc5fbb33233..b44b3597a3555f148c4baac201ce1de34ed07112 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,13 +1,20 @@
 CC=cc65
 AS=ca65
 LD=cl65
-INCLUDES:=$(wildcard include/*.h)
+INCLUDES:=$(wildcard include/*.h) include/version.h
 GV:=$(shell git describe --tags --always)
+CFLAGS= -I include -t c128
 
-CFLAGS += -DGV=\"${GV}\"
+.PHONY: include/version.h clean dist-clean
+
+all: kasse itemz
 
 %.o: %.c ${INCLUDES}
-       ${CC} ${CFLAGS} -O -I include -t c128 $< -o /dev/stdout | ${AS} -I include -t c128 /dev/stdin -o $@
+       ${CC} ${CFLAGS} -O $<
+       ${AS} ${CFLAGS} $(addsuffix .s,$(basename $< ))
+
+include/version.h:
+       echo "#define GV \"${GV}\"" > $@
 
 kasse: src/config.o src/kasse.o src/general.o src/credit_manager.o src/c128time.o src/print.o
        ${LD} -t c128 $^ -o $@
@@ -18,8 +25,6 @@ itemz: src/config.o src/itemz.o src/general.o src/credit_manager.o src/c128time.
 cat: src/general.o src/cat.o
        ${LD} -t c128 $^ -o $@
 
-all: kasse itemz
-
 package: all
        cp images/kasse.d64 .
        c1541 -attach kasse.d64 -delete state || exit 0 
@@ -44,6 +49,6 @@ test-package: test
 
 clean:
        rm -rf src/*.o src/*.s test/*.o test/*.s
-       
+
 dist-clean: clean
        rm kasse itemz kasse.d64