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