Skip to content

Commit 68d25fb

Browse files
committed
Linux build script: require only sh, not bash
1 parent 63cc4b4 commit 68d25fb

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

standalone_compilation_linux.sh

100644100755
Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,22 @@
1-
#!/bin/bash
1+
#!/bin/sh
22

33
# This script builds the liblsl.so for linux machines without bigger quirks
44
# and no recent CMake version, i.e. ARM boards and PCs with old distributions.
55
# For development, install a recent CMake version, either via pip
66
# (pip install cmake) or as binary download from cmake.org
77

88
set -x
9-
LSLGITREVISION="`git describe --tags HEAD`"
9+
# Try to read LSLGITREVISION from git if the variable isn't set
10+
echo ${LSLGITREVISION:="$(git describe --tags HEAD)"}
1011
${CXX:-g++} -fPIC -fvisibility=hidden -O2 ${CFLAGS} -Ilslboost \
11-
-DBOOST_ALL_NO_LIB -DBOOST_ASIO_SEPARATE_COMPILATION -D BOOST_THREAD_BUILD_DLL \
12+
-DBOOST_ALL_NO_LIB \
1213
-DLSL_LIBRARY_INFO_STR=\"${LSLGITREVISION:-"built from standalone build script"}\" \
1314
src/*.cpp src/pugixml/pugixml.cpp \
14-
lslboost/asio_objects.cpp \
1515
lslboost/libs/atomic/src/lockpool.cpp \
1616
lslboost/libs/chrono/src/chrono.cpp \
1717
lslboost/libs/serialization/src/*.cpp \
18-
lslboost/libs/thread/src/pthread/{once,thread}.cpp \
19-
-shared -o liblsl.so -lpthread
18+
lslboost/libs/thread/src/pthread/once.cpp \
19+
lslboost/libs/thread/src/pthread/thread.cpp \
20+
-shared -o liblsl.so -lpthread -lrt
2021
${CC:-gcc} -O2 ${FLAGS} -Iinclude testing/lslver.c -o lslver -L. -llsl
2122
LD_LIBRARY_PATH=. ./lslver

0 commit comments

Comments
 (0)