handle shared library extension on macosx for plumed runtime build

This commit is contained in:
Axel Kohlmeyer 2019-07-30 16:48:50 -04:00
parent 528ec75f88
commit 882b2301bb
No known key found for this signature in database
GPG Key ID: D9B44E93BF0C375A
2 changed files with 10 additions and 2 deletions

View File

@ -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:

View File

@ -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 =