Fix local server for multiple applications
[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 ### With docker
20
21 Architectures 'x86_64' and 'armv7l' are supported. Execute:
22
23      > tools/build-with-docker [variant: [Release]|Debug]
24
25 Note: database resources building is unsupported at the moment using docker.
26
27 ### Natively
28
29 This is a CMake based building suite.
30 Install cmake:
31
32      > sudo apt-get install cmake
33
34 And then generate the makefiles from project root directory:
35
36      > cmake .
37
38 You could specify type of build, 'Debug' or 'Release', for example:
39
40      > cmake -DCMAKE_BUILD_TYPE=Debug .
41      > cmake -DCMAKE_BUILD_TYPE=Release .
42
43 You could avoid database resources compilation to ease the add of requirements:
44
45      > cmake -DSKIP_DATABASE_BUILD=1 .
46
47 ## Clean project
48
49      > make clean
50
51 ## Change the compilers
52
53      > cmake -DCMAKE_CXX_COMPILER=/usr/bin/g++     -DCMAKE_C_COMPILER=/usr/bin/gcc
54      or
55      > cmake -DCMAKE_CXX_COMPILER=/usr/bin/clang++ -DCMAKE_C_COMPILER=/usr/bin/clang
56
57 ## Some basic ubuntu requirements
58
59 ### OpenSSL:
60      > sudo apt-get install libssl-dev
61
62 ### Gnome XML:
63      > sudo apt-get install libxml2-dev
64
65 ### OpenLDAP:
66      > sudo apt-get install libldap2-dev
67
68 ### Pcap:
69      > sudo apt-get install libpcap-dev
70
71 ### MySql:
72      > sudo apt-get install libmysqlclient-dev
73
74 ### Oracle:
75      Go to https://help.ubuntu.com/community/Oracle%20Instant%20Client and download development packages:
76
77      For example:
78
79         > wget https://download.oracle.com/otn_software/linux/instantclient/19600/oracle-instantclient19.6-devel-19.6.0.0.0-1.x86_64.rpm
80         > sudo alien -i oracle-instantclient19.6-devel-19.6.0.0.0-1.x86_64.rpm
81
82         (probably basic & sqlplus is also needed)
83
84      Edit CMakeLists.txt and update oracle includes, for example:
85
86         > include_directories(/usr/include/oracle/<version>/client64/include)
87
88 ### Oracle-OpenLDAP conflict:
89      as usual, Oracle is doing things very bad. Move the ldap.h from oracle includes, i.e.:
90
91         > cd /usr/include/oracle/12.1/client64
92         > sudo mv ldap.h ldap.h.orig
93
94 ### Google Test Framework:
95
96      > sudo apt-get install libgtest-dev
97
98      Note that this package only install source files. You have to compile the
99      code yourself to create the necessary library files. These source files
100      should be located at /usr/src/gtest. Browse to this folder and use cmake
101      to compile the library:
102
103      > cd /usr/src/gtest
104      > sudo cmake CMakeLists.txt
105      > sudo make
106
107      Copy or symlink libgtest.a and libgtest_main.a to your /usr/lib folder:
108      > sudo cp *.a /usr/lib
109
110 ## Documentation
111
112 Execute 'make doc'
113
114      > cd docs/doxygen
115      > tree -L 1
116
117      .
118      ├── Doxyfile
119      ├── html
120      ├── latex
121      └── man
122
123
124 ## Unit tests
125
126 Execute 'make test'
127
128 ## Install
129
130 To install headers, libraries, and examples, execute:
131
132      > sudo make install
133
134 Optionally you could specify another prefix for installation:
135
136      > cmake -DMY_OWN_INSTALL_PREFIX=$HOME/anna-deploy
137      > make install
138
139 ## Uninstall
140
141      > cat install_manifest.txt | sudo xargs rm
142
143 ## AOTS (Agents-Oriented Testing Setup)
144
145 See INSTALL_AOTS.md
146