2021-01-29 14:17:59 -05:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
# format code
|
2021-01-29 15:14:37 -05:00
|
|
|
clang-format -i uxnasm.c
|
2021-01-29 14:17:59 -05:00
|
|
|
clang-format -i uxn.c
|
|
|
|
|
|
|
|
# remove old
|
2021-01-29 15:14:37 -05:00
|
|
|
rm -f ./uxnasm
|
2021-01-29 14:17:59 -05:00
|
|
|
rm -f ./uxn
|
|
|
|
|
|
|
|
# debug(slow)
|
2021-01-29 15:14:37 -05:00
|
|
|
cc -std=c89 -DDEBUG -Wall -Wno-unknown-pragmas -Wpedantic -Wshadow -Wextra -Werror=implicit-int -Werror=incompatible-pointer-types -Werror=int-conversion -Wvla -g -Og -fsanitize=address -fsanitize=undefined uxnasm.c -o uxnasm
|
2021-01-29 14:17:59 -05:00
|
|
|
cc -std=c89 -DDEBUG -Wall -Wno-unknown-pragmas -Wpedantic -Wshadow -Wextra -Werror=implicit-int -Werror=incompatible-pointer-types -Werror=int-conversion -Wvla -g -Og -fsanitize=address -fsanitize=undefined uxn.c -o uxn
|
|
|
|
|
|
|
|
# build(fast)
|
|
|
|
# cc uxn.c -std=c89 -Os -DNDEBUG -g0 -s -Wall -Wno-unknown-pragmas -o uxn
|
|
|
|
|
|
|
|
# Size
|
|
|
|
echo "Size: $(du -sk ./uxn)"
|
|
|
|
|
|
|
|
# run
|
2021-01-29 15:14:37 -05:00
|
|
|
./uxnasm program.usm program.rom
|
2021-01-29 16:59:16 -05:00
|
|
|
./uxn program.rom
|