1 | ACLOCAL_AMFLAGS = -I ../m4 |
---|
2 | |
---|
3 | GIT_VERSION := $(shell $(top_srcdir)/git-version-gen $(top_srcdir)/.tarball-git-version) |
---|
4 | |
---|
5 | AM_CPPFLAGS = -I${top_srcdir} -I${top_builddir} -I${top_srcdir}/numeric -I${top_builddir}/numeric -I${top_srcdir}/kernel -I${top_builddir}/kernel -I${top_srcdir}/libpolys -I${top_builddir}/libpolys $(GMP_CFLAGS) -I${top_srcdir}/factory/include -I${top_builddir}/factory/include $(FACTORY_CFLAGS) $(NTL_CFLAGS) $(FLINT_CFLAGS) -DGIT_VERSION='"$(GIT_VERSION)"' |
---|
6 | |
---|
7 | if HAVE_GFANLIB |
---|
8 | USE_GFANLIB = ${top_builddir}/dyn_modules/callgfanlib/gfanlib.la ${abs_top_builddir}/gfanlib/libgfan.la ${CDDGMPLDFLAGS} |
---|
9 | else |
---|
10 | USE_GFANLIB = |
---|
11 | endif |
---|
12 | |
---|
13 | # AM_LDFLAGS = libSingular.la ${top_builddir}/numeric/libnumeric.la ${top_builddir}/kernel/libkernel.la |
---|
14 | |
---|
15 | ########################### Dynamic Modules... ######################### |
---|
16 | if ENABLE_P_PROCS_DYNAMIC |
---|
17 | moduledir = $(libexecdir)/singular/MOD |
---|
18 | else !ENABLE_P_PROCS_DYNAMIC |
---|
19 | moduledir = $(libdir)/singular |
---|
20 | endif !ENABLE_P_PROCS_DYNAMIC |
---|
21 | |
---|
22 | ########################################################################## |
---|
23 | module_LTLIBRARIES = pyobject.la |
---|
24 | |
---|
25 | pyobject_la_SOURCES = pyobject.cc |
---|
26 | |
---|
27 | pyobject_la_CXXFLAGS = $(PYTHON_CSPEC) |
---|
28 | pyobject_la_CPPFLAGS = $(PYTHON_CPPFLAGS) ${AM_CPPFLAGS} |
---|
29 | |
---|
30 | pyobject_la_LDFLAGS = $(PYTHON_EXTRA_LIBS) $(PYTHON_LSPEC) ${AM_LDFLAGS} $(PYTHON_EXTRA_LDFLAGS) $(PYTHON_LDFLAGS) -module -export-dynamic -avoid-version -flat_namespace -weak_reference_mismatches weak -undefined dynamic_lookup |
---|
31 | ### -export-dynamic -shared -module -avoid-version (add to all DMs?) |
---|
32 | |
---|
33 | ########################################################################## |
---|
34 | if PYTHON_USE |
---|
35 | PY=pyobject.la $(PYTHON_EXTRA_LIBS) $(PYTHON_LSPEC) $(PYTHON_EXTRA_LDFLAGS) $(PYTHON_LDFLAGS) |
---|
36 | else !PYTHON_USE |
---|
37 | PY= |
---|
38 | endif !PYTHON_USE |
---|
39 | |
---|
40 | if SI_EMBED_PYTHON |
---|
41 | EMBED_PYOBJECT = ${PY} ${top_builddir}/dyn_modules/syzextra/syzextra.la ${USE_GFANLIB} |
---|
42 | else !SI_EMBED_PYTHON |
---|
43 | EMBED_PYOBJECT = |
---|
44 | endif !SI_EMBED_PYTHON |
---|
45 | |
---|
46 | ########################### libSingular* ######################### |
---|
47 | |
---|
48 | libSingular_LTLIBRARIES = libSingular.la |
---|
49 | libSingulardir = $(libdir) |
---|
50 | |
---|
51 | libSingular_la_CPPFLAGS = ${AM_CPPFLAGS} -DLIBSINGULAR |
---|
52 | |
---|
53 | SOURCES = Minor.cc\ |
---|
54 | MinorInterface.cc\ |
---|
55 | MinorProcessor.cc\ |
---|
56 | links/asciiLink.cc\ |
---|
57 | attrib.cc\ |
---|
58 | blackbox.cc\ |
---|
59 | calcSVD.cc\ |
---|
60 | cntrlc.cc\ |
---|
61 | countedref.cc\ |
---|
62 | denom_list.cc\ |
---|
63 | eigenval_ip.cc\ |
---|
64 | extra.cc\ |
---|
65 | feOpt.cc\ |
---|
66 | fehelp.cc\ |
---|
67 | fevoices.cc\ |
---|
68 | fglm.cc\ |
---|
69 | gms.cc\ |
---|
70 | grammar.cc\ |
---|
71 | interpolation.cc\ |
---|
72 | iparith.cc\ |
---|
73 | ipassign.cc\ |
---|
74 | ipconv.cc\ |
---|
75 | ipid.cc\ |
---|
76 | iplib.cc\ |
---|
77 | ipprint.cc\ |
---|
78 | ipshell.cc\ |
---|
79 | janet.cc\ |
---|
80 | libparse.cc\ |
---|
81 | linearAlgebra_ip.cc\ |
---|
82 | lists.cc\ |
---|
83 | maps_ip.cc\ |
---|
84 | minpoly.cc\ |
---|
85 | misc_ip.cc\ |
---|
86 | mod_lib.cc\ |
---|
87 | links/ndbm.cc\ |
---|
88 | newstruct.cc\ |
---|
89 | pcv.cc\ |
---|
90 | links/pipeLink.cc\ |
---|
91 | scanner.cc\ |
---|
92 | sdb.cc\ |
---|
93 | links/s_buff.cc\ |
---|
94 | links/silink.cc\ |
---|
95 | links/sing_dbm.cc\ |
---|
96 | sing_win.cc\ |
---|
97 | links/slInit_Static.cc\ |
---|
98 | links/ssiLink.cc\ |
---|
99 | links/semaphore.c\ |
---|
100 | subexpr.cc\ |
---|
101 | pyobject_setup.cc\ |
---|
102 | singmathic.cc\ |
---|
103 | walk.cc\ |
---|
104 | walk_ip.cc\ |
---|
105 | wrapper.cc\ |
---|
106 | fereadl.c mmstd.c claptmpl.cc\ |
---|
107 | rlimit.c |
---|
108 | |
---|
109 | # links/slInit_Dynamic.cc |
---|
110 | |
---|
111 | libSingular_la_SOURCES = $(SOURCES) |
---|
112 | |
---|
113 | SingularHEADERS = Cache.h \ |
---|
114 | CacheImplementation.h \ |
---|
115 | Minor.h \ |
---|
116 | MinorInterface.h \ |
---|
117 | MinorProcessor.h \ |
---|
118 | attrib.h \ |
---|
119 | blackbox.h \ |
---|
120 | cntrlc.h \ |
---|
121 | countedref.h \ |
---|
122 | links/dbm_sl.h \ |
---|
123 | distrib.h \ |
---|
124 | eigenval_ip.h \ |
---|
125 | feOpt.h feOptTab.h fehelp.h \ |
---|
126 | fglm.h \ |
---|
127 | gms.h \ |
---|
128 | grammar.h \ |
---|
129 | interpolation.h \ |
---|
130 | idrec.h \ |
---|
131 | ipconv.h \ |
---|
132 | ipid.h \ |
---|
133 | ipprint.h \ |
---|
134 | ipshell.h \ |
---|
135 | janet.h \ |
---|
136 | libparse.h \ |
---|
137 | libsingular.h \ |
---|
138 | linearAlgebra_ip.h\ |
---|
139 | lists.h \ |
---|
140 | locals.h \ |
---|
141 | maps_ip.h \ |
---|
142 | minpoly.h \ |
---|
143 | misc_ip.h \ |
---|
144 | mmalloc.h \ |
---|
145 | mod_lib.h \ |
---|
146 | omSingularConfig.h \ |
---|
147 | links/ndbm.h \ |
---|
148 | newstruct.h \ |
---|
149 | pcv.h \ |
---|
150 | links/pipeLink.h \ |
---|
151 | pyobject_setup.h \ |
---|
152 | run.h \ |
---|
153 | sdb.h \ |
---|
154 | links/silink.h \ |
---|
155 | links/s_buff.h \ |
---|
156 | links/sing_dbm.h \ |
---|
157 | sing_win.h \ |
---|
158 | links/slInit.h \ |
---|
159 | links/ssiLink.h \ |
---|
160 | links/simpleipc.h \ |
---|
161 | si_signals.h \ |
---|
162 | stype.h \ |
---|
163 | subexpr.h \ |
---|
164 | table.h \ |
---|
165 | tok.h \ |
---|
166 | walk.h \ |
---|
167 | rlimit.h |
---|
168 | |
---|
169 | |
---|
170 | # -DMAKE_DISTRIBUTION |
---|
171 | |
---|
172 | # plural_cmd.inc |
---|
173 | nodist_libSingular_la_SOURCES = feOpt.inc iparith.inc |
---|
174 | |
---|
175 | libSingular_la_LDFLAGS = ${USEPPROCSDYNAMICLDFLAGS} ${USEPPROCSDYNAMICLD} -release ${PACKAGE_VERSION} |
---|
176 | |
---|
177 | libSingular_la_LIBADD = ${EMBED_PYOBJECT} ${top_builddir}/numeric/libnumeric.la ${top_builddir}/kernel/libkernel.la \ |
---|
178 | ${USEPPROCSDYNAMICLDFLAGS} ${USEPPROCSDYNAMICLD} |
---|
179 | |
---|
180 | |
---|
181 | libSingular_includedir = ${includedir}/singular/Singular |
---|
182 | nobase_libSingular_include_HEADERS = $(SingularHEADERS) |
---|
183 | |
---|
184 | ######################################################### |
---|
185 | # handle all the generated *.inc |
---|
186 | |
---|
187 | noinst_PROGRAMS = gentable1 feOptGen feOptES feOptTS |
---|
188 | |
---|
189 | gentable1_SOURCES = gentable.cc grammar.h tok.h table.h |
---|
190 | gentable1_CPPFLAGS = ${AM_CPPFLAGS} |
---|
191 | |
---|
192 | feOptGen_SOURCES = feOptGen.cc feOptGen.h |
---|
193 | feOptGen_CPPFLAGS = ${AM_CPPFLAGS} |
---|
194 | |
---|
195 | feOptES_SOURCES = feOptGen.cc feOptGen.h |
---|
196 | feOptES_CPPFLAGS = ${AM_CPPFLAGS} -DESINGULAR |
---|
197 | |
---|
198 | feOptTS_SOURCES = feOptGen.cc feOptGen.h |
---|
199 | feOptTS_CPPFLAGS = ${AM_CPPFLAGS} -DTSINGULAR |
---|
200 | |
---|
201 | ########################### Singular* ######################### |
---|
202 | |
---|
203 | EXTRA_PROGRAMS = libparse Singulars |
---|
204 | |
---|
205 | # the "optional_programs" variable should be defined in the configure |
---|
206 | # script, and listed in an AC_SUBST macro |
---|
207 | optional_Singular_programs = |
---|
208 | |
---|
209 | bin_PROGRAMS = Singular ESingular TSingular $(optional_Singular_programs) |
---|
210 | |
---|
211 | Singular ESingular TSingular $(optional_Singular_programs): ${abs_builddir}/LIB |
---|
212 | |
---|
213 | Singular_SOURCES = tesths.cc mmalloc.cc fegetopt.c fegetopt.h utils.cc utils.h |
---|
214 | |
---|
215 | Singular_LDADD = libSingular.la ${EMBED_PYOBJECT} |
---|
216 | |
---|
217 | # Singular_LDFLAGS = ${EMBED_PYOBJECT} |
---|
218 | |
---|
219 | Singulars_SOURCES = tesths.cc mmalloc.cc fegetopt.c fegetopt.h utils.cc utils.h |
---|
220 | |
---|
221 | # ${EMBED_PYOBJECT_LDFLAGS} ${EMBED_PYOBJECT_LDFLAGS} |
---|
222 | Singulars_LDADD = libSingular.la ${EMBED_PYOBJECT} |
---|
223 | |
---|
224 | Singulars_LDFLAGS = -static ${AM_LDFLAGS} ${EMBED_PYOBJECT} |
---|
225 | |
---|
226 | scriptdir = $(libexecdir)/singular/MOD |
---|
227 | dist_script_SCRIPTS = singularsurf |
---|
228 | |
---|
229 | #### ESingular |
---|
230 | ESingular_CPPFLAGS = ${AM_CPPFLAGS} -DESINGULAR -DPROTO |
---|
231 | # ESingular_LDFLAGS = -static ${AM_LDFLAGS} |
---|
232 | ESingular_LDADD = ${top_builddir}/libpolys/reporter/libreporter.la \ |
---|
233 | ${top_builddir}/libpolys/misc/libmisc.la ${top_builddir}/omalloc/libomalloc.la \ |
---|
234 | ${top_builddir}/resources/libresources.la |
---|
235 | |
---|
236 | |
---|
237 | ESingular_SOURCES = emacs.cc fegetopt.c fegetopt.h feOptES.inc feOpt.cc |
---|
238 | |
---|
239 | #### same for TSingular |
---|
240 | TSingular_CPPFLAGS = ${AM_CPPFLAGS} -DTSINGULAR -DPROTO |
---|
241 | # TSingular_LDFLAGS = -static ${AM_LDFLAGS} |
---|
242 | TSingular_LDADD = ${top_builddir}/libpolys/reporter/libreporter.la \ |
---|
243 | ${top_builddir}/libpolys/misc/libmisc.la ${top_builddir}/omalloc/libomalloc.la \ |
---|
244 | ${top_builddir}/resources/libresources.la |
---|
245 | |
---|
246 | TSingular_SOURCES = emacs.cc fegetopt.c fegetopt.h feOptTS.inc feOpt.cc |
---|
247 | # utils.cc utils.h |
---|
248 | |
---|
249 | |
---|
250 | #### libparse |
---|
251 | libparse_CPPFLAGS = ${AM_CPPFLAGS} -DSTANDALONE_PARSER |
---|
252 | |
---|
253 | libparse_SOURCES = libparse.cc fegetopt.c fegetopt.h utils.cc utils.h |
---|
254 | |
---|
255 | libparse_LDADD = ${top_builddir}/omalloc/libomalloc.la |
---|
256 | # libparse_LDFLAGS = -static ${AM_LDFLAGS} |
---|
257 | # TODO for libparse: DONE by Hans??? |
---|
258 | # multiple definition of `category_out': libparse.cc v.s. utils.cc |
---|
259 | # undefined reference to `iiInitSingularProcinfo(procinfo*, char const*, char const*, int, long, int)' |
---|
260 | |
---|
261 | ######################################################### |
---|
262 | # the Singular library (*.lib files) |
---|
263 | |
---|
264 | include ${srcdir}/singular-libs |
---|
265 | |
---|
266 | singularlibrarydir = ${datadir}/singular |
---|
267 | singularlibrary = $(SLIB0:%=LIB/%) $(SLIB1:%=LIB/%) $(PLIBS:%=LIB/%) |
---|
268 | nobase_dist_singularlibrary_DATA = LIB/tst.lib LIB/help.cnf ${singularlibrary} |
---|
269 | EXTRA_DIST = make_alllib.sh LIB/all.lib.tmpl singular-libs \ |
---|
270 | LIB/help.cnf links/slInit_Dynamic.cc |
---|
271 | |
---|
272 | singularalllibrarydir = ${datadir}/singular/LIB |
---|
273 | singularalllibrary = all.lib |
---|
274 | nobase_dist_singularalllibrary_DATA = all.lib |
---|
275 | |
---|
276 | all.lib: ${srcdir}/make_alllib.sh ${srcdir}/LIB/all.lib.tmpl ${singularlibrary} |
---|
277 | ${srcdir}/make_alllib.sh ${srcdir}/LIB/all.lib.tmpl ${SLIB0} ${PLIBS} |
---|
278 | |
---|
279 | ########################### TEST ######################### |
---|
280 | TESTS_ENVIRONMENT = SINGULARPATH='${top_builddir}/Singular/LIB:${top_srcdir}/Singular/LIB:${top_builddir}/libpolys/polys/.libs:${top_builddir}/factory/gftables' |
---|
281 | TESTS_ENVIRONMENT += SINGULAR_ROOT_DIR='${top_builddir}' |
---|
282 | |
---|
283 | TESTS=test |
---|
284 | |
---|
285 | check_PROGRAMS=$(TESTS) |
---|
286 | |
---|
287 | test_SOURCES = test.cc |
---|
288 | # ${EMBED_PYOBJECT_LDFLAGS} |
---|
289 | test_LDADD = libSingular.la |
---|
290 | |
---|
291 | ######################################################### |
---|
292 | |
---|
293 | # These files are built first |
---|
294 | BUILT_SOURCES = feOpt.inc feOptTS.inc feOptES.inc iparith.inc all.lib plural_cmd.inc \ |
---|
295 | gftables MOD |
---|
296 | |
---|
297 | CLEANFILES = $(BUILT_SOURCES) $(EXTRA_PROGRAMS) |
---|
298 | |
---|
299 | clean-local: |
---|
300 | if [ "${abs_builddir}" != "${abs_srcdir}" ]; then \ |
---|
301 | if [ -L ${abs_builddir}/LIB ]; then unlink ${abs_builddir}/LIB; fi \ |
---|
302 | fi |
---|
303 | |
---|
304 | feOpt.inc: feOptGen$(EXEEXT) |
---|
305 | ${builddir}/feOptGen$(EXEEXT) |
---|
306 | |
---|
307 | feOptES.inc: feOptES$(EXEEXT) |
---|
308 | ${builddir}/feOptES$(EXEEXT) |
---|
309 | |
---|
310 | feOptTS.inc: feOptTS$(EXEEXT) |
---|
311 | ${builddir}/feOptTS$(EXEEXT) |
---|
312 | |
---|
313 | plural_cmd.inc iparith.inc: gentable1$(EXEEXT) |
---|
314 | ${builddir}/gentable1$(EXEEXT) |
---|
315 | |
---|
316 | # # fake rule to fix parallel make http://www.gnu.org/s/hello/manual/automake/Multiple-Outputs.html |
---|
317 | # plural_cmd.inc: iparith.inc |
---|
318 | |
---|
319 | gftables: ${top_srcdir}/factory/gftables |
---|
320 | ln -snf ${top_srcdir}/factory/gftables ${builddir}/gftables |
---|
321 | |
---|
322 | ${abs_builddir}/LIB: ${srcdir}/LIB |
---|
323 | if [ "${abs_builddir}" != "${abs_srcdir}" ]; then \ |
---|
324 | ln -snf ${abs_srcdir}/LIB ${abs_builddir}/; \ |
---|
325 | fi |
---|
326 | |
---|
327 | MOD: ${top_builddir}/libpolys/polys/.libs |
---|
328 | ln -snf ${top_builddir}/libpolys/polys/.libs/ ${builddir}/MOD |
---|
329 | |
---|