-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile.Fujitsu
89 lines (67 loc) · 1.76 KB
/
Makefile.Fujitsu
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
#!/bin/bash
# Only for ITO supercomputer in Kyushu University, Japan
TARGET = ../pint/pint_pfm.exe
_PMLib_ =1
ifdef _PMLib_
PMLIB_HOME = /home/usr4/m70324a/libs/pmlib
PMLIB_INC = -I${PMLIB_HOME}/include
LDFLAGS_PM = -L${PMLIB_HOME}/lib -lPMmpi
OPTFLAGS_PM= -D_PMLib_
endif
_HDF5_=1
ifdef _HDF5_
HDF5_HOME = /home/app/a/HDF5-1.10.1-FJ/non-parallel
HDF5_INC = -I${HDF5_HOME}/include
LDFLAGS_H5 = -L${HDF5_HOME}/lib -lhdf5
OPTFLAGS_H5= -D _HDF5_
endif
#_HEAT_ = 1
ifdef _HEAT_
HEAT_INC = -Isrc/heat
HEAT_FSRC = $(wildcard src/heat/*.f90)
HEAT_CSRC = $(wildcard src/heat/*.cpp)
HEAT_OPT = -D _TEST_HEAT_
endif
_PFM_ = 1
ifdef _PFM_
PFM_INC = -Isrc/pfm
PFM_FSRC = $(wildcard src/pfm/*.f90)
PFM_CSRC = $(wildcard src/pfm/*.cpp)
PFM_OPT = -D _TEST_PFM_
endif
INCLUDES= -Isrc/include ${PMLIB_INC} ${HDF5_INC} ${HEAT_INC} ${PFM_INC}
.FUFFIXES: .o .cpp .c .f90
FSRC = $(wildcard src/core/*.f90) \
$(wildcard src/utils/*.f90) \
$(HEAT_FSRC) \
$(PFM_FSRC)
CSRC = $(wildcard src/core/*.cpp) \
$(wildcard src/utils/*.cpp) \
$(wildcard src/*.cpp) \
$(HEAT_CSRC) \
$(PFM_CSRC)
CSRC2 = $(wildcard src/utils/*.c)
SRCS = $(FSRC) $(CSRC)
FOBJS = $(FSRC:.f90=.o)
COBJS = $(CSRC:.cpp=.o) $(CSRC2:.c=.o)
OBJS = $(FOBJS) $(COBJS)
CXX=mpiFCC
FC=mpifrt
OPTFLAGS= -Kfast,parallel,openmp ${OPTFLAGS_PM} ${OPTFLAGS_H5} $(HEAT_OPT) $(PFM_OPT)
CXXFLAGS= -std=c++11 $(OPTFLAGS) $(INCLUDES)
FFLAGS = $(OPTFLAGS) $(INCLUDES) -x- -Qt -Cpp -C cdRR8
LDFLAGS = ${LDFLAGS_PM} $(LDFLAGS_H5)
RM = rm
$(TARGET): $(OBJS)
$(CXX) $(CXXFLAGS) -o $@ $^ $(LDFLAGS)
%.o: %.cpp
$(CXX) $(CXXFLAGS) -o $@ -c $^
%.o: %.c
$(CXX) $(CXXFLAGS) -o $@ -c $^
%.o: %.f90
$(FC) $(FFLAGS) -o $@ -c $^
.PHONY: clean
clean:
$(RM) $(OBJS)
depend:
makedepend -Y *.cpp *.h