summaryrefslogtreecommitdiffstats
path: root/Modules/makesetup
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2001-01-10 21:12:18 (GMT)
committerGuido van Rossum <guido@python.org>2001-01-10 21:12:18 (GMT)
commitb961920ff4dca0e716ba767aee8e74b6b0abe515 (patch)
treedc90691904acd2b7a6f1096dc2aa447ef2d44d2e /Modules/makesetup
parentaef734b182850a11ac15c128768826710d7e993e (diff)
downloadcpython-b961920ff4dca0e716ba767aee8e74b6b0abe515.zip
cpython-b961920ff4dca0e716ba767aee8e74b6b0abe515.tar.gz
cpython-b961920ff4dca0e716ba767aee8e74b6b0abe515.tar.bz2
Final part of SF patch #102409 by jlt63: Cygwin Python DLL and Shared
Extension Patch. These are the changes to the Modules Makefile and makesetup script for Cygwin.
Diffstat (limited to 'Modules/makesetup')
-rwxr-xr-xModules/makesetup15
1 files changed, 14 insertions, 1 deletions
diff --git a/Modules/makesetup b/Modules/makesetup
index 528f118..125a51e 100755
--- a/Modules/makesetup
+++ b/Modules/makesetup
@@ -79,6 +79,18 @@ esac
NL='\
'
+# Setup to link with extra libraries when makeing shared extensions.
+# Currently, only Cygwin needs this baggage.
+case `uname -s` in
+CYGWIN*) if test $srcdir = .
+ then
+ ExtraLibDir=..
+ else
+ ExtraLibDir='$(LIBPL)'
+ fi
+ ExtraLibs="-L$ExtraLibDir -lpython\$(VERSION)";;
+esac
+
# Main loop
for i in ${*-Setup}
do
@@ -149,6 +161,7 @@ sed -e 's/[ ]*#.*//' -e '/^[ ]*$/d' |
*.so) libs="$libs $arg";;
*.sl) libs="$libs $arg";;
/*.o) libs="$libs $arg";;
+ *.def) libs="$libs $arg";;
*.o) srcs="$srcs `basename $arg .o`.c";;
*.[cC]) srcs="$srcs $arg";;
*.cc) srcs="$srcs $arg";;
@@ -213,7 +226,7 @@ sed -e 's/[ ]*#.*//' -e '/^[ ]*$/d' |
no) SHAREDMODS="$SHAREDMODS $file";;
esac
rule="$file: $objs"
- rule="$rule; \$(LDSHARED) $objs $libs -o $file"
+ rule="$rule; \$(LDSHARED) $objs $libs $ExtraLibs -o $file"
echo "$rule" >>$rulesf
done
done