comparison INSTALL.md @ 594:e070fdcc592b

misc: various cleanups
author David Demelier <markand@malikania.fr>
date Fri, 24 Mar 2023 15:15:31 +0100
parents 67b52de5d3c0
children f76cada0bbb2
comparison
equal deleted inserted replaced
593:f9e85d0aca74 594:e070fdcc592b
4 Installation instructions. 4 Installation instructions.
5 5
6 Requirements 6 Requirements
7 ============ 7 ============
8 8
9 - C11 compliant compiler. 9 - C23 compliant compiler.
10 - [GNU Make][], Make build system. 10 - [CMake][], Make build system.
11 - [Jansson][], JSON parsing library. 11 - [Jansson][], JSON parsing library.
12 - [SDL2][], Multimedia library. 12 - [SDL2][], Multimedia library.
13 - [SDL2_image][], Image loading addon for SDL2. 13 - [SDL2_image][], Image loading addon for SDL2.
14 - [SDL2_mixer][], Audio addon for SDL2. 14 - [SDL2_mixer][], Audio addon for SDL2.
15 - [SDL2_ttf][], Fonts addon for SDL2. 15 - [SDL2_ttf][], Fonts addon for SDL2.
16 16
17 Molko's Engine is mostly written in pure C99 with a very limited POSIX 17 Molko's Engine is mostly written in C23 with a very limited POSIX extensions
18 extensions (including `stat`, `strlcpy`, `fmemopen`) but where support is 18 (including `stat`, `strlcpy`, `fmemopen`) but where support is missing fallback
19 missing fallback implementations are provided. 19 implementations are provided.
20 20
21 Supported platforms 21 Supported platforms
22 =================== 22 ===================
23 23
24 The project was successfully tested on the following platforms and their 24 The project was successfully tested on the following platforms and their
26 26
27 - Windows (MinGW-w64, VS2019). 27 - Windows (MinGW-w64, VS2019).
28 - Linux (musl/amd64, musl/aarch64, glibc/amd64). 28 - Linux (musl/amd64, musl/aarch64, glibc/amd64).
29 - FreeBSD (amd64). 29 - FreeBSD (amd64).
30 - OpenBSD (amd64). 30 - OpenBSD (amd64).
31 - macOS 31 - NetBSD (amd64).
32 - macOS (Monterey, Ventura).
32 33
33 Basic installation 34 Basic installation
34 ================== 35 ==================
35 36
36 Quick install. 37 Quick install.
37 38
38 $ bsdtar -xvf molko-x.y.z-tar.xz 39 $ tar -xvf molko-x.y.z-tar.xz
39 $ cd molko-x.y.z 40 $ cd molko-x.y.z
40 $ make 41 $ cmake -S. -Bbuild
41 # sudo make install 42 $ cmake --build build
43 $ cmake --install build
42 44
43 Available options 45 Available options
44 ================= 46 =================
45 47
46 The following make variables as available: 48 The following cmake options as available:
47 49
48 - `WITH_DEBUG`: Disable optimizations and turn on debug symbols (default: no). 50 - `MLK_WITH_DOXYGEN`: enable doxygen documentation (default: On, requires
49 51 doxygen).
50 The following make variables changes installation directories: 52 - `MLK_WITH_EXAMPLES`: enable examples (default: on).
51 53 - `MLK_WITH_NLS`: enable i18n (default: on, requires gettext).
52 - `PREFIX`: Root install path (default: /usr/local). 54 - `MLK_WITH_TESTS`: enable unit tests (default: on).
53 - `LIBDIR`: Libraries directory (default: $PREFIX/lib). 55 - `MLK_WITH_TESTS_GRAPHICAL`: enable unit tests that require a window
54 - `INCDIR`: C header directory (default: $PREFIX/include). 56 context(default: on).
55 57 - `MLK_WITH_CMAKEDIR`: root directory for CMake files (default: LIBDIR/cmake).
56 Booleans options can be set to `yes` or `no` (case sensitive).
57 58
58 Platform: macOS 59 Platform: macOS
59 --------------- 60 ---------------
60 61
61 The recommended way to build under macOS is to install dependencies through 62 The recommended way to build under macOS is to install dependencies through
62 [brew][] and compile using XCode or command line generated makefiles. 63 [brew][] and compile using XCode or command line generated makefiles.
63 64
64 You will need the following packages: 65 You will need the following packages:
65 66
66 - jansson 67 - *jansson*
67 - sdl2 68 - *sdl2*
68 - sdl2_image 69 - *sdl2_image*
69 - sdl2_mixer 70 - *sdl2_mixer*
70 - sdl2_ttf 71 - *sdl2_ttf*
71 72
72 Platform: Windows 73 Platform: Windows
73 ----------------- 74 -----------------
74 75
75 On Windows, [MSYS2][] and Visual Studio are supported. 76 On Windows, [MSYS2][] and Visual Studio are supported.
77 ### MSYS2 78 ### MSYS2
78 79
79 Once you have MSYS2 installed, simply install the following packages from the 80 Once you have MSYS2 installed, simply install the following packages from the
80 appropriate MinGW shell prior to the chapter above. 81 appropriate MinGW shell prior to the chapter above.
81 82
82 - *make*
83 - *mingw-w64-clang-x86_64-gcc*
84 - *mingw-w64-clang-x86_64-SDL2* 83 - *mingw-w64-clang-x86_64-SDL2*
85 - *mingw-w64-clang-x86_64-SDL2_image* 84 - *mingw-w64-clang-x86_64-SDL2_image*
86 - *mingw-w64-clang-x86_64-SDL2_mixer* 85 - *mingw-w64-clang-x86_64-SDL2_mixer*
87 - *mingw-w64-clang-x86_64-SDL2_ttf* 86 - *mingw-w64-clang-x86_64-SDL2_ttf*
88 - *mingw-w64-clang-x86_64-jansson* 87 - *mingw-w64-clang-x86_64-jansson*
97 96
98 On Visual Studio you will need to download or build libraries yourself. It is 97 On Visual Studio you will need to download or build libraries yourself. It is
99 recommended to install all of them in a same directory and hierarchy as 98 recommended to install all of them in a same directory and hierarchy as
100 following: 99 following:
101 100
102 - <dir>/bin 101 - *dir/bin*
103 - <dir>/lib 102 - *dir/lib*
104 - <dir>/include 103 - *dir/include*
105 104
106 Building with Visual Studio is only supported through `clang-cl` which should be 105 Make sure *dir/bin* is in your `PATH` and adjust `CMAKE_PREFIX_PATH` before
107 installed as individual component from the Visual Studio installer. You also 106 running `cmake`.
108 need a POSIX compliant toolset such as [MSYS2][] and add it to your path.
109 107
110 [brew][]: http://brew.sh 108 [brew]: http://brew.sh
111 [CMake][]: http://cmake.org 109 [CMake]: http://cmake.org
112 [Jansson][]: http://www.digip.org/jansson 110 [Jansson]: http://www.digip.org/jansson
113 [MSYS2]: http://www.msys2.org 111 [MSYS2]: http://www.msys2.org
114 [SDL2]: http://libsdl.org 112 [SDL2]: http://libsdl.org
115 [SDL2_image]: https://www.libsdl.org/projects/SDL_image 113 [SDL2_image]: https://www.libsdl.org/projects/SDL_image
116 [SDL2_mixer]: https://www.libsdl.org/projects/SDL_mixer 114 [SDL2_mixer]: https://www.libsdl.org/projects/SDL_mixer
117 [SDL2_ttf]: https://www.libsdl.org/projects/SDL_ttf 115 [SDL2_ttf]: https://www.libsdl.org/projects/SDL_ttf