KIM API V2
Makefile
Go to the documentation of this file.
1 #
2 # CDDL HEADER START
3 #
4 # The contents of this file are subject to the terms of the Common Development
5 # and Distribution License Version 1.0 (the "License").
6 #
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.
10 #
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:
15 #
16 # Portions Copyright (c) [yyyy] [name of copyright owner]. All rights reserved.
17 #
18 # CDDL HEADER END
19 #
20 
21 #
22 # Copyright (c) 2013--2018, Regents of the University of Minnesota.
23 # All rights reserved.
24 #
25 # Contributors:
26 # Ryan S. Elliott
27 #
28 
29 #
30 # Release: This file is part of the kim-api-v2.0.0-beta.1 package.
31 #
32 
33 ifeq ($(wildcard ../../Makefile.KIM_Config),)
34  $(error Makefile.KIM_Config does not exist. Something is wrong with your KIM API package setup)
35 endif
36 include ../../Makefile.KIM_Config
37 
38 INCLDS = KIM_Version.h
39 
40 #
41 # Main build settings and rules
42 #
43 .PHONY: all includes
44 
45 # add local Makefile to KIM_MAKE_FILES
46 KIM_MAKE_FILES += $(KIM_DIR)/c/include/Makefile
47 
48 all: includes
49 
50 includes: $(INCLDS)
51 
52 KIM_Version.h: KIM_Version.h.tpl $(KIM_MAKE_FILES)
53  @printf "Creating... include file....... $@.\n"
54  $(QUELL)cat KIM_Version.h.tpl | sed -e 's/versionMajor/$(VERSION_MAJOR)/g' \
55  -e 's/versionMinor/$(VERSION_MINOR)/g' \
56  -e 's/versionPatch/$(VERSION_PATCH)/g' \
57  -e 's/versionPrerelease/"$(VERSION_PRERELEASE)"/g' \
58  -e 's/versionBuildMetadata/"$(VERSION_BUILD_METADATA)"/g' \
59  -e 's/versionString/"$(VERSION_FULL)"/g' \
60  > $@
61 
62 
63 #
64 # Main clean settings and rules
65 #
66 .PHONY: clean
67 
68 clean:
69  @printf "Cleaning... c/include.\n"
70  $(QUELL)rm -f $(INCLDS)