forked from sccn/liblsl
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstandalone_compilation_linux.sh
More file actions
executable file
·25 lines (23 loc) · 1.05 KB
/
standalone_compilation_linux.sh
File metadata and controls
executable file
·25 lines (23 loc) · 1.05 KB
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
#!/bin/sh
# This script builds the liblsl.so for linux machines without bigger quirks
# and no recent CMake version, i.e. ARM boards and PCs with old distributions.
# For development, install a recent CMake version, either via pip
# (pip install cmake) or as binary download from cmake.org
set -e -x
# Try to read LSLGITREVISION from git if the variable isn't set
echo ${LSLGITREVISION:="$(git describe --tags HEAD)"}
${CXX:-g++} -fPIC -fvisibility=hidden -O2 ${CFLAGS} -Ilslboost \
-DBOOST_ALL_NO_LIB \
-DBOOST_THREAD_DONT_PROVIDE_INTERRUPTIONS \
-DBOOST_ASIO_STANDALONE \
-DLOGURU_DEBUG_LOGGING=0 \
-DLSL_LIBRARY_INFO_STR=\"${LSLGITREVISION:-"built from standalone build script"}\" \
src/*.cpp src/pugixml/pugixml.cpp src/loguru/loguru.cpp \
lslboost/libs/chrono/src/chrono.cpp \
lslboost/serialization_objects.cpp \
lslboost/libs/thread/src/pthread/once.cpp \
lslboost/libs/thread/src/pthread/thread.cpp \
${LDFLAGS} \
-shared -o liblsl.so -lpthread -lrt -ldl
${CC:-gcc} -O2 ${CFLAGS} -Iinclude testing/lslver.c -o lslver -L. -llsl
LD_LIBRARY_PATH=. ./lslver