mirror of
https://github.com/azahar-emu/soundtouch
synced 2025-11-07 07:30:02 +01:00
SoundTouchDLL: adapt gcc compilation settings for x86/x64/arm platforms
This commit is contained in:
parent
20e4bf0b04
commit
30b017d112
@ -1,8 +1,22 @@
|
|||||||
#!/bin/sh
|
#!/bin/bash
|
||||||
#
|
#
|
||||||
# This script compiles SoundTouch dynamic-link library for GNU environment
|
# This script compiles SoundTouch dynamic-link library for GNU environment
|
||||||
# with wrapper functions that are easier to import to Java / Mono / etc
|
# with wrapper functions that are easier to import to Java / Mono / etc
|
||||||
#
|
#
|
||||||
|
|
||||||
g++ -fPIC -shared -DDLL_EXPORTS -fvisibility=hidden -I../../include -o SoundTouchDll.so \
|
arch=$(uname -m)
|
||||||
SoundTouchDLL.cpp ../SoundTouch/*.cpp -I../SoundTouch -O3 -msse
|
flags=""
|
||||||
|
|
||||||
|
if [[ $arch == *"86"* ]]; then
|
||||||
|
# Intel x86/x64 architecture
|
||||||
|
flags="$flags -mstackrealign -msse"
|
||||||
|
|
||||||
|
if [[ $arch == *"_64" ]]; then
|
||||||
|
flags="$flags -fPIC"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "Building SoundTouchDLL for $arch with flags:$flags"
|
||||||
|
|
||||||
|
g++ -O3 -shared $flags -DDLL_EXPORTS -fvisibility=hidden -I../../include \
|
||||||
|
-I../SoundTouch -o SoundTouchDll.so SoundTouchDLL.cpp ../SoundTouch/*.cpp
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user