sus-regex/build
2024-04-09 20:17:19 +05:00

23 lines
680 B
Bash
Executable file

#!/bin/sh
mkdir -p target
./charjmpt.lua > target/charjmpt.s
gcc -O2 -Os -c meow.s -o target/amogus.o || exit
if command -v ~/stuff/zig/zig >/dev/null; then
~/stuff/zig/zig cc -shared -nostdlib target/amogus.o -o target/amogus || exit
elif command -v ld.lld >/dev/null; then
ld.lld -shared -nostdlib target/amogus.o -o target/amogus || exit
else
gcc -shared -nostdlib target/amogus.o -o target/amogus || exit
fi
objdump -d target/amogus
cp target/amogus target/amogstrip
strip -K entry target/amogstrip
objdump -t target/amogstrip
du -b target/amogstrip
rm -rf target/cg/
mkdir -p target/cg
cp target/amogstrip target/cg/amogus
cp amogus.h target/cg/
cp amogus.png target/cg/