4 # The contents of this file are subject to the terms of the Common Development
5 # and Distribution License Version 1.0 (the "License").
7 # You can obtain a copy of the license at
8 # http://www.opensource.org/licenses/CDDL-1.0. See the License for the
9 # specific language governing permissions and limitations under the License.
11 # When distributing Covered Code, include this CDDL HEADER in each file and
12 # include the License file in a prominent location with the name LICENSE.CDDL.
13 # If applicable, add the following below this CDDL HEADER, with the fields
14 # enclosed by brackets "[]" replaced with your own identifying information:
16 # Portions Copyright (c) [yyyy] [name of copyright owner]. All rights reserved.
22 # Copyright (c) 2013--2018, Regents of the University of Minnesota.
23 # All rights reserved.
30 # load all basic KIM make configuration
31 KIM_API_BUILD_CONFIG = kim-api-v2-build-config
32 ifeq ($(shell $(KIM_API_BUILD_CONFIG) --version 2> /dev/null),)
33 $(error $(KIM_API_BUILD_CONFIG) utility is not available. Something is wrong with your KIM API package setup)
37 CC = $(shell $(KIM_API_BUILD_CONFIG) --cc)
38 CXX = $(shell $(KIM_API_BUILD_CONFIG) --cxx)
39 FC = $(shell $(KIM_API_BUILD_CONFIG) --fc)
40 LD = $(shell $(KIM_API_BUILD_CONFIG) --ld)
41 INCLUDES = $(shell $(KIM_API_BUILD_CONFIG) --includes)
42 CFLAGS = $(shell $(KIM_API_BUILD_CONFIG) --cflags)
43 CXXFLAGS = $(shell $(KIM_API_BUILD_CONFIG) --cxxflags)
44 FFLAGS = $(shell $(KIM_API_BUILD_CONFIG) --fflags)
45 LDFLAGS = $(shell $(KIM_API_BUILD_CONFIG) --ldflags)
46 LDLIBS = $(shell $(KIM_API_BUILD_CONFIG) --ldlibs)
47 XLANGLDLIBS = $(shell $(KIM_API_BUILD_CONFIG) --xlangldlibs)
48 FNOMAINFLAG = $(shell $(KIM_API_BUILD_CONFIG) --fnomainflag)
49 OBJONLYFLAG = $(shell $(KIM_API_BUILD_CONFIG) --objonlyflag)
50 OUTPUTINFLAG = $(shell $(KIM_API_BUILD_CONFIG) --outputinflag)
55 TEST_NAME := utility_forces_numer_deriv
59 $(TEST_NAME).o: $(TEST_NAME).F03 Makefile
60 $(FC) $(INCLUDES) $(FFLAGS) $(OBJONLYFLAG) $<
62 $(TEST_NAME): $(TEST_NAME).o
63 $(LD) $(FNOMAINFLAG) $(LDFLAGS) $< $(LDLIBS) $(XLANGLDLIBS) $(OUTPUTINFLAG) $@
66 rm -f $(TEST_NAME) $(TEST_NAME).o kim.log *.mod