1 | ACLOCAL_AMFLAGS = -I ../m4 |
---|
2 | |
---|
3 | PACKAGES=include/factory libfac |
---|
4 | SUBDIRS=$(PACKAGES) |
---|
5 | |
---|
6 | CXXTEMPLFLAGS=-ftrapv |
---|
7 | ## -fno-implicit-templates |
---|
8 | |
---|
9 | AM_CPPFLAGS = -I${builddir}/include -I${srcdir}/include $(FLINT_CFLAGS) ${GMP_CFLAGS} ${NTL_CFLAGS} ${OMALLOC_CFLAGS} |
---|
10 | |
---|
11 | if WANT_DEBUG |
---|
12 | LIB_G=libfactory_g.la |
---|
13 | else |
---|
14 | LIB_G= |
---|
15 | endif |
---|
16 | |
---|
17 | lib_LTLIBRARIES = libfactory.la ${LIB_G} |
---|
18 | |
---|
19 | libfactory_la_CXXFLAGS = -O3 -fomit-frame-pointer ${CXXTEMPLFLAGS} |
---|
20 | libfactory_la_LIBADD = ${abs_builddir}/libfac/libfac.la $(FLINT_LIBS) ${GMP_LIBS} ${NTL_LIBS} |
---|
21 | libfactory_la_LDFLAGS = -release ${PACKAGE_VERSION} |
---|
22 | libfactory_g_la_CXXFLAGS = -g -Wextra -Wall -pedantic -Wno-long-long ${CXXTEMPLFLAGS} |
---|
23 | libfactory_g_la_LIBADD = ${abs_builddir}/libfac/libfac_g.la $(FLINT_LIBS) ${GMP_LIBS} ${NTL_LIBS} |
---|
24 | libfactory_g_la_LDFLAGS = -release ${PACKAGE_VERSION} |
---|
25 | |
---|
26 | |
---|
27 | |
---|
28 | # factory source files |
---|
29 | SOURCES = \ |
---|
30 | algext.cc \ |
---|
31 | canonicalform.cc \ |
---|
32 | cf_algorithm.cc \ |
---|
33 | cf_binom.cc \ |
---|
34 | cf_char.cc \ |
---|
35 | cf_chinese.cc \ |
---|
36 | cf_cyclo.cc \ |
---|
37 | cf_eval.cc \ |
---|
38 | cf_factor.cc \ |
---|
39 | cf_factory.cc \ |
---|
40 | cf_gcd.cc \ |
---|
41 | cf_gcd_smallp.cc \ |
---|
42 | cf_generator.cc \ |
---|
43 | cf_globals.cc \ |
---|
44 | cf_hnf.cc \ |
---|
45 | cf_inline.cc \ |
---|
46 | cf_irred.cc \ |
---|
47 | cf_iter.cc \ |
---|
48 | cf_iter_inline.cc \ |
---|
49 | cf_linsys.cc \ |
---|
50 | cf_map.cc \ |
---|
51 | cf_map_ext.cc \ |
---|
52 | cfNewtonPolygon.cc \ |
---|
53 | cfModResultant.cc \ |
---|
54 | cf_ops.cc \ |
---|
55 | cf_primes.cc \ |
---|
56 | cf_random.cc \ |
---|
57 | cf_resultant.cc \ |
---|
58 | cf_reval.cc \ |
---|
59 | cf_switches.cc \ |
---|
60 | cf_util.cc \ |
---|
61 | debug.cc \ |
---|
62 | DegreePattern.cc \ |
---|
63 | ExtensionInfo.cc \ |
---|
64 | facAlgExt.cc \ |
---|
65 | facBivar.cc \ |
---|
66 | fac_berlekamp.cc \ |
---|
67 | fac_cantzass.cc \ |
---|
68 | fac_distrib.cc \ |
---|
69 | fac_ezgcd.cc \ |
---|
70 | facFactorize.cc \ |
---|
71 | fac_iterfor.cc \ |
---|
72 | fac_multihensel.cc \ |
---|
73 | fac_multivar.cc \ |
---|
74 | fac_sqrfree.cc \ |
---|
75 | fac_univar.cc \ |
---|
76 | fac_util.cc \ |
---|
77 | facFqBivar.cc \ |
---|
78 | facFqBivarUtil.cc \ |
---|
79 | facFqFactorize.cc \ |
---|
80 | facFqFactorizeUtil.cc \ |
---|
81 | facFqSquarefree.cc \ |
---|
82 | facHensel.cc \ |
---|
83 | facIrredTest.cc \ |
---|
84 | facMul.cc \ |
---|
85 | facSparseHensel.cc \ |
---|
86 | ffops.cc \ |
---|
87 | FLINTconvert.cc \ |
---|
88 | gf_tabutil.cc \ |
---|
89 | gfops.cc \ |
---|
90 | imm.cc \ |
---|
91 | int_cf.cc \ |
---|
92 | int_int.cc \ |
---|
93 | int_intdiv.cc \ |
---|
94 | int_poly.cc \ |
---|
95 | int_pp.cc \ |
---|
96 | int_rat.cc \ |
---|
97 | variable.cc \ |
---|
98 | NTLconvert.cc \ |
---|
99 | singext.cc \ |
---|
100 | parseutil.cc \ |
---|
101 | ftmpl_inst.cc |
---|
102 | |
---|
103 | if WITH_PARSER_FOR_CANONICAL_FORM |
---|
104 | SOURCES += readcf.yy |
---|
105 | endif |
---|
106 | |
---|
107 | libfactory_la_SOURCES = $(SOURCES) |
---|
108 | libfactory_g_la_SOURCES = $(SOURCES) |
---|
109 | |
---|
110 | libfactory_la_CPPFLAGS = ${AM_CPPFLAGS} -DHAVE_CONFIG_H -DOM_NDEBUG -DNDEBUG |
---|
111 | libfactory_g_la_CPPFLAGS= ${AM_CPPFLAGS} -DHAVE_CONFIG_H |
---|
112 | |
---|
113 | nodist_libfactory_la_SOURCES = cplusplus.h factory.h factoryconf.h |
---|
114 | nodist_libfactory_g_la_SOURCES = cplusplus.h factory.h factoryconf.h |
---|
115 | |
---|
116 | # factory header files |
---|
117 | factory_headers = \ |
---|
118 | cf_assert.h \ |
---|
119 | canonicalform.h \ |
---|
120 | cf_algorithm.h \ |
---|
121 | cf_cyclo.h \ |
---|
122 | cf_binom.h \ |
---|
123 | cf_defs.h \ |
---|
124 | cf_eval.h \ |
---|
125 | cf_factory.h \ |
---|
126 | cf_generator.h \ |
---|
127 | cf_globals.h \ |
---|
128 | cf_gcd_smallp.h \ |
---|
129 | cf_hnf.h \ |
---|
130 | cf_irred.h \ |
---|
131 | cf_iter.h \ |
---|
132 | cf_map.h \ |
---|
133 | cf_map_ext.h \ |
---|
134 | cfNewtonPolygon.h \ |
---|
135 | cfModResultant.h \ |
---|
136 | cf_primes.h \ |
---|
137 | cf_primetab.h \ |
---|
138 | cf_random.h \ |
---|
139 | cf_reval.h \ |
---|
140 | cf_switches.h \ |
---|
141 | cf_util.h \ |
---|
142 | debug.h \ |
---|
143 | DegreePattern.h \ |
---|
144 | ExtensionInfo.h \ |
---|
145 | facAlgExt.h \ |
---|
146 | facBivar.h \ |
---|
147 | fac_berlekamp.h \ |
---|
148 | fac_cantzass.h \ |
---|
149 | fac_distrib.h \ |
---|
150 | facFactorize.h \ |
---|
151 | fac_iterfor.h \ |
---|
152 | fac_multivar.h \ |
---|
153 | fac_sqrfree.h \ |
---|
154 | fac_univar.h \ |
---|
155 | fac_util.h \ |
---|
156 | facFqBivar.h \ |
---|
157 | facFqBivarUtil.h \ |
---|
158 | facFqFactorize.h \ |
---|
159 | facFqFactorizeUtil.h \ |
---|
160 | facFqSquarefree.h \ |
---|
161 | facHensel.h \ |
---|
162 | facIrredTest.h \ |
---|
163 | facMul.h \ |
---|
164 | facSparseHensel.h \ |
---|
165 | ffops.h \ |
---|
166 | FLINTconvert.h \ |
---|
167 | gf_tabutil.h \ |
---|
168 | gfops.h \ |
---|
169 | gmpext.h \ |
---|
170 | imm.h \ |
---|
171 | int_cf.h \ |
---|
172 | int_int.h \ |
---|
173 | int_poly.h \ |
---|
174 | int_pp.h \ |
---|
175 | int_rat.h \ |
---|
176 | timing.h \ |
---|
177 | variable.h \ |
---|
178 | NTLconvert.h \ |
---|
179 | algext.h \ |
---|
180 | singext.h \ |
---|
181 | parseutil.h |
---|
182 | |
---|
183 | noinst_HEADERS = $(factory_headers) |
---|
184 | |
---|
185 | libfactory_includedir = ${includedir}/factory |
---|
186 | |
---|
187 | nodist_libfactory_include_HEADERS = cplusplus.h factory.h factoryconf.h |
---|
188 | |
---|
189 | |
---|
190 | #################################################### |
---|
191 | # Documentation |
---|
192 | include $(top_srcdir)/aminclude.am |
---|
193 | |
---|
194 | doxysrc = $(SOURCES) parseutil.cc |
---|
195 | doxyincl = $(factory_headers) parseutil.h |
---|
196 | |
---|
197 | # doxygen targets |
---|
198 | doxy: factory.cfg $(doxysrc) $(doxyincl) |
---|
199 | doxygen $< |
---|
200 | |
---|
201 | doxyclean: |
---|
202 | rm -rf doxygen |
---|
203 | |
---|
204 | #################################################### |
---|
205 | # the precomputed GF(q)-tables |
---|
206 | |
---|
207 | gftablesdir=$(datadir)/gftables |
---|
208 | dist_gftables_DATA = gftables/10201 gftables/1024 gftables/10609 gftables/11449 \ |
---|
209 | gftables/11881 gftables/121 gftables/12167 gftables/125 gftables/12769 \ |
---|
210 | gftables/128 gftables/1331 gftables/1369 gftables/14641 \ |
---|
211 | gftables/15625 gftables/16 gftables/16129 gftables/16384 \ |
---|
212 | gftables/16807 gftables/1681 gftables/169 gftables/17161 gftables/1849 \ |
---|
213 | gftables/18769 gftables/19321 gftables/19683 gftables/2048 \ |
---|
214 | gftables/2187 gftables/2197 gftables/2209 gftables/22201 \ |
---|
215 | gftables/22801 gftables/2401 gftables/243 gftables/24389 \ |
---|
216 | gftables/24649 gftables/25 gftables/256 gftables/26569 gftables/27 \ |
---|
217 | gftables/27889 gftables/2809 gftables/28561 gftables/289 \ |
---|
218 | gftables/29791 gftables/29929 gftables/3125 gftables/32 gftables/32041 \ |
---|
219 | gftables/32761 gftables/32768 gftables/343 gftables/3481 gftables/361 \ |
---|
220 | gftables/36481 gftables/3721 gftables/37249 gftables/38809 \ |
---|
221 | gftables/39601 gftables/4 gftables/4096 gftables/44521 gftables/4489 \ |
---|
222 | gftables/49 gftables/4913 gftables/49729 gftables/5041 \ |
---|
223 | gftables/50653 gftables/512 gftables/51529 gftables/52441 gftables/529 \ |
---|
224 | gftables/5329 gftables/54289 gftables/57121 gftables/58081 \ |
---|
225 | gftables/59049 gftables/6241 gftables/625 gftables/63001 \ |
---|
226 | gftables/64 gftables/6561 gftables/6859 gftables/6889 gftables/729 \ |
---|
227 | gftables/7921 gftables/8 gftables/81 gftables/8192 gftables/841 \ |
---|
228 | gftables/9 gftables/9409 gftables/961 |
---|
229 | |
---|
230 | |
---|
231 | #################################################### |
---|
232 | # Support for building GF(q)-tables |
---|
233 | # |
---|
234 | # gengftables needs libfactory.la and factory.h AND is needed for |
---|
235 | # generating gftable but the tables are not necessarily needed to |
---|
236 | # compile and use libfactory (though it will be a lot slower). |
---|
237 | |
---|
238 | EXTRA_PROGRAMS = gengftables |
---|
239 | gengftables_SOURCES = gengftables-conway.cc |
---|
240 | gengftables_LDADD = -L${builddir} -lfactory $(FLINT_LIBS) $(GMP_LIBS) $(NTL_LIBS) |
---|
241 | |
---|
242 | |
---|
243 | #################################################### |
---|
244 | # These files listed below are not used anywhere but are included in |
---|
245 | # the distribution. So they will be tacked on to EXTRA_DIST. |
---|
246 | |
---|
247 | templatesrc = templates/ftmpl_array.cc \ |
---|
248 | templates/ftmpl_factor.cc \ |
---|
249 | templates/ftmpl_functions.h \ |
---|
250 | templates/ftmpl_list.cc \ |
---|
251 | templates/ftmpl_matrix.cc |
---|
252 | |
---|
253 | # header templates |
---|
254 | hdrtemplsrc = factoryconf.template \ |
---|
255 | factory.template |
---|
256 | |
---|
257 | EXTRA_DIST = test_install.cc \ |
---|
258 | $(templatesrc) $(hdrtemplsrc) \ |
---|
259 | doxygen.cfg factory.cfg \ |
---|
260 | examples/application.cc \ |
---|
261 | examples/factorize.cc examples/gcd.cc \ |
---|
262 | bin/folding.el bin/fold-docu.el \ |
---|
263 | bin/makeheader bin/gen-readcf readcf.yy |
---|
264 | |
---|
265 | ################################################## |
---|
266 | # autogenerated sources |
---|
267 | |
---|
268 | noinst_PROGRAMS = cplusplus |
---|
269 | |
---|
270 | BUILT_SOURCES = cplusplus.h factory.h factoryconf.h |
---|
271 | |
---|
272 | CLEANFILES = $(BUILT_SOURCES) include/factory/factory.h include/factory/factoryconf.h include/factory/cplusplus.h |
---|
273 | |
---|
274 | distclean-local: |
---|
275 | -rm -f readcf.cc |
---|
276 | |
---|
277 | cplusplus_SOURCES = cplusplus.cc |
---|
278 | |
---|
279 | cplusplus.h: cplusplus |
---|
280 | ./cplusplus >$@ |
---|
281 | cp $@ include/factory/ |
---|
282 | |
---|
283 | .template.h: |
---|
284 | ${srcdir}/bin/makeheader $< $@ |
---|
285 | cp $@ include/factory/ |
---|
286 | |
---|
287 | # factory/gfops.cc has the gftables path hardcoded in, so we create a |
---|
288 | # symlink. Remove this rule once gfopts.cc has been fixed. Note that |
---|
289 | # check-local would run in parallel with check, so we can't use it |
---|
290 | # here! |
---|
291 | all-local: |
---|
292 | [ -d ${builddir}/gftables ] || ln -s ${srcdir}/gftables ${builddir} |
---|
293 | |
---|
294 | #################################################### |
---|
295 | ## Test program |
---|
296 | ## |
---|
297 | if WANT_DEBUG |
---|
298 | TESTS = test-s-g test-s-r test-d-g test-d-r |
---|
299 | else |
---|
300 | TESTS = test-s-r test-d-r |
---|
301 | endif |
---|
302 | check_PROGRAMS = $(TESTS) |
---|
303 | |
---|
304 | AMLDFLAGS = -L${abs_builddir} |
---|
305 | |
---|
306 | TESTSSOURCES = test.cc |
---|
307 | |
---|
308 | # The following ('..') is a hack for a while... |
---|
309 | TESTADDLIBDIRS = ${OMALLOC_LDFLAGS} |
---|
310 | TESTADDLIB = $(TESTADDLIBDIRS) $(OMALLOC_R_LDADD) |
---|
311 | TESTADDLIBDEBUG = $(TESTADDLIBDIRS) $(OMALLOC_G_LDADD) |
---|
312 | |
---|
313 | test_s_g_SOURCES = $(TESTSSOURCES) |
---|
314 | test_s_g_CFLAGS = -g -Wextra -Wall -pedantic -Wno-long-long -fomit-frame-pointer |
---|
315 | #ftmpl_inst.o |
---|
316 | test_s_g_LDADD = -lfactory_g $(FLINT_LIBS) $(GMP_LIBS) $(NTL_LIBS) $(TESTADDLIBDEBUG) |
---|
317 | |
---|
318 | test_s_r_SOURCES = $(TESTSSOURCES) |
---|
319 | test_s_r_CFLAGS = -O3 -fomit-frame-pointer |
---|
320 | #ftmpl_inst.o |
---|
321 | test_s_r_LDADD = -lfactory $(FLINT_LIBS) $(GMP_LIBS) $(NTL_LIBS) $(TESTADDLIB) |
---|
322 | |
---|
323 | test_s_r_LDFLAGS = -static ${AMLDFLAGS} |
---|
324 | test_s_g_LDFLAGS = -static ${AMLDFLAGS} |
---|
325 | |
---|
326 | test_d_g_SOURCES = $(TESTSSOURCES) |
---|
327 | test_d_g_CFLAGS = -g -Wextra -Wall -pedantic -Wno-long-long -fomit-frame-pointer |
---|
328 | #ftmpl_inst.o |
---|
329 | test_d_g_LDADD = -lfactory_g $(FLINT_LIBS) $(GMP_LIBS) $(NTL_LIBS) $(TESTADDLIBDEBUG) |
---|
330 | |
---|
331 | test_d_r_SOURCES = $(TESTSSOURCES) |
---|
332 | test_d_r_CFLAGS = -O3 -fomit-frame-pointer |
---|
333 | #ftmpl_inst.o |
---|
334 | test_d_r_LDADD = -lfactory $(FLINT_LIBS) $(GMP_LIBS) $(NTL_LIBS) $(TESTADDLIB) |
---|
335 | |
---|
336 | test_d_r_LDFLAGS = ${AMLDFLAGS} |
---|
337 | test_d_g_LDFLAGS = ${AMLDFLAGS} |
---|