source: git/factory/Makefile.am @ 90c9e3

spielwiese
Last change on this file since 90c9e3 was 3b07f8, checked in by Martin Lee <martinlee84@…>, 11 years ago
chg: changes to build system due to new templates
  • Property mode set to 100644
File size: 8.7 KB
Line 
1ACLOCAL_AMFLAGS = -I ../m4
2
3PACKAGES=include/factory libfac
4SUBDIRS=$(PACKAGES)
5
6CXXTEMPLFLAGS=-ftrapv
7## -fno-implicit-templates
8
9AM_CPPFLAGS = -I${builddir}/include -I${srcdir}/include $(FLINT_CFLAGS) ${GMP_CFLAGS} ${NTL_CFLAGS} ${OMALLOC_CFLAGS}
10
11if WANT_DEBUG
12  LIB_G=libfactory_g.la
13else
14  LIB_G=
15endif
16
17lib_LTLIBRARIES = libfactory.la ${LIB_G}
18
19libfactory_la_CXXFLAGS   = -O3 -fomit-frame-pointer ${CXXTEMPLFLAGS}
20libfactory_la_LIBADD     = ${builddir}/libfac/libfac.la $(FLINT_LIBS) ${GMP_LIBS} ${NTL_LIBS}
21libfactory_la_LDFLAGS    = -release ${PACKAGE_VERSION}
22libfactory_g_la_CXXFLAGS = -g -Wextra -Wall -pedantic -Wno-long-long ${CXXTEMPLFLAGS}
23libfactory_g_la_LIBADD   = ${builddir}/libfac/libfac_g.la $(FLINT_LIBS) ${GMP_LIBS} ${NTL_LIBS}
24libfactory_g_la_LDFLAGS  = -release ${PACKAGE_VERSION}
25
26
27
28# factory source files
29SOURCES = \
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                facAbsFact.cc \
65                facAlgExt.cc \
66                facBivar.cc \
67                fac_berlekamp.cc \
68                fac_cantzass.cc \
69                fac_distrib.cc \
70                fac_ezgcd.cc \
71                facFactorize.cc \
72                fac_iterfor.cc \
73                fac_multihensel.cc \
74                fac_multivar.cc \
75                fac_sqrfree.cc \
76                fac_univar.cc \
77                fac_util.cc \
78                facFqBivar.cc \
79                facFqBivarUtil.cc \
80                facFqFactorize.cc \
81                facFqFactorizeUtil.cc \
82                facFqSquarefree.cc \
83                facHensel.cc \
84                facIrredTest.cc \
85                facMul.cc \
86                facNTLzzpEXGCD.cc \
87                facSparseHensel.cc \
88                ffops.cc \
89                FLINTconvert.cc \
90                gf_tabutil.cc \
91                gfops.cc \
92                imm.cc \
93                int_cf.cc \
94                int_int.cc \
95                int_intdiv.cc \
96                int_poly.cc \
97                int_pp.cc \
98                int_rat.cc \
99                variable.cc \
100                NTLconvert.cc \
101                singext.cc \
102                parseutil.cc \
103                ftmpl_inst.cc
104
105if WITH_PARSER_FOR_CANONICAL_FORM
106    SOURCES +=  readcf.yy
107endif
108
109libfactory_la_SOURCES = $(SOURCES)
110libfactory_g_la_SOURCES = $(SOURCES)
111
112libfactory_la_CPPFLAGS  = ${AM_CPPFLAGS} -DHAVE_CONFIG_H -DOM_NDEBUG -DNDEBUG
113libfactory_g_la_CPPFLAGS= ${AM_CPPFLAGS} -DHAVE_CONFIG_H
114
115nodist_libfactory_la_SOURCES = cplusplus.h factory.h factoryconf.h
116nodist_libfactory_g_la_SOURCES = cplusplus.h factory.h factoryconf.h
117
118# factory header files
119factory_headers = \
120                cf_assert.h \
121                canonicalform.h \
122                cf_algorithm.h \
123                cf_cyclo.h \
124                cf_binom.h \
125                cf_defs.h \
126                cf_eval.h \
127                cf_factory.h \
128                cf_generator.h \
129                cf_globals.h \
130                cf_gcd_smallp.h \
131                cf_hnf.h \
132                cf_irred.h \
133                cf_iter.h \
134                cf_map.h \
135                cf_map_ext.h \
136                cfNewtonPolygon.h \
137                cfModResultant.h \
138                cf_primes.h \
139                cf_primetab.h \
140                cf_random.h \
141                cf_reval.h \
142                cf_switches.h \
143                cf_util.h \
144                debug.h \
145                DegreePattern.h \
146                ExtensionInfo.h \
147                facAbsFact.h \
148                facAlgExt.h \
149                facBivar.h \
150                fac_berlekamp.h \
151                fac_cantzass.h \
152                fac_distrib.h \
153                facFactorize.h \
154                fac_iterfor.h \
155                fac_multivar.h \
156                fac_sqrfree.h \
157                fac_univar.h \
158                fac_util.h \
159                facFqBivar.h \
160                facFqBivarUtil.h \
161                facFqFactorize.h \
162                facFqFactorizeUtil.h \
163                facFqSquarefree.h \
164                facHensel.h \
165                facIrredTest.h \
166                facMul.h \
167                facNTLzzpEXGCD.h \
168                facSparseHensel.h \
169                ffops.h \
170                FLINTconvert.h \
171                gf_tabutil.h \
172                gfops.h \
173                gmpext.h \
174                imm.h \
175                int_cf.h \
176                int_int.h \
177                int_poly.h \
178                int_pp.h \
179                int_rat.h \
180                timing.h \
181                variable.h \
182                NTLconvert.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)/factory/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 $(FLINT_LIBS) $(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_afactor.cc \
253                templates/ftmpl_factor.cc \
254                templates/ftmpl_functions.h \
255                templates/ftmpl_list.cc \
256                templates/ftmpl_matrix.cc
257
258# header templates
259hdrtemplsrc =   factoryconf.template \
260                factory.template
261
262EXTRA_DIST =    test_install.cc \
263                $(templatesrc) $(hdrtemplsrc) \
264                doxygen.cfg factory.cfg \
265                examples/application.cc \
266                examples/factorize.cc examples/gcd.cc \
267                bin/folding.el bin/fold-docu.el \
268                bin/makeheader bin/gen-readcf readcf.yy
269
270##################################################
271# autogenerated sources
272
273noinst_PROGRAMS = cplusplus
274
275BUILT_SOURCES = cplusplus.h factory.h factoryconf.h
276
277CLEANFILES = $(BUILT_SOURCES) include/factory/factory.h include/factory/factoryconf.h include/factory/cplusplus.h
278
279distclean-local:
280        -rm -f readcf.cc
281
282cplusplus_SOURCES = cplusplus.cc
283
284cplusplus.h: cplusplus$(EXEEXT)
285        ./cplusplus$(EXEEXT)  >$@
286        cp $@ include/factory/
287
288.template.h:
289        ${srcdir}/bin/makeheader $< $@
290        cp $@ include/factory/
291
292# factory/gfops.cc has the gftables path hardcoded in, so we create a
293# symlink. Remove this rule once gfopts.cc has been fixed. Note that
294# check-local would run in parallel with check, so we can't use it
295# here!
296all-local:
297        [ -d ${builddir}/gftables ] || ln -s ${srcdir}/gftables ${builddir}
298
299####################################################
300## Test program
301##
302if WANT_DEBUG
303TESTS = test-s-g test-s-r test-d-g test-d-r
304else
305TESTS = test-s-r test-d-r
306endif
307check_PROGRAMS = $(TESTS)
308
309AMLDFLAGS =  -L${builddir}
310
311TESTSSOURCES = test.cc
312
313# The following ('..') is a hack for a while...
314TESTADDLIBDIRS = ${OMALLOC_LDFLAGS}
315TESTADDLIB = $(TESTADDLIBDIRS) $(OMALLOC_R_LDADD)
316TESTADDLIBDEBUG = $(TESTADDLIBDIRS) $(OMALLOC_G_LDADD)
317
318test_s_g_SOURCES = $(TESTSSOURCES)
319test_s_g_CFLAGS = -g -Wextra -Wall -pedantic -Wno-long-long -fomit-frame-pointer
320#ftmpl_inst.o
321test_s_g_LDADD = -lfactory_g $(FLINT_LIBS) $(GMP_LIBS) $(NTL_LIBS) $(TESTADDLIBDEBUG)
322
323test_s_r_SOURCES = $(TESTSSOURCES)
324test_s_r_CFLAGS = -O3 -fomit-frame-pointer
325#ftmpl_inst.o
326test_s_r_LDADD = -lfactory $(FLINT_LIBS) $(GMP_LIBS) $(NTL_LIBS) $(TESTADDLIB)
327
328test_s_r_LDFLAGS = -static ${AMLDFLAGS}
329test_s_g_LDFLAGS = -static ${AMLDFLAGS}
330
331test_d_g_SOURCES = $(TESTSSOURCES)
332test_d_g_CFLAGS = -g -Wextra -Wall -pedantic -Wno-long-long -fomit-frame-pointer
333#ftmpl_inst.o
334test_d_g_LDADD = -lfactory_g $(FLINT_LIBS) $(GMP_LIBS) $(NTL_LIBS) $(TESTADDLIBDEBUG)
335
336test_d_r_SOURCES = $(TESTSSOURCES)
337test_d_r_CFLAGS = -O3 -fomit-frame-pointer
338#ftmpl_inst.o
339test_d_r_LDADD = -lfactory $(FLINT_LIBS) $(GMP_LIBS) $(NTL_LIBS) $(TESTADDLIB)
340
341test_d_r_LDFLAGS = ${AMLDFLAGS}
342test_d_g_LDFLAGS = ${AMLDFLAGS}
Note: See TracBrowser for help on using the repository browser.