Automatic date stamping

This commit is contained in:
Joshua Bell 2017-12-01 20:17:14 -08:00
parent 71097b0bbe
commit 296f128655
3 changed files with 9 additions and 3 deletions

View File

@ -5,6 +5,12 @@ CCFLAGS = --config apple2-asm.cfg
TARGETS = prodos.mod.BIN ns.clock.system.SYS cricket.system.SYS test.BIN
# For timestamps
MM = $(shell date "+%m")
DD = $(shell date "+%d")
YY = $(shell date "+%y")
DEFINES = -D DD=$(DD) -D MM=$(MM) -D YY=$(YY)
.PHONY: clean all
all: $(TARGETS)
@ -15,7 +21,7 @@ clean:
rm -f $(TARGETS)
%.o: %.s $(HEADERS)
$(CC65)/ca65 $(CAFLAGS) --listing $(basename $@).list -o $@ $<
$(CC65)/ca65 $(CAFLAGS) $(DEFINES) --listing $(basename $@).list -o $@ $<
%.BIN %.SYS: %.o
$(CC65)/ld65 $(CCFLAGS) -o $@ $<

View File

@ -33,7 +33,7 @@ sys_start:
sec
bcs relocate
.byte $12, $1, $17 ; 12/1/17 - version date stamp
.byte MM, DD, YY ; version date stamp
;;; ------------------------------------------------------------
;;; Relocate this code from $2000 (.SYSTEM start location) to $1000

View File

@ -33,7 +33,7 @@ sys_start:
sec
bcs relocate
.byte $11, $26, $17 ; 11/26/17 - version date stamp
.byte MM, DD, YY ; version date stamp
;;; ------------------------------------------------------------
;;; Relocate this code from $2000 (.SYSTEM start location) to $1000