-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile.fftw1
194 lines (141 loc) · 5.73 KB
/
Makefile.fftw1
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
## /***************************************************************************
## **************************************************************************
##
## SOFT: SO(3) Fourier Transforms
## Version 2.0
##
## Copyright (c) 2003, 2004, 2007 Peter Kostelec, Dan Rockmore
##
## This file is part of SOFT.
##
## SOFT is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation; either version 3 of the License, or
## (at your option) any later version.
##
## SOFT is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
## GNU General Public License for more details.
##
## You should have received a copy of the GNU General Public License
## along with this program. If not, see <http://www.gnu.org/licenses/>.
##
## See the accompanying LICENSE file for details.
##
## ************************************************************************
## ************************************************************************/
##
FFTWINC = -I/usr/local/include
FFTWLIB = -L/usr/local/lib -lfftw3
## define WALLCLOCK if want walltime and not cputime
## CFLAGS = -Wall -g -DWALLCLOCK
## CFLAGS = -Wall -g
## CFLAGS = -O3 -pg
## CFLAGS = -O3
## CFLAGS = -Wall -g -I./include $(FFTWINC)
CFLAGS = -Wall -O3 -I./include $(FFTWINC)
LIBNAME = libsoft1.a
LDFLAGS = -L. -lsoft1 -lm $(FFTWLIB)
COMSRC = $(wildcard common/*.c)
COMOBJ = $(patsubst %.c,%.o,$(COMSRC))
LIBSRC = $(COMSRC) \
$(wildcard lib1/*.c)
LIBOBJ = $(patsubst %.c,%.o,$(LIBSRC))
EXELIST = test_wigSpec test_genWig test_Wigner_Analysis \
test_Wigner_Synthesis test_Wigner_Naive test_Wigner_angle
EXELOC = $(patsubst %,bin/%,$(EXELIST))
EXE1LIST = test_soft_fftw test_soft_fftw_for test_soft_fftw_inv \
test_soft_fftw_pc test_soft_fftw_nt test_s2_rotate_fftw \
test_s2_rotate_fftw_wrap test_s2_rotate_fftw_mem \
test_soft_fftw_correlate2 test_soft_fftw_correlate2_wrap
EXE1LOC = $(patsubst %,bin/%,$(EXE1LIST))
###################################################################
##################################################################
######
###### things that can be made
######
##################################################################
##################################################################
# things that can be made
depend:
makedepend -I. ${FFTWINC} $(SRC)
clean:
rm -f {common,lib1,examples,examples1}/*.o
vclean:
rm -f libsoft1.a $(EXELOC) $(EXE1LOC) {common,lib1,examples,examples1}/*.o
libsoft1.a: $(LIBOBJ)
ar vru $(LIBNAME) $(LIBOBJ)
ranlib $(LIBNAME)
lib: libsoft1.a
#
# making the example Wigner routines
#
examples: $(EXELIST)
#
# making the example SO(3) FT routines
#
examples1: $(EXE1LIST)
tests: examples examples1
all: lib examples examples1
########################################################
#
# making the executables
#
########################################################
#
# discrete Wigner transform routines
#
test_wigSpec: examples/test_wigSpec.o libsoft1.a
$(CC) $(CFLAGS) examples/test_wigSpec.o \
$(LDFLAGS) -o bin/test_wigSpec
test_genWig: examples/test_genWig.o libsoft1.a
$(CC) examples/test_genWig.o \
$(LDFLAGS) -o bin/test_genWig
test_Wigner_angle: examples/test_Wigner_angle.o libsoft1.a
$(CC) $(CFLAGS) examples/test_Wigner_angle.o \
$(LDFLAGS) -o bin/test_Wigner_angle
test_Wigner_Analysis: examples/test_Wigner_Analysis.o libsoft1.a
$(CC) $(CFLAGS) examples/test_Wigner_Analysis.o \
$(LDFLAGS) -o bin/test_Wigner_Analysis
test_Wigner_Synthesis: examples/test_Wigner_Synthesis.o libsoft1.a
$(CC) $(CFLAGS) examples/test_Wigner_Synthesis.o \
$(LDFLAGS) -o bin/test_Wigner_Synthesis
test_Wigner_Naive: examples/test_Wigner_Naive.o libsoft1.a
$(CC) $(CFLAGS) examples/test_Wigner_Naive.o \
$(LDFLAGS) -o bin/test_Wigner_Naive
#
# SO(3) routines that depend on FFTW
#
test_soft_fftw: examples1/test_soft_fftw.o libsoft1.a
$(CC) $(CFLAGS) examples1/test_soft_fftw.o \
$(LDFLAGS) ${FFTWLIB} -o bin/test_soft_fftw
test_soft_fftw_for: examples1/test_soft_fftw_for.o libsoft1.a
$(CC) $(CFLAGS) examples1/test_soft_fftw_for.o \
$(LDFLAGS) ${FFTWLIB} -o bin/test_soft_fftw_for
test_soft_fftw_inv: examples1/test_soft_fftw_inv.o libsoft1.a
$(CC) $(CFLAGS) examples1/test_soft_fftw_inv.o \
$(LDFLAGS) ${FFTWLIB} -o bin/test_soft_fftw_inv
test_soft_fftw_pc: examples1/test_soft_fftw_pc.o libsoft1.a
$(CC) $(CFLAGS) examples1/test_soft_fftw_pc.o \
$(LDFLAGS) ${FFTWLIB} -o bin/test_soft_fftw_pc
test_soft_fftw_nt: examples1/test_soft_fftw_nt.o libsoft1.a
$(CC) $(CFLAGS) examples1/test_soft_fftw_nt.o \
$(LDFLAGS) ${FFTWLIB} -o bin/test_soft_fftw_nt
test_s2_rotate_fftw: examples1/test_s2_rotate_fftw.o libsoft1.a
$(CC) $(CFLAGS) examples1/test_s2_rotate_fftw.o \
$(LDFLAGS) ${FFTWLIB} -o bin/test_s2_rotate_fftw
test_s2_rotate_fftw_wrap: examples1/test_s2_rotate_fftw_wrap.o libsoft1.a
$(CC) $(CFLAGS) examples1/test_s2_rotate_fftw_wrap.o \
$(LDFLAGS) ${FFTWLIB} -o bin/test_s2_rotate_fftw_wrap
test_s2_rotate_fftw_mem: examples1/test_s2_rotate_fftw_mem.o libsoft1.a
$(CC) $(CFLAGS) examples1/test_s2_rotate_fftw_mem.o \
$(LDFLAGS) ${FFTWLIB} -o bin/test_s2_rotate_fftw_mem
test_soft_fftw_correlate2: examples1/test_soft_fftw_correlate2.o libsoft1.a
$(CC) $(CFLAGS) examples1/test_soft_fftw_correlate2.o \
$(LDFLAGS) ${FFTWLIB} -o bin/test_soft_fftw_correlate2
test_soft_fftw_correlate2_wrap: examples1/test_soft_fftw_correlate2_wrap.o libsoft1.a
$(CC) $(CFLAGS) examples1/test_soft_fftw_correlate2_wrap.o \
$(LDFLAGS) ${FFTWLIB} -o bin/test_soft_fftw_correlate2_wrap
# and now for LOTS OF dependencies ...
# DO NOT DELETE THIS LINE -- make depend depends on it.