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