File: make-gnu-dll.sh

package info (click to toggle)
soundtouch 2.3.2%2Bds1-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 920 kB
  • sloc: cpp: 5,233; pascal: 453; makefile: 87; ansic: 64; sh: 50
file content (29 lines) | stat: -rwxr-xr-x 986 bytes parent folder | download | duplicates (2)
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
#!/bin/bash
#
# This script is deprecated. Don't use this, the makefile can now compile
# the dynamic-link library 'libSoundTouchDLL.so' automatically.
#
# This script compiles SoundTouch dynamic-link library for GNU environment
# with wrapper functions that are easier to import to Java / Mono / etc
#

arch=$(uname -m)
flags=""

if [[ $arch == *"86"* ]]; then
    # Intel x86/x64 architecture
    flags="$flags -mstackrealign -msse"

    if [[ $arch == *"_64" ]]; then
        flags="$flags -fPIC"
    fi
fi

echo "*************************************************************************"
echo "NOTE: Rather use the makefile that can now build the dynamic-link library"
echo "*************************************************************************"
echo ""
echo "Building SoundTouchDLL for $arch with flags:$flags"

g++ -O3 -ffast-math -shared $flags -DDLL_EXPORTS -fvisibility=hidden -I../../include \
    -I../SoundTouch -o SoundTouchDll.so SoundTouchDLL.cpp ../SoundTouch/*.cpp