-
Notifications
You must be signed in to change notification settings - Fork 12
/
Makefile.a64fx
127 lines (94 loc) · 3.22 KB
/
Makefile.a64fx
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
TARGET=./lib/libmonolish_a64fx.so
MONOLISH_DIR?=$(HOME)/lib/monolish
CXX=FCC
CXXFLAGS = -Nclang -O3 -Ofast -fopenmp -std=c++17 -fPIC -fvectorize -Nlibomp
#CXXFLAGS = -Kfast,openmp,zfill,parallel,simd,reduction -std=c++17 -lm -fPIC -Kopenmp -Nlibomp
#CXXFLAGS += -Nsrc -Koptmsg=2
CXXFLAGS += $(CXXFLAGS_EXTRA)
LIBFLAGS = -shared
#BLAS_LIB = -SSL2BLAMP
#BLAS_LIB = -Kopenmp -SSL2BLAMP
####################
LIB_INC=$(BLAS_INC)
LIB_OBJ=$(BLAS_LIB)
####################
SRCS =$(notdir $(wildcard ./src/*.cpp))
SRCS +=$(notdir $(wildcard ./src/blas/*.cpp))
SRCS +=$(notdir $(wildcard ./src/blas/*/*.cpp))
SRCS +=$(notdir $(wildcard ./src/blas/*/*/*.cpp))
SRCS +=$(notdir $(wildcard ./src/equation/*.cpp))
SRCS +=$(notdir $(wildcard ./src/equation/*/*.cpp))
SRCS +=$(notdir $(wildcard ./src/internal/*.cpp))
SRCS +=$(notdir $(wildcard ./src/internal/*/*.cpp))
SRCS +=$(notdir $(wildcard ./src/internal/*/*/*.cpp))
SRCS +=$(notdir $(wildcard ./src/internal/*/*/*/*.cpp))
SRCS +=$(notdir $(wildcard ./src/utils/*.cpp))
SRCS +=$(notdir $(wildcard ./src/utils/*/*.cpp))
SRCS +=$(notdir $(wildcard ./src/vml/*.cpp))
SRCS +=$(notdir $(wildcard ./src/vml/*/*.cpp))
# SRCS +=$(notdir $(wildcard ./src/mpi/*.cpp))
#############################################################
vpath %.cpp ./src/
vpath %.cpp ./src/blas/vector/
vpath %.cpp ./src/blas/matrix/
vpath %.cpp ./src/blas/matrix/copy/
vpath %.cpp ./src/blas/matrix/mataddsub/
vpath %.cpp ./src/blas/matrix/matmul
vpath %.cpp ./src/blas/matrix/matvec
vpath %.cpp ./src/blas/matrix/scal
vpath %.cpp ./src/blas/matrix/diag_op
vpath %.cpp ./src/equation/
vpath %.cpp ./src/equation/lu/
vpath %.cpp ./src/equation/qr/
vpath %.cpp ./src/equation/cholesky/
vpath %.cpp ./src/internal/
vpath %.cpp ./src/internal/arithmetic/
vpath %.cpp ./src/internal/lapack/
vpath %.cpp ./src/internal/lapack/getrf/
vpath %.cpp ./src/internal/lapack/getrs/
vpath %.cpp ./src/internal/lapack/syev/
vpath %.cpp ./src/internal/lapack/sygv/
vpath %.cpp ./src/internal/lapack/sytrf/
vpath %.cpp ./src/internal/lapack/sytrs/
vpath %.cpp ./src/internal/math/
vpath %.cpp ./src/utils/
vpath %.cpp ./src/utils/getvec/
vpath %.cpp ./src/utils/at_insert_sort/
vpath %.cpp ./src/utils/compare/
vpath %.cpp ./src/utils/convert
vpath %.cpp ./src/utils/copy/
vpath %.cpp ./src/utils/create_matrix/
vpath %.cpp ./src/utils/fill/
vpath %.cpp ./src/utils/IO/
vpath %.cpp ./src/utils/system/
vpath %.cpp ./src/utils/transpose/
vpath %.cpp ./src/utils/minus/
vpath %.cpp ./src/vml/linearoperator/
vpath %.cpp ./src/vml/matrix/
vpath %.cpp ./src/vml/vector/
# vpath %.cpp ./src/mpi/
#############################################################
.PHONY = libs test clean
OBJDIR=./obj/a64fx/
OBJS=$(addprefix $(OBJDIR)/, $(SRCS:.cpp=.o))
all: $(TARGET)
$(TARGET): $(OBJS)
mkdir -p lib
$(CXX) $(CXXFLAGS) $(LIBFLAGS) $(OBJS) $(LIB_INC) $(LIB_OBJ) -o $(TARGET) $(LIB_INC) $(LIB_OBJ)
$(OBJDIR)/%.o: %.cpp
mkdir -p $(OBJDIR)
$(CXX) $(CXXFLAGS) $(LIB_INC) $(LIB_OBJ) -I../include -c $< -o $@
libs:
git submodule update -i
make -C external
test:
cd test; make; make run
install:
-mkdir -p $(MONOLISH_DIR)
-mkdir -p $(MONOLISH_DIR)/external
-cp -r lib $(MONOLISH_DIR)
-cp -r include $(MONOLISH_DIR)
clean:
- rm $(OBJDIR)/*
- rm lib/*
- rm -r $(MONOLISH_DIR)