This repository has been archived by the owner on Apr 22, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
ci_build.sh
executable file
·64 lines (51 loc) · 1.97 KB
/
ci_build.sh
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
#!/usr/bin/env bash
# help debug
set -x
# Build and local install repositories
mkdir tmp
mkdir tmp/etc
BUILD_PREFIX=$PWD/tmp
SCRIPTS_PREFIX=$PWD/tmp/etc
LIBSODIUM_VER=1.0.3
LIBZMQ_VER=v4.2.0-pre
LIBCZMQ_VER=v3.0.2
MALAMUTE_VER=v1.0
ZYRE_VER=v1.1.0
CONFIG_FLAGS=()
CONFIG_FLAGS+=("CFLAGS=-I${BUILD_PREFIX}/include")
CONFIG_FLAGS+=("CPPFLAGS=-I${BUILD_PREFIX}/include")
CONFIG_FLAGS+=("CXXFLAGS=-I${BUILD_PREFIX}/include")
CONFIG_FLAGS+=("LDFLAGS=-L${BUILD_PREFIX}/lib")
KERNEL_FLAGS=()
KERNEL_FLAGS+=("INSTALLDIR=${BUILD_PREFIX}/lib/modules/$(shell uname -r)/extra")
KERNEL_FLAGS+=("INSTALLHDRDIR=${BUILD_PREFIX}/include/pciDriver/driver")
BPM_OPTS=()
BPM_OPTS+=(${CONFIG_FLAGS[@]})
BPM_OPTS+=(${KERNEL_FLAGS[@]})
BPM_OPTS+=("PREFIX=${BUILD_PREFIX}")
BPM_OPTS+=("SCRIPTS_PREFIX=${SCRIPTS_PREFIX}")
CONFIG_OPTS=()
CONFIG_OPTS+=(${CONFIG_FLAGS[@]})
CONFIG_OPTS+=("PKG_CONFIG_PATH=${BUILD_PREFIX}/lib/pkgconfig")
CONFIG_OPTS+=("--prefix=${BUILD_PREFIX}")
# libsodium
git clone --branch=${LIBSODIUM_VER} git://github.com/jedisct1/libsodium.git &&
( cd libsodium; ./autogen.sh && ./configure --prefix=$BUILD_PREFIX &&
make check && make install ) || exit 1
# libzmq
git clone --branch=${LIBZMQ_VER} git://github.com/lnls-dig/libzmq.git &&
( cd libzmq; ./autogen.sh && ./configure "${CONFIG_OPTS[@]}" &&
make check && make install ) || exit 1
# CZMQ
git clone --branch=${LIBCZMQ_VER} git://github.com/zeromq/czmq.git &&
( cd czmq; ./autogen.sh && ./configure "${CONFIG_OPTS[@]}" &&
make check && make install ) || exit 1
# Zyre
git clone --branch=${ZYRE_VER} git://github.com/zeromq/zyre.git &&
( cd zyre; ./autogen.sh && ./configure "${CONFIG_OPTS[@]}" &&
make check && make install ) || exit 1
# Malamute
git clone --branch=${MALAMUTE_VER} git://github.com/lnls-dig/malamute.git &&
( cd malamute; ./autogen.sh && ./configure "${CONFIG_OPTS[@]}" &&
make check && make install ) || exit 1
./compile.sh -b $BOARD -a "${APP}" -e $EXAMPLES -l $SYSTEM_INTEGRATION -x "${BPM_OPTS[*]}"