2020-10-25 10:27:52 -04:00
|
|
|
TARGETS = forth pcat
|
2020-10-24 20:41:51 -04:00
|
|
|
OBJS = cpu.o
|
|
|
|
CDIR = ../../cvm
|
|
|
|
STAGE = $(CDIR)/stage
|
|
|
|
BLKFS = $(CDIR)/blkfs
|
|
|
|
|
|
|
|
.PHONY: all
|
|
|
|
all: $(TARGETS)
|
|
|
|
|
2020-10-24 23:20:20 -04:00
|
|
|
forth: forth.c forth.bin $(OBJS) $(BLKFS)
|
2020-11-07 08:45:26 -05:00
|
|
|
$(CC) -DFBIN_PATH=\"`pwd`/forth.bin\" -DBLKFS_PATH=\"`pwd`/$(BLKFS)\" forth.c $(OBJS) -lcurses -o $@
|
2020-10-24 20:41:51 -04:00
|
|
|
|
2020-10-24 22:06:51 -04:00
|
|
|
forth.bin: xcomp.fs $(STAGE)
|
|
|
|
$(CDIR)/stage < xcomp.fs > $@
|
2020-10-24 20:41:51 -04:00
|
|
|
|
2020-10-25 10:27:52 -04:00
|
|
|
pcat: pcat.c $(OBJS) $(BLKFS)
|
2020-11-07 08:45:26 -05:00
|
|
|
$(CC) -DBLKFS_PATH=\"`pwd`/$(BLKFS)\" pcat.c $(OBJS) -lcurses -o $@
|
2020-10-25 10:27:52 -04:00
|
|
|
|
2020-10-24 20:41:51 -04:00
|
|
|
$(BLKFS): $(STAGE)
|
|
|
|
|
|
|
|
$(STAGE):
|
|
|
|
$(MAKE) -C $(CDIR) all
|
|
|
|
|
|
|
|
.PHONY: clean
|
|
|
|
clean:
|
|
|
|
rm -f $(TARGETS) $(OBJS) forth.bin
|
|
|
|
|