2024-04-03 15:18:26 +03:00
|
|
|
#!/bin/sh
|
2024-04-04 07:37:18 +03:00
|
|
|
mkdir -p target
|
2024-04-05 10:21:27 +03:00
|
|
|
./charjmpt.lua > target/charjmpt.s
|
2024-04-04 07:37:18 +03:00
|
|
|
gcc -c meow.s -o target/amogus.o || exit
|
2024-04-05 10:21:27 +03:00
|
|
|
gnu() { shift 1 && clang "$@"; }
|
2024-04-04 07:37:18 +03:00
|
|
|
"$(command -v ~/stuff/zig/zig || echo gnu)" \
|
2024-04-04 09:23:46 +03:00
|
|
|
cc -O3 -shared -static -nostdlib -nodefaultlibs target/amogus.o -o target/amogus || exit
|
2024-04-04 07:37:18 +03:00
|
|
|
objdump -d target/amogus
|
2024-04-05 10:21:27 +03:00
|
|
|
cp target/amogus target/amogstrip
|
|
|
|
strip -K entry target/amogstrip
|
|
|
|
objdump -t target/amogstrip
|
|
|
|
du -b target/amogstrip
|
2024-04-04 09:23:46 +03:00
|
|
|
rm -rf target/cg/
|
|
|
|
mkdir -p target/cg
|
2024-04-05 10:21:27 +03:00
|
|
|
cp target/amogstrip target/cg/amogus
|
2024-04-04 09:23:46 +03:00
|
|
|
cp amogus.h target/cg/
|
2024-04-04 07:37:18 +03:00
|
|
|
|