Files
low-level-programming/justfile
Greg Shuflin faaadcf475 Move lightshow into dir
Note: this currently has a rustc compiler panic trying to use
the `#[no_core]` attribute, which seems poorly supported
2022-01-29 23:19:00 -08:00

51 lines
1.7 KiB
Makefile

default:
just --list
run_gamarjoba: build_gamarjoba
./gamarjoba_munde/gamarjoba
build_gamarjoba:
nasm -f elf64 -o gamarjoba_munde/gamarjoba.o gamarjoba_munde/gamarjoba.asm
ld -o gamarjoba_munde/gamarjoba gamarjoba_munde/gamarjoba.o
build_baremetal_gamarjoba:
#!/usr/bin/env bash
cd baremetal_gamarjoba
gcc -m32 -ffreestanding -o include.o -c include.c
nasm -f elf32 -i ../common baremetal_gamarjoba.asm
ld -m elf_i386 -nostdlib -T ../common/linker.ld baremetal_gamarjoba.o include.o -o baremetal_gamarjoba
run_baremetal_gamarjoba: build_baremetal_gamarjoba
#!/usr/bin/env bash
cd baremetal_gamarjoba
qemu-system-i386 -kernel baremetal_gamarjoba
build_keyboard:
#!/usr/bin/env bash
cd keyboard
gcc -m32 -ffreestanding -o c_keyboard.o -c c_keyboard.c
rustc --emit obj -o rust_keyboard.o --target i686-unknown-linux-gnu keyboard.rs
nasm -f elf32 -i ../common keyboard.asm
ld -m elf_i386 -nostdlib -T ../common/linker.ld keyboard.o c_keyboard.o rust_keyboard.o -o keyboard_kernel
run_keyboard: build_keyboard
qemu-system-i386 -kernel keyboard/keyboard_kernel
run_terminal_keyboard: build_keyboard
qemu-system-i386 -display curses -kernel keyboard/keyboard_kernel
build_lightshow:
#!/usr/bin/env bash
cd lightshow
rustc --emit obj -o lightshow_rust.o --target i686-unknown-linux-gnu -g lightshow.rs
nasm -f elf32 -i ../common -g lightshow.asm
ld -m elf_i386 -nostdlib -T ../common/linker.ld lightshow.o lightshow_rust.o -o lightshow
run_lightshow: build_lightshow
qemu-system-i386 -kernel lightshow
debug_lightshow: build_lightshow
qemu-system-i386 -kernel lightshow -gdb tcp::9999 -S