source: git/Singular/Makefile.am @ 0d59f94

jengelh-datetimespielwiese
Last change on this file since 0d59f94 was 0d59f94, checked in by Oleksandr Motsak <motsak@…>, 10 years ago
Fixing BS
  • Property mode set to 100644
File size: 14.3 KB
Line 
1# PIPE = -pipe
2# ???
3#LD_DYN_FLAGS   = -ldl -rdynamic
4#SFLAGS         = -fpic -DPIC
5#SLDFLAGS       = -shared
6#LD_LIBC                = -lc
7#STATIC_LDFLAGS = -static
8
9WARNCFLAGS = -Wunused-parameter
10# clang has also: -Wunneeded-internal-declaration
11
12NODEBUGCFLAGS   = -O3 -w -fomit-frame-pointer $(WARNCFLAGS)
13NODEBUGCXXFLAGS = -O3 -w -fomit-frame-pointer $(WARNCFLAGS)
14NODEBUGDEFS = -DNDEBUG -DOM_NDEBUG
15
16CXXTEMPLFLAGS =-ftrapv ## -fno-implicit-templates
17
18AM_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) ${EMBED_PYOBJECT_CFLAGS}
19
20########################### libSingular* #########################
21
22if WANT_DEBUG
23  LIB_G=libSingular_g.la
24else
25  LIB_G=
26endif
27
28libSingular_LTLIBRARIES = libSingular.la ${LIB_G}
29libSingulardir = $(libdir)/singular
30
31libSingular_la_CFLAGS   = -O3 -fomit-frame-pointer -Wextra -Wall -Wno-long-long ${PIPE}  $(WARNCFLAGS)
32libSingular_g_la_CFLAGS = -g -Wextra -Wall -Wno-long-long -pedantic ${PIPE}  $(WARNCFLAGS)
33
34libSingular_la_CXXFLAGS   = -O3 -fomit-frame-pointer -Wextra -Wall -Wno-long-long ${PIPE} $(CXXTEMPLFLAGS)  $(WARNCFLAGS)
35libSingular_g_la_CXXFLAGS = -g -Wextra -Wall -Wno-long-long -pedantic ${PIPE} $(CXXTEMPLFLAGS)   $(WARNCFLAGS)
36# -fdiagnostics-show-option
37
38
39libSingular_la_CPPFLAGS   = ${AM_CPPFLAGS} -DHAVE_CONFIG_H -DNDEBUG -DOM_NDEBUG -DLIBSINGULAR
40libSingular_g_la_CPPFLAGS = ${AM_CPPFLAGS} -DHAVE_CONFIG_H -DLIBSINGULAR
41
42SOURCES =    Minor.cc\
43   MinorInterface.cc\
44   MinorProcessor.cc\
45   links/asciiLink.cc\
46   attrib.cc\
47   bbcone.cc\
48   bbfan.cc\
49   bigintm.cc\
50   blackbox.cc\
51   calcSVD.cc\
52   cntrlc.cc\
53   countedref.cc\
54   denom_list.cc\
55   eigenval_ip.cc\
56   extra.cc\
57   feOpt.cc\
58   fehelp.cc\
59   fevoices.cc\
60   fglm.cc\
61   gms.cc\
62   grammar.cc\
63   interpolation.cc\
64   iparith.cc\
65   ipassign.cc\
66   ipconv.cc\
67   ipid.cc\
68   iplib.cc\
69   ipprint.cc\
70   ipshell.cc\
71   janet.cc\
72   libparse.cc\
73   linearAlgebra_ip.cc\
74   lists.cc\
75   maps_ip.cc\
76   minpoly.cc\
77   misc_ip.cc\
78   links/ndbm.cc\
79   newstruct.cc\
80   pcv.cc\
81   links/pipeLink.cc\
82   scanner.cc\
83   sdb.cc\
84   links/s_buff.cc\
85   links/silink.cc\
86   links/sing_dbm.cc\
87   sing_win.cc\
88   links/slInit_Static.cc\
89   links/ssiLink.cc\
90   links/semaphore.c\
91   subexpr.cc\
92   pyobject_setup.cc\
93   walk.cc\
94   walk_ip.cc\
95   wrapper.cc\
96   fereadl.c mmstd.c claptmpl.cc
97
98#   links/slInit_Dynamic.cc
99
100libSingular_la_SOURCES   = $(SOURCES) feOpt.inc
101libSingular_g_la_SOURCES = $(SOURCES) feOpt.inc
102
103SingularHEADERS =    Cache.h \
104   CacheImplementation.h \
105   Minor.h \
106   MinorInterface.h \
107   MinorProcessor.h \
108   attrib.h \
109   bigintm.h \
110   blackbox.h \
111   cntrlc.h \
112   countedref.h \
113   links/dbm_sl.h \
114   distrib.h \
115   eigenval_ip.h \
116   feOpt.h feOptTab.h fehelp.h \
117   fglm.h \
118   gms.h \
119   grammar.h \
120   interpolation.h \
121   idrec.h \
122   ipconv.h \
123   ipid.h \
124   ipprint.h \
125   ipshell.h \
126   janet.h \
127   libparse.h \
128   libsingular.h \
129   linearAlgebra_ip.h\
130   lists.h \
131   locals.h \
132   maps_ip.h \
133   minpoly.h \
134   misc_ip.h \
135   mmalloc.h \
136   omSingularConfig.h \
137   links/ndbm.h \
138   newstruct.h \
139   pcv.h \
140   links/pipeLink.h \
141   pyobject_setup.h \
142   run.h \
143   sdb.h \
144   links/silink.h \
145   links/s_buff.h \
146   links/sing_dbm.h \
147   sing_win.h \
148   links/slInit.h \
149   links/ssiLink.h \
150   links/simpleipc.h \
151   stype.h \
152   subexpr.h \
153   table.h \
154   tok.h \
155   walk.h
156
157# plural_cmd.inc
158nodist_libSingular_la_SOURCES = iparith.inc
159nodist_libSingular_g_la_SOURCES = iparith.inc
160
161noinst_HEADERS = version.h
162
163
164libSingular_includedir = ${includedir}/singular/Singular/
165nobase_libSingular_include_HEADERS = $(SingularHEADERS)
166
167if ENABLE_FACTORY
168  USE_FACTORY = -L${top_builddir}/factory
169else
170  USE_FACTORY =
171endif
172
173#########################################################
174# handle all the generated *.inc
175
176noinst_PROGRAMS = gentable1 feOptGen feOptES feOptTS
177
178gentable1_SOURCES = gentable.cc grammar.h tok.h table.h
179gentable1_CFLAGS = -O3 -fomit-frame-pointer ${PIPE}
180gentable1_CXXFLAGS = -O3 -fomit-frame-pointer -Wextra -Wall -Wno-long-long ${PIPE} $(CXXTEMPLFLAGS)
181gentable1_CPPFLAGS = ${AM_CPPFLAGS} -DHAVE_CONFIG_H -DNDEBUG -DOM_NDEBUG
182
183feOptGen_SOURCES = feOptGen.cc feOptGen.h
184feOptGen_CXXFLAGS = -O3 -fomit-frame-pointer -Wextra -Wall -Wno-long-long ${PIPE} $(CXXTEMPLFLAGS)
185feOptGen_CPPFLAGS = ${AM_CPPFLAGS} -DHAVE_CONFIG_H -DNDEBUG -DOM_NDEBUG
186
187feOptES_SOURCES = feOptGen.cc feOptGen.h
188feOptES_CXXFLAGS = -O3 -fomit-frame-pointer -Wextra -Wall -Wno-long-long ${PIPE} $(CXXTEMPLFLAGS)
189feOptES_CPPFLAGS = ${AM_CPPFLAGS} -DHAVE_CONFIG_H -DNDEBUG -DOM_NDEBUG -DESINGULAR
190
191feOptTS_SOURCES = feOptGen.cc feOptGen.h
192feOptTS_CXXFLAGS = -O3 -fomit-frame-pointer -Wextra -Wall -Wno-long-long ${PIPE} $(CXXTEMPLFLAGS)
193feOptTS_CPPFLAGS = ${AM_CPPFLAGS} -DHAVE_CONFIG_H -DNDEBUG -DOM_NDEBUG -DTSINGULAR
194
195########################### Singular* #########################
196
197EXTRA_PROGRAMS = Singulard libparse
198
199# the "optional_programs" variable should be defined in the configure
200# script, and listed in an AC_SUBST macro
201optional_Singular_programs =
202
203bin_PROGRAMS = Singular ESingular TSingular $(optional_Singular_programs)
204
205if WANT_DEBUG
206  bin_PROGRAMS += Singularg
207  EXTRA_PROGRAMS += Singulardg
208endif
209
210Singular Singularg ESingular TSingular $(optional_Singular_programs): ${abs_builddir}/LIB
211
212AMLDFLAGS = -L${top_builddir}/Singular -L${top_builddir}/numeric -L${top_builddir}/kernel -L${top_builddir}/libpolys/polys  -L${top_builddir}/libpolys/coeffs -L${top_builddir}/libpolys/reporter -L${top_builddir}/libpolys/misc $(USE_FACTORY) -L${top_builddir}/omalloc -L${top_builddir}/findexec
213
214Singular_CFLAGS = -O3 -fomit-frame-pointer ${PIPE}
215Singularg_CFLAGS = -g ${PIPE}
216
217Singular_CXXFLAGS = -O3 -fomit-frame-pointer -Wextra -Wall -Wno-long-long ${PIPE} $(CXXTEMPLFLAGS)
218Singularg_CXXFLAGS = -g -Wextra -Wall -Wno-long-long -pedantic ${PIPE} $(CXXTEMPLFLAGS)
219
220nodist_Singular_SOURCES = libSingular.la
221nodist_Singularg_SOURCES =  libSingular_g.la
222
223Singular_SOURCES = tesths.cc fegetopt.c fegetopt.h utils.cc  utils.h
224Singularg_SOURCES = tesths.cc fegetopt.c fegetopt.h utils.cc  utils.h
225
226Singular_LDADD = libSingular.la ${top_builddir}/numeric/libnumeric.la ${top_builddir}/kernel/libkernel.la ${top_builddir}/libpolys/polys/libpolys.la -lcoeffs -lreporter -lmisc $(FACTORY_LIBS) -lomalloc -lfindexec $(FLINT_LIBS) $(NTL_LIBS) $(GMP_LIBS) ${USEPPROCSDYNAMICLDFLAGS} ${USEPPROCSDYNAMICLD} ${EMBED_PYOBJECT_LDFLAGS}
227Singularg_LDADD = libSingular_g.la ${top_builddir}/numeric/libnumeric_g.la ${top_builddir}/kernel/libkernel_g.la ${top_builddir}/libpolys/polys/libpolys_g.la -lcoeffs_g -lreporter_g -lmisc_g $(FACTORY_LIBS) -lomalloc_g -lfindexec_g $(FLINT_LIBS) $(NTL_LIBS) $(GMP_LIBS) ${USEPPROCSDYNAMICLDFLAGS}  ${USEPPROCSDYNAMICLD} ${EMBED_PYOBJECT_LDFLAGS}
228
229Singular_CPPFLAGS = ${AM_CPPFLAGS} -DHAVE_CONFIG_H -DNDEBUG -DOM_NDEBUG
230Singularg_CPPFLAGS = ${AM_CPPFLAGS} -DHAVE_CONFIG_H
231
232Singular_LDFLAGS = -static ${AMLDFLAGS}
233Singularg_LDFLAGS = -static ${AMLDFLAGS}
234
235
236Singulard_CFLAGS = -O3 -fomit-frame-pointer ${PIPE}
237Singulardg_CFLAGS = -g ${PIPE}
238
239Singulard_CXXFLAGS = -O3 -fomit-frame-pointer -Wextra -Wall -Wno-long-long ${PIPE} $(CXXTEMPLFLAGS)
240Singulardg_CXXFLAGS = -g -Wextra -Wall -Wno-long-long -pedantic ${PIPE} $(CXXTEMPLFLAGS)
241
242Singulard_SOURCES = tesths.cc fegetopt.c fegetopt.h utils.cc  utils.h
243nodist_Singulard_SOURCES = libSingular.la
244
245Singulardg_SOURCES = tesths.cc fegetopt.c fegetopt.h utils.cc  utils.h
246nodist_Singulardg_SOURCES =  libSingular_g.la
247
248Singulard_LDADD = libSingular.la -lnumeric -lkernel -lpolys -lcoeffs -lreporter -lmisc $(FACTORY_LIBS) -lomalloc -lfindexec $(FLINT_LIBS) $(NTL_LIBS) $(GMP_LIBS) ${USEPPROCSDYNAMICLDFLAGS} ${USEPPROCSDYNAMICLD} ${EMBED_PYOBJECT_LDFLAGS}
249Singulardg_LDADD = libSingular_g.la -lnumeric_g -lkernel_g -lpolys_g -lcoeffs_g -lreporter_g -lmisc_g $(FACTORY_LIBS) -lomalloc_g -lfindexec_g $(FLINT_LIBS) $(NTL_LIBS) $(GMP_LIBS) ${USEPPROCSDYNAMICLDFLAGS}  ${USEPPROCSDYNAMICLD} ${EMBED_PYOBJECT_LDFLAGS}
250
251Singulard_CPPFLAGS = ${AM_CPPFLAGS} -DHAVE_CONFIG_H -DNDEBUG -DOM_NDEBUG
252Singulardg_CPPFLAGS = ${AM_CPPFLAGS} -DHAVE_CONFIG_H
253
254Singulard_LDFLAGS = ${AMLDFLAGS}
255Singulardg_LDFLAGS = ${AMLDFLAGS}
256
257
258#### ESingular
259
260ESingular_CFLAGS = -O3 -fomit-frame-pointer ${PIPE}
261ESingular_CXXFLAGS = -O3 -fomit-frame-pointer -Wextra -Wall -Wno-long-long ${PIPE} $(CXXTEMPLFLAGS)
262ESingular_CPPFLAGS = ${AM_CPPFLAGS} -DHAVE_CONFIG_H -DNDEBUG -DOM_NDEBUG -DESINGULAR -DPROTO
263ESingular_LDFLAGS = -static ${AMLDFLAGS}
264ESingular_LDADD =   -lreporter -lmisc -lomalloc -lfindexec
265
266ESingular_SOURCES = emacs.cc fegetopt.c fegetopt.h feOptES.inc feOpt.cc
267
268#### same for TSingular
269
270TSingular_CFLAGS = -O3 -fomit-frame-pointer ${PIPE}
271TSingular_CXXFLAGS = -O3 -fomit-frame-pointer -Wextra -Wall -Wno-long-long ${PIPE} $(CXXTEMPLFLAGS)
272TSingular_CPPFLAGS = ${AM_CPPFLAGS} -DHAVE_CONFIG_H -DNDEBUG -DOM_NDEBUG -DTSINGULAR -DPROTO
273TSingular_LDFLAGS = -static ${AMLDFLAGS}
274TSingular_LDADD =   -lreporter -lmisc -lomalloc -lfindexec
275
276TSingular_SOURCES = emacs.cc fegetopt.c fegetopt.h feOptTS.inc feOpt.cc
277# utils.cc utils.h
278
279
280#### libparse
281libparse_CPPFLAGS = ${AM_CPPFLAGS} -DHAVE_CONFIG_H -DNDEBUG -DOM_NDEBUG -DSTANDALONE_PARSER
282libparse_CFLAGS = -O3 -fomit-frame-pointer ${PIPE}
283libparse_CXXFLAGS = -O3 -fomit-frame-pointer -Wextra -Wall -Wno-long-long ${PIPE} $(CXXTEMPLFLAGS)
284 
285libparse_SOURCES = libparse.cc fegetopt.c fegetopt.h utils.cc  utils.h
286# nodist_libparse_SOURCES = libSingular.la
287 
288# # libSingular.la -lnumeric
289libparse_LDADD = -lomalloc
290libparse_LDFLAGS = -static ${AMLDFLAGS}
291# TODO for libparse:
292# multiple definition of `category_out': libparse.cc v.s. utils.cc
293# undefined reference to `iiInitSingularProcinfo(procinfo*, char const*, char const*, int, long, int)'
294
295#########################################################
296# the Singular library (*.lib files)
297
298include ${srcdir}/singular-libs
299
300singularlibrarydir = ${datadir}/singular
301singularlibrary = $(SLIB0:%=LIB/%) $(SLIB1:%=LIB/%) $(PLIBS:%=LIB/%)
302nobase_dist_singularlibrary_DATA = LIB/tst.lib LIB/help.cnf ${singularlibrary}
303EXTRA_DIST = make_alllib.sh LIB/all.lib.tmpl singular-libs \
304             LIB/help.cnf links/slInit_Dynamic.cc
305
306# ${nobase_dist_singularlibrary_DATA}
307
308singularalllibrarydir = ${datadir}/singular/LIB
309singularalllibrary = all.lib
310nobase_dist_singularalllibrary_DATA = all.lib
311
312all.lib: ${srcdir}/make_alllib.sh ${srcdir}/LIB/all.lib.tmpl ${singularlibrary}
313        ${srcdir}/make_alllib.sh ${srcdir}/LIB/all.lib.tmpl ${SLIB0} ${PLIBS}
314
315########################### TEST #########################
316
317TESTS_ENVIRONMENT = SINGULARPATH='${top_builddir}/Singular/LIB:${top_srcdir}/Singular/LIB:${top_builddir}/libpolys/polys/.libs:${top_builddir}/factory/gftables'
318TESTS_ENVIRONMENT += SINGULAR_ROOT_DIR='${top_builddir}'
319
320TESTS=test-s-r test-d-r
321
322if WANT_DEBUG
323TESTS += test-s-g test-d-g
324endif
325
326check_PROGRAMS=$(TESTS)
327
328# Static versions
329
330test_s_r_CFLAGS = -O3 -fomit-frame-pointer ${PIPE}
331test_s_g_CFLAGS = ${PIPE}
332
333test_s_r_CXXFLAGS = -O3 -fomit-frame-pointer -Wextra -Wall -Wno-long-long ${PIPE} $(CXXTEMPLFLAGS)
334test_s_g_CXXFLAGS = -g -Wextra -Wall -Wno-long-long -pedantic ${PIPE} $(CXXTEMPLFLAGS)
335
336test_s_r_SOURCES = test.cc
337test_s_g_SOURCES = test.cc
338
339test_s_r_LDADD = libSingular.la -lnumeric -lkernel -lpolys -lcoeffs -lreporter -lmisc $(FACTORY_LIBS) -lomalloc -lfindexec $(FLINT_LIBS) $(NTL_LIBS) $(GMP_LIBS) ${USEPPROCSDYNAMICLDFLAGS} ${USEPPROCSDYNAMICLD} ${EMBED_PYOBJECT_LDFLAGS}
340test_s_g_LDADD = libSingular_g.la -lnumeric_g -lkernel_g -lpolys_g -lcoeffs_g -lreporter_g -lmisc_g $(FACTORY_LIBS) -lomalloc_g -lfindexec_g $(FLINT_LIBS) $(NTL_LIBS) $(GMP_LIBS) ${USEPPROCSDYNAMICLDFLAGS}  ${USEPPROCSDYNAMICLD} ${EMBED_PYOBJECT_LDFLAGS}
341
342test_s_r_CPPFLAGS = ${AM_CPPFLAGS} -DHAVE_CONFIG_H -DNDEBUG -DOM_NDEBUG
343test_s_g_CPPFLAGS = ${AM_CPPFLAGS} -DHAVE_CONFIG_H
344
345test_s_r_LDFLAGS = -static ${AMLDFLAGS}
346test_s_g_LDFLAGS = -static ${AMLDFLAGS}
347
348
349# Dynamic versions
350
351test_d_r_CFLAGS = -O3 -fomit-frame-pointer ${PIPE}
352test_d_g_CFLAGS = ${PIPE}
353
354test_d_r_CXXFLAGS = -O3 -fomit-frame-pointer -Wextra -Wall -Wno-long-long ${PIPE} $(CXXTEMPLFLAGS)
355test_d_g_CXXFLAGS = -g -Wextra -Wall -Wno-long-long -pedantic ${PIPE} $(CXXTEMPLFLAGS)
356
357test_d_r_SOURCES = test.cc
358test_d_g_SOURCES = test.cc
359
360test_d_r_LDADD = libSingular.la -lnumeric -lkernel -lpolys -lcoeffs -lreporter -lmisc $(FACTORY_LIBS) -lomalloc -lfindexec $(FLINT_LIBS) $(NTL_LIBS) $(GMP_LIBS) ${USEPPROCSDYNAMICLDFLAGS} ${USEPPROCSDYNAMICLD} ${EMBED_PYOBJECT_LDFLAGS}
361test_d_g_LDADD = libSingular_g.la -lnumeric_g -lkernel_g -lpolys_g -lcoeffs_g -lreporter_g -lmisc_g $(FACTORY_LIBS) -lomalloc_g -lfindexec_g $(FLINT_LIBS) $(NTL_LIBS) $(GMP_LIBS) ${USEPPROCSDYNAMICLDFLAGS}  ${USEPPROCSDYNAMICLD} ${EMBED_PYOBJECT_LDFLAGS}
362
363test_d_r_CPPFLAGS = ${AM_CPPFLAGS} -DHAVE_CONFIG_H -DNDEBUG -DOM_NDEBUG
364test_d_g_CPPFLAGS = ${AM_CPPFLAGS} -DHAVE_CONFIG_H
365
366test_d_r_LDFLAGS = ${AMLDFLAGS}
367test_d_g_LDFLAGS = ${AMLDFLAGS}
368
369#########################################################
370
371# These files are built first
372BUILT_SOURCES = feOpt.inc feOptTS.inc feOptES.inc iparith.inc all.lib plural_cmd.inc \
373                gftables MOD
374
375CLEANFILES = $(BUILT_SOURCES) $(EXTRA_PROGRAMS)
376
377clean-local:
378        if [ "${abs_builddir}" != "${abs_srcdir}" ]; then \
379          if [ -L ${abs_builddir}/LIB ]; then unlink ${abs_builddir}/LIB; fi \
380        fi
381
382feOpt.inc: feOptGen
383        ${builddir}/feOptGen
384
385feOptES.inc: feOptES
386        ${builddir}/feOptES
387
388feOptTS.inc: feOptTS
389        ${builddir}/feOptTS
390
391plural_cmd.inc iparith.inc: gentable1
392        ${builddir}/gentable1
393
394# # fake rule to fix parallel make http://www.gnu.org/s/hello/manual/automake/Multiple-Outputs.html
395# plural_cmd.inc: iparith.inc
396
397
398gftables: ${top_srcdir}/factory/gftables
399        ln -snf ${top_srcdir}/factory/gftables ${builddir}/gftables
400
401${abs_builddir}/LIB: ${srcdir}/LIB
402        if [ "${abs_builddir}" != "${abs_srcdir}" ]; then \
403          ln -snf ${abs_srcdir}/LIB ${abs_builddir}/; \
404        fi
405
406MOD: ${top_builddir}/libpolys/polys/.libs
407        ln -snf ${top_builddir}/libpolys/polys/.libs/ ${builddir}/MOD
408
409moduledir = $(bindir)/MOD
410
411module_LTLIBRARIES =
412
413if PYTHON_MODULE
414module_LTLIBRARIES += pyobject.la
415endif
416
417pyobject_la_SOURCES = pyobject.cc
418pyobject_la_CPPFLAGS   = ${AM_CPPFLAGS} ${NODEBUGDEFS}
419pyobject_g_la_CPPFLAGS = ${AM_CPPFLAGS}
420
421pyobject_la_CXXFLAGS   = ${NODEBUGCXXFLAGS} @PYTHON_CSPEC@
422pyobject_g_la_CXXFLAGS = ${DEBUGCXXFLAGS} @PYTHON_CSPEC@
423
424pyobject_la_LDFLAGS = -export-dynamic -shared -module -avoid-version \
425  ${AMLDFLAGS} @PYTHON_LSPEC@
Note: See TracBrowser for help on using the repository browser.