2019-05-09 14:09:40 -04:00
|
|
|
TARGETS = shell zasm
|
|
|
|
KERNEL_HEADERS = shell-kernel.h zasm-kernel.h
|
2019-05-09 15:36:03 -04:00
|
|
|
USER_HEADERS = zasm-user.h
|
2019-05-16 12:07:57 -04:00
|
|
|
CFSPACK = ../cfspack/cfspack
|
2019-05-09 14:09:40 -04:00
|
|
|
|
2019-05-09 12:58:41 -04:00
|
|
|
.PHONY: all
|
2019-05-09 14:09:40 -04:00
|
|
|
all: $(TARGETS)
|
2019-05-09 12:58:41 -04:00
|
|
|
|
|
|
|
shell-kernel.h: shell_.asm
|
2019-05-09 14:09:40 -04:00
|
|
|
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
|
2019-05-09 12:58:41 -04:00
|
|
|
|
2019-05-16 12:07:57 -04:00
|
|
|
zasm-includes.h: ../../parts/z80 $(CFSPACK)
|
|
|
|
cp -rf $< zasm-includes
|
|
|
|
rm zasm-includes/README.md
|
|
|
|
$(CFSPACK) zasm-includes | ./bin2c.sh FSDEV | tee $@ > /dev/null
|
|
|
|
rm -rf zasm-includes
|
|
|
|
|
|
|
|
shell: shell.c libz80/libz80.o shell-kernel.h $(CFSPACK)
|
|
|
|
zasm: zasm.c libz80/libz80.o zasm-kernel.h zasm-user.h zasm-includes.h
|
2019-05-09 14:09:40 -04:00
|
|
|
$(TARGETS):
|
2019-05-09 12:58:41 -04:00
|
|
|
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
|
|
|
|
|
2019-05-16 12:07:57 -04:00
|
|
|
$(CFSPACK):
|
2019-05-12 11:20:31 -04:00
|
|
|
make -C ../cfspack
|
|
|
|
|
2019-05-09 12:58:41 -04:00
|
|
|
.PHONY: clean
|
|
|
|
clean:
|
2019-05-09 15:36:03 -04:00
|
|
|
rm -f $(TARGETS) $(KERNEL_HEADERS) $(USER_HEADERS)
|