collapseos/recipes/rc2014/Makefile
Virgil Dupras a2f164ecc3 emul: bootstrap to stage2 from within Collapse OS!
Big bootstrapping change which greatly reduces the role of the modern
operating system in the bootstrapping process.
2020-04-26 10:24:09 -04:00

37 lines
638 B
Makefile

TARGET = stage1.bin
BASEDIR = ../..
FDIR = $(BASEDIR)/forth
EDIR = $(BASEDIR)/emul
STAGE2 = $(EDIR)/stage2
EMUL = $(BASEDIR)/emul/hw/rc2014/classic
PATHS = \
$(FDIR)/core.fs \
$(FDIR)/cmp.fs \
$(FDIR)/parse.fs \
$(BASEDIR)/drv/acia.fs \
$(FDIR)/print.fs \
$(FDIR)/fmt.fs \
$(FDIR)/link.fs \
run.fs
STRIPFC = $(BASEDIR)/tools/stripfc
.PHONY: all
all: $(TARGET)
$(TARGET): z80c.bin $(PATHS)
cp z80c.bin $@
cat $(PATHS) | $(STRIPFC) >> $@
z80c.bin: xcomp.fs
cat xcomp.fs | $(STAGE2) > $@
$(SLATEST):
$(MAKE) -C $(BASEDIR)/tools
$(EMUL):
$(MAKE) -C ${@:%/classic=%}
.PHONY: emul
emul: $(EMUL) $(TARGET)
$(EMUL) $(TARGET)