From 1d2c58607c2560194bc264213823e7e2d85b1eac Mon Sep 17 00:00:00 2001 From: Stefan Behnel Date: Fri, 27 Aug 2010 17:04:33 +0200 Subject: [PATCH] build embedding test against static Python library to support non-shared CPython builds --- Demos/embed/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Demos/embed/Makefile b/Demos/embed/Makefile index 59e053f4..b43d08a6 100644 --- a/Demos/embed/Makefile +++ b/Demos/embed/Makefile @@ -5,6 +5,7 @@ PYVERSION=$(shell $(PYTHON) -c "import sys; print(sys.version[:3])") INCDIR=$(shell $(PYTHON) -c "from distutils import sysconfig; print(sysconfig.get_python_inc())") LIBDIR1=$(shell $(PYTHON) -c "from distutils import sysconfig; print(sysconfig.get_config_var('LIBDIR'))") LIBDIR2=$(shell $(PYTHON) -c "from distutils import sysconfig; print(sysconfig.get_config_var('LIBPL'))") +STATIC_PYLIB=$(shell $(PYTHON) -c "from distutils import sysconfig; print(sysconfig.get_config_var('LIBRARY'))") CC=$(shell $(PYTHON) -c "import distutils.sysconfig; print(distutils.sysconfig.get_config_var('CC'))") LINKCC=$(shell $(PYTHON) -c "import distutils.sysconfig; print(distutils.sysconfig.get_config_var('LINKCC'))") @@ -13,7 +14,7 @@ LIBS=$(shell $(PYTHON) -c "import distutils.sysconfig; print(distutils.sysconfig SYSLIBS= $(shell $(PYTHON) -c "import distutils.sysconfig; print(distutils.sysconfig.get_config_var('SYSLIBS'))") embedded: embedded.o - $(LINKCC) -o $@ $^ $(LINKFORSHARED) -L$(LIBDIR1) -L$(LIBDIR2) -lpython$(PYVERSION) $(LIBS) $(SYSLIBS) + $(LINKCC) -o $@ $^ $(LIBDIR1)/$(STATIC_PYLIB) $(LINKFORSHARED) -L$(LIBDIR1) -L$(LIBDIR2) $(LIBS) $(SYSLIBS) embedded.o: embedded.c $(CC) -c $^ -I$(INCDIR) -- 2.26.2