2020-02-24 12:52:44 +11:00
|
|
|
SHELLAPPS = zasm ed
|
2020-02-24 06:51:19 +11:00
|
|
|
APPTARGETS = ${SHELLAPPS:%=cfsin/%}
|
|
|
|
CFSTARGETS = $(APPTARGETS) cfsin/user.h
|
2020-02-13 02:20:47 +11:00
|
|
|
TARGET = os.bin
|
|
|
|
BASEDIR = ../..
|
|
|
|
ZASM = $(BASEDIR)/emul/zasm/zasm
|
|
|
|
KERNEL = $(BASEDIR)/kernel
|
|
|
|
APPS = $(BASEDIR)/apps
|
2020-02-24 06:51:19 +11:00
|
|
|
CFSPACK = $(BASEDIR)/tools/cfspack/cfspack
|
2020-02-13 02:20:47 +11:00
|
|
|
|
|
|
|
.PHONY: all
|
2020-02-24 06:51:19 +11:00
|
|
|
all: $(TARGET) floppy.cfs
|
2020-02-13 02:20:47 +11:00
|
|
|
$(TARGET): glue.asm
|
|
|
|
$(ZASM) $(KERNEL) $(APPS) < glue.asm > $@
|
2020-02-24 06:51:19 +11: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)
|