diff --git a/lib/python/Makefile.lammps b/lib/python/Makefile.lammps index 897e631a5d..8538994694 100644 --- a/lib/python/Makefile.lammps +++ b/lib/python/Makefile.lammps @@ -1,6 +1,6 @@ # Settings that the LAMMPS build will import when this package library is used # See the README file for more explanation -python_SYSINC = -I/usr/local/include/python2.7 -python_SYSLIB = -lpython2.7 -lnsl -ldl -lreadline -ltermcap -lpthread -lutil -lm -python_SYSPATH = +python_SYSINC = $(shell which python2-config > /dev/null 2>&1 && python2-config --includes || python-config --includes ) +python_SYSLIB = $(shell which python2-config > /dev/null 2>&1 && python2-config --ldflags || python-config --ldflags) +python_SYSPATH = diff --git a/lib/python/Makefile.lammps.auto b/lib/python/Makefile.lammps.auto new file mode 100644 index 0000000000..8538994694 --- /dev/null +++ b/lib/python/Makefile.lammps.auto @@ -0,0 +1,6 @@ +# Settings that the LAMMPS build will import when this package library is used +# See the README file for more explanation + +python_SYSINC = $(shell which python2-config > /dev/null 2>&1 && python2-config --includes || python-config --includes ) +python_SYSLIB = $(shell which python2-config > /dev/null 2>&1 && python2-config --ldflags || python-config --ldflags) +python_SYSPATH =