2019-05-17 09:33:20 -04:00
|
|
|
TARGETS = shell/shell zasm/zasm runbin/runbin
|
2019-05-17 07:23:59 -04:00
|
|
|
KERNEL_HEADERS = shell/kernel.h zasm/kernel.h
|
|
|
|
USER_HEADERS = zasm/user.h
|
2019-05-16 12:07:57 -04:00
|
|
|
CFSPACK = ../cfspack/cfspack
|
2019-05-19 11:19:41 -04:00
|
|
|
KERNEL = ../../kernel
|
2019-05-19 09:14:40 -04:00
|
|
|
APPS = ../../apps
|
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
|
|
|
|
2019-05-17 07:23:59 -04:00
|
|
|
shell/kernel.h: shell/shell_.asm
|
|
|
|
zasm/kernel.h: zasm/glue.asm
|
2019-05-09 14:09:40 -04:00
|
|
|
$(KERNEL_HEADERS):
|
2019-05-19 12:57:59 -04:00
|
|
|
scas -o - -I $(KERNEL) $< | ./bin2c.sh KERNEL | tee $@ > /dev/null
|
|
|
|
|
|
|
|
zasm/user.h: $(APPS)/zasm/glue.asm
|
|
|
|
$(USER_HEADERS):
|
|
|
|
scas -o - -I $(APPS) $< | ./bin2c.sh USERSPACE | tee $@ > /dev/null
|
2019-05-09 12:58:41 -04:00
|
|
|
|
2019-05-17 20:47:43 -04:00
|
|
|
zasm/includes.cfs: $(CFSPACK)
|
|
|
|
rm -rf zasm/includes
|
2019-05-19 11:19:41 -04:00
|
|
|
cp -r $(KERNEL) zasm/includes
|
|
|
|
cp -r $(APPS)/zasm zasm/includes/zasm
|
2019-05-19 12:57:59 -04:00
|
|
|
find zasm/includes -name *.md -o -name *.example -delete
|
2019-05-17 19:54:35 -04:00
|
|
|
find zasm/includes -type f -exec sed -i -e 's/;.*//g' {} \;
|
2019-05-19 12:57:59 -04:00
|
|
|
cp user.h zasm/includes
|
2019-05-17 07:23:59 -04:00
|
|
|
$(CFSPACK) zasm/includes > $@
|
|
|
|
rm -rf zasm/includes
|
2019-05-16 12:07:57 -04:00
|
|
|
|
2019-05-17 07:23:59 -04:00
|
|
|
zasm/includes.h: zasm/includes.cfs
|
2019-05-16 21:15:00 -04:00
|
|
|
./bin2c.sh FSDEV < $< | tee $@ > /dev/null
|
|
|
|
|
2019-05-17 07:23:59 -04:00
|
|
|
shell/shell: shell/shell.c libz80/libz80.o shell/kernel.h $(CFSPACK)
|
2019-05-19 12:57:59 -04:00
|
|
|
zasm/zasm: zasm/zasm.c libz80/libz80.o zasm/kernel.h zasm/user.h zasm/includes.h
|
2019-05-17 09:33:20 -04:00
|
|
|
runbin/runbin: runbin/runbin.c libz80/libz80.o
|
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-17 07:23:59 -04:00
|
|
|
rm -f $(TARGETS) $(KERNEL_HEADERS) $(USER_HEADERS) zasm/includes.*
|