2019-12-12 05:01:51 +11:00
|
|
|
SHELLAPPS = zasm sdct memt at28w
|
|
|
|
APPTARGETS = ${SHELLAPPS:%=cfsin/%}
|
|
|
|
CFSTARGETS = $(APPTARGETS) cfsin/user.h
|
2020-01-01 07:07:39 +11:00
|
|
|
BASEDIR = ../../..
|
|
|
|
ZASM = $(BASEDIR)/emul/zasm/zasm
|
|
|
|
KERNEL = $(BASEDIR)/kernel
|
|
|
|
APPS = $(BASEDIR)/apps
|
|
|
|
CFSPACK = $(BASEDIR)/tools/cfspack/cfspack
|
2019-06-04 03:34:16 +10:00
|
|
|
|
|
|
|
.PHONY: all
|
|
|
|
all: os.bin sdcard.cfs
|
|
|
|
|
|
|
|
os.bin: glue.asm
|
2020-01-01 07:07:39 +11:00
|
|
|
$(ZASM) $(KERNEL) $(APPS) < glue.asm > $@
|
2019-06-04 03:34:16 +10:00
|
|
|
|
|
|
|
$(CFSPACK):
|
2020-01-01 07:07:39 +11:00
|
|
|
make -C $(BASEDIR)/tools/cfspack
|
2019-06-04 03:34:16 +10:00
|
|
|
|
|
|
|
sdcard.cfs: $(CFSTARGETS) $(CFSPACK)
|
|
|
|
$(CFSPACK) cfsin > $@
|
|
|
|
|
2019-12-12 05:01:51 +11:00
|
|
|
$(APPTARGETS): $(ZASMBIN)
|
|
|
|
$(ZASM) $(KERNEL) $(APPS) user.h < $(APPS)/${@:cfsin/%=%}/glue.asm > $@
|
2019-06-16 03:41:20 +10:00
|
|
|
|
2019-06-04 03:34:16 +10:00
|
|
|
cfsin/user.h: user.h
|
2020-01-01 07:07:39 +11:00
|
|
|
cp user.h $@
|
2019-06-16 03:41:20 +10:00
|
|
|
|
|
|
|
.PHONY: clean
|
|
|
|
clean:
|
|
|
|
rm -f $(CFSTARGETS) sdcard.cfs os.bin
|