forked from benroberts999/ampsci
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
77 lines (61 loc) · 2.78 KB
/
Makefile
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
################################################################################
# Copy this file into the working directory, and rename to "Makefile"
# Then, compile the code simply by typing 'make' from command line
# Current options are set up for linux; you may need to tweak the options
################################################################################
## Which compiler: (g++, clang++) [no spaces]
CXX=g++
## Use OpenMP (parallelisation) yes/no:
UseOpenMP=yes
## Build mode (changes warnings + optimisation level): release/dev/debug
Build=release
## Compile in parallel with n cores (Faster, but makes reading errors difficult)
ParallelBuild=6
## Optional: set directory for executables (by default: current directory)
XD=.
################################################################################
## Path to the GSL library. Try first with this blank. Exact path will depend
## on where GSL has been installed. Usually, this can be left blank.
## nb: do not leave a trailing space after the line
## Some common places include '/opt/gsl/2.1/gnu'
## Intel Mac: '/usr/local/opt/gnu-scientific-library',
## M1/M2 mac: '/opt/homebrew/Cellar/gsl/2.7.1/'
PathForGSL=
################################################################################
# By default, uses -lblas (set =blas). For openblas, set =openblas.
# On some systems, openblas is available
BLASLIB=blas
################################################################################
# OpenMP library to use. -fopenmp default for GCC, -fopenmp=libomp for clang
# libomp for clang++X requires package libomp-X-dev (e.g., X=15)
OMPLIB=-fopenmp
# OMPLIB=-fopenmp=libomp
################################################################################
## If compiler cannot find correct libraries/headers, add the paths here.
## (Adds to -I and -L on compile and link; don't include the "-L" or "-I" here)
## Usually, these will be blank.
ExtraInclude=
ExtraLink=
ExtraFlags=
## Required on bunya:
#ExtraFlags=-lgfortran
# To use openmp with the llvm version clang++ on mac:
#ExtraInclude=/usr/local/opt/llvm/include/
#ExtraLink=/usr/local/opt/llvm/lib/
################################################################################
# Use these to pass in any other compiler/linker arguments
# Any other arguments
CARGS=
LARGS=
################################################################################
## None of the below options should need changing
################################################################################
## Set directories for source files (SD), and output object files (OD)
SD=./src
BD=./build
## c++ standard. must be at least c++17
CXXSTD=-std=c++17
## Build config + options:
include $(BD)/buildOptions.mk
## Build targets (must update if new programs/files are added):
include $(BD)/buildTargets.mk