Newer
Older
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
# Define our compilers.................................
#
# on geodyncomp, the defaults are OpenMPI (1.4.3),
# built with the GNU compilers
F90 = gfortran
F77 = gfortran
cc = gcc
# we take the standard ar
AR=ar
BITS=-gcc
# Define MPI include files for ifort.
# these should match the build of wsmp; see below.
# for openmpi, these work
MPI_INC=-I /usr/lib/openmpi/include
MPI_LIB=-L /usr/lib/openmpi/lib -lmpi -lmpi_f77 -lmpi_f90
INCLUDE = $(MPI_INC)
# Define compiler flags:
#F90FLAGS = -O3 -Wall -Werror -Warray-bounds -Wunderflow -fbacktrace -fdump-core -ffree-line-length-none -fcheck=all
F90FLAGS = -O3 -Wall -Warray-bounds -Wunderflow -fbacktrace -fdump-core -ffree-line-length-none -fcheck=all
F77FLAGS = $(F90FLAGS)
# CFLAGS = -O3 -Wall -Werror
CFLAGS = -O3 -Wall
WSMP = -L ../../wsmp/wsmp-Linux64-GNU/lib/openmpi/ -lpwsmp64
LIBS = \
-LOCTREE -lOctree$(BITS) \
-LNN -lnn_f$(BITS) \
-LNN -lnn_c$(BITS) \
-LCASCADE -lcascade$(BITS) \
-LRESAMPLE -lresample$(BITS) \
$(WSMP) -lblas \
$(MPI_LIB) \
-lpthread
# The Makefiles look at compile output with this
PAGER=less
# compile rules.......................................
#
COMPILE_OUT=$(NAME)$(BITS).compile
.SUFFIXES:
.SUFFIXES: .o .c .f .f90
.f90.o:
@echo "--" >>$(COMPILE_OUT) 2>&1
@echo "$(F90) $(F90FLAGS) $(INCLUDE) -c $<" >>$(COMPILE_OUT) 2>&1
$(F90) $(F90FLAGS) $(INCLUDE) -c $< >>$(COMPILE_OUT) 2>&1
.f.o:
@echo "--" >>$(COMPILE_OUT) 2>&1
@echo "$(F77) $(F77FLAGS) $(INCLUDE) -c $<" >>$(COMPILE_OUT) 2>&1
$(F77) $(F77FLAGS) $(INCLUDE) -c $< >>$(COMPILE_OUT) 2>&1
.c.o:
@echo "--" >>$(COMPILE_OUT) 2>&1
@echo "$(CC) $(CFLAGS) -c $<" >>$(COMPILE_OUT) 2>&1
$(CC) $(CFLAGS) -c $< >>$(COMPILE_OUT) 2>&1