]> git.pld-linux.org Git - packages/SPQR.git/blob - SPQR-shared.patch
86fd9fa2180db3a696a81a415bd815f2e6d98071
[packages/SPQR.git] / SPQR-shared.patch
1 --- SPQR/Lib/Makefile.orig      2012-01-08 12:07:16.049602813 +0100
2 +++ SPQR/Lib/Makefile   2012-01-08 12:22:07.552965999 +0100
3 @@ -11,6 +11,7 @@
4  #-------------------------------------------------------------------------------
5  # the optional Partition module requires METIS, CAMD, and CCOLAMD
6  CONFIG = -DNPARTITION
7 +LIB_WITH_PARTITION =
8  # check if METIS is requested and available
9  ifeq (,$(findstring -DNPARTITION, $(CHOLMOD_CONFIG)))
10      # METIS is requested.  See if it is available
11 @@ -18,6 +19,7 @@
12         # assume CAMD and CCOLAMD are available
13                  # METIS, CAMD, and CCOLAMD is available
14                  CONFIG =
15 +               LIB_WITH_PARTITION = $(METIS) -lccolamd -lcamd
16      endif
17  endif
18  #-------------------------------------------------------------------------------
19 @@ -28,14 +30,14 @@
20  #      -Wredundant-decls -Wdisabled-optimization \
21  #      -ansi -fexceptions
22  
23 -all: libspqr.a
24 +all: libspqr.la
25  
26 -library: libspqr.a
27 +library: libspqr.la
28  
29  purge: distclean
30  
31  distclean: clean
32 -       - $(RM) libspqr.a
33 +       - $(RM) libspqr.la
34  
35  clean:
36         - $(RM) $(CLEAN)
37 @@ -92,126 +94,130 @@
38  
39  C = $(CXX) $(CF) $(SPQR_CONFIG) $(CONFIG) $(I)
40  
41 -libspqr.a: $(OBJ)
42 -       $(ARCHIVE)  libspqr.a $(OBJ)
43 -       - $(RANLIB) libspqr.a
44 +libspqr.la: $(OBJ)
45 +       libtool --tag=CC --mode=link $(CXX) $(LDFLAGS) -o libspqr.la -rpath $(libdir) $(OBJ:.o=.lo) \
46 +               -lcholmod $(LIB_WITH_PARTITION) -lm
47 +
48 +install: libspqr.la
49 +       install -d $(DESTDIR)$(libdir)
50 +       libtool --mode=install cp libspqr.la $(DESTDIR)$(libdir)/libspqr.la
51  
52  spqr_1colamd.o: ../Source/spqr_1colamd.cpp
53 -       $(C) -c $<
54 +       libtool --tag=CXX --mode=compile $(C) -c $<
55  
56  spqr_1factor.o: ../Source/spqr_1factor.cpp
57 -       $(C) -c $<
58 +       libtool --tag=CXX --mode=compile $(C) -c $<
59  
60  spqr_1fixed.o: ../Source/spqr_1fixed.cpp
61 -       $(C) -c $<
62 +       libtool --tag=CXX --mode=compile $(C) -c $<
63  
64  spqr_analyze.o: ../Source/spqr_analyze.cpp
65 -       $(C) -c $<
66 +       libtool --tag=CXX --mode=compile $(C) -c $<
67  
68  spqr_parallel.o: ../Source/spqr_parallel.cpp
69 -       $(C) -c $<
70 +       libtool --tag=CXX --mode=compile $(C) -c $<
71  
72  spqr_kernel.o: ../Source/spqr_kernel.cpp
73 -       $(C) -c $<
74 +       libtool --tag=CXX --mode=compile $(C) -c $<
75  
76  spqr_append.o: ../Source/spqr_append.cpp
77 -       $(C) -c $<
78 +       libtool --tag=CXX --mode=compile $(C) -c $<
79  
80  spqr_assemble.o: ../Source/spqr_assemble.cpp
81 -       $(C) -c $<
82 +       libtool --tag=CXX --mode=compile $(C) -c $<
83  
84  spqr_cpack.o: ../Source/spqr_cpack.cpp
85 -       $(C) -c $<
86 +       libtool --tag=CXX --mode=compile $(C) -c $<
87  
88  spqr_csize.o: ../Source/spqr_csize.cpp
89 -       $(C) -c $<
90 +       libtool --tag=CXX --mode=compile $(C) -c $<
91  
92  spqr_cumsum.o: ../Source/spqr_cumsum.cpp
93 -       $(C) -c $<
94 +       libtool --tag=CXX --mode=compile $(C) -c $<
95  
96  spqr_debug.o: ../Source/spqr_debug.cpp
97 -       $(C) -c $<
98 +       libtool --tag=CXX --mode=compile $(C) -c $<
99  
100  spqr_factorize.o: ../Source/spqr_factorize.cpp
101 -       $(C) -c $<
102 +       libtool --tag=CXX --mode=compile $(C) -c $<
103  
104  spqr_fcsize.o: ../Source/spqr_fcsize.cpp
105 -       $(C) -c $<
106 +       libtool --tag=CXX --mode=compile $(C) -c $<
107  
108  spqr_freefac.o: ../Source/spqr_freefac.cpp
109 -       $(C) -c $<
110 +       libtool --tag=CXX --mode=compile $(C) -c $<
111  
112  spqr_freenum.o: ../Source/spqr_freenum.cpp
113 -       $(C) -c $<
114 +       libtool --tag=CXX --mode=compile $(C) -c $<
115  
116  spqr_freesym.o: ../Source/spqr_freesym.cpp
117 -       $(C) -c $<
118 +       libtool --tag=CXX --mode=compile $(C) -c $<
119  
120  spqr_fsize.o: ../Source/spqr_fsize.cpp
121 -       $(C) -c $<
122 +       libtool --tag=CXX --mode=compile $(C) -c $<
123  
124  spqr_happly.o: ../Source/spqr_happly.cpp
125 -       $(C) -c $<
126 +       libtool --tag=CXX --mode=compile $(C) -c $<
127  
128  spqr_panel.o: ../Source/spqr_panel.cpp
129 -       $(C) -c $<
130 +       libtool --tag=CXX --mode=compile $(C) -c $<
131  
132  spqr_happly_work.o: ../Source/spqr_happly_work.cpp
133 -       $(C) -c $<
134 +       libtool --tag=CXX --mode=compile $(C) -c $<
135  
136  spqr_hpinv.o: ../Source/spqr_hpinv.cpp
137 -       $(C) -c $<
138 +       libtool --tag=CXX --mode=compile $(C) -c $<
139  
140  spqr_larftb.o: ../Source/spqr_larftb.cpp
141 -       $(C) -c $<
142 +       libtool --tag=CXX --mode=compile $(C) -c $<
143  
144  spqr_rconvert.o: ../Source/spqr_rconvert.cpp
145 -       $(C) -c $<
146 +       libtool --tag=CXX --mode=compile $(C) -c $<
147  
148  spqr_rcount.o: ../Source/spqr_rcount.cpp
149 -       $(C) -c $<
150 +       libtool --tag=CXX --mode=compile $(C) -c $<
151  
152  spqr_rhpack.o: ../Source/spqr_rhpack.cpp
153 -       $(C) -c $<
154 +       libtool --tag=CXX --mode=compile $(C) -c $<
155  
156  spqr_rsolve.o: ../Source/spqr_rsolve.cpp
157 -       $(C) -c $<
158 +       libtool --tag=CXX --mode=compile $(C) -c $<
159  
160  spqr_shift.o: ../Source/spqr_shift.cpp
161 -       $(C) -c $<
162 +       libtool --tag=CXX --mode=compile $(C) -c $<
163  
164  spqr_stranspose1.o: ../Source/spqr_stranspose1.cpp
165 -       $(C) -c $<
166 +       libtool --tag=CXX --mode=compile $(C) -c $<
167  
168  spqr_stranspose2.o: ../Source/spqr_stranspose2.cpp
169 -       $(C) -c $<
170 +       libtool --tag=CXX --mode=compile $(C) -c $<
171  
172  spqr_trapezoidal.o: ../Source/spqr_trapezoidal.cpp
173 -       $(C) -c $<
174 +       libtool --tag=CXX --mode=compile $(C) -c $<
175  
176  spqr_type.o: ../Source/spqr_type.cpp
177 -       $(C) -c $<
178 +       libtool --tag=CXX --mode=compile $(C) -c $<
179  
180  spqr_front.o: ../Source/spqr_front.cpp
181 -       $(C) -c $<
182 +       libtool --tag=CXX --mode=compile $(C) -c $<
183  
184  SuiteSparseQR_expert.o: ../Source/SuiteSparseQR_expert.cpp
185 -       $(C) -c $<
186 +       libtool --tag=CXX --mode=compile $(C) -c $<
187  
188  spqr_maxcolnorm.o: ../Source/spqr_maxcolnorm.cpp
189 -       $(C) -c $<
190 +       libtool --tag=CXX --mode=compile $(C) -c $<
191  
192  SuiteSparseQR_qmult.o: ../Source/SuiteSparseQR_qmult.cpp
193 -       $(C) -c $<
194 +       libtool --tag=CXX --mode=compile $(C) -c $<
195  
196  SuiteSparseQR.o: ../Source/SuiteSparseQR.cpp
197 -       $(C) -c $<
198 +       libtool --tag=CXX --mode=compile $(C) -c $<
199  
200  spqr_tol.o: ../Source/spqr_tol.cpp
201 -       $(C) -c $<
202 +       libtool --tag=CXX --mode=compile $(C) -c $<
203  
204  SuiteSparseQR_C.o: ../Source/SuiteSparseQR_C.cpp
205 -       $(C) -c $<
206 +       libtool --tag=CXX --mode=compile $(C) -c $<
207  
208  spqr_rmap.o: ../Source/spqr_rmap.cpp
209 -       $(C) -c $<
210 +       libtool --tag=CXX --mode=compile $(C) -c $<
211 --- SPQR/Demo/Makefile.orig     2012-06-27 19:01:18.418478492 +0200
212 +++ SPQR/Demo/Makefile  2012-06-27 19:01:37.301811034 +0200
213 @@ -23,7 +23,7 @@
214  endif
215  #-------------------------------------------------------------------------------
216  
217 -CLIB = ../Lib/libspqr.a \
218 +CLIB = ../Lib/libspqr.la \
219         -lcholmod -lamd \
220         -lcolamd $(LIB_WITH_PARTITION)
221  
222 @@ -140,22 +140,22 @@
223  LIBS = $(CLIB) $(LIB) $(FLIB) $(TBB)
224  
225  qrsimple: qrsimple.cpp library $(INC)
226 -       $(C) qrsimple.cpp -o qrsimple $(LIBS)
227 +       libtool --mode=link --tag=CXX $(C) qrsimple.cpp -o qrsimple $(LIBS)
228  
229  qrdemo: qrdemo.cpp library $(INC)
230 -       $(C) qrdemo.cpp -o qrdemo $(LIBS)
231 +       libtool --mode=link --tag=CXX $(C) qrdemo.cpp -o qrdemo $(LIBS)
232  
233  # compile the C code with gcc, but link with g++ to use SuiteSparseQR:
234  
235  qrdemoc.o: qrdemoc.c $(INC)
236 -       $(CC) $(CF) $(SPQR_CONFIG) -ansi $(I) -c $<
237 +       libtool --mode=compile --tag=CC $(CC) $(CF) $(SPQR_CONFIG) -ansi $(I) -c $<
238  
239  qrdemoc: qrdemoc.o library $(INC)
240 -       $(C) -o qrdemoc qrdemoc.o $(LIBS)
241 +       libtool --mode=link --tag=CXX $(C) -o qrdemoc qrdemoc.o $(LIBS)
242  
243  qrsimplec.o: qrsimplec.c $(INC)
244 -       $(CC) $(CF) $(SPQR_CONFIG) -ansi $(I) -c $<
245 +       libtool --mode=compile --tag=CC $(CC) $(CF) $(SPQR_CONFIG) -ansi $(I) -c $<
246  
247  qrsimplec: qrsimplec.o library $(INC)
248 -       $(C) -o qrsimplec qrsimplec.o $(LIBS)
249 +       libtool --mode=link --tag=CXX $(C) -o qrsimplec qrsimplec.o $(LIBS)
250  
This page took 0.061532 seconds and 2 git commands to generate.