collapseos/recipes/rc2014/Makefile
2020-04-23 13:55:00 -04:00

45 lines
800 B
Makefile

TARGET = stage1.bin
BASEDIR = ../..
FDIR = $(BASEDIR)/forth
EDIR = $(BASEDIR)/emul/forth
STAGE2 = $(EDIR)/stage2
EMUL = $(BASEDIR)/emul/hw/rc2014/classic
BOOTSRCS = conf.fs \
$(EDIR)/xcomp.fs \
drvz80.fs \
$(FDIR)/icore.fs \
$(EDIR)/stop.fs
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
SLATEST = $(BASEDIR)/tools/slatest
STRIPFC = $(BASEDIR)/tools/stripfc
.PHONY: all
all: $(TARGET)
$(TARGET): z80c.bin $(SLATEST) $(PATHS)
cp z80c.bin $@
$(SLATEST) $@
cat $(PATHS) | $(STRIPFC) >> $@
z80c.bin: conf.fs
cat $(BOOTSRCS) | $(STAGE2) > $@
$(SLATEST):
$(MAKE) -C $(BASEDIR)/tools
$(EMUL):
$(MAKE) -C ${@:%/classic=%}
.PHONY: emul
emul: $(EMUL) $(TARGET)
$(EMUL) $(TARGET)