2020-02-23 14:51:19 -05:00
|
|
|
SHELLAPPS = zasm
|
|
|
|
APPTARGETS = ${SHELLAPPS:%=cfsin/%}
|
|
|
|
CFSTARGETS = $(APPTARGETS) cfsin/user.h
|
2020-02-12 10:20:47 -05:00
|
|
|
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
|
2020-02-12 10:20:47 -05:00
|
|
|
|
|
|
|
.PHONY: all
|
2020-02-23 14:51:19 -05:00
|
|
|
all: $(TARGET) floppy.cfs
|
2020-02-12 10:20:47 -05:00
|
|
|
$(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)
|