Fix local server for multiple applications
[anna.git] / README.md
index 951387c..b9bc6ae 100644 (file)
--- a/README.md
+++ b/README.md
@@ -11,78 +11,136 @@ ANNA is a complete suite of tools and resources to build proffesional applicatio
 Based on GIT, hosted on http://redmine.teslayout.com
 
 You could use my pre-commit specific template if you want to do some basic checkings (i.e.
- astyle code processing): Execute './scr/git/use-pre-commit.sh'
+ astyle code processing): Execute './scripts/git/use-pre-commit.sh'
 
-## Documentation
 
-Execute 'scons doc'
+## Build project
 
-## Unit tests
+### With docker
 
-Execute 'scons test'
+Architectures 'x86_64' and 'armv7l' are supported. Execute:
 
-## Examples
+     > tools/build-with-docker [variant: [Release]|Debug]
 
-Execute 'scons example' to generate example binaries
+Note: database resources building is unsupported at the moment using docker.
 
-## Install
+### Natively
 
-Execute 'scons install'
-(install-include-and-lib and install-example, are another aliases for selective installation)
+This is a CMake based building suite.
+Install cmake:
 
-## Uninstall
+     > sudo apt-get install cmake
 
-Execute 'scons uninstall'
+And then generate the makefiles from project root directory:
 
+     > cmake .
 
+You could specify type of build, 'Debug' or 'Release', for example:
 
-## Some basic ubuntu requirements
+     > cmake -DCMAKE_BUILD_TYPE=Debug .
+     > cmake -DCMAKE_BUILD_TYPE=Release .
+
+You could avoid database resources compilation to ease the add of requirements:
+
+     > cmake -DSKIP_DATABASE_BUILD=1 .
+
+## Clean project
+
+     > make clean
+
+## Change the compilers
 
-### Scons python-based building suite:
-     sudo apt-get install scons
+     > cmake -DCMAKE_CXX_COMPILER=/usr/bin/g++     -DCMAKE_C_COMPILER=/usr/bin/gcc
+     or
+     > cmake -DCMAKE_CXX_COMPILER=/usr/bin/clang++ -DCMAKE_C_COMPILER=/usr/bin/clang
+
+## Some basic ubuntu requirements
 
 ### OpenSSL:
-     sudo apt-get install libssl-dev
+     sudo apt-get install libssl-dev
+
 ### Gnome XML:
-     sudo apt-get install libxml2-dev
+     sudo apt-get install libxml2-dev
 
 ### OpenLDAP:
-     sudo apt-get install libldap2-dev
+     > sudo apt-get install libldap2-dev
+
+### Pcap:
+     > sudo apt-get install libpcap-dev
 
 ### MySql:
-     sudo apt-get install libmysqlclient-dev
+     sudo apt-get install libmysqlclient-dev
 
 ### Oracle:
-     https://help.ubuntu.com/community/Oracle%20Instant%20Client
-     Set 'ORACLE_HOME' environment variable in your profile, i.e.:
-        export ORACLE_HOME=/usr/lib/oracle/12.1/client64/
+     Go to https://help.ubuntu.com/community/Oracle%20Instant%20Client and download development packages:
+
+     For example:
 
-     Be sure to create in that directory, a link to oracle includes,
-     for example:
+        > wget https://download.oracle.com/otn_software/linux/instantclient/19600/oracle-instantclient19.6-devel-19.6.0.0.0-1.x86_64.rpm
+        > sudo alien -i oracle-instantclient19.6-devel-19.6.0.0.0-1.x86_64.rpm
 
-       <user>@<host>:/usr/lib/oracle/12.1/client64$ ls -lrt
-       total 8
-       drwxr-xr-x 2 root root 4096 Feb 28 15:59 bin
-       drwxr-xr-x 2 root root 4096 Feb 28 15:59 lib
-       lrwxrwxrwx 1 root root   33 Feb 28 16:07 include -> /usr/include/oracle/12.1/client64
+        (probably basic & sqlplus is also needed)
 
-     The alternative is to edit SConstruct file directly to set
-     oracle includes directory.
+     Edit CMakeLists.txt and update oracle includes, for example:
+
+        > include_directories(/usr/include/oracle/<version>/client64/include)
 
 ### Oracle-OpenLDAP conflict:
      as usual, Oracle is doing things very bad. Move the ldap.h from oracle includes, i.e.:
 
-        cd /usr/include/oracle/12.1/client64
-        sudo mv ldap.h ldap.h.orig
+        > cd /usr/include/oracle/12.1/client64
+        > sudo mv ldap.h ldap.h.orig
+
+### Google Test Framework:
+
+     > sudo apt-get install libgtest-dev
+
+     Note that this package only install source files. You have to compile the
+     code yourself to create the necessary library files. These source files
+     should be located at /usr/src/gtest. Browse to this folder and use cmake
+     to compile the library:
 
-### Boost:
-     Although the more i use, the more i dislike, this suite is included (ambition to learn
-     new things...):
+     > cd /usr/src/gtest
+     > sudo cmake CMakeLists.txt
+     > sudo make
+
+     Copy or symlink libgtest.a and libgtest_main.a to your /usr/lib folder:
+     > sudo cp *.a /usr/lib
+
+## Documentation
+
+Execute 'make doc'
+
+     > cd docs/doxygen
+     > tree -L 1
+
+     .
+     ├── Doxyfile
+     ├── html
+     ├── latex
+     └── man
+
+
+## Unit tests
+
+Execute 'make test'
+
+## Install
+
+To install headers, libraries, and examples, execute:
+
+     > sudo make install
+
+Optionally you could specify another prefix for installation:
+
+     > cmake -DMY_OWN_INSTALL_PREFIX=$HOME/anna-deploy
+     > make install
+
+## Uninstall
 
-        sudo apt-get install libboost-dev
-        sudo apt-get install libboost-test-dev
+     > cat install_manifest.txt | sudo xargs rm
 
+## AOTS (Agents-Oriented Testing Setup)
 
+See INSTALL_AOTS.md