@@ -288,6 +288,8 @@ LIBRARY_DEPS= @LIBRARY_DEPS@
288288LINK_PYTHON_DEPS=@LINK_PYTHON_DEPS@
289289PY_ENABLE_SHARED= @PY_ENABLE_SHARED@
290290STATIC_LIBPYTHON= @STATIC_LIBPYTHON@
291+ ABI3DLLLIBRARY= libpython3$(ABIFLAGS).dll
292+ ABI3LDLIBRARY= libpython3$(ABIFLAGS).dll.a
291293
292294
293295LIBS= @LIBS@
@@ -710,7 +712,7 @@ list-targets:
710712
711713.PHONY: build_all
712714build_all: check-clean-src check-app-store-compliance $(BUILDPYTHON) $(BUILDPYTHONW) $(BUILDVENVLAUNCHER) $(BUILDVENVWLAUNCHER) platform sharedmods \
713- gdbhooks Programs/_testembed scripts checksharedmods rundsymutil
715+ gdbhooks Programs/_testembed scripts checksharedmods rundsymutil $(ABI3DLLLIBRARY) $(ABI3LDLIBRARY)
714716
715717.PHONY: build_wasm
716718build_wasm: check-clean-src $(BUILDPYTHON) platform sharedmods \
@@ -899,6 +901,9 @@ pythonw_exe.o: $(srcdir)/PC/pythonw_exe.rc
899901python_nt.o: $(srcdir)/PC/python_nt.rc
900902 $(WINDRES) $(RCFLAGS) -DORIGINAL_FILENAME=\\\"$(DLLLIBRARY)\\\" -I$(srcdir)/Include -I$(srcdir)/PC -I. $(srcdir)/PC/python_nt.rc $@
901903
904+ python3dll_nt.o: $(srcdir)/PC/python_nt.rc
905+ $(WINDRES) $(RCFLAGS) -DORIGINAL_FILENAME=\\\"$(ABI3DLLLIBRARY)\\\" -I$(srcdir)/Include -I$(srcdir)/PC -I. $(srcdir)/PC/python_nt.rc $@
906+
902907venvlauncher.o: $(srcdir)/PC/pylauncher.rc
903908 $(WINDRES) $(RCFLAGS) -DPY_ICON -I$(srcdir)/Include -I$(srcdir)/PC -I. $(srcdir)/PC/pylauncher.rc $@
904909
@@ -1029,6 +1034,10 @@ $(DLLLIBRARY) libpython$(LDVERSION).dll.a: $(LIBRARY_OBJS) python_nt.o
10291034 else true; \
10301035 fi
10311036
1037+ $(ABI3DLLLIBRARY) $(ABI3LDLIBRARY): python3dll_nt.o $(srcdir)/PC/launcher.c
1038+ $(LDSHARED) -DPYTHON_DLL_NAME=\"$(DLLLIBRARY)\" $(srcdir)/PC/python3dll.c -Wl,--out-implib=$(ABI3LDLIBRARY) -o $(ABI3DLLLIBRARY) python3dll_nt.o \
1039+ $(LDFLAGS_NODIST);
1040+
10321041# wasm32-emscripten browser build
10331042# wasm assets directory is relative to current build dir, e.g. "./usr/local".
10341043# --preload-file turns a relative asset path into an absolute path.
@@ -2257,6 +2266,7 @@ altbininstall: $(BUILDPYTHON) @FRAMEWORKPYTHONW@
22572266 if test -f $(LDLIBRARY) && test "$(PYTHONFRAMEWORKDIR)" = "no-framework" ; then \
22582267 if test -n "$(DLLLIBRARY)" ; then \
22592268 $(INSTALL_SHARED) $(DLLLIBRARY) $(DESTDIR)$(BINDIR); \
2269+ $(INSTALL_SHARED) $(ABI3DLLLIBRARY) $(DESTDIR)$(BINDIR); \
22602270 else \
22612271 $(INSTALL_SHARED) $(LDLIBRARY) $(DESTDIR)$(LIBDIR)/$(INSTSONAME); \
22622272 if test $(LDLIBRARY) != $(INSTSONAME); then \
@@ -2741,6 +2751,7 @@ libainstall: all scripts
27412751 if test "$(PYTHONFRAMEWORKDIR)" = no-framework; then \
27422752 if test "$(SHLIB_SUFFIX)" = .dll -o "$(SHLIB_SUFFIX)" = .pyd; then \
27432753 $(INSTALL_DATA) $(LDLIBRARY) $(DESTDIR)$(LIBDIR) ; \
2754+ $(INSTALL_DATA) $(ABI3LDLIBRARY) $(DESTDIR)$(LIBDIR) ; \
27442755 else \
27452756 $(INSTALL_DATA) $(LIBRARY) $(DESTDIR)$(LIBPL)/$(LIBRARY) ; \
27462757 fi; \
@@ -3049,7 +3060,7 @@ clean: clean-retain-profile clean-bolt
30493060
30503061.PHONY: clobber
30513062clobber: clean
3052- -rm -f $(BUILDPYTHON) $(LIBRARY) $(LDLIBRARY) $(DLLLIBRARY) \
3063+ -rm -f $(BUILDPYTHON) $(LIBRARY) $(LDLIBRARY) $(DLLLIBRARY) $(ABI3LDLIBRARY) $(ABI3DLLLIBRARY) \
30533064 tags TAGS \
30543065 config.cache config.log pyconfig.h Modules/config.c
30553066 -rm -rf build platform
0 commit comments