2015-01-09 23:52:12 +08:00
|
|
|
# This file contains the hooks to build and link LAMMPS with the OpenKIM
|
|
|
|
# library so that a LAMMPS input script can use a KIM potential, via the
|
|
|
|
# pair_style kim command.
|
2015-07-02 08:45:28 +08:00
|
|
|
#
|
|
|
|
# The KIM API package can be downloaded from https://openkim.org/kim-api
|
|
|
|
# Follow the instructions in the INSTALL file to build and install the
|
|
|
|
# KIM API. Add the openkim.org Models you are interested in using.
|
|
|
|
#
|
|
|
|
# As long as you have followed the KIM API build and install instructions,
|
|
|
|
# there should not be any reason to change this file.
|
2015-01-09 23:52:12 +08:00
|
|
|
|
|
|
|
# -----------------------------------------------------------
|
|
|
|
|
|
|
|
# Settings that the LAMMPS build will import when this package is installed
|
|
|
|
|
2018-11-05 10:10:04 +08:00
|
|
|
|
|
|
|
ifeq ($(strip $(shell pkg-config --version)),)
|
|
|
|
$(error 'pkg-config' not found, but is required to configure the KIM API)
|
|
|
|
endif
|
|
|
|
kim_PREFIX := $(shell cat ../../lib/kim/kim-prefix.txt 2> /dev/null)
|
|
|
|
kim_PREFIX := $(if $(kim_PREFIX),$(kim_PREFIX)/lib/pkgconfig,)
|
|
|
|
kim_PREFIX := $(if $(shell printf -- "$${PKG_CONFIG_PATH}"),$(kim_PREFIX):$(shell printf -- "$${PKG_CONFIG_PATH}"),$(kim_PREFIX))
|
|
|
|
|
2018-08-21 06:56:40 +08:00
|
|
|
# there is no usable libcurl installation
|
|
|
|
ifeq ($(shell curl-config --version 2> /dev/null),)
|
2019-03-29 04:35:22 +08:00
|
|
|
kim_SYSINC := $(shell export PKG_CONFIG_PATH="$(kim_PREFIX)"; pkg-config --cflags libkim-api 2> /dev/null)
|
|
|
|
kim_SYSLIB := $(shell export PKG_CONFIG_PATH="$(kim_PREFIX)"; pkg-config --libs libkim-api 2> /dev/null)
|
2018-08-21 06:56:40 +08:00
|
|
|
else
|
2019-03-29 04:35:22 +08:00
|
|
|
kim_SYSINC := $(shell export PKG_CONFIG_PATH="$(kim_PREFIX)"; pkg-config --cflags libkim-api 2> /dev/null) $(shell curl-config --cflags) -DLMP_KIM_CURL
|
|
|
|
kim_SYSLIB := $(shell export PKG_CONFIG_PATH="$(kim_PREFIX)"; pkg-config --libs libkim-api 2> /dev/null) $(shell curl-config --libs)
|
2018-08-21 06:56:40 +08:00
|
|
|
endif
|
2018-11-05 10:10:04 +08:00
|
|
|
|
|
|
|
ifeq ($(strip $(kim_SYSINC)),)
|
|
|
|
$(error 'pkg-config' could not find an installed KIM API library.)
|
|
|
|
endif
|