uxn/build.sh

21 lines
702 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
2021-02-08 20:16:39 +00:00
clang-format -i cpu.h
clang-format -i cpu.c
2021-01-29 19:17:59 +00:00
# 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-02-08 20:16:39 +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 cpu.c uxn.c -o uxn
2021-01-29 19:17:59 +00:00
# run
2021-02-08 20:16:39 +00:00
./uxnasm examples/hello.usm boot.rom
2021-01-30 05:56:19 +00:00
./uxn boot.rom