-
Notifications
You must be signed in to change notification settings - Fork 29
/
install.sh
executable file
·43 lines (35 loc) · 1.16 KB
/
install.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
41
42
43
#!/usr/bin/env bash
#default installation directories
INSTALL_DIR_LINUX="/usr/local/lib/lv2"
INSTALL_DIR_MAC="/Library/Audio/Plug-Ins/LV2"
# Detect the platform (similar to $OSTYPE)
OS="`uname`"
case $OS in
'Linux') OS='Linux' && echo "You are on a Linux system. Building for Linux";;
'Darwin') OS='Mac' && echo "You are on a Mac system. Building for MacOS";;
*) ;;
esac
#build rrnoise statically
cd rnnoise
./autogen.sh
mv ../ltmain.sh ./ && ./autogen.sh #This is weird but otherwise it won't work (Related to bug #24 in rnnoise)
if [ $OS = "Mac" ]; then
CFLAGS="-fvisibility=hidden -fPIC " \
./configure --disable-examples --disable-doc --disable-shared --enable-static
elif [ $OS = "Linux" ]; then
CFLAGS="-fvisibility=hidden -fPIC -Wl,--exclude-libs,ALL" \
./configure --disable-examples --disable-doc --disable-shared --enable-static
fi
make
cd ..
#remove previous builds
rm -rf build || true
#build the plugin in the new directory
if [ $OS = "Linux" ]; then
meson build --buildtype release --prefix $INSTALL_DIR_LINUX
elif [ $OS = "Mac" ]; then
meson build --buildtype release --prefix $INSTALL_DIR_MAC
fi
cd build
ninja -v
ninja install