Skip oracle and database build by mean cmake variable
[anna.git] / README.md
1 # ANNA
2
3 Multi-purpose C++ development suite, focused on Telco resources (communications, protocols and tools).
4 ANNA is acronym for "Anna is not nothingness anymore", that is to say: "Anna is something to take into
5 account" (like a SONaTINA).
6
7 ANNA is a complete suite of tools and resources to build proffesional applications with minimum cost.
8
9 ## Revision control
10
11 Based on GIT, hosted on http://redmine.teslayout.com
12
13 You could use my pre-commit specific template if you want to do some basic checkings (i.e.
14  astyle code processing): Execute './scripts/git/use-pre-commit.sh'
15
16
17 ## Build project
18
19 This is a CMake based building suite.
20 Install cmake:
21
22      > sudo apt-get install cmake
23
24 And then generate the makefiles from project root directory:
25
26      > cmake .
27
28 You could specify type of build, 'Debug' or 'Release', for example:
29
30      > cmake -DCMAKE_BUILD_TYPE=Debug .
31      > cmake -DCMAKE_BUILD_TYPE=Release .
32
33 You could avoid database resources compilation to ease the add of requirements:
34
35      > cmake -DSKIP_DATABASE_BUILD=1 .
36
37 ## Clean project
38
39      > make clean
40
41 ## Change the compilers
42
43      > cmake -DCMAKE_CXX_COMPILER=/usr/bin/g++     -DCMAKE_C_COMPILER=/usr/bin/gcc
44      or
45      > cmake -DCMAKE_CXX_COMPILER=/usr/bin/clang++ -DCMAKE_C_COMPILER=/usr/bin/clang
46
47 ## Some basic ubuntu requirements
48
49 ### OpenSSL:
50      > sudo apt-get install libssl-dev
51
52 ### Gnome XML:
53      > sudo apt-get install libxml2-dev
54
55 ### OpenLDAP:
56      > sudo apt-get install libldap2-dev
57
58 ### Pcap:
59      > sudo apt-get install libpcap-dev
60
61 ### MySql:
62      > sudo apt-get install libmysqlclient-dev
63
64 ### Oracle:
65      https://help.ubuntu.com/community/Oracle%20Instant%20Client
66
67      After instalation of basic/sqlplus/devel, edit CMakeLists.txt
68      and update oracle includes, for example:
69
70        include_directories(/usr/include/oracle/<version>/client64/include)
71
72 ### Oracle-OpenLDAP conflict:
73      as usual, Oracle is doing things very bad. Move the ldap.h from oracle includes, i.e.:
74
75         > cd /usr/include/oracle/12.1/client64
76         > sudo mv ldap.h ldap.h.orig
77
78 ### Google Test Framework:
79
80      > sudo apt-get install libgtest-dev
81
82      Note that this package only install source files. You have to compile the
83      code yourself to create the necessary library files. These source files
84      should be located at /usr/src/gtest. Browse to this folder and use cmake
85      to compile the library:
86
87      > cd /usr/src/gtest
88      > sudo cmake CMakeLists.txt
89      > sudo make
90
91      Copy or symlink libgtest.a and libgtest_main.a to your /usr/lib folder:
92      > sudo cp *.a /usr/lib
93
94 ## Documentation
95
96 Execute 'make doc'
97
98      > cd docs/doxygen
99      > tree -L 1
100
101      .
102      ├── Doxyfile
103      ├── html
104      ├── latex
105      └── man
106
107
108 ## Unit tests
109
110 Execute 'make test'
111
112 ## Install
113
114 To install headers, libraries, and examples, execute:
115
116      > sudo make install
117
118 Optionally you could specify another prefix for installation:
119
120      > cmake -DMY_OWN_INSTALL_PREFIX=$HOME/anna-deploy
121      > make install
122
123 ## Uninstall
124
125      > cat install_manifest.txt | sudo xargs rm
126
127 ## AOTS (Agents-Oriented Testing Setup)
128
129 See INSTALL_AOTS.md
130