summaryrefslogtreecommitdiffstats
path: root/docs/3_Developer_Guides/2_Building_Microservices_Natively/4_getting-source-files.md
blob: b59cec0277eaad9ea10390350fbae43c4ba77081 (plain)
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
---
edit_link: ''
title: Getting Your Source Files
origin_url: >-
  https://raw.githubusercontent.com/automotive-grade-linux/docs-sources/master/agl-documentation/host-configuration/docs/4-getting-source-files.md
---

<!-- WARNING: This file is generated by fetch_docs.js using /home/boron/Documents/AGL/docs-webtemplate/site/_data/tocs/devguides/master/host-configuration-developer-guides-devguides-book.yml -->

# Getting Your Source Files

Now that you have your host ready, packages installed, and the binder
daemon ready, you can get your source files together.
This example uses the `helloworld-service` binding, which is
a project hosted on GitHub, is written in the C programming language,
depends on the `libjson-c` library, and uses `cmake` for building.

## Install Programs and Libraries You Need for this Example

For this example, you need to have the following installed on your host:

```bash
git
cmake
pkg-config
gcc
g++
json-c
```

**NOTE:** If you are building a different binding, you need to make sure
you have all the programs and libraries needed to build that particular
binding.

### Installing on Debian

Use the following commands if your native Linux machine uses the Debian
distribution:

```bash
sudo apt-get install git cmake pkg-config gcc g++ libjson-c-dev
```

### Installing on OpenSUSE

Use the following commands if your native Linux machine uses the OpenSUSE
distribution:

```bash
sudo zypper install git cmake pkg-config gcc gcc-c++ libjson-c-devel
```

### Installing on Fedora

Use the following commands if your native Linux machine uses the Fedora
distribution:

```bash
sudo dnf install git cmake pkg-config gcc gcc-c++ json-c-devel.x86_64
```

## Cloning the helloworld-service repository

Use Git to create a local repository of the
[helloworld-service](https://github.com/iotbzh/helloworld-service) binding from
[IoT.BZH](https://iot.bzh/en/).
The following command creates a repository named `helloworld-service` in the
current directory.
The "--recurse-submodules" option ensures that all submodules (i.e. repositories
within `helloworld-service`) are initialized and cloned as well.

```bash
git clone https://github.com/iotbzh/helloworld-service.git --recurse-submodules
```