-
Notifications
You must be signed in to change notification settings - Fork 0
/
makefile
54 lines (42 loc) · 1.23 KB
/
makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
CFLAGS=-std=c99 -Wall -Wextra -pedantic -O2 -fwrapv
SRC=ffs.fth
IMAGE=subleq.dec
.PHONY: all default help run dump clean disk forth
default all: help
help:
@echo "FORTH BLOCK BASED FILE SYSTEM"
@echo
@echo "* Author: Richard James Howe"
@echo "* License: Public Domain / The Unlicense"
@echo "* Email: howe.r.j.89@gmail.com"
@echo "* Repo: https://github.com/howerj/ffs"
@echo
@echo "Makefile commands:"
@echo
@echo "* run : run gforth on '${SRC}'"
@echo "* dump : make 'ffs.fb' and hexdump it"
@echo "* forth : run unaltered SUBLEQ eFORTH using '${IMAGE}'"
@echo "* disk : make an image with '${SRC}' and '${IMAGE}' for SUBLEQ eFORTH and run it"
@echo "* ro : make an image with '${SRC}' and '${IMAGE}' for SUBLEQ eFORTH and run it in read only mode"
@echo "* clean : BANG AND THE DIRT IS GONE"
@echo
@echo "For documentation please see '${SRC}' or 'readme.md'"
@echo
run:
gforth ${SRC}
ffs.fb: ${SRC}
echo bye | gforth $<
dump: ffs.fb
hexdump -C $<
subleq: subleq.c
forth: subleq ${IMAGE}
./subleq ${IMAGE}
disk: subleq disk.dec
./subleq disk.dec _disk.dec
mv _disk.dec disk.dec
ro r/o: subleq disk.dec
./subleq disk.dec
disk.dec: subleq ${IMAGE} ${SRC}
./subleq ${IMAGE} $@ < ${SRC}
clean:
git clean -dffx