2021-01-29 14:17:59 -05:00
|
|
|
#!/bin/bash
|
|
|
|
|
2021-02-08 17:18:01 -05:00
|
|
|
# Create bin folder
|
|
|
|
mkdir -p bin
|
2021-01-29 14:17:59 -05:00
|
|
|
|
2021-02-08 17:18:01 -05:00
|
|
|
# Assembler
|
|
|
|
clang-format -i assembler.c
|
2021-02-09 00:59:46 -05:00
|
|
|
rm -f ./bin/assembler
|
|
|
|
rm -f ./bin/boot.rom
|
2021-02-08 17:18:01 -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 assembler.c -o bin/assembler
|
2021-01-29 14:17:59 -05:00
|
|
|
|
2021-02-09 13:06:55 -05:00
|
|
|
# Core
|
2021-02-08 17:18:01 -05:00
|
|
|
clang-format -i uxn.h
|
|
|
|
clang-format -i uxn.c
|
2021-02-09 13:06:55 -05:00
|
|
|
|
|
|
|
# Cli
|
|
|
|
clang-format -i cli.c
|
2021-02-09 13:58:06 -05:00
|
|
|
# rm -f ./bin/cli
|
|
|
|
# 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 cli.c -o bin/cli
|
2021-02-09 00:59:46 -05:00
|
|
|
|
|
|
|
# Emulator
|
2021-02-09 13:06:55 -05:00
|
|
|
clang-format -i emulator.c
|
2021-02-09 13:58:06 -05:00
|
|
|
rm -f ./bin/emulator
|
|
|
|
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 14:17:59 -05:00
|
|
|
|
|
|
|
# run
|
2021-02-12 13:26:58 -05:00
|
|
|
./bin/assembler examples/test.usm bin/boot.rom
|
2021-02-09 13:58:06 -05:00
|
|
|
./bin/emulator bin/boot.rom
|