Add linmath submodule

master
Elias Fleckenstein 2021-03-24 16:05:08 +01:00
parent 2b06e9efa5
commit 1152c2be96
8 changed files with 33 additions and 14 deletions

3
.gitmodules vendored Normal file
View File

@ -0,0 +1,3 @@
[submodule "deps/linmath.h"]
path = deps/linmath.h
url = https://github.com/datenwolf/linmath.h

View File

@ -1,6 +1,22 @@
# Building instructions
The code and the Makefile are located in the src/ directory
GNU make is used for compiling. The code and the Makefile are located in the src/ directory.
## Dependencies
To build anything you need g++ and GNU make.
```bash
sudo apt install build-essential make
```
The development versions OpenGL, GLFW3, GLEW are required to build the client.
```bash
sudo apt install libgl1-mesa-dev libglfw3-dev libglew-dev
```
When building the client, don't forget to pull the submodules before building.
``bash
git submodule update --init
```
## Available targets
- `all` (default)
@ -9,9 +25,9 @@ The code and the Makefile are located in the src/ directory
- `clean`
- `clobber`
Debug flag (`-g`) is set by default.
The debug flag (`-g`) is set by default (RELEASE=TRUE will disable it).
## Release Build
## Release
```bash
./release.sh
```

View File

@ -26,3 +26,10 @@ All positions are signed integers (`s32`)
- `invalid`: unknown nodes received from server
Interrupt handlers for SIGINT und SIGTERM are implemented.
## Dependencies
The client depends on GLFW3, OpenGL and GLEW.
```bash
sudo apt install libgl1-mesa-dri libglfw3 libglew2.1
```

1
deps/linmath.h vendored Submodule

@ -0,0 +1 @@
Subproject commit 05387571f57224f8cbc2b390b423dab6b9158988

View File

@ -4,7 +4,7 @@ cd .build/src
make clobber && make all RELEASE=TRUE -j$(nproc) && make clean
cp Dragonblocks DragonblocksServer ..
cd ..
rm -rf src BUILDING.md .git* release.sh DragonblocksAlpha-*.zip
rm -rf .git* deps src BUILDING.md release.sh DragonblocksAlpha-*.zip
cd ..
mv .build DragonblocksAlpha
zip DragonblocksAlpha-`git rev-parse --short HEAD` DragonblocksAlpha/*

View File

@ -18,7 +18,7 @@ DragonblocksServer: $(SERVER)
cc $(FLAGS) -o DragonblocksServer $(SERVER) $(LIBRARIES)
%.o: %.c
cc $(FLAGS) -o $@ -c -Wall -Wextra -Wpedantic -Werror $<
cc $(FLAGS) -o $@ -c -Wall -Wextra -Wpedantic -Werror -isystem ../deps $<
clean:
rm -rf *.o

View File

@ -8,6 +8,7 @@
#include <GL/glew.h>
#include <GL/gl.h>
#include <GLFW/glfw3.h>
#include <linmath.h/linmath.h>
#include "client.h"
#include "signal.h"
#include "util.h"

View File

@ -28,15 +28,6 @@ DEFTYPES(16)
DEFTYPES(32)
DEFTYPES(64)
typedef float f32;
typedef double f64;
DEFVEC(f32)
DEFVEC(f64)
typedef v2f32 v2f;
typedef v3f32 v3f;
#undef DEFRW
#undef DEFVEC
#undef DEFTYP