1# Several changes made by HCP so this would build without trouble
2# on a Linux/g77 system.
3# (1) changed step to build library to use ar instead of update
4#     (update must mean something different on someone elses Unix.)
5# (2) Added make clean step
6# (3) In test step, changed a.out to ./a.out for cautious folk who don't
7#     have "." in their PATH.
8# (4) Change FFLAGS from -O to -O2 -funroll-loops
9# (5) Specify FC=gcc in case /usr/bin/f77 is not a link to g77
10#     (as it won't be if you have f77reorder installed)
11# (6) Added targets shared and installshared to make and install a shared
12#     version of the library. You need /usr/local/lib in /etc/ld.so.conf
13#     for this to work
14# (7) Modified names for dble prec version
15LIB=dfftpack
16
17# Use these lines for Linux/g77
18FC=g77
19FFLAGS=-O2 -funroll-loops -fexpensive-optimizations
20
21# Use these lines for Solaris
22#FC=f77
23#FFLAGS=-fast -O5
24
25OBJ=\
26zfftb.o\
27cfftb1.o\
28zfftf.o\
29cfftf1.o\
30zffti.o\
31cffti1.o\
32dcosqb.o\
33cosqb1.o\
34dcosqf.o\
35cosqf1.o\
36dcosqi.o\
37dcost.o\
38dcosti.o\
39ezfft1.o\
40dzfftb.o\
41dzfftf.o\
42dzffti.o\
43passb.o\
44passb2.o\
45passb3.o\
46passb4.o\
47passb5.o\
48passf.o\
49passf2.o\
50passf3.o\
51passf4.o\
52passf5.o\
53radb2.o\
54radb3.o\
55radb4.o\
56radb5.o\
57radbg.o\
58radf2.o\
59radf3.o\
60radf4.o\
61radf5.o\
62radfg.o\
63dfftb.o\
64rfftb1.o\
65dfftf.o\
66rfftf1.o\
67dffti.o\
68rffti1.o\
69dsinqb.o\
70dsinqf.o\
71dsinqi.o\
72dsint.o\
73sint1.o\
74dsinti.o
75
76lib$(LIB).a:	$(OBJ)
77	ar -rcs lib$(LIB).a $(OBJ)
78
79shared:$(OBJ)
80	$(FC)  -shared -o lib$(LIB).so $(OBJ)
81
82install:	lib$(LIB).a
83	mv lib$(LIB).a /usr/local/lib
84	rm *.o
85
86installshared:lib$(LIB).so
87	mv lib$(LIB).so /usr/local/lib
88	rm *.o
89	ldconfig
90
91test: test.o
92	$(FC) test.o -L./ -l$(LIB)
93	time ./a.out
94
95clean:
96	 rm -f -r *.o *.a *.so
97