-
Notifications
You must be signed in to change notification settings - Fork 0
/
makefile.public.Linux-gcc-6.2.0
77 lines (65 loc) · 2.45 KB
/
makefile.public.Linux-gcc-6.2.0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
# Copyright 2018 Eli Lilly and Company
#
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
########################################################################
# This file is included by all Makefiles below to specify system
# specific things. Note that by default all optimisations are
# turned on
# Shell command redefine
CC = gcc
RM = /bin/rm -f
# CP = /bin/cp -rf
# Not allow to override internal code
CP = /bin/cp -n
LN = ln
MKDIR = mkdir -p
####################### Define GCC compilier ###########################
PTHREAD = -pthread
CXX = g++
LD = $(CXX) $(PROF)
DEBUG = -DNDEBUG
CPU = -DUNIX -mtune=haswell
OPT = -O2
OPENMP = -fopenmp
COMPILER = -msse -mfpmath=sse
# IWPROGRAMMES shall be defined in the Makefile which includes this shared makefile
# IWPROGRAMMES shall point to the folder where src is located
# Target directory for copying include, library and executable files
LIBDIR = $(IWPROGRAMMES)/lib/$(UNAME)
INCDIR = $(IWPROGRAMMES)/include
EXEDIR = $(IWPROGRAMMES)/bin/$(UNAME)
# Library folder
LIB = -L $(IWPROGRAMMES)/lib/$(UNAME)
# Define ZLIB to point to where zlib.a is located. Need version 1.2.8 or higher
#Exmaple: ZLIB = /zlib/zlib-1.2.11/lib
ZLIB =
LIBZ = -L $(ZLIB) -lz
# Include folder
INC = -I . -I $(IWPROGRAMMES)/include -I $(IWPROGRAMMES)/include/mol
# TODO Do we need keep this
USRLIB=-L/usr/lib64
USRLIB=
FLAGS = $(PROF) $(DEBUG) $(COMPILER) $(CPU) $(OPT) $(PROJ) $(INC) -Wl,--no-warn-search-mismatch
CFLAGS = $(FLAGS)
CXXFLAGS = $(FLAGS) -std=c++11
CPPFLAGS = -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DNEED_EXTERN_OPT
# Some programmes want implicit templates
FLAGS_FOR_TEMPLATE_INSTANTIATORS = $(CXXFLAGS)
CXX_FLAGS_WITH_IMPLICIT_TEMPLATES = $(CPPFLAGS) -std=c++11 $(COMPILER) $(PROF) $(DEBUG) $(CPU) $(OPT) $(PROJ) $(INC)
####################### Define Fortran compilier ###########################
FC=gfortran
FORT_LD = $(CXX) $(PROF)
# Fortran flag and library
FFLAGS = $(OPT) $(DEBUG) $(CPU) $(PROF)
FORTRAN_LIBRARY = -lgfortran