Skip to content

Commit

Permalink
Post 3.2.2.5 - Further improvements to build-hamlib.sh to tosss gcc r…
Browse files Browse the repository at this point in the history
…untimes into destination
  • Loading branch information
hamlibdk committed Sep 17, 2022
1 parent 9522e24 commit fba135c
Showing 1 changed file with 28 additions and 27 deletions.
55 changes: 28 additions & 27 deletions tools/msys64/usr/local/bin/build-hamlib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
################################################################################
#
# Title ........: build-hamlib.sh
# Version ......: 3.2.2.5
# Version ......: 3.2.2.5.1
# Description ..: Build Hamlib from GIT-distributed Hamlib Integration Branches
# Base Project .: https://github.com/KI7MT/jtsdk64-tools-scripts.git
# Project URL ..: https://sourceforge.net/projects/hamlib-sdk/files/Windows/JTSDK-3.2-Stream
Expand Down Expand Up @@ -391,13 +391,8 @@ function Run-Config () {
echo -e " --> Build Type: "${C_G}$STSHMSG${C_NC}' built '${C_G}$LIBUSBMSG${C_NC}${C_NC}' LibUSB'${C_NC}
echo ''

# echo "CPPFLAGS: ${libusb_dir_f}/include"
# echo "ORIGINAL: ${libusb_dir_f}/MinGW64/dll"
# echo "NEW.....: ${libusb_dir_f}${libusb_dll}"
# read -p "Press ENTER to continue"

# New options to match that in (hamlib-src)/scripts/build-w64.sh - creates cleaner configuration results
# Implemented Steve VK3SIR 9-9-2021
# Implemented Steve VK3SIR 9-9-2021 [ Pruned 16-09-2022 ]
# Setup so maybe can fully implement -shared / -static command line options

# ../src/configure --host=${HOST_ARCH} \
Expand All @@ -409,9 +404,6 @@ function Run-Config () {
$LIBUSBVAR \
CPPFLAGS="-I${libusb_dir_f}/include" \
LDFLAGS="-L${libusb_dir_f}${libusb_dll}"
#LDFLAGS="-L${libusb_dir_f}/MinGW64/dll"
# CPPFLAGS="-I${libusb_dir_f}/include -I/usr/include" \
# LDFLAGS="-L${libusb_dir_f}/MinGW64/dll -L/usr/lib"
else
echo '* Option -nc set to disable executing configure script'
fi
Expand Down Expand Up @@ -543,20 +535,32 @@ function Copy-DLLs {
# These lines may need ongoing manual maintenance as Hamlib and MSYS2 Evolves
# A better technique to identify Support DLL's needed by Hamlib is needed.

if [ -f "$GCCPATH/libwinpthread-1.dll" ];
then
echo " --> $GCCPATH/libwinpthread-1.dll"
cp -u "$GCCPATH/libwinpthread-1.dll" "$PREFIX/bin"
fi
if [ -f "$GCCPATH/libtermcap-0.dll" ];
then
echo " --> $GCCPATH/libtermcap-0.dll"
cp -u "$GCCPATH/libtermcap-0.dll" "$PREFIX/bin"
fi
if [ -f "$GCCPATH/libreadline8.dll" ];
if [ $STATICBUILD = "No" ];
then
echo " --> $GCCPATH/libreadline8.dll"
cp -u "$GCCPATH/libreadline8.dll" "$PREFIX/bin"
if [ $SHAREDBUILD = "Yes" ];
then
files=(${GCCPATH}/libgcc_**)
if [ -e "${files[0]}" ];
then
echo " --> $GCCPATH/libgcc_*.dll"
cp -u ${GCCPATH}/libgcc_*.dll ${PREFIX}/bin
fi
if [ -f "$GCCPATH/libwinpthread-1.dll" ];
then
echo " --> $GCCPATH/libwinpthread-1.dll"
cp -u "$GCCPATH/libwinpthread-1.dll" "$PREFIX/bin"
fi
if [ -f "$GCCPATH/libtermcap-0.dll" ];
then
echo " --> $GCCPATH/libtermcap-0.dll"
cp -u "$GCCPATH/libtermcap-0.dll" "$PREFIX/bin"
fi
if [ -f "$GCCPATH/libreadline8.dll" ];
then
echo " --> $GCCPATH/libreadline8.dll"
cp -u "$GCCPATH/libreadline8.dll" "$PREFIX/bin"
fi
fi
fi

# -- Special Cleanup for Dynamic Builds ---------------------------------------
Expand All @@ -583,12 +587,9 @@ function Copy-DLLs {
fi
fi

# -- Special Cleanup for Static Builds -----------------------------------
# -- Special Cleanup for Static Builds -----------------------------------
# Note: This may NOT be required in the future when configure option --disable-dynamic works

# echo "PREFIX: $PREFIX"
# read -p "Press any key to resume ..."

if [ $SHAREDBUILD = "No" ];
then
if [ $STATICBUILD = "Yes" ];
Expand Down

0 comments on commit fba135c

Please sign in to comment.