File: make-gnu-dll.sh

package info (click to toggle)
soundtouch 2.2%2Bds1-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 800 kB
  • sloc: cpp: 5,189; pascal: 408; makefile: 68; ansic: 65; sh: 43
file content (22 lines) | stat: -rwxr-xr-x 597 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/bash
#
# 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 "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