Skip to content

Commit

Permalink
Merge pull request #200 from drowe67/ms-script-paths
Browse files Browse the repository at this point in the history
Use more portable way of referring to bash
  • Loading branch information
tmiw committed Dec 29, 2021
2 parents 737418b + 6b3ecfc commit d9473a7
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 41 deletions.
10 changes: 7 additions & 3 deletions build_linux.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/bash
#!/usr/bin/env bash
# build_ubuntu.sh
#
# Build script for Ubuntu and Fedora Linux, git pulls codec2 and
Expand All @@ -16,13 +16,17 @@ CODEC2_BRANCH=master

# First build and install vanilla codec2 as we need -lcodec2 to build LPCNet
cd $FREEDVGUIDIR
git clone https://github.com/drowe67/codec2.git
if [ ! -d codec2 ]; then
git clone https://github.com/drowe67/codec2.git
fi
cd codec2 && git checkout $CODEC2_BRANCH && git pull
mkdir -p build_linux && cd build_linux && rm -Rf * && cmake .. && make

# OK, build and test LPCNet
cd $FREEDVGUIDIR
git clone https://github.com/drowe67/LPCNet.git
if [ ! -d LPCNet ]; then
git clone https://github.com/drowe67/LPCNet.git
fi
cd $LPCNETDIR && git checkout master && git pull
mkdir -p build_linux && cd build_linux && rm -Rf *
cmake -DCODEC2_BUILD_DIR=$CODEC2DIR/build_linux ..
Expand Down
19 changes: 14 additions & 5 deletions build_osx.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# build_ubuntu.sh
#
# Build script for OSX using MacPorts, git pulls codec2 and
Expand All @@ -10,13 +10,17 @@ export LPCNETDIR=$FREEDVGUIDIR/LPCNet
export HAMLIBDIR=$FREEDVGUIDIR/hamlib

# Prerequisite: build dylibbundler
git clone https://github.com/tmiw/macdylibbundler.git
if [ ! -d macdylibbundler ]; then
git clone https://github.com/tmiw/macdylibbundler.git
fi
cd macdylibbundler && git checkout main && git pull
make -j4

# Prerequisite: build hamlib
cd $FREEDVGUIDIR
git clone https://github.com/Hamlib/Hamlib.git hamlib-code
if [ ! -d hamlib-code ]; then
git clone https://github.com/Hamlib/Hamlib.git hamlib-code
fi
cd hamlib-code && git checkout master && git pull
./bootstrap
CFLAGS="-g -O2 -mmacosx-version-min=10.9 -arch x86_64 -arch arm64" CXXFLAGS="-g -O2 -mmacosx-version-min=10.9 -arch x86_64 -arch arm64" ./configure --disable-shared --prefix $HAMLIBDIR
Expand All @@ -25,17 +29,22 @@ make install

# First build and install vanilla codec2 as we need -lcodec2 to build LPCNet
cd $FREEDVGUIDIR
git clone https://github.com/drowe67/codec2.git
if [ ! -d codec2 ]; then
git clone https://github.com/drowe67/codec2.git
fi
cd codec2 && git checkout ms-reliable-text && git pull
mkdir -p build_osx && cd build_osx && rm -Rf * && cmake -DBUILD_OSX_UNIVERSAL=1 .. && make -j4

# OK, build and test LPCNet
cd $FREEDVGUIDIR
git clone https://github.com/drowe67/LPCNet.git
if [ ! -d LPCNet ]; then
git clone https://github.com/drowe67/LPCNet.git
fi
cd $LPCNETDIR && git checkout master && git pull
mkdir -p build_osx && cd build_osx && rm -Rf *
cmake -DCODEC2_BUILD_DIR=$CODEC2DIR/build_osx -DBUILD_OSX_UNIVERSAL=1 ..
make -j4

# sanity check test
cd src && sox ../../wav/wia.wav -t raw -r 16000 - | ./lpcnet_enc -s | ./lpcnet_dec -s > /dev/null

Expand Down
2 changes: 1 addition & 1 deletion build_windows.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# build_windows.sh
#
# Script that cross compiles freedv-gui for Windows on Fedora
Expand Down
2 changes: 1 addition & 1 deletion build_windows_old.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# build_windows_old.sh
#
# Script that cross compiles freedv-gui for Windows on Fedora
Expand Down
2 changes: 1 addition & 1 deletion configure_speexdsp_osx.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/bash
#!/usr/bin/env bash

CFLAGS="-g -O2 -mmacosx-version-min=10.9" ./configure --prefix=$1 --disable-examples
2 changes: 1 addition & 1 deletion configure_speexdsp_osx_universal.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/bash
#!/usr/bin/env bash

CFLAGS="-g -O2 -arch arm64 -arch x86_64 -mmacosx-version-min=10.9" ./configure --prefix=$1 --disable-examples
29 changes: 0 additions & 29 deletions script/spot.sh

This file was deleted.

0 comments on commit d9473a7

Please sign in to comment.