summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rwxr-xr-xbin/mklib16
1 files changed, 10 insertions, 6 deletions
diff --git a/bin/mklib b/bin/mklib
index bc554c1563..2f9223ff3c 100755
--- a/bin/mklib
+++ b/bin/mklib
@@ -930,6 +930,16 @@ case $ARCH in
CYGWIN*)
# GCC-based environment
+
+ if [ "x$LINK" = "x" ] ; then
+ # -linker was not specified so set default link command now
+ if [ $CPLUSPLUS = 1 ] ; then
+ LINK=g++
+ else
+ LINK=gcc
+ fi
+ fi
+
if [ $NOPREFIX = 1 ] ; then
# No "lib" or ".so" part
echo "mklib: Making CYGWIN shared library: " ${LIBNAME}
@@ -966,12 +976,6 @@ case $ARCH in
fi
echo "mklib: Making CYGWIN shared library: " ${CYGNAME}-${MAJOR}.dll
- if [ $CPLUSPLUS = 1 ] ; then
- LINK="g++"
- else
- LINK="gcc"
- fi
-
# rm any old libs
rm -f ${CYGNAME}-${MAJOR}.dll
rm -f ${LIBNAME}-${MAJOR}.dll.a