collapseos/recipes/rc2014/Makefile

40 lines
707 B
Makefile
Raw Normal View History

TARGET = stage1.bin
BASEDIR = ../..
2020-04-04 10:31:22 -04:00
FDIR = $(BASEDIR)/forth
EDIR = $(BASEDIR)/emul/forth
STAGE2 = $(EDIR)/stage2
EMUL = $(BASEDIR)/emul/hw/rc2014/classic
PATHS = \
2020-04-04 10:31:22 -04:00
$(FDIR)/core.fs \
$(FDIR)/cmp.fs \
2020-04-04 10:31:22 -04:00
$(FDIR)/parse.fs \
2020-04-02 23:21:53 -04:00
$(BASEDIR)/drv/acia.fs \
2020-04-04 10:31:22 -04:00
$(FDIR)/print.fs \
2020-04-04 14:27:23 -04:00
$(FDIR)/fmt.fs \
2020-04-11 16:38:45 -04:00
$(FDIR)/link.fs \
2020-04-04 10:31:22 -04:00
run.fs
2020-04-02 23:21:53 -04:00
SLATEST = $(BASEDIR)/tools/slatest
2020-04-04 10:31:22 -04:00
STRIPFC = $(BASEDIR)/tools/stripfc
.PHONY: all
2020-04-02 23:21:53 -04:00
all: $(TARGET)
$(TARGET): z80c.bin $(SLATEST) $(PATHS)
cp z80c.bin $@
2020-04-02 23:21:53 -04:00
$(SLATEST) $@
2020-04-04 10:31:22 -04:00
cat $(PATHS) | $(STRIPFC) >> $@
2020-04-02 23:21:53 -04:00
z80c.bin: xcomp.fs
cat xcomp.fs | $(STAGE2) > $@
2020-04-02 23:21:53 -04:00
$(SLATEST):
$(MAKE) -C $(BASEDIR)/tools
$(EMUL):
$(MAKE) -C ${@:%/classic=%}
.PHONY: emul
emul: $(EMUL) $(TARGET)
$(EMUL) $(TARGET)