forked from alexh-name/bsec_bme680_linux
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmake.sh
More file actions
36 lines (28 loc) · 760 Bytes
/
make.sh
File metadata and controls
36 lines (28 loc) · 760 Bytes
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
#!/bin/sh
set -eu
. ./make.config
if [ ! -d "${BSEC_DIR}" ]; then
echo 'BSEC directory missing.'
exit 1
fi
if [ ! -d "${CONFIG_DIR}" ]; then
mkdir "${CONFIG_DIR}"
fi
STATEFILE="${CONFIG_DIR}/bsec_iaq.state"
if [ ! -f "${STATEFILE}" ]; then
touch "${STATEFILE}"
fi
echo 'Compiling...'
cc -Wall -Wno-unused-but-set-variable -Wno-unused-variable -static \
-iquote"${BSEC_DIR}"/API \
-iquote"${BSEC_DIR}"/algo/bin/${ARCH} \
-iquote"${BSEC_DIR}"/examples \
"${BSEC_DIR}"/API/bme680.c \
"${BSEC_DIR}"/examples/bsec_integration.c \
./bsec_bme680.c \
-L"${BSEC_DIR}"/algo/bin/"${ARCH}" -lalgobsec \
-lm -lrt \
-o bsec_bme680
echo 'Compiled.'
cp "${BSEC_DIR}"/config/"${CONFIG}"/bsec_iaq.config "${CONFIG_DIR}"/
echo 'Copied config.'