]> git.localhorst.tv Git - blank.git/blob - doc/building
update documentation for make targets
[blank.git] / doc / building
1 Dependencies
2 ============
3
4         GLEW, GLM, SDL2, SDL2_image, SDL2_net, SDL2_ttf, OpenAL, freealut, zlib
5
6         CppUnit for tests
7         Cppcheck for linting
8
9 archlinux: pacman -S \
10         glew glm sdl2 sdl2_image sdl2_net sdl2_ttf openal freealut zlib \
11         cppunit cppcheck
12
13 debian: apt install \
14         libglew-dev libglm-dev libsdl2-dev libsdl2-image-dev libsdl2-net-dev \
15         libsdl2-ttf-dev libopenal-dev libalut-dev zlib1g-dev \
16         libcppunit-dev cppcheck
17
18         (!) you may have to build the tests with CPPFLAGS=-D_GLIBCXX_USE_CXX11_ABI=0
19
20 centos: yum install \
21         glew-devel glm-devel SDL2-devel SDL2_image-devel SDL2_net-devel \
22         SDL2_ttf-devel openal-soft-devel freealut-devel zlib-devel \
23         cppunit-devel cppcheck
24
25         (!) you need the "epel" repository for SDL2 et al. `yum install epel-release`
26
27 manual:
28         Cppcheck: http://cppcheck.sourceforge.net/
29         CppUnit http://sourceforge.net/projects/cppunit/
30         GLEW    http://glew.sourceforge.net/
31         GLM     http://glm.g-truc.net/0.9.6/index.html
32         OpenAL  http://openal.org/
33         SDL     http://www.libsdl.org/
34         zlib    http://zlib.net/
35
36
37 Makefile
38 ========
39
40 Targets
41 -------
42
43 all:
44         build everything
45
46 release (default), debug, profile:
47         build executables tuned for running, debugging, and profiling
48
49 run:
50         build and execute the main binary with state path set to ./saves
51
52 server:
53         same as run, only in server mode
54
55 server:
56         same as run, only in client mode and the save path is set to
57         ./client-saved to prevent clashes with a running `make server`
58
59 test:
60         build and run tests
61
62 unittest:
63         build and run tests that require no X server
64
65 gdb, cachegrind, callgrind:
66         build the binary suited for given tool and launch
67
68 clean:
69         remove intermediates
70
71 distclean:
72         remove intermediates and artifacts
73         (also those generated by tool invocations!)
74
75
76 Variables
77 ---------
78
79 CXX, LXX:
80         compiler/linker used for C++ sources/objects
81
82 LIBS:
83         names of libraries (for pkg-config)
84
85 CPPFLAGS, CXXFLAGS, LDXXFLAGS:
86         flags for the preprocessor, compiler, and linker
87
88 DEBUG_FLAGS, PROFILE_FLAGS, RELEASE_FLAGS:
89         flags for building binaries in debug, profile, and release mode