2020-10-25 11:41:51 +11:00
|
|
|
TARGETS = forth
|
|
|
|
OBJS = cpu.o
|
|
|
|
CDIR = ../../cvm
|
|
|
|
STAGE = $(CDIR)/stage
|
|
|
|
BLKFS = $(CDIR)/blkfs
|
|
|
|
|
|
|
|
.PHONY: all
|
|
|
|
all: $(TARGETS)
|
|
|
|
|
2020-10-25 12:50:44 +11:00
|
|
|
forth: forth.c forth.bin $(OBJS)
|
|
|
|
$(CC) -DFBIN_PATH=\"`pwd`/forth.bin\" forth.c $(OBJS) -lncurses -o $@
|
2020-10-25 11:41:51 +11:00
|
|
|
|
2020-10-25 12:50:44 +11:00
|
|
|
emul.o: emul.c $(BLKFS)
|
2020-10-25 11:41:51 +11:00
|
|
|
$(CC) -DFBIN_PATH=\"`pwd`/forth.bin\" -DBLKFS_PATH=\"`pwd`/$(BLKFS)\" -c -o emul.o emul.c
|
|
|
|
|
2020-10-25 13:06:51 +11:00
|
|
|
forth.bin: xcomp.fs $(STAGE)
|
|
|
|
$(CDIR)/stage < xcomp.fs > $@
|
2020-10-25 11:41:51 +11:00
|
|
|
|
|
|
|
$(BLKFS): $(STAGE)
|
|
|
|
|
|
|
|
$(STAGE):
|
|
|
|
$(MAKE) -C $(CDIR) all
|
|
|
|
|
|
|
|
.PHONY: clean
|
|
|
|
clean:
|
|
|
|
rm -f $(TARGETS) $(OBJS) forth.bin
|
|
|
|
|