How to dynamically read ldflags for boost-python?

Viewed 151

Currently, I have written a Makefile, which reads ldflags using pkg-config.

pkg-config --libs python3

Now, I have found python3-config --ldflags and python3-config --libs which in my point of view are better.

The problem that remains for me is that, I'm also using boost_python and I have hard-coded the flag for boost_python in my Makefile. i.e. -lboost_python-py35. The problem with this is that, if someone else uses this Makefile with python3.4, They have to change this to -lboost_python-py34. So, can this be made dynamic, in a way the python3-config and pkg-config allows us to do similar things.

0 Answers
Related