implement more instructions

This commit is contained in:
2026-02-28 19:27:17 +01:00
parent 9ee3b726a4
commit b7f27abaf4
2 changed files with 254 additions and 94 deletions

View File

@@ -1,13 +1,15 @@
#!/bin/bash
WARNINGS="-Wall -Wextra -Wpedantic -Wno-unused-variable -Wno-gnu-binary-literal"
echo "building mos6502..."
cc -Wall -Wextra -Wpedantic -std=c99 -o mos6502 mos6502.c
cc $WARNINGS -std=c99 -o mos6502 mos6502.c
if command -v pkg-config >/dev/null; then
RAYLIB_FLAGS=$(pkg-config --cflags --libs raylib 2>/dev/null)
if [ $? -eq 0 ]; then
echo "building chip8..."
cc -Wall -Wextra -Wpedantic -std=c99 -o chip8 chip8.c $RAYLIB_FLAGS
cc $WARNINGS -std=c99 -o chip8 chip8.c $RAYLIB_FLAGS
else
echo "raylib not found - skipping chip8..."
fi
@@ -15,7 +17,7 @@ if command -v pkg-config >/dev/null; then
LIBELF_FLAGS=$(pkg-config --cflags --libs libelf 2>/dev/null)
if [ $? -eq 0 ]; then
echo "building riscv64..."
cc -Wall -Wextra -Wpedantic -std=gnu11 -Wno-gnu-binary-literal -Wno-unused-variable -o riscv64 riscv64.c $LIBELF_FLAGS
cc $WARNINGS -std=gnu11 -o riscv64 riscv64.c $LIBELF_FLAGS
else
echo "libelf not found - skipping riscv64..."
fi