summaryrefslogtreecommitdiffstats
path: root/Modules/Makefile.pre.in
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/Makefile.pre.in
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/Makefile.pre.in')
-rw-r--r--Modules/Makefile.pre.in9
1 files changed, 9 insertions, 0 deletions
diff --git a/Modules/Makefile.pre.in b/Modules/Makefile.pre.in
index 82a4e16..9487980 100644
--- a/Modules/Makefile.pre.in
+++ b/Modules/Makefile.pre.in
@@ -105,6 +105,7 @@ SYSLIBS= $(LIBM) $(LIBC)
LIBRARY= ../libpython$(VERSION).a
LDLIBRARY= ../@LDLIBRARY@
+@SET_DLLLIBRARY@
# === Rules ===
@@ -127,6 +128,14 @@ link: $(MAINOBJ)
$(LDLIBRARY) $(MODLIBS) $(LIBS) $(SYSLIBS) -o python$(EXE) $(LDLAST)
mv python$(EXE) ../python$(EXE)
+# This rule builds the Cygwin Python DLL
+$(DLLLIBRARY): $(LIBRARY)
+ test -d cygwin || mkdir cygwin
+ (cd cygwin; ar x ../$^)
+ dlltool --export-all --output-def $(basename $@).def cygwin/*.o
+ $(LDSHARED) -Wl,--out-implib=$(LDLIBRARY) -o $@ $(basename $@).def cygwin/*.o $(MODLIBS) $(LIBS) $(SYSLIBS)
+ rm -fr cygwin
+
clean:
-rm -f *.o python$(EXE) core *~ [@,#]* *.old *.orig *.rej
-rm -f add2lib hassignal