Modest/INSTALL.md

48 lines
1.6 KiB
Markdown
Raw Normal View History

2016-12-20 15:52:50 +03:00
# Modest: Build and Installation
2017-03-20 21:57:29 +03:00
## GNU Make
2016-12-20 15:52:50 +03:00
2017-03-20 21:57:29 +03:00
In root directory of project (`/`):
2016-12-20 15:52:50 +03:00
```bash
make
2017-03-20 21:57:29 +03:00
make test
sudo make install
2016-12-20 15:52:50 +03:00
```
Flags that can be passed to make:
2017-03-20 21:57:29 +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*:
2016-12-20 15:52:50 +03:00
```bash
2017-03-20 21:57:29 +03:00
make -j4 prefix=/usr MyCORE_BUILD_WITHOUT_THREADS=YES
2016-12-20 15:52:50 +03:00
sudo make install
```
2017-03-20 21:57:29 +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*:
2016-12-20 15:52:50 +03:00
```bash
2017-03-20 21:57:29 +03:00
make shared
2016-12-20 15:52:50 +03:00
```