mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
correct static lib extension on *nix
This commit is contained in:
parent
46cc81b482
commit
120af8f889
|
@ -16,11 +16,13 @@ fi
|
||||||
|
|
||||||
WINDOWS_VERSION=$(cmd.exe /c ver 2>/dev/null | grep "Microsoft Windows")
|
WINDOWS_VERSION=$(cmd.exe /c ver 2>/dev/null | grep "Microsoft Windows")
|
||||||
if [ ! -z "$WINDOWS_VERSION" ]; then
|
if [ ! -z "$WINDOWS_VERSION" ]; then
|
||||||
EXT=dll
|
EXT="dll"
|
||||||
BIN_DIR="$2/bin/"
|
BIN_DIR="$2/bin/"
|
||||||
|
STATIC_EXT="$EXT.a"
|
||||||
else
|
else
|
||||||
BIN_DIR=$LIB_DIR
|
BIN_DIR=$LIB_DIR
|
||||||
EXT=so
|
EXT="so"
|
||||||
|
STATIC_EXT="a"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Cloning filter_audio from GitHub.com"
|
echo "Cloning filter_audio from GitHub.com"
|
||||||
|
@ -31,7 +33,7 @@ cd $SOURCE_DIR
|
||||||
gcc -c -fPIC filter_audio.c aec/*.c agc/*.c ns/*.c other/*.c -lm -lpthread
|
gcc -c -fPIC filter_audio.c aec/*.c agc/*.c ns/*.c other/*.c -lm -lpthread
|
||||||
|
|
||||||
echo "Creating shared object file"
|
echo "Creating shared object file"
|
||||||
gcc *.o -shared -o libfilteraudio.$EXT -Wl,--out-implib,libfilteraudio.$EXT.a
|
gcc *.o -shared -o libfilteraudio.$EXT -Wl,--out-implib,libfilteraudio.$STATIC_EXT
|
||||||
|
|
||||||
echo "Cleaning up"
|
echo "Cleaning up"
|
||||||
rm *.o
|
rm *.o
|
||||||
|
@ -41,9 +43,9 @@ muhcmd="cp libfilteraudio.$EXT $BIN_DIR"
|
||||||
echo "Installing libfilteraudio.so with $muhcmd"
|
echo "Installing libfilteraudio.so with $muhcmd"
|
||||||
$muhcmd
|
$muhcmd
|
||||||
|
|
||||||
muhcmd="cp libfilteraudio.$EXT.a $LIB_DIR"
|
muhcmd="cp libfilteraudio.$STATIC_EXT $LIB_DIR"
|
||||||
[ -z "$2" ] && muhcmd="sudo $muhcmd"
|
[ -z "$2" ] && muhcmd="sudo $muhcmd"
|
||||||
echo "Installing libfilteraudio.$EXT.a with $muhcmd"
|
echo "Installing libfilteraudio.$STATIC_EXT with $muhcmd"
|
||||||
$muhcmd
|
$muhcmd
|
||||||
|
|
||||||
muhcmd="cp *.h $INCLUDE_DIR"
|
muhcmd="cp *.h $INCLUDE_DIR"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user