2021-02-26 11:03:09 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
set -eu
|
2021-10-12 16:27:19 +01:00
|
|
|
|
2021-02-26 11:03:09 +00:00
|
|
|
if [ ! -d /Applications ]; then
|
2021-10-12 16:27:19 +01:00
|
|
|
# Assumed to be Linux
|
|
|
|
|
|
|
|
|
|
echo " *** Building static library using Linux-specific Makefile"
|
|
|
|
|
# make -f otherbuilds/Makefile.linux clean
|
2021-02-26 11:03:09 +00:00
|
|
|
make -f otherbuilds/Makefile.linux
|
2021-10-12 16:27:19 +01:00
|
|
|
|
|
|
|
|
echo " *** Linking against static library"
|
2021-02-26 11:43:21 +00:00
|
|
|
g++ main/main.cpp lib/librubberband.a -I. -Isrc -o test -lsndfile -lsamplerate -lpthread
|
2021-10-12 16:27:19 +01:00
|
|
|
|
|
|
|
|
echo " *** Running build from Linux-specific Makefile"
|
2021-02-26 11:03:09 +00:00
|
|
|
./test -V
|
2021-10-12 16:27:19 +01:00
|
|
|
|
|
|
|
|
echo " *** Building with single-file source"
|
2021-10-04 12:24:59 +01:00
|
|
|
g++ main/main.cpp single/RubberBandSingle.cpp -o test_single -lsndfile
|
2021-10-12 16:27:19 +01:00
|
|
|
|
|
|
|
|
echo " *** Running build from single-file source"
|
2021-10-04 12:24:59 +01:00
|
|
|
./test_single -V
|
2021-10-12 16:27:19 +01:00
|
|
|
|
|
|
|
|
echo " *** OK"
|
|
|
|
|
|
2021-02-26 11:03:09 +00:00
|
|
|
else
|
2021-10-12 16:27:19 +01:00
|
|
|
|
|
|
|
|
echo " *** Building static library using macOS-specific Makefile"
|
|
|
|
|
make -f otherbuilds/Makefile.macos clean
|
2021-02-26 11:03:09 +00:00
|
|
|
make -f otherbuilds/Makefile.macos
|
2021-10-12 16:27:19 +01:00
|
|
|
|
|
|
|
|
echo " *** Linking against static library"
|
2021-02-26 11:43:21 +00:00
|
|
|
c++ main/main.cpp lib/librubberband.a -I. -Isrc -o test -lsndfile -lsamplerate -framework Accelerate
|
2021-10-12 16:27:19 +01:00
|
|
|
|
|
|
|
|
echo " *** Running build from macOS-specific Makefile"
|
2021-02-26 11:03:09 +00:00
|
|
|
./test -V
|
2021-10-12 16:27:19 +01:00
|
|
|
|
|
|
|
|
echo " *** Building with single-file source"
|
|
|
|
|
c++ main/main.cpp single/RubberBandSingle.cpp -o test_single -lsndfile -framework Accelerate
|
|
|
|
|
|
|
|
|
|
echo " *** Running build from single-file source"
|
2021-10-04 13:10:59 +01:00
|
|
|
./test_single -V
|
2021-10-12 16:27:19 +01:00
|
|
|
|
|
|
|
|
echo " *** Building static library using iOS-specific Makefile"
|
|
|
|
|
make -f otherbuilds/Makefile.ios clean
|
2021-02-26 11:03:09 +00:00
|
|
|
make -f otherbuilds/Makefile.ios
|
2021-10-12 16:27:19 +01:00
|
|
|
|
2021-02-26 11:03:09 +00:00
|
|
|
fi
|