Skip to content

Commit 064f31a

Browse files
committed
Added makefile with checksum verification
1 parent 3634f52 commit 064f31a

2 files changed

Lines changed: 46 additions & 0 deletions

File tree

applications/Makefile

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
.POSIX:
2+
3+
ECHO := @echo
4+
QUIET := @
5+
6+
ASM := FUNK00.COM.asm
7+
ASM += PAR8003.COM.asm
8+
ASM += PAR8003.relocated.asm
9+
ASM += SLF80037.COM.asm
10+
ASM += SLF80037.relocated.asm
11+
12+
CHK_FILENAME := md5sum.txt
13+
14+
BIN := $(patsubst %.asm, build/%, $(ASM))
15+
16+
CHK := $(patsubst %.asm, %.chk, $(ASM))
17+
18+
all: tests
19+
20+
.PHONY: tests
21+
tests: checksum
22+
23+
.PHONY: checksum
24+
checksum: $(CHK)
25+
26+
.PHONY: assemble
27+
assemble: $(BIN)
28+
29+
build/%: %.asm
30+
$(QUIET) mkdir -p `dirname $@`
31+
$(ECHO) ' ASM $<'
32+
$(QUIET) z80asm -b -o$@ $<
33+
34+
%.chk: build/% %.asm
35+
$(ECHO) ' SUM $<'
36+
$(QUIET) grep "`md5sum "$<"`" $(CHK_FILENAME) > /dev/null
37+
38+
.PHONY: clean
39+
clean:
40+
$(ECHO) ' RM'
41+
$(QUIET) rm -rf build

applications/md5sum.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
22d027c28acc59b775c8a826194d9fc7 build/FUNK00.COM
2+
2a75591c8b454c74df433ab1b58a47fd build/PAR8003.COM
3+
5c6f140b44c03539fea2e30eab1bb138 build/PAR8003.relocated
4+
8c0541188297d176ffa06d4cae53591f build/SLF80037.COM
5+
fda2bf1e49a0d91488906d6b5456ba88 build/SLF80037.relocated

0 commit comments

Comments
 (0)