-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
193 lines (167 loc) · 3.92 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
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
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
# Paths
bindir = $(PWD)/../lib
objdir = $(PWD)/../obj
moddir = $(bindir)
srcdir = $(PWD)
# Dependencies
object_spline = \
SplineAkima.o \
SplineBessel.o \
SplineBiCubic.o \
SplineBilinear.o \
SplineBiQuintic.o \
SplineConstant.o \
SplineCubicBase.o \
SplineCubic.o \
SplineHermite.o \
SplineLinear.o \
SplinePchip.o \
SplineQuinticBase.o \
SplineQuintic.o \
SplinesBivariate.o \
Splines.o \
SplinesCinterface.o \
SplineSet.o \
SplineSetGC.o \
SplinesUnivariate.o \
SplineVec.o \
external_spline.o
object_iir = \
Biquad.o \
Butterworth.o \
Cascade.o \
ChebyshevI.o \
ChebyshevII.o \
Custom.o \
PoleFilter.o \
RBJ.o \
external_iir.o \
module_iirfilt.o
object_filesystem = \
common.o \
get_path.o \
filesystem.o \
f_filesystem.o \
f_find.o \
f_get_path.o \
f2c.o
object_hdbscan = \
hdbscan.o \
cluster.o \
hdbscanAlgorithm.o \
hdbscanConstraint.o \
outlierScore.o \
undirectedGraph.o \
hdbscanParameters.o \
hdbscanResult.o \
hdbscanRunner.o \
bitSet.o \
external_hdbscan.o
object_libflit = \
module_error.o \
module_string.o \
module_constants.o \
module_array.o \
module_array_operation.o \
module_array_extension.o \
module_sort.o \
module_calculus.o \
module_laplacefilt.o \
module_specialfunc.o \
module_utility.o \
module_heap.o \
module_date_time.o \
module_unique.o \
external_random.o \
module_random.o \
$(object_filesystem) \
module_filedir.o \
module_io.o \
module_linear_algebra.o \
module_taper.o \
$(object_spline) \
external_mba.o \
module_interp.o \
module_fit.o \
external_convexhull.o \
module_readpar.o \
module_transform.o \
module_balancefilt.o \
module_gaussfilt.o \
module_statistics.o \
module_medianfilt.o \
module_meanfilt.o \
module_lowessfilt.o \
module_geometry.o \
$(object_iir) \
module_fourierfilt.o \
module_domain_decomposition.o \
module_mpicomm.o \
module_andffilt.o \
module_dipfilt.o \
module_tvfilt.o \
module_spectrum.o \
$(object_hdbscan) \
module_clustering.o \
module_libflit.o
object = $(object_libflit)
obj = $(addprefix $(objdir)/, $(object))
# targets
lib = $(bindir)/libflit.a
all: mkdir $(lib) copy clean_genmod
# Compile options
include $(PWD)/Makefile.in
inc = $(base_inc) \
-I$(PWD) \
-I$(PWD)/../third_party/pcg_random \
-I$(PWD)/../third_party/spline \
-I$(PWD)/../third_party/multilevel_bspline \
-I$(PWD)/../third_party/iir \
-I$(PWD)/../third_party/filesystem \
-I$(PWD)/../third_party/convexhull \
-I$(PWD)/../third_party/hdbscan/Hdbscan \
-I$(PWD)/../third_party/hdbscan/HdbscanStar \
-I$(PWD)/../third_party/hdbscan/Runner \
-I$(PWD)/../third_party/hdbscan/Utils
lflags = $(base_lflags)
fflags = $(base_fflags) #-O0 -g -check bounds
cflags = $(base_cflags)
cxxflags = $(base_cxxflags)
# Compile
$(objdir)/%.o : $(srcdir)/%.c
$(cc) -o $@ -c $(cflag) $(inc) $<
$(objdir)/%.o : $(srcdir)/%.cpp
$(cxx) -o $@ -c $(cxxflags) $(inc) $<
$(objdir)/%.o : $(srcdir)/%.f90
$(fc) -o $@ -c $(fflags) $(inc) $<
$(objdir)/%.o : $(srcdir)/../third_party/pcg_random/%.cpp
$(cxx) -o $@ -c $(cxxflags) $(inc) $<
$(objdir)/%.o : $(srcdir)/../third_party/spline/%.cc
$(cxx) -o $@ -c $(cxxflags) $(inc) $<
$(objdir)/%.o : $(srcdir)/../third_party/iir/%.cpp
$(cxx) -o $@ -c $(cxxflags) $(inc) $<
$(objdir)/%.o : $(srcdir)/../third_party/filesystem/%.f90
$(fc) -o $@ -c $(fflags) $(inc) $<
$(objdir)/%.o : $(srcdir)/../third_party/filesystem/%.c
$(cc) -o $@ -c $(cflags) $(inc) $<
$(objdir)/%.o : $(srcdir)/../third_party/filesystem/%.cpp
$(cxx) -o $@ -c $(cxxflags) $(inc) $<
$(objdir)/%.o : $(srcdir)/../third_party/hdbscan/*/%.cpp
$(cxx) -o $@ -c $(cxxflags) $(inc) $<
# link
$(lib): $(obj)
$(ll) rcs $@ $^
# make directory
mkdir:
-@mkdir -p $(bindir)
-@mkdir -p $(objdir)
-@mkdir -p $(moddir)
# clean
clean:
-@rm -rf $(objdir)/*.o $(moddir)/*.mod $(moddir)/*.smod $(lib)
# copy macro
copy:
-@cp -p $(srcdir)/libflit.macro $(bindir)
# clean auto-generated f90 files
clean_genmod:
-@rm -rf $(moddir)/*_genmod.f90