How to dynamically read ldflags for boost-python?

Currently I have written a Makefile

that reads ldflags

using pkg-config

.

pkg-config --libs python3

      

Now I have found python3-config --ldflags

and python3-config --libs

which, in my opinion, are better.

The problem that remains for me is that I am also using boost_python and I have a hardcoded flag for boost_python in mine Makefile

. those. -lboost_python-py35

... The problem is, if someone uses this Makefile

with python3.4

, they have to change it to -lboost_python-py34

. Thus, it can be done dynamically, so that python3-config

and pkg-config

allow us to do things like that.

+3


source to share





All Articles