diff --git a/lib/plumed/Install.py b/lib/plumed/Install.py index a59200d1f8..e34fc9236a 100644 --- a/lib/plumed/Install.py +++ b/lib/plumed/Install.py @@ -6,7 +6,7 @@ used to automate the steps described in the README file in this dir """ from __future__ import print_function -import sys, os, subprocess, shutil +import sys, os, platform, subprocess, shutil from argparse import ArgumentParser sys.path.append('..') @@ -130,7 +130,10 @@ if os.path.isfile("Makefile.lammps.%s" % mode): print("Creating Makefile.lammps") plumedinc = os.path.join('liblink', 'plumed', 'src', 'lib', 'Plumed.inc.' + mode) lines1 = open(plumedinc, 'r').readlines() - lines2 = open("Makefile.lammps.%s" % mode, 'r').readlines() + if (platform.system() == 'Darwin' and os.path.isfile("Makefile.lammps.%s.macosx")): + lines2 = open("Makefile.lammps.%s.macosx" % mode, 'r').readlines() + else: + lines2 = open("Makefile.lammps.%s" % mode, 'r').readlines() fp = open("Makefile.lammps", 'w') fp.write("PLUMED_LIBDIR=" + os.path.join(homedir, "lib\n")) for line in lines1: diff --git a/lib/plumed/Makefile.lammps.runtime.macosx b/lib/plumed/Makefile.lammps.runtime.macosx new file mode 100644 index 0000000000..d0ae6e82a5 --- /dev/null +++ b/lib/plumed/Makefile.lammps.runtime.macosx @@ -0,0 +1,5 @@ +# Settings that the LAMMPS build will import when this package library is used + +plumed_SYSINC = -D__PLUMED_HAS_DLOPEN=1 -D__PLUMED_DEFAULT_KERNEL=$(PLUMED_LIBDIR)/libplumedKernel.dylib +plumed_SYSLIB = $(PLUMED_LOAD) -rdynamic +plumed_SYSPATH =