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.

48 lines
888B

  1. TARGETS = forth stage blkfs
  2. OBJS = emul.o libz80/libz80.o
  3. BLKPACK = ../tools/blkpack
  4. BLKUNPACK = ../tools/blkunpack
  5. .PHONY: all
  6. all: $(TARGETS)
  7. $(BLKPACK):
  8. $(MAKE) -C ../tools
  9. .PHONY: $(BLKUNPACK)
  10. $(BLKUNPACK): $(BLKPACK)
  11. stage: stage.c $(OBJS)
  12. $(CC) stage.c $(OBJS) -o $@
  13. blkfs: $(BLKPACK)
  14. $(BLKPACK) ../blk > $@
  15. forth: forth.c $(OBJS)
  16. $(CC) forth.c $(OBJS) -lncurses -o $@
  17. libz80/libz80.o: libz80/z80.c
  18. $(MAKE) -C libz80/codegen opcodes
  19. $(CC) -Wall -ansi -g -c -o libz80/libz80.o libz80/z80.c
  20. emul.o: emul.c
  21. $(CC) -DFBIN_PATH=\"`pwd`/forth.bin\" -DBLKFS_PATH=\"`pwd`/blkfs\" -c -o emul.o emul.c
  22. .PHONY: updatebootstrap
  23. updatebootstrap: stage xcomp.fs pack
  24. ./stage < xcomp.fs > new.bin
  25. mv new.bin forth.bin
  26. .PHONY: pack
  27. pack:
  28. rm blkfs && $(MAKE) blkfs
  29. .PHONY: unpack
  30. unpack:
  31. $(BLKUNPACK) ../blk < blkfs
  32. .PHONY: clean
  33. clean:
  34. rm -f $(TARGETS) emul.o *-bin.h blkfs