Created
July 1, 2024 21:10
-
-
Save sultanqasim/70f8f54e0e272efc5958d1e96ea68268 to your computer and use it in GitHub Desktop.
RFNM build script for Mac with SigDigger
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
set -eux | |
BREW_PREFIX="$(brew --prefix)" | |
CPU_COUNT="$(sysctl -n hw.ncpu)" | |
# get the code | |
if [ ! -e soapy-rfnm ]; then | |
git clone https://github.com/rfnm/soapy-rfnm.git | |
fi | |
# prepare the deploy path | |
DEPLOYROOT="$(pwd)/deploy-root" | |
#rm -rf "$DEPLOYROOT" | |
mkdir -p "$DEPLOYROOT" | |
export PKG_CONFIG_PATH="$DEPLOYROOT/usr/lib/pkgconfig" | |
DEBUG=0 | |
if [ "$DEBUG" == "1" ]; then | |
CMAKE_BUILD_TYPE="Debug" | |
else | |
CMAKE_BUILD_TYPE="RelWithDebInfo" #"Release" | |
fi | |
( | |
cd soapy-rfnm | |
rm -rf build | |
mkdir -p build | |
cd build | |
cmake .. -DCMAKE_INSTALL_PREFIX="$DEPLOYROOT/usr" -DCMAKE_PREFIX_PATH="$DEPLOYROOT/usr" -DCMAKE_BUILD_TYPE="$CMAKE_BUILD_TYPE" | |
make -j${CPU_COUNT} | |
make install | |
mv "$DEPLOYROOT/usr/lib/SoapySDR/modules0.8/libsoapy-rfnm.dylib" "$DEPLOYROOT/usr/lib/SoapySDR/modules0.8/libsoapy-rfnm.so" | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment