2017-02-14 14:55:02 +03:00
|
|
|
# Modest: Build and Installation
|
|
|
|
|
2017-03-21 09:56:42 +03:00
|
|
|
## GNU Make
|
2017-02-14 14:55:02 +03:00
|
|
|
|
2017-03-21 09:56:42 +03:00
|
|
|
In root directory of project (`/`):
|
2017-02-14 14:55:02 +03:00
|
|
|
```bash
|
|
|
|
make
|
2017-03-21 09:56:42 +03:00
|
|
|
make test
|
|
|
|
sudo make install
|
2017-02-14 14:55:02 +03:00
|
|
|
```
|
|
|
|
|
|
|
|
Flags that can be passed to make:
|
2017-03-21 09:56:42 +03:00
|
|
|
- `prefix`, default /usr/local
|
|
|
|
- `OS`, if not defined try to get from "uname -s"
|
|
|
|
- `PROJECT_OPTIMIZATION_LEVEL`, default -O2
|
|
|
|
- `MyCORE_BUILD_WITHOUT_THREADS`, YES or (NO or undefined), default undefined
|
|
|
|
- `MyCORE_BUILD_DEBUG`, YES or (NO or undefined), default undefined
|
|
|
|
- `MyCORE_WITH_PERF`, YES or (NO or undefined), default undefined, try build with timers (rdtsc or some), OS dependent, may not work on some systems,
|
|
|
|
- `PROJECT_INSTALL_HEADER`, default "include"
|
|
|
|
- `PROJECT_INSTALL_LIBRARY`, default "lib"
|
|
|
|
- `PROJECT_INSTALL_WITHOUT_HEADERS`, YES or (NO or undefined), default undefined
|
|
|
|
|
|
|
|
*for example*:
|
2017-02-14 14:55:02 +03:00
|
|
|
```bash
|
2017-03-21 09:56:42 +03:00
|
|
|
make -j4 prefix=/usr MyCORE_BUILD_WITHOUT_THREADS=YES
|
2017-02-14 14:55:02 +03:00
|
|
|
sudo make install
|
|
|
|
```
|
|
|
|
|
2017-03-21 09:56:42 +03:00
|
|
|
Makefile rules:
|
|
|
|
- `all` —- build all components (libraries, examples, tests) (default)
|
|
|
|
- `library` -- build only static and shared library
|
|
|
|
- `shared` -- build only shared library
|
|
|
|
- `static` -- build only static library
|
|
|
|
- `clean` -- clean up current build directory
|
|
|
|
- `clone` -- copy all headers from source to include directories and modify local include (`#include "..."`) to global (`#include <...>`)
|
|
|
|
- `clean_api` -- remove all headers from include directory
|
|
|
|
- `create` -- create directories for binary, libraries, tests
|
|
|
|
- `test` -- run all tests
|
|
|
|
- `modules` -- print modules name, description, dependencies
|
|
|
|
- `install` -- install libraries and headers on your system
|
|
|
|
- `uninstall` -- delete libraries and headers on your system
|
|
|
|
- `make-pc-file` -- create pkg-config file
|
|
|
|
|
|
|
|
*for example*:
|
2017-02-14 14:55:02 +03:00
|
|
|
```bash
|
2017-03-21 09:56:42 +03:00
|
|
|
make shared
|
2017-02-14 14:55:02 +03:00
|
|
|
```
|