File tree 1 file changed +11
-12
lines changed
1 file changed +11
-12
lines changed Original file line number Diff line number Diff line change 1
1
# --------------------------------------------------------------------------
2
- # Which make to use
2
+ # Which make to use
3
3
make = make
4
4
5
5
# Which compiler to use
6
6
# CC is the compiler for the serial code
7
7
# PARCC is the compiter for the parallel code
8
8
CC = clang
9
- PARCC = /usr/local/opt/open-mpi/bin/ mpicc
9
+ PARCC = $( shell which mpicc)
10
10
11
11
# What optimization level to use
12
12
OPTFLAGS = -O3
13
13
14
14
# What options to be used by the compiler
15
- COPTIONS =
15
+ COPTIONS =
16
16
17
17
# Which loader to use
18
- LD = cc
19
- PARLD = cc
18
+ LD = clang
19
+ PARLD = $( shell which mpicc)
20
20
21
21
# What options to be used by the loader
22
22
LDOPTIONS = -O3
23
23
24
- # Where to put the executable
24
+ # Where to put the executable
25
25
BINDIR = ../../bin
26
26
27
27
# Additional libraries
28
- DMALLOCDIR =
28
+ DMALLOCDIR =
29
29
IMLIBDIR = ../../MGridGen/IMlib
30
30
31
31
# Include directories for the compiler
32
- INCDIR =
32
+ INCDIR =
33
33
34
34
# In which directories to look for any additional libraries
35
- LIBDIR = -L../.. \
36
- -L/usr/local/lib
35
+ LIBDIR = -L../.. $(patsubst % ,-L% ,$(shell $(PARCC ) --showme:libdirs) )
37
36
38
37
# Set some flags
39
38
DEBUGFLAGS =
40
39
41
40
# What additional libraries to link the programs with (eg., -lmpi)
42
41
LIBS = -lmgrid -lm
43
- PARLIBS = -lparmgrid -lmgrid -lmpi -lm
42
+ PARLIBS = -lparmgrid -lmgrid -l $( shell $( PARCC ) --showme:libs) -lm
44
43
45
44
46
45
# What archiving to use
@@ -51,7 +50,7 @@ AR = ar rv
51
50
RANLIB = ar -ts
52
51
53
52
# --------------------------------------------------------------------------
54
- #
53
+ #
55
54
# Do not change any of the following
56
55
#
57
56
VERNUM = 1.0
You can’t perform that action at this time.
0 commit comments