GNUmakefile
9.55 KB
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
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
#-------------------------------------------------------------------------------
# UMFPACK Makefile for compiling on Unix systems (for GNU Make)
#-------------------------------------------------------------------------------
default: ../Lib/libumfpack.a
include ../../UFconfig/UFconfig.mk
C = $(CC) $(CFLAGS) $(UMFPACK_CONFIG) \
-I../Include -I../Source -I../../AMD/Include -I../../UFconfig
#-------------------------------------------------------------------------------
# source files
#-------------------------------------------------------------------------------
# non-user-callable umf_*.[ch] files:
UMFCH = umf_assemble umf_blas3_update umf_build_tuples umf_create_element \
umf_dump umf_extend_front umf_garbage_collection umf_get_memory \
umf_init_front umf_kernel umf_kernel_init umf_kernel_wrapup \
umf_local_search umf_lsolve umf_ltsolve umf_mem_alloc_element \
umf_mem_alloc_head_block umf_mem_alloc_tail_block \
umf_mem_free_tail_block umf_mem_init_memoryspace \
umf_report_vector umf_row_search umf_scale_column \
umf_set_stats umf_solve umf_symbolic_usage umf_transpose \
umf_tuple_lengths umf_usolve umf_utsolve umf_valid_numeric \
umf_valid_symbolic umf_grow_front umf_start_front umf_2by2 \
umf_store_lu umf_scale
# non-user-callable umf_*.[ch] files, int/UF_long versions only (no real/complex):
UMFINT = umf_analyze umf_apply_order umf_colamd umf_free umf_fsize \
umf_is_permutation umf_malloc umf_realloc umf_report_perm \
umf_singletons
# non-user-callable, created from umf_ltsolve.c, umf_utsolve.c,
# umf_triplet.c, and umf_assemble.c , with int/UF_long and real/complex versions:
UMF_CREATED = umf_lhsolve umf_uhsolve umf_triplet_map_nox \
umf_triplet_nomap_x umf_triplet_nomap_nox umf_triplet_map_x \
umf_assemble_fixq umf_store_lu_drop
# non-user-callable, int/UF_long and real/complex versions:
UMF = $(UMF_CREATED) $(UMFCH)
# user-callable umfpack_*.[ch] files (int/UF_long and real/complex):
UMFPACK = umfpack_col_to_triplet umfpack_defaults umfpack_free_numeric \
umfpack_free_symbolic umfpack_get_numeric umfpack_get_lunz \
umfpack_get_symbolic umfpack_get_determinant umfpack_numeric \
umfpack_qsymbolic umfpack_report_control umfpack_report_info \
umfpack_report_matrix umfpack_report_numeric umfpack_report_perm \
umfpack_report_status umfpack_report_symbolic umfpack_report_triplet \
umfpack_report_vector umfpack_solve umfpack_symbolic \
umfpack_transpose umfpack_triplet_to_col umfpack_scale \
umfpack_load_numeric umfpack_save_numeric \
umfpack_load_symbolic umfpack_save_symbolic
# user-callable, created from umfpack_solve.c (umfpack_wsolve.h exists, though):
# with int/UF_long and real/complex versions:
UMFPACKW = umfpack_wsolve
USER = $(UMFPACKW) $(UMFPACK)
# user-callable, only one version for int/UF_long, real/complex, *.[ch] files:
GENERIC = umfpack_timer umfpack_tictoc umfpack_global
#-------------------------------------------------------------------------------
# include files:
#-------------------------------------------------------------------------------
INC = ../Include/umfpack.h ../../UFconfig/UFconfig.h \
../Source/umf_config.h ../Source/umf_version.h \
../Source/umf_internal.h ../Source/umf_triplet.h \
$(addprefix ../Source/, $(addsuffix .h,$(UMFCH))) \
$(addprefix ../Source/, $(addsuffix .h,$(UMFINT))) \
$(addprefix ../Include/, $(addsuffix .h,$(USER))) \
$(addprefix ../Include/, $(addsuffix .h,$(GENERIC))) \
../../AMD/Include/amd_internal.h ../../AMD/Include/amd.h
#-------------------------------------------------------------------------------
# object files for each version
#-------------------------------------------------------------------------------
DI = $(addsuffix .o, $(subst umf_,umf_di_,$(UMF)) $(subst umfpack_,umfpack_di_,$(USER)))
DL = $(addsuffix .o, $(subst umf_,umf_dl_,$(UMF)) $(subst umfpack_,umfpack_dl_,$(USER)))
ZI = $(addsuffix .o, $(subst umf_,umf_zi_,$(UMF)) $(subst umfpack_,umfpack_zi_,$(USER)))
ZL = $(addsuffix .o, $(subst umf_,umf_zl_,$(UMF)) $(subst umfpack_,umfpack_zl_,$(USER)))
II = $(addsuffix .o, $(subst umf_,umf_i_,$(UMFINT)))
LL = $(addsuffix .o, $(subst umf_,umf_l_,$(UMFINT)))
GN = $(addsuffix .o, $(subst umfpack_,umfpack_gn_,$(GENERIC)))
#-------------------------------------------------------------------------------
# compile each int and UF_long routine (with no real/complex version)
#-------------------------------------------------------------------------------
umf_i_%.o: ../Source/umf_%.c $(INC)
$(C) -DDINT -c $< -o $@
umf_l_%.o: ../Source/umf_%.c $(INC)
$(C) -DDLONG -c $< -o $@
#-------------------------------------------------------------------------------
# compile each routine in the DI version
#-------------------------------------------------------------------------------
umf_di_%.o: ../Source/umf_%.c $(INC)
$(C) -DDINT -c $< -o $@
umf_di_%hsolve.o: ../Source/umf_%tsolve.c $(INC)
$(C) -DDINT -DCONJUGATE_SOLVE -c $< -o $@
umf_di_triplet_map_x.o: ../Source/umf_triplet.c $(INC)
$(C) -DDINT -DDO_MAP -DDO_VALUES -c $< -o $@
umf_di_triplet_map_nox.o: ../Source/umf_triplet.c $(INC)
$(C) -DDINT -DDO_MAP -c $< -o $@
umf_di_triplet_nomap_x.o: ../Source/umf_triplet.c $(INC)
$(C) -DDINT -DDO_VALUES -c $< -o $@
umf_di_triplet_nomap_nox.o: ../Source/umf_triplet.c $(INC)
$(C) -DDINT -c $< -o $@
umf_di_assemble_fixq.o: ../Source/umf_assemble.c $(INC)
$(C) -DDINT -DFIXQ -c $< -o $@
umf_di_store_lu_drop.o: ../Source/umf_store_lu.c $(INC)
$(C) -DDINT -DDROP -c $< -o $@
umfpack_di_wsolve.o: ../Source/umfpack_solve.c $(INC)
$(C) -DDINT -DWSOLVE -c $< -o $@
umfpack_di_%.o: ../Source/umfpack_%.c $(INC)
$(C) -DDINT -c $< -o $@
#-------------------------------------------------------------------------------
# compile each routine in the DL version
#-------------------------------------------------------------------------------
umf_dl_%.o: ../Source/umf_%.c $(INC)
$(C) -DDLONG -c $< -o $@
umf_dl_%hsolve.o: ../Source/umf_%tsolve.c $(INC)
$(C) -DDLONG -DCONJUGATE_SOLVE -c $< -o $@
umf_dl_triplet_map_x.o: ../Source/umf_triplet.c $(INC)
$(C) -DDLONG -DDO_MAP -DDO_VALUES -c $< -o $@
umf_dl_triplet_map_nox.o: ../Source/umf_triplet.c $(INC)
$(C) -DDLONG -DDO_MAP -c $< -o $@
umf_dl_triplet_nomap_x.o: ../Source/umf_triplet.c $(INC)
$(C) -DDLONG -DDO_VALUES -c $< -o $@
umf_dl_triplet_nomap_nox.o: ../Source/umf_triplet.c $(INC)
$(C) -DDLONG -c $< -o $@
umf_dl_assemble_fixq.o: ../Source/umf_assemble.c $(INC)
$(C) -DDLONG -DFIXQ -c $< -o $@
umf_dl_store_lu_drop.o: ../Source/umf_store_lu.c $(INC)
$(C) -DDLONG -DDROP -c $< -o $@
umfpack_dl_wsolve.o: ../Source/umfpack_solve.c $(INC)
$(C) -DDLONG -DWSOLVE -c $< -o $@
umfpack_dl_%.o: ../Source/umfpack_%.c $(INC)
$(C) -DDLONG -c $< -o $@
#-------------------------------------------------------------------------------
# compile each routine in the ZI version
#-------------------------------------------------------------------------------
umf_zi_%.o: ../Source/umf_%.c $(INC)
$(C) -DZINT -c $< -o $@
umf_zi_%hsolve.o: ../Source/umf_%tsolve.c $(INC)
$(C) -DZINT -DCONJUGATE_SOLVE -c $< -o $@
umf_zi_triplet_map_x.o: ../Source/umf_triplet.c $(INC)
$(C) -DZINT -DDO_MAP -DDO_VALUES -c $< -o $@
umf_zi_triplet_map_nox.o: ../Source/umf_triplet.c $(INC)
$(C) -DZINT -DDO_MAP -c $< -o $@
umf_zi_triplet_nomap_x.o: ../Source/umf_triplet.c $(INC)
$(C) -DZINT -DDO_VALUES -c $< -o $@
umf_zi_triplet_nomap_nox.o: ../Source/umf_triplet.c $(INC)
$(C) -DZINT -c $< -o $@
umf_zi_assemble_fixq.o: ../Source/umf_assemble.c $(INC)
$(C) -DZINT -DFIXQ -c $< -o $@
umf_zi_store_lu_drop.o: ../Source/umf_store_lu.c $(INC)
$(C) -DZINT -DDROP -c $< -o $@
umfpack_zi_wsolve.o: ../Source/umfpack_solve.c $(INC)
$(C) -DZINT -DWSOLVE -c $< -o $@
umfpack_zi_%.o: ../Source/umfpack_%.c $(INC)
$(C) -DZINT -c $< -o $@
#-------------------------------------------------------------------------------
# compile each routine in the ZL version
#-------------------------------------------------------------------------------
umf_zl_%.o: ../Source/umf_%.c $(INC)
$(C) -DZLONG -c $< -o $@
umf_zl_%hsolve.o: ../Source/umf_%tsolve.c $(INC)
$(C) -DZLONG -DCONJUGATE_SOLVE -c $< -o $@
umf_zl_triplet_map_x.o: ../Source/umf_triplet.c $(INC)
$(C) -DZLONG -DDO_MAP -DDO_VALUES -c $< -o $@
umf_zl_triplet_map_nox.o: ../Source/umf_triplet.c $(INC)
$(C) -DZLONG -DDO_MAP -c $< -o $@
umf_zl_triplet_nomap_x.o: ../Source/umf_triplet.c $(INC)
$(C) -DZLONG -DDO_VALUES -c $< -o $@
umf_zl_triplet_nomap_nox.o: ../Source/umf_triplet.c $(INC)
$(C) -DZLONG -c $< -o $@
umf_zl_assemble_fixq.o: ../Source/umf_assemble.c $(INC)
$(C) -DZLONG -DFIXQ -c $< -o $@
umf_zl_store_lu_drop.o: ../Source/umf_store_lu.c $(INC)
$(C) -DZLONG -DDROP -c $< -o $@
umfpack_zl_wsolve.o: ../Source/umfpack_solve.c $(INC)
$(C) -DZLONG -DWSOLVE -c $< -o $@
umfpack_zl_%.o: ../Source/umfpack_%.c $(INC)
$(C) -DZLONG -c $< -o $@
#-------------------------------------------------------------------------------
# Create the generic routines (GN) using a generic rule
#-------------------------------------------------------------------------------
umfpack_gn_%.o: ../Source/umfpack_%.c $(INC)
$(C) -c $< -o $@
#-------------------------------------------------------------------------------
# Create the ../Lib/libumfpack.a library
#-------------------------------------------------------------------------------
../Lib/libumfpack.a: $(II) $(LL) $(GN) $(DI) $(DL) $(ZI) $(ZL)
$(AR) ../Lib/libumfpack.a $^
- $(RANLIB) ../Lib/libumfpack.a
#-------------------------------------------------------------------------------
# Remove all but the files in the original distribution
#-------------------------------------------------------------------------------
purge: clean
- $(RM) ../Lib/libumfpack.a
clean:
- $(RM) $(CLEAN)