1
0
mirror of https://github.com/hsoft/collapseos.git synced 2024-11-24 05:28:06 +11:00
collapseos/tools/emul/Makefile

41 lines
1.1 KiB
Makefile
Raw Normal View History

2019-05-17 21:23:59 +10:00
TARGETS = shell/shell zasm/zasm
KERNEL_HEADERS = shell/kernel.h zasm/kernel.h
USER_HEADERS = zasm/user.h
CFSPACK = ../cfspack/cfspack
2019-05-10 04:09:40 +10:00
2019-05-10 02:58:41 +10:00
.PHONY: all
2019-05-10 04:09:40 +10:00
all: $(TARGETS)
2019-05-10 02:58:41 +10:00
2019-05-17 21:23:59 +10:00
shell/kernel.h: shell/shell_.asm
zasm/kernel.h: zasm/glue.asm
2019-05-10 04:09:40 +10:00
$(KERNEL_HEADERS):
scas -o - -I ../../parts/z80 $< | ./bin2c.sh KERNEL | tee $@ > /dev/null
2019-05-17 21:23:59 +10:00
zasm/user.h: zasm/user.asm
2019-05-10 04:09:40 +10:00
scas -o - -I ../../apps/zasm $< | ./bin2c.sh USERSPACE | tee $@ > /dev/null
2019-05-10 02:58:41 +10:00
2019-05-17 21:23:59 +10:00
zasm/includes.cfs: ../../parts/z80 $(CFSPACK)
cp -rf $< zasm/includes
rm zasm/includes/README.md
$(CFSPACK) zasm/includes > $@
rm -rf zasm/includes
2019-05-17 21:23:59 +10:00
zasm/includes.h: zasm/includes.cfs
2019-05-17 11:15:00 +10:00
./bin2c.sh FSDEV < $< | tee $@ > /dev/null
2019-05-17 21:23:59 +10:00
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
2019-05-10 04:09:40 +10:00
$(TARGETS):
2019-05-10 02:58:41 +10: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
$(CFSPACK):
make -C ../cfspack
2019-05-10 02:58:41 +10:00
.PHONY: clean
clean:
2019-05-17 21:23:59 +10:00
rm -f $(TARGETS) $(KERNEL_HEADERS) $(USER_HEADERS) zasm/includes.*