1### vsomeip 2 3##### Copyright 4Copyright (C) 2015-2017, Bayerische Motoren Werke Aktiengesellschaft (BMW AG) 5 6##### License 7 8This Source Code Form is subject to the terms of the Mozilla Public 9License, v. 2.0. If a copy of the MPL was not distributed with this 10file, You can obtain one at http://mozilla.org/MPL/2.0/. 11 12##### vsomeip Overview 13---------------- 14The vsomeip stack implements the http://some-ip.com/ (Scalable service-Oriented 15MiddlewarE over IP (SOME/IP)) protocol. The stack consists out of: 16 17* a shared library for SOME/IP (`libvsomeip3.so`) 18* a second shared library for SOME/IP's service discovery (`libvsomeip3-sd.so`) 19 which is loaded during runtime if the service discovery is enabled. 20 21##### Build Instructions for Linux 22 23###### Dependencies 24 25- A C++11 enabled compiler like gcc >= 4.8 is needed. 26- vsomeip uses CMake as buildsystem. 27- vsomeip uses Boost >= 1.55: 28 29Ubuntu 14.04: 30 31`sudo apt-get install libboost-system1.55-dev libboost-thread1.55-dev libboost-log1.55-dev` 32 33Ubuntu 12.04: a PPA is necessary to use version 1.54 of Boost: 34-- URL: https://launchpad.net/~boost-latest/+archive/ubuntu/ppa 35--`sudo add-apt-repository ppa:boost-latest/ppa` 36--`sudo apt-get install libboost-system1.55-dev libboost-thread1.55-dev 37 libboost-log1.55-dev` 38 39For the tests Google's test framework https://code.google.com/p/googletest/[gtest] in version 1.7.0 is needed. 40-- URL: https://googletest.googlecode.com/files/gtest-1.7.0.zip 41 42To build the documentation asciidoc, source-highlight, doxygen and graphviz is needed: 43--`sudo apt-get install asciidoc source-highlight doxygen graphviz` 44 45###### Compilation 46 47For compilation call: 48 49```bash 50mkdir build 51cd build 52cmake .. 53make 54``` 55 56To specify a installation directory (like `--prefix=` if you're used to autotools) call cmake like: 57```bash 58cmake -DCMAKE_INSTALL_PREFIX:PATH=$YOUR_PATH .. 59make 60make install 61``` 62 63###### Compilation with predefined unicast and/or diagnosis address 64To predefine the unicast address, call cmake like: 65```bash 66cmake -DUNICAST_ADDRESS=<YOUR IP ADDRESS> .. 67``` 68 69To predefine the diagnosis address, call cmake like: 70```bash 71cmake -DDIAGNOSIS_ADDRESS=<YOUR DIAGNOSIS ADDRESS> .. 72``` 73The diagnosis address is a single byte value. 74 75###### Compilation with custom default configuration folder 76To change the default configuration folder, call cmake like: 77```bash 78cmake -DDEFAULT_CONFIGURATION_FOLDER=<DEFAULT CONFIGURATION FOLDER> .. 79``` 80The default configuration folder is /etc/vsomeip. 81 82###### Compilation with custom default configuration file 83To change the default configuration file, call cmake like: 84```bash 85cmake -DDEFAULT_CONFIGURATION_FILE=<DEFAULT CONFIGURATION FILE> .. 86``` 87The default configuration file is /etc/vsomeip.json. 88 89###### Compilation with signal handling 90 91To compile vsomeip with signal handling (SIGINT/SIGTERM) enabled, call cmake like: 92```bash 93cmake -DENABLE_SIGNAL_HANDLING=1 .. 94``` 95In the default setting, the application has to take care of shutting down vsomeip in case these signals are received. 96 97 98##### Build Instructions for Android 99 100###### Dependencies 101 102- vsomeip uses Boost >= 1.55. The boost libraries (system, thread and log) must be included in the Android source tree and integrated into the build process with an appropriate Android.bp file. 103 104###### Compilation 105 106In general for building the Android source tree the instructions found on the pages from the Android Open Source Project (AOSP) apply (https://source.android.com/setup/build/requirements). 107 108To integrate the vsomeip library into the build process, the source code together with the Android.bp file has to be inserted into the Android source tree (by simply copying or by fetching with a custom platform manifest). 109When building the Android source tree, the Android.bp file is automatically found and considered by the build system. 110 111In order that the vsomeip library is also included in the Android image, the library has to be added to the PRODUCT_PACKAGES variable in one of a device/target specific makefile: 112 113``` 114PRODUCT_PACKAGES += \ 115 libvsomeip \ 116 libvsomeip_cfg \ 117 libvsomeip_sd 118```