From f646d10ae1c7f9df1cc91243d7166d74791b487b Mon Sep 17 00:00:00 2001 From: cbdev Date: Wed, 23 Jun 2021 22:41:23 +0200 Subject: Prefer pkg-config over python3-config for linker info --- backends/Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/backends/Makefile b/backends/Makefile index 4697a5a..5054236 100644 --- a/backends/Makefile +++ b/backends/Makefile @@ -89,9 +89,10 @@ lua.dll: CFLAGS += $(shell pkg-config --cflags lua53 || pkg-config --cflags lua5 lua.dll: LDLIBS += -L../ -llua53 # Python seems to ship their own little python3-config tool instead of properly maintaining their pkg-config files. -# This one also spams a good deal of unwanted flags into CFLAGS, so we use only --includes and --libs +# This one also spams a good deal of unwanted flags into CFLAGS, so we use only --includes. On the other hand, the --libs +# info from this one seems to include the actual interpreter library only on some systems, which makes it worse than useless. python.so: CFLAGS += $(shell python3-config --includes || pkg-config --cflags python3 || pkg-config --cflags python || echo "-DBUILD_ERROR=\"Missing pkg-config data for python3\"") -python.so: LDLIBS += $(shell python3-config --libs || pkg-config --libs python3 || pkg-config --libs python || echo "-DBUILD_ERROR=\"Missing pkg-config data for python3\"") +python.so: LDLIBS += $(shell pkg-config --libs python3-embed || python3-config --libs || pkg-config --libs python || echo "-DBUILD_ERROR=\"Missing pkg-config data for python3\"") # Generic rules on how to build .SO/.DLL's from C and CPP sources %.so :: %.c %.h $(BACKEND_LIB) -- cgit v1.2.3