source: git/Singular/Makefile.am @ 7b8818

jengelh-datetimespielwiese
Last change on this file since 7b8818 was 7b8818, checked in by Yue Ren <ren@…>, 10 years ago
chg: deleted old packages for convex geometry in Singular
  • 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   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   stype.h \
150   subexpr.h \
151   table.h \
152   tok.h \
153   walk.h
154
155# plural_cmd.inc
156nodist_libSingular_la_SOURCES = iparith.inc
157nodist_libSingular_g_la_SOURCES = iparith.inc
158
159noinst_HEADERS = version.h
160
161
162libSingular_includedir = ${includedir}/singular/Singular/
163nobase_libSingular_include_HEADERS = $(SingularHEADERS)
164
165if ENABLE_FACTORY
166  USE_FACTORY = -L${top_builddir}/factory
167else
168  USE_FACTORY =
169endif
170
171#########################################################
172# handle all the generated *.inc
173
174noinst_PROGRAMS = gentable1 feOptGen feOptES feOptTS
175
176gentable1_SOURCES = gentable.cc grammar.h tok.h table.h
177gentable1_CFLAGS = -O3 -fomit-frame-pointer ${PIPE}
178gentable1_CXXFLAGS = -O3 -fomit-frame-pointer -Wextra -Wall -Wno-long-long ${PIPE} $(CXXTEMPLFLAGS)
179gentable1_CPPFLAGS = ${AM_CPPFLAGS} -DHAVE_CONFIG_H -DNDEBUG -DOM_NDEBUG
180
181feOptGen_SOURCES = feOptGen.cc feOptGen.h
182feOptGen_CXXFLAGS = -O3 -fomit-frame-pointer -Wextra -Wall -Wno-long-long ${PIPE} $(CXXTEMPLFLAGS)
183feOptGen_CPPFLAGS = ${AM_CPPFLAGS} -DHAVE_CONFIG_H -DNDEBUG -DOM_NDEBUG
184
185feOptES_SOURCES = feOptGen.cc feOptGen.h
186feOptES_CXXFLAGS = -O3 -fomit-frame-pointer -Wextra -Wall -Wno-long-long ${PIPE} $(CXXTEMPLFLAGS)
187feOptES_CPPFLAGS = ${AM_CPPFLAGS} -DHAVE_CONFIG_H -DNDEBUG -DOM_NDEBUG -DESINGULAR
188
189feOptTS_SOURCES = feOptGen.cc feOptGen.h
190feOptTS_CXXFLAGS = -O3 -fomit-frame-pointer -Wextra -Wall -Wno-long-long ${PIPE} $(CXXTEMPLFLAGS)
191feOptTS_CPPFLAGS = ${AM_CPPFLAGS} -DHAVE_CONFIG_H -DNDEBUG -DOM_NDEBUG -DTSINGULAR
192
193########################### Singular* #########################
194
195EXTRA_PROGRAMS = Singulard libparse
196
197# the "optional_programs" variable should be defined in the configure
198# script, and listed in an AC_SUBST macro
199optional_Singular_programs =
200
201bin_PROGRAMS = Singular ESingular TSingular $(optional_Singular_programs)
202
203if WANT_DEBUG
204  bin_PROGRAMS += Singularg
205  EXTRA_PROGRAMS += Singulardg
206endif
207
208Singular Singularg ESingular TSingular $(optional_Singular_programs): ${abs_builddir}/LIB
209
210AMLDFLAGS = -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
211
212Singular_CFLAGS = -O3 -fomit-frame-pointer ${PIPE}
213Singularg_CFLAGS = -g ${PIPE}
214
215Singular_CXXFLAGS = -O3 -fomit-frame-pointer -Wextra -Wall -Wno-long-long ${PIPE} $(CXXTEMPLFLAGS)
216Singularg_CXXFLAGS = -g -Wextra -Wall -Wno-long-long -pedantic ${PIPE} $(CXXTEMPLFLAGS)
217
218nodist_Singular_SOURCES = libSingular.la
219nodist_Singularg_SOURCES =  libSingular_g.la
220
221Singular_SOURCES = tesths.cc fegetopt.c fegetopt.h utils.cc  utils.h
222Singularg_SOURCES = tesths.cc fegetopt.c fegetopt.h utils.cc  utils.h
223
224Singular_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}
225Singularg_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}
226
227Singular_CPPFLAGS = ${AM_CPPFLAGS} -DHAVE_CONFIG_H -DNDEBUG -DOM_NDEBUG
228Singularg_CPPFLAGS = ${AM_CPPFLAGS} -DHAVE_CONFIG_H
229
230Singular_LDFLAGS = -static ${AMLDFLAGS}
231Singularg_LDFLAGS = -static ${AMLDFLAGS}
232
233
234Singulard_CFLAGS = -O3 -fomit-frame-pointer ${PIPE}
235Singulardg_CFLAGS = -g ${PIPE}
236
237Singulard_CXXFLAGS = -O3 -fomit-frame-pointer -Wextra -Wall -Wno-long-long ${PIPE} $(CXXTEMPLFLAGS)
238Singulardg_CXXFLAGS = -g -Wextra -Wall -Wno-long-long -pedantic ${PIPE} $(CXXTEMPLFLAGS)
239
240Singulard_SOURCES = tesths.cc fegetopt.c fegetopt.h utils.cc  utils.h
241nodist_Singulard_SOURCES = libSingular.la
242
243Singulardg_SOURCES = tesths.cc fegetopt.c fegetopt.h utils.cc  utils.h
244nodist_Singulardg_SOURCES =  libSingular_g.la
245
246Singulard_LDADD = libSingular.la -lnumeric -lkernel -lpolys -lcoeffs -lreporter -lmisc $(FACTORY_LIBS) -lomalloc -lfindexec $(FLINT_LIBS) $(NTL_LIBS) $(GMP_LIBS) ${USEPPROCSDYNAMICLDFLAGS} ${USEPPROCSDYNAMICLD} ${EMBED_PYOBJECT_LDFLAGS}
247Singulardg_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}
248
249Singulard_CPPFLAGS = ${AM_CPPFLAGS} -DHAVE_CONFIG_H -DNDEBUG -DOM_NDEBUG
250Singulardg_CPPFLAGS = ${AM_CPPFLAGS} -DHAVE_CONFIG_H
251
252Singulard_LDFLAGS = ${AMLDFLAGS}
253Singulardg_LDFLAGS = ${AMLDFLAGS}
254
255
256#### ESingular
257
258ESingular_CFLAGS = -O3 -fomit-frame-pointer ${PIPE}
259ESingular_CXXFLAGS = -O3 -fomit-frame-pointer -Wextra -Wall -Wno-long-long ${PIPE} $(CXXTEMPLFLAGS)
260ESingular_CPPFLAGS = ${AM_CPPFLAGS} -DHAVE_CONFIG_H -DNDEBUG -DOM_NDEBUG -DESINGULAR -DPROTO
261ESingular_LDFLAGS = -static ${AMLDFLAGS}
262ESingular_LDADD =   -lreporter -lmisc -lomalloc -lfindexec
263
264ESingular_SOURCES = emacs.cc fegetopt.c fegetopt.h feOptES.inc feOpt.cc
265
266#### same for TSingular
267
268TSingular_CFLAGS = -O3 -fomit-frame-pointer ${PIPE}
269TSingular_CXXFLAGS = -O3 -fomit-frame-pointer -Wextra -Wall -Wno-long-long ${PIPE} $(CXXTEMPLFLAGS)
270TSingular_CPPFLAGS = ${AM_CPPFLAGS} -DHAVE_CONFIG_H -DNDEBUG -DOM_NDEBUG -DTSINGULAR -DPROTO
271TSingular_LDFLAGS = -static ${AMLDFLAGS}
272TSingular_LDADD =   -lreporter -lmisc -lomalloc -lfindexec
273
274TSingular_SOURCES = emacs.cc fegetopt.c fegetopt.h feOptTS.inc feOpt.cc
275# utils.cc utils.h
276
277
278#### libparse
279libparse_CPPFLAGS = ${AM_CPPFLAGS} -DHAVE_CONFIG_H -DNDEBUG -DOM_NDEBUG -DSTANDALONE_PARSER
280libparse_CFLAGS = -O3 -fomit-frame-pointer ${PIPE}
281libparse_CXXFLAGS = -O3 -fomit-frame-pointer -Wextra -Wall -Wno-long-long ${PIPE} $(CXXTEMPLFLAGS)
282
283libparse_SOURCES = libparse.cc fegetopt.c fegetopt.h utils.cc  utils.h
284# nodist_libparse_SOURCES = libSingular.la
285
286# # libSingular.la -lnumeric
287libparse_LDADD = -lomalloc
288libparse_LDFLAGS = -static ${AMLDFLAGS}
289# TODO for libparse:
290# multiple definition of `category_out': libparse.cc v.s. utils.cc
291# undefined reference to `iiInitSingularProcinfo(procinfo*, char const*, char const*, int, long, int)'
292
293#########################################################
294# the Singular library (*.lib files)
295
296include ${srcdir}/singular-libs
297
298singularlibrarydir = ${datadir}/singular
299singularlibrary = $(SLIB0:%=LIB/%) $(SLIB1:%=LIB/%) $(PLIBS:%=LIB/%)
300nobase_dist_singularlibrary_DATA = LIB/tst.lib LIB/help.cnf ${singularlibrary}
301EXTRA_DIST = make_alllib.sh LIB/all.lib.tmpl singular-libs \
302             LIB/help.cnf links/slInit_Dynamic.cc
303
304# ${nobase_dist_singularlibrary_DATA}
305
306singularalllibrarydir = ${datadir}/singular/LIB
307singularalllibrary = all.lib
308nobase_dist_singularalllibrary_DATA = all.lib
309
310all.lib: ${srcdir}/make_alllib.sh ${srcdir}/LIB/all.lib.tmpl ${singularlibrary}
311        ${srcdir}/make_alllib.sh ${srcdir}/LIB/all.lib.tmpl ${SLIB0} ${PLIBS}
312
313########################### TEST #########################
314
315TESTS_ENVIRONMENT = SINGULARPATH='${top_builddir}/Singular/LIB:${top_srcdir}/Singular/LIB:${top_builddir}/libpolys/polys/.libs:${top_builddir}/factory/gftables'
316TESTS_ENVIRONMENT += SINGULAR_ROOT_DIR='${top_builddir}'
317
318TESTS=test-s-r test-d-r
319
320if WANT_DEBUG
321TESTS += test-s-g test-d-g
322endif
323
324check_PROGRAMS=$(TESTS)
325
326# Static versions
327
328test_s_r_CFLAGS = -O3 -fomit-frame-pointer ${PIPE}
329test_s_g_CFLAGS = ${PIPE}
330
331test_s_r_CXXFLAGS = -O3 -fomit-frame-pointer -Wextra -Wall -Wno-long-long ${PIPE} $(CXXTEMPLFLAGS)
332test_s_g_CXXFLAGS = -g -Wextra -Wall -Wno-long-long -pedantic ${PIPE} $(CXXTEMPLFLAGS)
333
334test_s_r_SOURCES = test.cc
335test_s_g_SOURCES = test.cc
336
337test_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}
338test_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}
339
340test_s_r_CPPFLAGS = ${AM_CPPFLAGS} -DHAVE_CONFIG_H -DNDEBUG -DOM_NDEBUG
341test_s_g_CPPFLAGS = ${AM_CPPFLAGS} -DHAVE_CONFIG_H
342
343test_s_r_LDFLAGS = -static ${AMLDFLAGS}
344test_s_g_LDFLAGS = -static ${AMLDFLAGS}
345
346
347# Dynamic versions
348
349test_d_r_CFLAGS = -O3 -fomit-frame-pointer ${PIPE}
350test_d_g_CFLAGS = ${PIPE}
351
352test_d_r_CXXFLAGS = -O3 -fomit-frame-pointer -Wextra -Wall -Wno-long-long ${PIPE} $(CXXTEMPLFLAGS)
353test_d_g_CXXFLAGS = -g -Wextra -Wall -Wno-long-long -pedantic ${PIPE} $(CXXTEMPLFLAGS)
354
355test_d_r_SOURCES = test.cc
356test_d_g_SOURCES = test.cc
357
358test_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}
359test_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}
360
361test_d_r_CPPFLAGS = ${AM_CPPFLAGS} -DHAVE_CONFIG_H -DNDEBUG -DOM_NDEBUG
362test_d_g_CPPFLAGS = ${AM_CPPFLAGS} -DHAVE_CONFIG_H
363
364test_d_r_LDFLAGS = ${AMLDFLAGS}
365test_d_g_LDFLAGS = ${AMLDFLAGS}
366
367#########################################################
368
369# These files are built first
370BUILT_SOURCES = feOpt.inc feOptTS.inc feOptES.inc iparith.inc all.lib plural_cmd.inc \
371                gftables MOD
372
373CLEANFILES = $(BUILT_SOURCES) $(EXTRA_PROGRAMS)
374
375clean-local:
376        if [ "${abs_builddir}" != "${abs_srcdir}" ]; then \
377          if [ -L ${abs_builddir}/LIB ]; then unlink ${abs_builddir}/LIB; fi \
378        fi
379
380feOpt.inc: feOptGen
381        ${builddir}/feOptGen
382
383feOptES.inc: feOptES
384        ${builddir}/feOptES
385
386feOptTS.inc: feOptTS
387        ${builddir}/feOptTS
388
389plural_cmd.inc iparith.inc: gentable1
390        ${builddir}/gentable1
391
392# # fake rule to fix parallel make http://www.gnu.org/s/hello/manual/automake/Multiple-Outputs.html
393# plural_cmd.inc: iparith.inc
394
395
396gftables: ${top_srcdir}/factory/gftables
397        ln -snf ${top_srcdir}/factory/gftables ${builddir}/gftables
398
399${abs_builddir}/LIB: ${srcdir}/LIB
400        if [ "${abs_builddir}" != "${abs_srcdir}" ]; then \
401          ln -snf ${abs_srcdir}/LIB ${abs_builddir}/; \
402        fi
403
404MOD: ${top_builddir}/libpolys/polys/.libs
405        ln -snf ${top_builddir}/libpolys/polys/.libs/ ${builddir}/MOD
406
407moduledir = $(libexecdir)/singular/MOD
408
409module_LTLIBRARIES =
410
411if PYTHON_MODULE
412module_LTLIBRARIES += pyobject.la
413endif
414
415pyobject_la_SOURCES = pyobject.cc
416pyobject_la_CPPFLAGS   = ${AM_CPPFLAGS} ${NODEBUGDEFS}
417pyobject_g_la_CPPFLAGS = ${AM_CPPFLAGS}
418
419pyobject_la_CXXFLAGS   = ${NODEBUGCXXFLAGS} @PYTHON_CSPEC@
420pyobject_g_la_CXXFLAGS = ${DEBUGCXXFLAGS} @PYTHON_CSPEC@
421
422pyobject_la_LDFLAGS = -export-dynamic -shared -module -avoid-version \
423  ${AMLDFLAGS} @PYTHON_LSPEC@
Note: See TracBrowser for help on using the repository browser.