uxn/build.sh

22 lines
800 B
Bash
Raw Normal View History

2021-01-29 19:17:59 +00:00
#!/bin/bash
2021-02-08 22:18:01 +00:00
# Create bin folder
mkdir -p bin
2021-01-29 19:17:59 +00:00
2021-02-08 22:18:01 +00:00
# Assembler
clang-format -i assembler.c
rm -f ./assembler
2021-01-30 05:56:19 +00:00
rm -f ./boot.rom
2021-02-08 22:18:01 +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 assembler.c -o bin/assembler
./bin/assembler examples/hello.usm bin/boot.rom
2021-01-29 19:17:59 +00:00
2021-02-08 22:18:01 +00:00
# Emulator
clang-format -i emulator.c
clang-format -i uxn.h
clang-format -i uxn.c
rm -f ./uxn
2021-02-08 23:46:52 +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 emulator.c -L/usr/local/lib -lSDL2 -o bin/emulator
2021-01-29 19:17:59 +00:00
# run
2021-02-08 22:18:01 +00:00
./bin/emulator bin/boot.rom