Mirror of CollapseOS
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

31 lines
652B

  1. TARGETS = forth
  2. OBJS = emul.o libz80/libz80.o
  3. CDIR = ../cvm
  4. STAGE = $(CDIR)/stage
  5. BLKFS = $(CDIR)/blkfs
  6. .PHONY: all
  7. all: $(TARGETS)
  8. forth: forth.c $(OBJS) $(BLKFS)
  9. $(CC) forth.c $(OBJS) -lncurses -o $@
  10. libz80/libz80.o: libz80/z80.c
  11. $(MAKE) -C libz80/codegen opcodes
  12. $(CC) -Wall -std=c89 -g -c -o libz80/libz80.o libz80/z80.c
  13. emul.o: emul.c forth.bin $(BLKFS)
  14. $(CC) -DFBIN_PATH=\"`pwd`/forth.bin\" -DBLKFS_PATH=\"`pwd`/$(BLKFS)\" -c -o emul.o emul.c
  15. forth.bin: xcomp.fs $(STAGE) $(BLKFS)
  16. $(CDIR)/stage < xcomp.fs > $@
  17. $(BLKFS): $(STAGE)
  18. $(STAGE):
  19. $(MAKE) -C $(CDIR) all
  20. .PHONY: clean
  21. clean:
  22. rm -f $(TARGETS) emul.o *.bin libz80/libz80.o