1
0
mirror of https://github.com/hsoft/collapseos.git synced 2024-12-26 17:28:06 +11:00
collapseos/cvm/Makefile

47 lines
787 B
Makefile
Raw Normal View History

2020-06-27 07:55:10 +10:00
TARGETS = forth stage
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
$(CC) stage.c $(OBJS) -o $@
blkfs: $(BLKPACK)
$(BLKPACK) ../blk > $@
2020-06-27 07:55:10 +10:00
forth: forth.c $(OBJS)
$(CC) forth.c $(OBJS) -lncurses -o $@
2020-06-27 07:55:10 +10:00
stage: stage.c $(OBJS)
$(CC) stage.c $(OBJS) -o $@
2020-06-27 07:55:10 +10:00
vm.o: vm.c blkfs
$(CC) -DFBIN_PATH=\"`pwd`/forth.bin\" -DBLKFS_PATH=\"`pwd`/blkfs\" -c -o vm.o vm.c
.PHONY: updatebootstrap
updatebootstrap: stage xcomp.fs pack
./stage < xcomp.fs > new.bin
2020-06-27 08:58:02 +10:00
mv new.bin forth.bin
.PHONY: pack
pack:
rm blkfs && $(MAKE) blkfs
.PHONY: unpack
unpack:
$(BLKUNPACK) ../blk < blkfs
.PHONY: clean
clean:
rm -f $(TARGETS) *.o blkfs