@@ -278,6 +278,8 @@ LIBRARY_DEPS= @LIBRARY_DEPS@
278278LINK_PYTHON_DEPS=@LINK_PYTHON_DEPS@
279279PY_ENABLE_SHARED= @PY_ENABLE_SHARED@
280280STATIC_LIBPYTHON= @STATIC_LIBPYTHON@
281+ ABI3DLLLIBRARY= libpython3.dll
282+ ABI3LDLIBRARY= libpython3.dll.a
281283
282284
283285LIBS= @LIBS@
@@ -600,7 +602,7 @@ LIBEXPAT_HEADERS= \
600602# Default target
601603all: @DEF_MAKE_ALL_RULE@
602604build_all: check-clean-src $(BUILDPYTHON) $(BUILDPYTHONW) $(BUILDVENVLAUNCHER) $(BUILDVENVWLAUNCHER) platform oldsharedmods sharedmods \
603- gdbhooks Programs/_testembed python-config
605+ gdbhooks Programs/_testembed python-config $(ABI3DLLLIBRARY) $(ABI3LDLIBRARY)
604606build_wasm: check-clean-src $(BUILDPYTHON) platform oldsharedmods python-config
605607
606608# Check that the source is clean when building out of source.
@@ -724,6 +726,9 @@ pythonw_exe.o: $(srcdir)/PC/pythonw_exe.rc
724726python_nt.o: $(srcdir)/PC/python_nt.rc
725727 $(WINDRES) $(RCFLAGS) -DORIGINAL_FILENAME=\\\"$(DLLLIBRARY)\\\" -I$(srcdir)/Include -I$(srcdir)/PC -I. $(srcdir)/PC/python_nt.rc $@
726728
729+ python3dll_nt.o: $(srcdir)/PC/python_nt.rc
730+ $(WINDRES) $(RCFLAGS) -DORIGINAL_FILENAME=\\\"$(ABI3DLLLIBRARY)\\\" -I$(srcdir)/Include -I$(srcdir)/PC -I. $(srcdir)/PC/python_nt.rc $@
731+
727732venvlauncher.o: $(srcdir)/PC/pylauncher.rc
728733 $(WINDRES) $(RCFLAGS) -DPY_ICON -I$(srcdir)/Include -I$(srcdir)/PC -I. $(srcdir)/PC/pylauncher.rc $@
729734
@@ -852,6 +857,10 @@ $(DLLLIBRARY) libpython$(LDVERSION).dll.a: $(LIBRARY_OBJS) python_nt.o
852857 else true; \
853858 fi
854859
860+ $(ABI3DLLLIBRARY) $(ABI3LDLIBRARY): python3dll_nt.o $(srcdir)/PC/launcher.c
861+ $(LDSHARED) -DPYTHON_DLL_NAME=\"$(DLLLIBRARY)\" $(srcdir)/PC/python3dll.c -Wl,--out-implib=$(ABI3LDLIBRARY) -o $(ABI3DLLLIBRARY) python3dll_nt.o \
862+ $(LDFLAGS_NODIST);
863+
855864# wasm32-emscripten browser build
856865# wasm assets directory is relative to current build dir, e.g. "./usr/local".
857866# --preload-file turns a relative asset path into an absolute path.
@@ -1863,6 +1872,7 @@ altbininstall: $(BUILDPYTHON) @FRAMEWORKPYTHONW@
18631872 if test -f $(LDLIBRARY) && test "$(PYTHONFRAMEWORKDIR)" = "no-framework" ; then \
18641873 if test -n "$(DLLLIBRARY)" ; then \
18651874 $(INSTALL_SHARED) $(DLLLIBRARY) $(DESTDIR)$(BINDIR); \
1875+ $(INSTALL_SHARED) $(ABI3DLLLIBRARY) $(DESTDIR)$(BINDIR); \
18661876 else \
18671877 $(INSTALL_SHARED) $(LDLIBRARY) $(DESTDIR)$(LIBDIR)/$(INSTSONAME); \
18681878 if test $(LDLIBRARY) != $(INSTSONAME); then \
@@ -2275,6 +2285,7 @@ libainstall: all python-config
22752285 if test "$(PYTHONFRAMEWORKDIR)" = no-framework; then \
22762286 if test "$(SHLIB_SUFFIX)" = .dll -o "$(SHLIB_SUFFIX)" = .pyd; then \
22772287 $(INSTALL_DATA) $(LDLIBRARY) $(DESTDIR)$(LIBDIR) ; \
2288+ $(INSTALL_DATA) $(ABI3LDLIBRARY) $(DESTDIR)$(LIBDIR) ; \
22782289 else \
22792290 $(INSTALL_DATA) $(LIBRARY) $(DESTDIR)$(LIBPL)/$(LIBRARY) ; \
22802291 fi; \
@@ -2521,7 +2532,7 @@ clean: clean-retain-profile
25212532 fi
25222533
25232534clobber: clean
2524- -rm -f $(BUILDPYTHON) $(LIBRARY) $(LDLIBRARY) $(DLLLIBRARY) \
2535+ -rm -f $(BUILDPYTHON) $(LIBRARY) $(LDLIBRARY) $(DLLLIBRARY)$(ABI3LDLIBRARY) $(ABI3DLLLIBRARY) \
25252536 tags TAGS \
25262537 config.cache config.log pyconfig.h Modules/config.c
25272538 -rm -rf build platform
0 commit comments