Simplyfy the creation of includes.cfs

The next step is to generate them on-the-fly.
This commit is contained in:
Virgil Dupras 2019-06-02 16:47:17 -04:00
parent a4e45d1a75
commit 02954af570

View File

@ -4,6 +4,7 @@ KERNEL = ../../kernel
APPS = ../../apps APPS = ../../apps
ZASMBIN = zasm/zasm ZASMBIN = zasm/zasm
INCCFS = zasm/includes.cfs INCCFS = zasm/includes.cfs
SRCPATTERN = *.+(asm|h)
.PHONY: all .PHONY: all
all: $(TARGETS) all: $(TARGETS)
@ -18,14 +19,9 @@ zasm/user.h: zasm/zasm.bin
./bin2c.sh USERSPACE < $< | tee $@ > /dev/null ./bin2c.sh USERSPACE < $< | tee $@ > /dev/null
$(INCCFS): $(CFSPACK) $(INCCFS): $(CFSPACK)
rm -rf zasm/includes $(CFSPACK) $(KERNEL) "$(SRCPATTERN)" > $@
cp -r $(KERNEL) zasm/includes $(CFSPACK) $(APPS) "$(SRCPATTERN)" >> $@
cp -r $(APPS)/zasm zasm/includes/zasm $(CFSPACK) user.h >> $@
find zasm/includes -name *.md -o -name *.example -o -name glue.asm -delete
find zasm/includes -type f -exec sed -i -e 's/;.*//g' {} \;
cp user.h zasm/includes
$(CFSPACK) zasm/includes > $@
rm -rf zasm/includes
shell/shell: shell/shell.c libz80/libz80.o shell/kernel.h $(CFSPACK) shell/shell: shell/shell.c libz80/libz80.o shell/kernel.h $(CFSPACK)
$(ZASMBIN): zasm/zasm.c libz80/libz80.o zasm/kernel.h zasm/user.h $(ZASMBIN): zasm/zasm.c libz80/libz80.o zasm/kernel.h zasm/user.h