-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.sh
executable file
·40 lines (31 loc) · 956 Bytes
/
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
#!/bin/bash
THREADS=1
# Check for core numbers.
if [ -n "$1" ]; then
if [ "$1" -eq 0 ]; then
THREADS=$(nproc)
elif [ "$1" -gt 0 ]; then
THREADS=$1
fi
fi
echo "Building Packet Batch (Standard) using $THREADS threads..."
# First, we want to build our common objects which includes LibYAML. Read the PB-Common directory for more information.
echo "Building Common Repository..."
echo "Building LibYAML..."
sudo make -j $THREADS -C modules/common libyaml
echo "Done..."
echo "Building Common Main..."
make -j $THREADS -C modules/common
echo "Done..."
echo "Installing Common..."
sudo make -j $THREADS -C modules/common install
echo "Done..."
echo "Building Standard Version..."
# Now build our primary objects and executables.
echo "Building Main..."
make -j $THREADS
echo "Done..."
# Finally, install our binary. This must be ran by root or with sudo.
echo "Installing Main..."
sudo make -j $THREADS install
echo "Done..."