from-scratch/stages/lisp0/Makefile

24 lines
557 B
Makefile

# test.bin: lisp.rs lisp.o
# rustc -Clink-arg=-fuse-ld=mold -Clink-arg=lisp.o --edition=2024 --test -g $< -o $@
# lisp.o: lisp.asm
# nasm -g -f elf64 -o lisp.o lisp.asm
# test: test.bin
# ./test.bin
test.bin: test.rs lisp1.o
rustc -Clink-arg=-fuse-ld=mold -Clink-arg=lisp1.o --edition=2024 --test -g $< -o $@
lisp1.o: lisp1.asm
nasm -g -f elf64 -o lisp1.o lisp1.asm
test: test.bin
./test.bin --nocapture --test-threads=1
lisp1: lisp1.o
ld -m elf_x86_64 -e _interp_entry -o lisp1 lisp1.o
clean:
rm -f lisp.o test.bin lisp1.o test1.bin lisp1