uxn/build.sh

25 lines
773 B
Bash
Raw Normal View History

2021-01-29 19:17:59 +00:00
#!/bin/bash
# format code
2021-01-29 20:14:37 +00:00
clang-format -i uxnasm.c
2021-01-29 19:17:59 +00:00
clang-format -i uxn.c
# remove old
2021-01-29 20:14:37 +00:00
rm -f ./uxnasm
2021-01-29 19:17:59 +00:00
rm -f ./uxn
2021-01-30 05:56:19 +00:00
rm -f ./boot.rom
2021-01-29 19:17:59 +00:00
# debug(slow)
2021-01-29 20:14:37 +00: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-30 05:56:19 +00: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
2021-01-29 19:17:59 +00:00
# build(fast)
# cc uxn.c -std=c89 -Os -DNDEBUG -g0 -s -Wall -Wno-unknown-pragmas -o uxn
# Size
2021-01-30 01:49:10 +00:00
# echo "Size: $(du -sk ./uxn)"
2021-01-29 19:17:59 +00:00
# run
2021-01-30 05:56:19 +00:00
./uxnasm example.usm boot.rom
./uxn boot.rom