1
0
mirror of https://github.com/hsoft/collapseos.git synced 2024-11-27 19:58:06 +11:00
collapseos/emul/8086/Makefile

28 lines
493 B
Makefile
Raw Normal View History

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)
forth: forth.c $(OBJS)
$(CC) forth.c $(OBJS) -lncurses -o $@
emul.o: emul.c forth.bin $(BLKFS)
$(CC) -DFBIN_PATH=\"`pwd`/forth.bin\" -DBLKFS_PATH=\"`pwd`/$(BLKFS)\" -c -o emul.o emul.c
forth.bin: xcomp.fs $(STAGE) $(BLKFS)
$(CDIR)/stage < xcomp.fs > $@
$(BLKFS): $(STAGE)
$(STAGE):
$(MAKE) -C $(CDIR) all
.PHONY: clean
clean:
rm -f $(TARGETS) $(OBJS) forth.bin