Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 7d0e695

Browse files
Cryorislava
authored andcommitted
include ldflags instead of libs
1 parent b79ca6d commit 7d0e695

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Makefile

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ PYTHON_BIN ?= python3
66
PYTHON_CONFIG := $(PYTHON_BIN)-config
77
PYTHON_INCLUDE ?= $(shell $(PYTHON_CONFIG) --includes)
88
EXTRA_FLAGS := $(PYTHON_INCLUDE)
9-
# NOTE: Since python3.8, the correct invocation is `python3-config --libs --embed`.
9+
# NOTE: Since python3.8, the correct invocation is `python3-config --libs --embed`.
1010
# So of course the proper way to get python libs for embedding now is to
1111
# invoke that, check if it crashes, and fall back to just `--libs` if it does.
12-
LDFLAGS += $(shell if $(PYTHON_CONFIG) --libs --embed >/dev/null; then $(PYTHON_CONFIG) --libs --embed; else $(PYTHON_CONFIG) --libs; fi)
12+
LDFLAGS += $(shell if $(PYTHON_CONFIG) --ldflags --embed >/dev/null; then $(PYTHON_CONFIG) --ldflags --embed; else $(PYTHON_CONFIG) --ldflags; fi)
1313

1414
# Either finds numpy or set -DWITHOUT_NUMPY
1515
EXTRA_FLAGS += $(shell $(PYTHON_BIN) $(CURDIR)/numpy_flags.py)

0 commit comments

Comments
 (0)