source: git/Singular/Makefile.am @ 33b509

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