diff options
Diffstat (limited to 'INSTALL.md')
-rw-r--r-- | INSTALL.md | 70 |
1 files changed, 33 insertions, 37 deletions
@@ -1,51 +1,47 @@ # Modest: Build and Installation -## make +## GNU Make -In root directory: +In root directory of project (`/`): ```bash make +make test +sudo make install ``` -If successful copy lib/* and include/* at the right place for you - Flags that can be passed to make: -- `MODEST_OPTIMIZATION_LEVEL=-O2` set compiler optimization level. Default: -O2 -- `MODEST_BUILD_WITHOUT_THREADS=YES` build without POSIX Threads. Default: NO - -*for example* -```bash -make MODEST_BUILD_WITHOUT_THREADS=NO -``` - -and copy to the right place for you +- `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*: ```bash -cp lib/* /usr/local/lib -cp -r include/* /usr/local/include -``` - -## cmake - -In `project` directory: -```bash -cmake . -make +make -j4 prefix=/usr MyCORE_BUILD_WITHOUT_THREADS=YES sudo make install ``` -Flags that can be passed to CMake: -- `MODEST_OPTIMIZATION_LEVEL=-O2` set compiler optimization level. Default: -O2 -- `CMAKE_INSTALL_LIBDIR=lib` set path to install created library. Default: lib -- `MODEST_BUILD_SHARED=ON` build shared library. Default: ON -- `MODEST_BUILD_STATIC=ON` build static library. Default: ON -- `MODEST_INSTALL_HEADER=OFF` install header files. Default OFF -- `MODEST_BUILD_WITHOUT_THREADS=YES` build without POSIX Threads. Default: NO -- `MODEST_EXTERN_MALLOC=my_malloc_func` set extern malloc function. Default: UNDEFINED -- `MODEST_EXTERN_REALLOC=my_realloc_func` set extern realloc function. Default: UNDEFINED -- `MODEST_EXTERN_CALLOC=my_calloc_func` set extern calloc function. Default: UNDEFINED -- `MODEST_EXTERN_FREE=my_free_func` set extern free function. Default: UNDEFINED - -*for example* +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*: ```bash -cmake . -DCMAKE_INSTALL_LIBDIR=lib64 -DMODEST_INSTALL_HEADER=ON +make shared ``` |