-
Notifications
You must be signed in to change notification settings - Fork 1
/
make.config
166 lines (146 loc) · 6.58 KB
/
make.config
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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
#====================================================================#
# #
# Copyright 2002-2017,2018 #
# Mikael Granvik, Jenni Virtanen, Karri Muinonen, Teemu Laakso, #
# Dagmara Oszkiewicz #
# #
# This file is part of OpenOrb. #
# #
# OpenOrb is free software: you can redistribute it and/or modify it #
# under the terms of the GNU General Public License as published by #
# the Free Software Foundation, either version 3 of the License, or #
# (at your option) any later version. #
# #
# OpenOrb is distributed in the hope that it will be useful, but #
# WITHOUT ANY WARRANTY; without even the implied warranty of #
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU #
# General Public License for more details. #
# #
# You should have received a copy of the GNU General Public License #
# along with OpenOrb. If not, see <http://www.gnu.org/licenses/>. #
# #
#====================================================================#
#
# This file contains all variables needed to run make.
#
# Author: MG
# Version: 2018-12-12
# The path to where this makefile is located
ROOT_DIR := $(dir $(realpath $(lastword $(MAKEFILE_LIST))))
# These two lines ensure that build-tools/ dir is added to the path
# (n.b., it won't work unless SHELL explicitly set)
SHELL:=/bin/bash
export PATH:=$(ROOT_DIR)/build-tools:$(PATH)
# Project name:
PROJNAME = $(notdir $(CURDIR))
# Version (deduce from git):
VERSION := $(shell $(ROOT_DIR)/build-tools/compute-version.sh -u)
# Make command
MAKE = make
# OS-dependent settings
ifeq ($(shell uname),Darwin)
LD_LIB_PATH_VAR=DYLD_LIBRARY_PATH
# Target a reasonably low version of OS X, for binary compatibility
export MACOSX_DEPLOYMENT_TARGET=10.9
else
LD_LIB_PATH_VAR=LD_LIBRARY_PATH
endif
#
F90_CLASS_SOURCES = Base_class.f90 \
Unit_class.f90 \
File_class.f90 \
Time_class.f90 \
Observatory_class.f90 \
SphericalCoordinates_class.f90 \
CartesianCoordinates_class.f90 \
Observation_class.f90 \
Observatories_class.f90 \
Orbit_class.f90 \
Observations_class.f90 \
StochasticOrbit_class.f90 \
PhysicalParameters_class.f90
F90_MODULE_SOURCES = parameters.f90 \
utilities.f90 \
random.f90 \
sort.f90 \
statistics.f90 \
functions.f90 \
linal.f90 \
estimators.f90 \
planetary_data.f90 \
cl_options.f90 \
integrators.f90 \
data_structures.f90
# List of all executables. Assumed their corresponding .f90 files live in main/
PROGRAMS=oorb ephemeris_linking orbit_linking
# Paths to all source files (relative to build/) that will be compiled into liboorb.dylib and liboorb.a
LIBSOURCES=$(addprefix ../modules/, $(F90_MODULE_SOURCES)) $(addprefix ../classes/, $(F90_CLASS_SOURCES)) ../main/io.f90
# All .f90 sources (these will be used to derive dependency information)
ALLSOURCES=$(LIBSOURCES) $(addsuffix .f90, $(addprefix ../main/, $(PROGRAMS))) ../python/pyoorb.f90
########################################################################################
#
# Compiler command and options. The parts to follow should rarely need to
# change.
#
########################################################################################
# g95:
FC_G95 = g95
FCOPTIONS_OPT_G95 = -O3 -fzero -fshort-circuit -std=f95 -fintrinsic-extensions
FCOPTIONS_DEB_G95 = -g -O0 -fbounds-check -fintrinsic-extensions -fzero -fshort-circuit -ftrace=full -std=f95
FC_INC_G95 = -I
FC_SHARED_G95 = -dynamiclib -single_module -read_only_relocs suppress
# gfortran:
FC_GFORTRAN = gfortran
FCOPTIONS_OPT_GFORTRAN = -O2 -fPIC -std=f95 -fall-intrinsics -cpp -flto -pipe -funroll-loops -fstack-arrays -fno-protect-parens
FCOPTIONS_DEB_GFORTRAN = -g -O0 -fPIC -fbounds-check -pedantic -Wall -std=f95 -fall-intrinsics -cpp -pipe
FC_INC_GFORTRAN = -I
FC_SHARED_GFORTRAN = -shared
F2PY_FCOMPILER_GFORTRAN = --fcompiler=gnu95
# flang:
FC_FLANG = flang
FCOPTIONS_OPT_FLANG = -O2 -fPIC -std=f95 -fall-intrinsics -cpp -flto -pipe -funroll-loops -fstack-arrays -fno-protect-parens
FCOPTIONS_DEB_FLANG = -g -O0 -fPIC -fbounds-check -pedantic -Wall -std=f95 -fall-intrinsics -cpp -pipe
FC_INC_FLANG = -I
FC_SHARED_FLANG = -shared
F2PY_FCOMPILER_FLANG = --fcompiler=flang
# Absoft:
FC_ABSOFT = f90
FCOPTIONS_OPT_ABSOFT = -en -O2 -cpu:p7 -lU77 -YDEALLOC=ALL
FCOPTIONS_DEB_ABSOFT = -g -P -en -g
FC_INC_ABSOFT = -p
FC_SHARED_ABSOFT = -bundle
# Compaq:
FC_COMPAQ = f95
FCOPTIONS_OPT_COMPAQ = -O2 -C -std95
FCOPTIONS_DEB_COMPAQ = -g2 -pg -C -std95
FC_INC_COMPAQ = -I
FC_SHARED_COMPAQ = -bundle
# IBM:
FC_SER_IBM = xlf90
FC_PAR_IBM = xlf90_r
FCOPTIONS_PAR_IBM = -qsuffix=f=f90 -qarch=pwr4 -qtune=pwr4 -qsmp=omp -g
FCOPTIONS_OPT_IBM = -qsuffix=f=f90 -O -qmaxmem=-1
FCOPTIONS_DEB_IBM = -qsuffix=f=f90 -g -qfullpath -qlist -qsource -qxref -qcheck
FC_INC_IBM = -I
FC_SHARED_IBM = -bundle
# Intel:
FC_INTEL = ifort
FCOPTIONS_OPT_INTEL = -O3 -ip -fPIC -fpp
FCOPTIONS_DEB_INTEL = -g -fPIC -fpp
FC_INC_INTEL = -I
FC_SHARED_INTEL = -shared
F2PY_FCOMPILER_INTEL = --fcompiler=intelem
# Lahey:
FC_LAHEY = lf95
FCOPTIONS_OPT_LAHEY = --f95 --wo --warn --o2 --staticlink
# Warning: use of --chkglobal will lead to mysterious crashes.
FCOPTIONS_DEB_LAHEY = --f95 -g -O0 --staticlink
FC_INC_LAHEY = -M
FC_SHARED_LAHEY = -bundle
# Sun:
FC_SUN = f90
FCOPTIONS_OPT_SUN = -C -e -m32 -fast -Bstatic
FCOPTIONS_PAR_SUN = -ansi -xarch=v9b -O3 -openmp -vpara -g
FCOPTIONS_DEB_SUN = -g -C -e -m32
FC_INC_SUN = -M
FC_SHARED_SUN = -bundle