forked from libmoon/libmoon
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.sh
More file actions
executable file
·42 lines (34 loc) · 801 Bytes
/
build.sh
File metadata and controls
executable file
·42 lines (34 loc) · 801 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
36
37
38
39
40
41
#!/bin/bash
# TODO: this should probably be a makefile
(
cd $(dirname "${BASH_SOURCE[0]}")
git submodule update --init --recursive
NUM_CPUS=$(cat /proc/cpuinfo | grep "processor\\s: " | wc -l)
(
cd deps/luajit
make -j $NUM_CPUS BUILDMODE=static 'CFLAGS=-DLUAJIT_NUMMODE=2 -DLUAJIT_ENABLE_LUA52COMPAT'
make install DESTDIR=$(pwd)
)
(
cd deps/dpdk
make -j $NUM_CPUS install T=x86_64-native-linuxapp-gcc
)
(
cd lua/lib/turbo
make 2> /dev/null
if [[ $? > 0 ]]
then
echo "Could not compile Turbo with TLS support, disabling TLS"
echo "Install libssl-dev and OpenSSL to enable TLS support"
make SSL=none
fi
)
(
cd build
cmake ..
make -j $NUM_CPUS
)
echo Trying to bind interfaces, this will fail if you are not root
echo Try "sudo ./bind-interfaces.sh" if this step fails
./bind-interfaces.sh
)