1
1
Fork 0
Browse Source

build instructions

thread-physics
alistair 4 years ago
parent
commit
37a05c3770
  1. 11
      Makefile
  2. 46
      README.md

11
Makefile

@ -1,12 +1,10 @@
EXE = main EXE = main
.PHONY: windows
.PHONY: linux
sdl2ibdir = sdllib sdl2ibdir = sdllib
target=linux ifndef target
target=linux
endif
ifeq ($(target),windows) ifeq ($(target),windows)
CC=x86_64-w64-mingw32-gcc CC=x86_64-w64-mingw32-gcc
@ -19,7 +17,7 @@ else
endif endif
ifdef debug ifdef debug
CC = $(CC) -g -Wall CC += -g -Wall
endif endif
.PHONY: default .PHONY: default
@ -82,4 +80,3 @@ clean:
rm datastructures/*.o rm datastructures/*.o
rm *.o rm *.o
rm -rf dist rm -rf dist

46
README.md

@ -4,19 +4,49 @@
![image](https://alistairmichael.com/media/game3.png) ![image](https://alistairmichael.com/media/game3.png)
# Build Instructions # Prebuilt Binary
See the releases tab.
## Linux On linux, you will need to install the SDL2 package from your package maintainer.
### Fedora
Download the SDL2 runtime and SDL2 development packages from your package ```sh
distributor. [official page](http://libsdl.org/download-2.0.php) sudo dnf install SDL2
```
# Build Instructions
```bash ## On Linux
Install the [libSDL2](http://libsdl.org/download-2.0.php) runtime and SDL2
development packages from your package distributor. On Fedora, this
is the `SDL2` and `SDL2-devel` packages.
```
git clone --recurse-submodules https://git.topost.net/alistair/space_game.git git clone --recurse-submodules https://git.topost.net/alistair/space_game.git
cd space_game
make
``` ```
By default it is built using debug flags. ### For Linux
```
make clean
make target=linux
```
### For Windows
You have to have mingw and the mingw libsdl library (I think).
Run setup.sh to download the SDL2 static libraries and `SDL2.dll`.
```
./setup.sh
make clean
make target=windows
```
### With debug flags
Append `debug=true` to the make command.

Loading…
Cancel
Save