summaryrefslogtreecommitdiffstats
path: root/coverity/build_Osmocom.sh
blob: ef45b7a4bec00d60176f6a58ae7fb2f087818f8f (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
93
94
95
96
97
98
99
100
101
102
103
#!/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"

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

	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_osmobts() {
	pushd osmo-bts

	do_build --enable-sysmocom-bts --with-sysmobts="$prefix/include/" --enable-trx
	popd
}

build_osmopcu() {
	pushd osmo-pcu 

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

build_libsmpp34() {
	pushd libsmpp34
	PM=$PARALLEL_MAKE
	PARALLEL_MAKE=""
	do_build
	PARALLEL_MAKE=$PM
	popd
}

build_osmocombb() {
	pushd osmocom-bb/src/
	make nofirmware
	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_libsmpp34
build_default osmo-ggsn
build_default osmo-iuh
build_osmopcu
build_osmobts
build_default osmo-sysmon
build_default osmo-mgw
build_default osmo-bsc
build_default osmo-hlr
build_default osmo-msc
build_default osmo-sgsn

# GMR
build_default libosmo-dsp
build_default osmo-gmr

# MNCC to SIP
build_default osmo-sip-connector

build_default osmo-trx

# OsmocomBB (without firmware)
build_osmocombb