collapseos/recipes/trs80/Makefile

31 lines
651 B
Makefile
Raw Normal View History

2020-02-23 14:51:19 -05:00
SHELLAPPS = zasm
APPTARGETS = ${SHELLAPPS:%=cfsin/%}
CFSTARGETS = $(APPTARGETS) cfsin/user.h
TARGET = os.bin
BASEDIR = ../..
ZASM = $(BASEDIR)/emul/zasm/zasm
KERNEL = $(BASEDIR)/kernel
APPS = $(BASEDIR)/apps
2020-02-23 14:51:19 -05:00
CFSPACK = $(BASEDIR)/tools/cfspack/cfspack
.PHONY: all
2020-02-23 14:51:19 -05:00
all: $(TARGET) floppy.cfs
$(TARGET): glue.asm
$(ZASM) $(KERNEL) $(APPS) < glue.asm > $@
2020-02-23 14:51:19 -05:00
$(CFSPACK):
make -C $(BASEDIR)/tools/cfspack
floppy.cfs: $(CFSTARGETS) $(CFSPACK)
$(CFSPACK) cfsin > $@
$(APPTARGETS):
$(ZASM) $(KERNEL) $(APPS) user.h < $(APPS)/${@:cfsin/%=%}/glue.asm > $@
cfsin/user.h: user.h
cp user.h $@
.PHONY: clean
clean:
rm -f $(CFSTARGETS) floppy.cfs $(TARGET)