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}/kernel -I${top_builddir}/kernel -I${top_srcdir}/libpolys -I${top_builddir}/libpolys $(FACTORY_INCLUDES) $(GMP_CFLAGS) $(NTL_CFLAGS) $(FLINT_CFLAGS) -DGIT_VERSION='"$(GIT_VERSION)"' |
---|
6 | |
---|
7 | all-local: feOpt.inc feOptTS.inc feOptES.inc iparith.inc all.lib gftables MOD ${abs_builddir}/LIB Singular$(EXEEXT) ESingular$(EXEEXT) TSingular$(EXEEXT) |
---|
8 | |
---|
9 | if SING_WIN |
---|
10 | SUBDIRS = ${BUILTIN_MODULES} . dyn_modules |
---|
11 | else |
---|
12 | SUBDIRS = dyn_modules . |
---|
13 | endif |
---|
14 | |
---|
15 | ########################### Possible builtin modules... ######################### |
---|
16 | BUILTIN_FLAGS = ${BUILTIN_LIBS} |
---|
17 | |
---|
18 | ########################### libSingular* ######################### |
---|
19 | |
---|
20 | libSingular_LTLIBRARIES = libSingular.la |
---|
21 | libSingulardir = $(libdir) |
---|
22 | |
---|
23 | libSingular_la_CPPFLAGS = ${AM_CPPFLAGS} -DLIBSINGULAR ${PTHREAD_CFLAGS} |
---|
24 | |
---|
25 | SOURCES = \ |
---|
26 | links/asciiLink.cc\ |
---|
27 | attrib.cc\ |
---|
28 | blackbox.cc\ |
---|
29 | calcSVD.cc\ |
---|
30 | cntrlc.cc\ |
---|
31 | countedref.cc\ |
---|
32 | denom_list.cc\ |
---|
33 | eigenval_ip.cc\ |
---|
34 | extra.cc\ |
---|
35 | feOpt.cc\ |
---|
36 | fehelp.cc\ |
---|
37 | fevoices.cc\ |
---|
38 | fglm.cc\ |
---|
39 | gms.cc\ |
---|
40 | grammar.cc\ |
---|
41 | iparith.cc\ |
---|
42 | ipassign.cc\ |
---|
43 | ipconv.cc\ |
---|
44 | ipid.cc\ |
---|
45 | iplib.cc\ |
---|
46 | ipprint.cc\ |
---|
47 | ipshell.cc\ |
---|
48 | libparse.cc\ |
---|
49 | linearAlgebra_ip.cc\ |
---|
50 | lists.cc\ |
---|
51 | maps_ip.cc\ |
---|
52 | misc_ip.cc\ |
---|
53 | mod_lib.cc\ |
---|
54 | links/ndbm.cc\ |
---|
55 | newstruct.cc\ |
---|
56 | number2.cc\ |
---|
57 | pcv.cc\ |
---|
58 | links/pipeLink.cc\ |
---|
59 | scanner.cc\ |
---|
60 | sdb.cc\ |
---|
61 | links/silink.cc\ |
---|
62 | links/sing_dbm.cc\ |
---|
63 | links/slInit_Static.cc\ |
---|
64 | links/ssiLink.cc\ |
---|
65 | links/semaphore.c\ |
---|
66 | subexpr.cc\ |
---|
67 | pyobject_setup.cc\ |
---|
68 | walk.cc\ |
---|
69 | walk_ip.cc\ |
---|
70 | wrapper.cc\ |
---|
71 | mmstd.c claptmpl.cc\ |
---|
72 | febase.cc |
---|
73 | |
---|
74 | # links/slInit_Dynamic.cc |
---|
75 | |
---|
76 | libSingular_la_SOURCES = $(SOURCES) |
---|
77 | |
---|
78 | SingularHEADERS = \ |
---|
79 | attrib.h \ |
---|
80 | blackbox.h \ |
---|
81 | cntrlc.h \ |
---|
82 | countedref.h \ |
---|
83 | links/dbm_sl.h \ |
---|
84 | distrib.h \ |
---|
85 | eigenval_ip.h \ |
---|
86 | feOpt.h feOptTab.h fehelp.h \ |
---|
87 | fglm.h \ |
---|
88 | gms.h \ |
---|
89 | grammar.h \ |
---|
90 | idrec.h \ |
---|
91 | ipconv.h \ |
---|
92 | ipid.h \ |
---|
93 | ipprint.h \ |
---|
94 | ipshell.h \ |
---|
95 | libparse.h \ |
---|
96 | libsingular.h \ |
---|
97 | linearAlgebra_ip.h\ |
---|
98 | lists.h \ |
---|
99 | locals.h \ |
---|
100 | maps_ip.h \ |
---|
101 | misc_ip.h \ |
---|
102 | mmalloc.h \ |
---|
103 | mod_lib.h \ |
---|
104 | links/ndbm.h \ |
---|
105 | newstruct.h \ |
---|
106 | number2.h \ |
---|
107 | pcv.h \ |
---|
108 | links/pipeLink.h \ |
---|
109 | pyobject_setup.h \ |
---|
110 | run.h \ |
---|
111 | sdb.h \ |
---|
112 | links/silink.h \ |
---|
113 | links/sing_dbm.h \ |
---|
114 | links/slInit.h \ |
---|
115 | links/ssiLink.h \ |
---|
116 | links/simpleipc.h \ |
---|
117 | stype.h \ |
---|
118 | subexpr.h \ |
---|
119 | table.h \ |
---|
120 | tok.h \ |
---|
121 | walk.h \ |
---|
122 | fevoices.h |
---|
123 | |
---|
124 | |
---|
125 | # -DMAKE_DISTRIBUTION |
---|
126 | |
---|
127 | # plural_cmd.inc |
---|
128 | nodist_libSingular_la_SOURCES = feOpt.inc iparith.inc |
---|
129 | |
---|
130 | libSingular_la_LDFLAGS =$(SINGULAR_LDFLAGS) ${USEPPROCSDYNAMICLDFLAGS} ${USEPPROCSDYNAMICLD} -release ${PACKAGE_VERSION} ${PTHREAD_LDFLAGS} |
---|
131 | libSingular_la_LIBADD =${USEPPROCSDYNAMICLDFLAGS} ${USEPPROCSDYNAMICLD} ${BUILTIN_FLAGS} ${top_builddir}/kernel/libkernel.la ${PTHREAD_LIBS} |
---|
132 | |
---|
133 | libSingular_includedir = ${includedir}/singular/Singular |
---|
134 | nobase_libSingular_include_HEADERS = $(SingularHEADERS) |
---|
135 | |
---|
136 | ######################################################### |
---|
137 | # handle all the generated *.inc |
---|
138 | |
---|
139 | noinst_PROGRAMS = gentable1 feOptGen feOptES feOptTS |
---|
140 | |
---|
141 | gentable1_SOURCES = gentable.cc grammar.h tok.h table.h |
---|
142 | gentable1_CPPFLAGS = ${AM_CPPFLAGS} |
---|
143 | |
---|
144 | feOptGen_SOURCES = feOptGen.cc feOptGen.h |
---|
145 | feOptGen_CPPFLAGS = ${AM_CPPFLAGS} |
---|
146 | |
---|
147 | feOptES_SOURCES = feOptGen.cc feOptGen.h |
---|
148 | feOptES_CPPFLAGS = ${AM_CPPFLAGS} -DESINGULAR |
---|
149 | |
---|
150 | feOptTS_SOURCES = feOptGen.cc feOptGen.h |
---|
151 | feOptTS_CPPFLAGS = ${AM_CPPFLAGS} -DTSINGULAR |
---|
152 | |
---|
153 | ########################### Singular* ######################### |
---|
154 | |
---|
155 | EXTRA_PROGRAMS = libparse Singulard |
---|
156 | |
---|
157 | # the "optional_programs" variable should be defined in the configure |
---|
158 | # script, and listed in an AC_SUBST macro |
---|
159 | optional_Singular_programs = |
---|
160 | |
---|
161 | bin_PROGRAMS = Singular ESingular TSingular $(optional_Singular_programs) |
---|
162 | |
---|
163 | Singular_SOURCES = tesths.cc fegetopt.c fegetopt.h utils.cc utils.h |
---|
164 | |
---|
165 | Singular_LDADD = libSingular.la ${BUILTIN_FLAGS} |
---|
166 | |
---|
167 | Singular_LDFLAGS = -static ${AM_LDFLAGS} ${BUILTIN_FLAGS} |
---|
168 | |
---|
169 | Singulard_SOURCES = tesths.cc fegetopt.c fegetopt.h utils.cc utils.h |
---|
170 | |
---|
171 | Singulard_LDADD = libSingular.la ${BUILTIN_FLAGS} |
---|
172 | |
---|
173 | Singulard_LDFLAGS = -shared ${AM_LDFLAGS} ${BUILTIN_FLAGS} |
---|
174 | |
---|
175 | scriptdir = $(libexecdir)/singular/MOD |
---|
176 | dist_script_SCRIPTS = singularsurf singularsurf_jupyter singularsurf_win |
---|
177 | |
---|
178 | #### ESingular |
---|
179 | ESingular_CPPFLAGS = ${AM_CPPFLAGS} -DESINGULAR -DPROTO |
---|
180 | # ESingular_LDFLAGS = -static ${AM_LDFLAGS} |
---|
181 | ESingular_LDADD = ${top_builddir}/libpolys/reporter/libreporter.la \ |
---|
182 | ${top_builddir}/libpolys/misc/libmisc.la ${top_builddir}/omalloc/libomalloc.la \ |
---|
183 | ${top_builddir}/resources/libsingular_resources.la |
---|
184 | |
---|
185 | |
---|
186 | ESingular_SOURCES = emacs.cc fegetopt.c fegetopt.h feOptES.inc feOpt.cc |
---|
187 | |
---|
188 | #### same for TSingular |
---|
189 | TSingular_CPPFLAGS = ${AM_CPPFLAGS} -DTSINGULAR -DPROTO |
---|
190 | # TSingular_LDFLAGS = -static ${AM_LDFLAGS} |
---|
191 | TSingular_LDADD = ${top_builddir}/libpolys/reporter/libreporter.la \ |
---|
192 | ${top_builddir}/libpolys/misc/libmisc.la ${top_builddir}/omalloc/libomalloc.la \ |
---|
193 | ${top_builddir}/resources/libsingular_resources.la |
---|
194 | |
---|
195 | TSingular_SOURCES = emacs.cc fegetopt.c fegetopt.h feOptTS.inc feOpt.cc |
---|
196 | # utils.cc utils.h |
---|
197 | |
---|
198 | |
---|
199 | #### libparse |
---|
200 | libparse_CPPFLAGS = ${AM_CPPFLAGS} -DSTANDALONE_PARSER |
---|
201 | |
---|
202 | libparse_SOURCES = libparse.cc fegetopt.c fegetopt.h utils.cc utils.h |
---|
203 | |
---|
204 | libparse_LDADD = ${top_builddir}/omalloc/libomalloc.la |
---|
205 | libparse_LDFLAGS = -static ${AM_LDFLAGS} |
---|
206 | |
---|
207 | ######################################################### |
---|
208 | # the Singular library (*.lib files) |
---|
209 | |
---|
210 | include ${srcdir}/singular-libs |
---|
211 | |
---|
212 | singularlibrarydir = ${datadir}/singular |
---|
213 | singularlibrary = $(SLIB0:%=LIB/%) $(SLIB1:%=LIB/%) $(PLIBS:%=LIB/%) $(SLIB2:%=LIB/%) |
---|
214 | singularlibrary_DATA = $(top_srcdir)/doc/singular.idx |
---|
215 | nobase_dist_singularlibrary_DATA = LIB/tst.lib LIB/help.cnf ${singularlibrary} |
---|
216 | EXTRA_DIST = grammar.y libparse.ll make_alllib.sh LIB/all.lib.tmpl \ |
---|
217 | singular-libs LIB/help.cnf LIB/.singularrc LIB/COPYING \ |
---|
218 | links/slInit_Dynamic.cc ../doc/singular.idx |
---|
219 | |
---|
220 | singularalllibrarydir = ${datadir}/singular/LIB |
---|
221 | singularalllibrary = all.lib |
---|
222 | nobase_dist_singularalllibrary_DATA = all.lib |
---|
223 | |
---|
224 | all.lib: ${srcdir}/make_alllib.sh ${srcdir}/LIB/all.lib.tmpl ${singularlibrary} |
---|
225 | ${srcdir}/make_alllib.sh ${srcdir}/LIB/all.lib.tmpl ${SLIB0} ${PLIBS} |
---|
226 | |
---|
227 | ########################### TEST ######################### |
---|
228 | TESTS_ENVIRONMENT = SINGULARPATH='${top_builddir}/Singular/LIB:${top_srcdir}/Singular/LIB:${top_builddir}/libpolys/polys/.libs:${top_builddir}/factory/gftables' |
---|
229 | TESTS_ENVIRONMENT += SINGULAR_ROOT_DIR='${top_builddir}' |
---|
230 | |
---|
231 | TESTS=test |
---|
232 | |
---|
233 | check_PROGRAMS=$(TESTS) |
---|
234 | |
---|
235 | test_SOURCES = test.cc |
---|
236 | test_LDADD = libSingular.la |
---|
237 | |
---|
238 | ######################################################### |
---|
239 | # These files are built first |
---|
240 | BUILT_SOURCES = feOpt.inc feOptTS.inc feOptES.inc iparith.inc all.lib gftables MOD |
---|
241 | CLEANFILES = $(BUILT_SOURCES) $(EXTRA_PROGRAMS) |
---|
242 | |
---|
243 | clean-local: |
---|
244 | if [ "${abs_builddir}" != "${abs_srcdir}" ]; then \ |
---|
245 | if [ -L ${abs_builddir}/LIB ]; then unlink ${abs_builddir}/LIB; fi \ |
---|
246 | fi |
---|
247 | |
---|
248 | feOpt.inc: feOptGen$(EXEEXT) |
---|
249 | ${builddir}/feOptGen$(EXEEXT) |
---|
250 | |
---|
251 | feOptES.inc: feOptES$(EXEEXT) |
---|
252 | ${builddir}/feOptES$(EXEEXT) |
---|
253 | |
---|
254 | feOptTS.inc: feOptTS$(EXEEXT) |
---|
255 | ${builddir}/feOptTS$(EXEEXT) |
---|
256 | |
---|
257 | iparith.inc: gentable1$(EXEEXT) table.h |
---|
258 | ${builddir}/gentable1$(EXEEXT) |
---|
259 | |
---|
260 | # # fake rule to fix parallel make http://www.gnu.org/s/hello/manual/automake/Multiple-Outputs.html |
---|
261 | |
---|
262 | gftables: ${top_srcdir}/factory/gftables |
---|
263 | ln -snf ${top_srcdir}/factory/gftables ${builddir}/gftables |
---|
264 | |
---|
265 | ${abs_builddir}/LIB: ${srcdir}/LIB |
---|
266 | if [ "${abs_builddir}" != "${abs_srcdir}" ]; then \ |
---|
267 | ln -snf ${abs_srcdir}/LIB ${abs_builddir}/; \ |
---|
268 | fi |
---|
269 | |
---|
270 | MOD: |
---|
271 | if [ -d "${top_builddir}/libpolys/polys/.libs" ]; then \ |
---|
272 | ln -snf ${top_builddir}/libpolys/polys/.libs/ ${abs_builddir}/MOD; \ |
---|
273 | fi |
---|
274 | |
---|
275 | echoLIBS: |
---|
276 | @echo ${SLIB0} ${SLIB1} ${SLIB2} ${PLIBS} |
---|
277 | |
---|