Added instructions and adaptation for Windows build

This commit is contained in:
Andrew Alderwick 2021-07-27 21:13:12 +01:00
parent fa6b8a1769
commit 6c80a46a3a
2 changed files with 17 additions and 1 deletions

View File

@ -23,6 +23,18 @@ mk
If the build fails on 9front because of missing headers or functions, try again after `rm -r /sys/include/npe`.
### Windows
Uxn can be built on Windows with [MSYS2](https://www.msys2.org/). Install by downloading from their website or with Chocolatey with `choco install msys2`. In the MSYS shell, type:
```sh
pacman -S git mingw-w64-x86_64-gcc mingw64/mingw-w64-x86_64-SDL2
export PATH="${PATH}:/mingw64/bin"
git clone https://git.sr.ht/~rabbits/uxn
cd uxn
./build.sh
```
## Getting Started
Begin by building the assembler and emulator by running the build script. The assembler(`uxnasm`) and emulator(`uxnemu`) are created in the `/bin` folder.

View File

@ -24,7 +24,11 @@ fi
mkdir -p bin
CFLAGS="-std=c89 -Wall -Wno-unknown-pragmas"
UXNEMU_LDFLAGS="-L/usr/local/lib $(sdl2-config --cflags --libs)"
if [ -n "${MSYSTEM}" ]; then
UXNEMU_LDFLAGS="-static $(sdl2-config --cflags --static-libs)"
else
UXNEMU_LDFLAGS="-L/usr/local/lib $(sdl2-config --cflags --libs)"
fi
if [ "${1}" = '--debug' ];
then