source: git/factory/Makefile.am @ e2c181

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