diff --git a/README.md b/README.md index fa14028..d59fc9e 100644 --- a/README.md +++ b/README.md @@ -4,13 +4,14 @@ An assembler and emulator for the [Uxn stack-machine](https://wiki.xxiivv.com/si ## Build -### Linux +### Linux/OS X To build the Uxn emulator, you must install [SDL2](https://wiki.libsdl.org/) for your distro. If you are using a package manager: ```sh sudo pacman -Sy sdl2 # Arch sudo apt install libsdl2-dev # Ubuntu +sudo brew sdl2 # OS X ``` Build the assembler and emulator by running the `build.sh` script. The assembler(`uxnasm`) and emulator(`uxnemu`) are created in the `/bin` folder. @@ -18,6 +19,7 @@ Build the assembler and emulator by running the `build.sh` script. The assembler ```sh ./build.sh --debug # Add debug flags to compiler + --format # Format source code ``` If you wish to build the emulator without graphics mode: diff --git a/build.sh b/build.sh index 5ba35f7..929667b 100755 --- a/build.sh +++ b/build.sh @@ -8,7 +8,7 @@ rm -f ./bin/boot.rom # When clang-format is present -if command -v clang-format > /dev/null 2>&1 +if [ "${1}" = '--format' ]; then echo "Formatting.." clang-format -i src/uxn.h