1
0
mirror of https://github.com/hsoft/collapseos.git synced 2024-11-27 19:58:06 +11:00
collapseos/tools/emul/Makefile
Virgil Dupras 93e40aeb09 Strip comments out of code before packing CFS
This shrinks the CFS size to 21k from nearly 64K. This will allow me to
kick the can down the road a bit with regards to supporting storage
seek/tell greater than 64K.

I'll get to it, but first, I want to assemble zasm with zasm!
2019-05-17 19:54:35 -04:00

43 lines
1.2 KiB
Makefile

TARGETS = shell/shell zasm/zasm runbin/runbin
KERNEL_HEADERS = shell/kernel.h zasm/kernel.h
USER_HEADERS = zasm/user.h
CFSPACK = ../cfspack/cfspack
.PHONY: all
all: $(TARGETS)
shell/kernel.h: shell/shell_.asm
zasm/kernel.h: zasm/glue.asm
$(KERNEL_HEADERS):
scas -o - -I ../../parts/z80 $< | ./bin2c.sh KERNEL | tee $@ > /dev/null
zasm/user.h: zasm/user.asm
scas -o - -I ../../apps/zasm $< | ./bin2c.sh USERSPACE | tee $@ > /dev/null
zasm/includes.cfs: ../../parts/z80 $(CFSPACK)
cp -rf $< zasm/includes
rm zasm/includes/README.md
find zasm/includes -type f -exec sed -i -e 's/;.*//g' {} \;
$(CFSPACK) zasm/includes > $@
rm -rf zasm/includes
zasm/includes.h: zasm/includes.cfs
./bin2c.sh FSDEV < $< | tee $@ > /dev/null
shell/shell: shell/shell.c libz80/libz80.o shell/kernel.h $(CFSPACK)
zasm/zasm: zasm/zasm.c libz80/libz80.o zasm/kernel.h zasm/user.h zasm/includes.h
runbin/runbin: runbin/runbin.c libz80/libz80.o
$(TARGETS):
cc $< libz80/libz80.o -o $@
libz80/libz80.o: libz80/z80.c
make -C libz80/codegen opcodes
gcc -Wall -ansi -g -c -o libz80/libz80.o libz80/z80.c
$(CFSPACK):
make -C ../cfspack
.PHONY: clean
clean:
rm -f $(TARGETS) $(KERNEL_HEADERS) $(USER_HEADERS) zasm/includes.*