-
Notifications
You must be signed in to change notification settings - Fork 0
/
makefile.public.Linux-gcc-7.2.1
88 lines (60 loc) · 1.98 KB
/
makefile.public.Linux-gcc-7.2.1
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
78
79
80
81
82
83
84
85
86
87
88
# This file is included by all Makefiles below to specify system
# specific things. Note that by default all optimisations are
# turned on
CC = gcc
RM = /bin/rm
CP = /bin/cp
LN = ln
PTHREAD = -pthread
CXX = g++
PROF=
# DEBUG = -g -fsanitize=address
# DEBUG = -g
DEBUG = -DNDEBUG
#DEBUG = -g -gdwarf-3
# CPU = -DUNIX -mtune=sandybridge
# CPU = -DUNIX -mtune=haswell
# Define -march and -mutune options based on your hardware
CPU = -DUNIX -march=westmere -mtune=haswell
OPT = -O2
#OPT = -O0
OPENMP = -fopenmp
LIBDIR = $(IWPROGRAMMES)/lib/$(UNAME)
INCDIR = $(IWPROGRAMMES)/include
EXEDIR = $(IWPROGRAMMES)/bin/$(UNAME)
LIB = -L $(IWPROGRAMMES)/lib/$(UNAME)
# Define ZLIB to point to where zlib.a is located. Need version 1.2.8 or higher
# Example: ZLIB = /zlib/zlib-1.2.11/lib
ZLIB =
ifeq ($(ZLIB),)
LIBZ = -lz
else
LIBZ = -L$(ZLIB) -lz
endif
USRLIB=
OPENSSL_INC = $(C3TK_HOME)/src/smallmolecule/include
INC = $(MYINC) -I . -I $(IWPROGRAMMES)/include -I $(IWPROGRAMMES)/include/mol
COMPILER = -msse -mfpmath=sse
FLAGS = $(PROF) $(DEBUG) $(COMPILER) $(CPU) $(OPT) $(PROJ) $(INC) -Wl,--no-warn-search-mismatch
CFLAGS = $(FLAGS)
CXXFLAGS = $(FLAGS) -std=c++11
FLAGS_FOR_TEMPLATE_INSTANTIATORS = $(CXXFLAGS)
# not needed if we are compiling 64 bit
# CPPFLAGS = -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
CPPFLAGS = -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DNEED_EXTERN_OPT
# Some programmes want implicit templates
CXX_FLAGS_WITH_IMPLICIT_TEMPLATES = $(CPPFLAGS) -std=c++11 $(COMPILER) $(PROF) $(DEBUG) $(CPU) $(OPT) $(PROJ) $(INC)
LD = $(CXX) $(PROF)
# Intel requires Fortran executables to be linked with ifort - gcc is happy with either (I think)
FORT_LD = $(CXX) $(PROF)
# Whenever we use fortran
FC=gfortran
FFLAGS = $(OPT) $(DEBUG) $(CPU) $(PROF)
FORTRAN_LIBRARY = -lgfortran
SHARED_LIBRARY_CREATOR = gcc -shared
SHARED_LIBRARY_SUFFIX = so
CLANG_SHARED_LIBRARY_COMPILER = gcc
%.lo : %.cc
$(CXX) $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $<
%.lo : %.c
$(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $<