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