--- /dev/null
+[submodule "deps/linmath.h"]
+ path = deps/linmath.h
+ url = https://github.com/datenwolf/linmath.h
# 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)
- `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
```
- `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
+```
--- /dev/null
+Subproject commit 05387571f57224f8cbc2b390b423dab6b9158988
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/*
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
#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"
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