1
0
mirror of https://github.com/hsoft/collapseos.git synced 2024-11-08 10:28:07 +11:00
collapseos/emul/Makefile
Virgil Dupras a65f674c74 emul: build from "cvm" instead of from itself
The C VM now runs the show.
2020-06-26 22:08:45 -04:00

31 lines
645 B
Makefile

TARGETS = forth
OBJS = emul.o libz80/libz80.o
CDIR = ../cvm
STAGE = $(CDIR)/stage
BLKFS = $(CDIR)/blkfs
.PHONY: all
all: $(TARGETS)
forth: forth.c $(OBJS) $(CDIR)/blkfs
$(CC) forth.c $(OBJS) -lncurses -o $@
libz80/libz80.o: libz80/z80.c
$(MAKE) -C libz80/codegen opcodes
$(CC) -Wall -ansi -g -c -o libz80/libz80.o libz80/z80.c
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)
$(CDIR)/stage < xcomp.fs > $@
$(BLKFS): $(STAGE)
$(STAGE):
$(MAKE) -C $(CDIR) all
.PHONY: clean
clean:
rm -f $(TARGETS) emul.o *.bin libz80/libz80.o