source: git/Singular/Makefile.am @ 825fb7

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