-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathINSTALL.txt
57 lines (36 loc) · 1.75 KB
/
INSTALL.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
Here's some instructions (interwoven with notes to myself) on how to build and
install libgpif.
1. Create Makefiles
Install cmake (http://www.cmake.org/) if you haven't got it already.
If you want to install into a non-standard location you can modify the
CMAKE_INSTALL_PREFIX cmake cache entry to change the destination using the
following cmake parameter:
-DCMAKE_INSTALL_PREFIX:PATH=/opt/libgpif
If you want a Debug build of libgpif you can specify
-DCMAKE_BUILD_TYPE:STRING=Debug
on cmake's commandline. Make sure you have cunit
(http://cunit.sourceforge.net/) installed though, as an additional unit test
binary will be created as well.
I tend to use clang (http://clang.llvm.org) quite often lately, this is how
I tell cmake which C-compiler to use (entirely optional if you don't care):
-DCMAKE_C_COMPILER:STRING=clang
I would suggest building out of tree, so make yourself a build directory
somewhere:
mkdir build
cd build
Finally run cmake with any of the above options an the path to libgpif's
source directory:
cmake [OPTS] /path/to/libgpif/src/
2. Build
make
Running make in your build directory will build the shared libgpif library
and optionally (in a Debug build) a 'gpiftesttest' binary which runs some
unit tests against the library.
3. Install
make install
There is no need to install if for instance you just want to run gpiftest.
cmake will set everything up accordingly. Just go ahead and run
test/gpiftest from the build direcotry. I would suggest to do so before
installing anyway.
4. Update you dynamic linker's runtime bindings so it can find libgpif (see e.g.
man ldconfig on Linux).