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