-
Notifications
You must be signed in to change notification settings - Fork 1
/
make.inc
112 lines (71 loc) · 2.8 KB
/
make.inc
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
# OS
#----
UNAME = Linux
# Compilers (C++11 for variadic macros)
#----------
CC := gcc -x c -std=c11
CPP := gcc -x c++ -std=c++11
F77 := gfortran -cpp
LEX := flex #-d
YACC := bison #-t
# Compiler and preprocessor flags (recommended by GSL)
# see www.gnu.org/software/gsl/manual/html_node/GCC-warning-options-for-numerical-programs.html)
# Warning flags
#--------------
WFLAGS := -Wall -Wcast-align -Wcast-qual -Wnested-externs -Wpointer-arith -Wmissing-prototypes -Wstrict-prototypes -Wshadow -fno-common -Dinline= -Wvariadic-macros #-W #-Wtraditional #-Wconversion #-Wwrite-strings #-Werror #-fshort-enums
# Directory flags (-I replaced by -iquote)
#----------------
# DFLAGS = -I${BIL_PATH}
DFLAGS = -iquote${BIL_PATH} -D '__BASEFILE__=${basename ${notdir $@}}'
# Preprocessor flags
#-------------------
IFLAGS-SRC = -iprefix ${BIL_PATH}/src/ -iwithprefix . -iwithprefix Common -iwithprefix DataSet -iwithprefix Help -iwithprefix Libraries -iwithprefix Macros -iwithprefix Main -iwithprefix Models -iwithprefix Modules -iwithprefix Outputs -iwithprefix Solver -iwithprefix Tools -iwithprefix Parser -iwithprefix Parallelization
IFLAGS-SOLVER = -iprefix ${BIL_PATH}/src/Solver/ -iwithprefix MatrixStorageFormats -iwithprefix ResolutionMethods -iwithprefix VectorStorageFormats
# Additional flags for models
IFLAGS-MODELS = -iprefix ${BIL_PATH}/src/Models/ -iwithprefix . -iwithprefix DataBases -iwithprefix Libraries -iwithprefix Methods -iwithprefix ConstitutiveLaws
# Additional flags for modules
IFLAGS-MODULES = -iprefix ${BIL_PATH}/src/Modules/ -iwithprefix .
IFLAGS = ${IFLAGS-SRC} ${IFLAGS-SOLVER} ${IFLAGS-MODELS} ${IFLAGS-MODULES}
# Option flags
#-------------
sinclude ${BIL_PATH}/make.config
OFLAGS :=
#${info ENABLE_OPENMP = ${ENABLE_OPENMP}}
ifdef ENABLE_OPENMP
ifeq (${ENABLE_OPENMP},ON)
OFLAGS += -fopenmp
#${info OFLAGS = ${OFLAGS}}
endif
endif
# C/CPP compiler flags
#---------------------
CFLAGS = -pedantic ${DFLAGS} ${WFLAGS} ${IFLAGS} -fPIC ${OFLAGS}
# C compiler flags for models
CFLAGS-MODELS = ${CFLAGS} #${IFLAGS-MODELS}
# C compiler flags for modules
CFLAGS-MODULES = ${CFLAGS} #${IFLAGS-MODULES}
# Fortran compiler flags
#-----------------------
FFLAGS = -fPIC
# Optimization flags
#------------------
OPTIM = -gdwarf-2 -g3 # Debug
#OPTIM = -O3 -DNDEBUG # Release
#OPTIM = -O3 -g -gdwarf-3 # RelWithDebInfo
# Linker
#-------
LINKER = g++
# Linker flags
#-------------
LFLAGS = -lgfortran ${OFLAGS}
# Libraries
#----------
# Library extensions. Depends on which kind of library you want to install
# Choose either "so" (shared object) or "a" (static)
LIBBILEXT = so
# How you create a static library on this machine
AR = /usr/bin/ar ruvs
RANLIB = ranlib
# To create and install a shared library
CCSO = gcc -shared
LDCONFIG = /sbin/ldconfig