summaryrefslogtreecommitdiffstats
path: root/coverity/build_Osmocom.sh
blob: 9e5607d5bdbaf57ab24bcbb6cc0ad9aa1793972f (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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
#!/usr/bin/env bash

set -e -x

base_dir="$PWD"
src_dir="$base_dir/source-Osmocom"
prefix="$base_dir/install-Osmocom"

install -d "$prefix"

export PKG_CONFIG_PATH="$prefix/lib/pkgconfig"

git_branch() {
  echo "$(git status)" | grep 'On branch' | sed 's/On branch //'
}

do_build() {
	autoreconf --install --force
	./configure --prefix="$prefix" $*

	make $PARALLEL_MAKE
	make install
}

build_default() {
	pushd $1
	do_build
	popd
}

build_layer1api() {
	pushd layer1-api
	install -d "$prefix/include/sysmocom/femtobts/"
	cp include/*.h "$prefix/include/sysmocom/femtobts/"
	popd
}

build_libasn1c() {
	pushd libasn1c
	do_build
	sed -i s,'#include "config.h"','/*#include "config.h"*/', "$prefix/include/asn1c/asn_system.h"
	popd
}

build_openbsc() {
	pushd openbsc/openbsc
	#IU git checkout sysmocom/iu

	do_build --enable-osmo-bsc --enable-nat --enable-smpp --enable-mgcp-transcoding #IU --enable-iu
	popd
}

build_osmobts() {
	pushd osmo-bts

	do_build --enable-sysmocom-bts
	popd
}

build_osmopcu() {
	pushd osmo-pcu 

	do_build --enable-sysmocom-bts=yes --enable-sysmocom-dsp=yes
	popd
}

cd "$src_dir"

rm -rf "$prefix"

build_layer1api
build_default asn1c
build_default libosmocore
build_libasn1c
build_default libosmo-abis
build_default libosmo-netif
build_default libosmo-sccp
build_default libsmpp34
build_default osmo-ggsn
#IU build_default osmo-iuh
build_osmopcu
build_osmobts
build_openbsc

# GMR
build_default libosmo-dsp
build_default osmo-gmr

# MNCC to SIP
build_default osmo-sip-connector

build_default osmo-trx