2020-06-26 17:55:10 -04:00
|
|
|
TARGETS = forth stage
|
2020-06-26 15:50:13 -04:00
|
|
|
OBJS = vm.o
|
|
|
|
BLKPACK = ../tools/blkpack
|
|
|
|
BLKUNPACK = ../tools/blkunpack
|
|
|
|
|
|
|
|
.PHONY: all
|
|
|
|
all: $(TARGETS)
|
|
|
|
|
|
|
|
$(BLKPACK):
|
|
|
|
$(MAKE) -C ../tools
|
|
|
|
|
|
|
|
.PHONY: $(BLKUNPACK)
|
|
|
|
$(BLKUNPACK): $(BLKPACK)
|
|
|
|
|
|
|
|
stage: stage.c $(OBJS) blkfs
|
2020-09-20 10:21:21 -04:00
|
|
|
$(CC) -DBLKFS_PATH=\"`pwd`/blkfs\" stage.c $(OBJS) -o $@
|
2020-06-26 15:50:13 -04:00
|
|
|
|
|
|
|
blkfs: $(BLKPACK)
|
|
|
|
$(BLKPACK) ../blk > $@
|
|
|
|
|
2020-06-26 17:55:10 -04:00
|
|
|
forth: forth.c $(OBJS)
|
2020-11-07 08:45:26 -05:00
|
|
|
$(CC) -DBLKFS_PATH=\"`pwd`/blkfs\" forth.c $(OBJS) -lcurses -o $@
|
2020-06-26 15:50:13 -04:00
|
|
|
|
2020-06-26 17:55:10 -04:00
|
|
|
vm.o: vm.c blkfs
|
2020-09-20 10:21:21 -04:00
|
|
|
$(CC) -DFBIN_PATH=\"`pwd`/forth.bin\" -c -o vm.o vm.c
|
2020-06-26 15:50:13 -04:00
|
|
|
|
|
|
|
|
|
|
|
.PHONY: updatebootstrap
|
|
|
|
updatebootstrap: stage xcomp.fs pack
|
|
|
|
./stage < xcomp.fs > new.bin
|
2020-06-26 18:58:02 -04:00
|
|
|
mv new.bin forth.bin
|
2020-06-26 15:50:13 -04:00
|
|
|
|
|
|
|
.PHONY: pack
|
|
|
|
pack:
|
|
|
|
rm blkfs && $(MAKE) blkfs
|
|
|
|
|
|
|
|
.PHONY: unpack
|
|
|
|
unpack:
|
|
|
|
$(BLKUNPACK) ../blk < blkfs
|
|
|
|
|
|
|
|
.PHONY: clean
|
|
|
|
clean:
|
|
|
|
rm -f $(TARGETS) *.o blkfs
|