source: git/Singular/Makefile.am @ 6c01d6b

spielwiese
Last change on this file since 6c01d6b was 17228e, checked in by Hans Schoenemann <hannes@…>, 12 years ago
fix: make check (for non-dbug version) removed: static.h
  • Property mode set to 100644
File size: 13.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 = ## -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)
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   attrib.cc\
46   bbcone.cc\
47   bbfan.cc\
48   bigintm.cc\
49   blackbox.cc\
50   calcSVD.cc\
51   cntrlc.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   slInit_Static.cc\
87   links/ssiLink.cc\
88   subexpr.cc\
89   walk.cc\
90   walk_ip.cc\
91   wrapper.cc\
92   fereadl.c mmstd.c claptmpl.cc
93
94#   slInit_Dynamic.cc
95
96libSingular_la_SOURCES   = $(SOURCES) feOpt.inc
97libSingular_g_la_SOURCES = $(SOURCES) feOpt.inc
98
99SingularHEADERS =    Cache.h \
100   CacheImplementation.h \
101   Minor.h \
102   MinorInterface.h \
103   MinorProcessor.h \
104   attrib.h \
105   bigintm.h \
106   blackbox.h \
107   cntrlc.h \
108   links/dbm_sl.h \
109   distrib.h \
110   eigenval_ip.h \
111   feOpt.h feOptTab.h fehelp.h \
112   fglm.h \
113   gms.h \
114   grammar.h \
115   interpolation.h \
116   idrec.h \
117   ipconv.h \
118   ipid.h \
119   ipprint.h \
120   ipshell.h \
121   janet.h \
122   libparse.h \
123   libsingular.h \
124   linearAlgebra_ip.h\
125   lists.h \
126   locals.h \
127   maps_ip.h \
128   minpoly.h \
129   misc_ip.h \
130   mmalloc.h \
131   omSingularConfig.h \
132   links/ndbm.h \
133   newstruct.h \
134   pcv.h \
135   links/pipeLink.h \
136   pyobject_setup.h \
137   run.h \
138   sdb.h \
139   silink.h \
140   links/s_buff.h \
141   links/sing_dbm.h \
142   sing_win.h \
143   slInit.h \
144   links/ssiLink.h \
145   stype.h \
146   subexpr.h \
147   table.h \
148   tok.h \
149   walk.h
150
151# plural_cmd.inc
152nodist_libSingular_la_SOURCES = iparith.inc
153nodist_libSingular_g_la_SOURCES = iparith.inc
154
155noinst_HEADERS = version.h
156
157
158libSingular_includedir = ${includedir}/singular/Singular/
159nobase_libSingular_include_HEADERS = $(SingularHEADERS)
160
161if ENABLE_FACTORY
162  USE_FACTORY = -L${top_builddir}/factory
163else
164  USE_FACTORY =
165endif
166
167#########################################################
168# handle all the generated *.inc
169
170noinst_PROGRAMS = gentable1 feOptGen feOptES feOptTS
171
172gentable1_SOURCES = gentable.cc grammar.h tok.h table.h
173gentable1_CFLAGS = -O3 -fomit-frame-pointer ${PIPE}
174gentable1_CXXFLAGS = -O3 -fomit-frame-pointer -Wextra -Wall -Wno-long-long ${PIPE} $(CXXTEMPLFLAGS)
175gentable1_CPPFLAGS = ${AM_CPPFLAGS} -DHAVE_CONFIG_H -DNDEBUG -DOM_NDEBUG
176
177feOptGen_SOURCES = feOptGen.cc feOptGen.h
178feOptGen_CXXFLAGS = -O3 -fomit-frame-pointer -Wextra -Wall -Wno-long-long ${PIPE} $(CXXTEMPLFLAGS)
179feOptGen_CPPFLAGS = ${AM_CPPFLAGS} -DHAVE_CONFIG_H -DNDEBUG -DOM_NDEBUG
180
181feOptES_SOURCES = feOptGen.cc feOptGen.h
182feOptES_CXXFLAGS = -O3 -fomit-frame-pointer -Wextra -Wall -Wno-long-long ${PIPE} $(CXXTEMPLFLAGS)
183feOptES_CPPFLAGS = ${AM_CPPFLAGS} -DHAVE_CONFIG_H -DNDEBUG -DOM_NDEBUG -DESINGULAR
184
185feOptTS_SOURCES = feOptGen.cc feOptGen.h
186feOptTS_CXXFLAGS = -O3 -fomit-frame-pointer -Wextra -Wall -Wno-long-long ${PIPE} $(CXXTEMPLFLAGS)
187feOptTS_CPPFLAGS = ${AM_CPPFLAGS} -DHAVE_CONFIG_H -DNDEBUG -DOM_NDEBUG -DTSINGULAR
188
189########################### Singular* #########################
190
191if WANT_DEBUG
192  EXTRA_PROGRAMS = Singulard Singulardg libparse
193else
194  EXTRA_PROGRAMS = Singulard libparse
195endif
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
201if WANT_DEBUG
202  bin_PROGRAMS = Singular Singularg ESingular TSingular $(optional_Singular_programs)
203else
204  bin_PROGRAMS = Singular ESingular TSingular $(optional_Singular_programs)
205endif
206
207AMLDFLAGS = -L${abs_top_builddir}/Singular -L${abs_top_builddir}/numeric -L${abs_top_builddir}/kernel -L${abs_top_builddir}/libpolys/polys  -L${top_builddir}/libpolys/coeffs -L${top_builddir}/libpolys/reporter -L${top_builddir}/libpolys/misc $(USE_FACTORY) -L${abs_top_builddir}/omalloc -L${abs_top_builddir}/findexec
208
209Singular_CFLAGS = -O3 -fomit-frame-pointer ${PIPE}
210Singularg_CFLAGS = -g ${PIPE}
211
212Singular_CXXFLAGS = -O3 -fomit-frame-pointer -Wextra -Wall -Wno-long-long ${PIPE} $(CXXTEMPLFLAGS)
213Singularg_CXXFLAGS = -g -Wextra -Wall -Wno-long-long -pedantic ${PIPE} $(CXXTEMPLFLAGS)
214
215nodist_Singular_SOURCES = libSingular.la
216nodist_Singularg_SOURCES =  libSingular_g.la
217
218Singular_SOURCES = tesths.cc fegetopt.c fegetopt.h utils.cc  utils.h
219Singularg_SOURCES = tesths.cc fegetopt.c fegetopt.h utils.cc  utils.h
220
221Singular_LDADD = libSingular.la ${abs_top_builddir}/numeric/libnumeric.la ${abs_top_builddir}/kernel/libkernel.la ${abs_top_builddir}/libpolys/polys/libpolys.la -lcoeffs -lreporter -lmisc $(FACTORY_LIBS) -lomalloc -lfindexec $(FLINT_LIBS) $(NTL_LIBS) $(GMP_LIBS) ${USEPPROCSDYNAMICLDFLAGS} ${USEPPROCSDYNAMICLD}
222Singularg_LDADD = libSingular_g.la ${abs_top_builddir}/numeric/libnumeric_g.la ${abs_top_builddir}/kernel/libkernel_g.la ${abs_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}
223
224Singular_CPPFLAGS = ${AM_CPPFLAGS} -DHAVE_CONFIG_H -DNDEBUG -DOM_NDEBUG
225Singularg_CPPFLAGS = ${AM_CPPFLAGS} -DHAVE_CONFIG_H
226
227Singular_LDFLAGS = -static ${AMLDFLAGS}
228Singularg_LDFLAGS = -static ${AMLDFLAGS}
229
230
231Singulard_CFLAGS = -O3 -fomit-frame-pointer ${PIPE}
232Singulardg_CFLAGS = -g ${PIPE}
233
234Singulard_CXXFLAGS = -O3 -fomit-frame-pointer -Wextra -Wall -Wno-long-long ${PIPE} $(CXXTEMPLFLAGS)
235Singulardg_CXXFLAGS = -g -Wextra -Wall -Wno-long-long -pedantic ${PIPE} $(CXXTEMPLFLAGS)
236
237Singulard_SOURCES = tesths.cc fegetopt.c fegetopt.h utils.cc  utils.h
238nodist_Singulard_SOURCES = libSingular.la
239
240Singulardg_SOURCES = tesths.cc fegetopt.c fegetopt.h utils.cc  utils.h
241nodist_Singulardg_SOURCES =  libSingular_g.la
242
243Singulard_LDADD = libSingular.la -lnumeric -lkernel -lpolys -lcoeffs -lreporter -lmisc $(FACTORY_LIBS) -lomalloc -lfindexec $(FLINT_LIBS) $(NTL_LIBS) $(GMP_LIBS) ${USEPPROCSDYNAMICLDFLAGS} ${USEPPROCSDYNAMICLD}
244Singulardg_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}
245
246Singulard_CPPFLAGS = ${AM_CPPFLAGS} -DHAVE_CONFIG_H -DNDEBUG -DOM_NDEBUG
247Singulardg_CPPFLAGS = ${AM_CPPFLAGS} -DHAVE_CONFIG_H
248
249Singulard_LDFLAGS = ${AMLDFLAGS}
250Singulardg_LDFLAGS = ${AMLDFLAGS}
251
252
253#### ESingular
254
255ESingular_CFLAGS = -O3 -fomit-frame-pointer ${PIPE}
256ESingular_CXXFLAGS = -O3 -fomit-frame-pointer -Wextra -Wall -Wno-long-long ${PIPE} $(CXXTEMPLFLAGS)
257ESingular_CPPFLAGS = ${AM_CPPFLAGS} -DHAVE_CONFIG_H -DNDEBUG -DOM_NDEBUG -DESINGULAR -DPROTO
258ESingular_LDFLAGS = -static ${AMLDFLAGS}
259ESingular_LDADD =   -lreporter -lmisc -lomalloc -lfindexec
260
261ESingular_SOURCES = emacs.cc fegetopt.c fegetopt.h feOptES.inc feOpt.cc
262
263#### same for TSingular
264
265TSingular_CFLAGS = -O3 -fomit-frame-pointer ${PIPE}
266TSingular_CXXFLAGS = -O3 -fomit-frame-pointer -Wextra -Wall -Wno-long-long ${PIPE} $(CXXTEMPLFLAGS)
267TSingular_CPPFLAGS = ${AM_CPPFLAGS} -DHAVE_CONFIG_H -DNDEBUG -DOM_NDEBUG -DTSINGULAR -DPROTO
268TSingular_LDFLAGS = -static ${AMLDFLAGS}
269TSingular_LDADD =   -lreporter -lmisc -lomalloc -lfindexec
270
271TSingular_SOURCES = emacs.cc fegetopt.c fegetopt.h feOptTS.inc feOpt.cc
272# utils.cc utils.h
273
274
275#### libparse
276libparse_CPPFLAGS = ${AM_CPPFLAGS} -DHAVE_CONFIG_H -DNDEBUG -DOM_NDEBUG -DSTANDALONE_PARSER
277libparse_CFLAGS = -O3 -fomit-frame-pointer ${PIPE}
278libparse_CXXFLAGS = -O3 -fomit-frame-pointer -Wextra -Wall -Wno-long-long ${PIPE} $(CXXTEMPLFLAGS)
279 
280libparse_SOURCES = libparse.cc fegetopt.c fegetopt.h utils.cc  utils.h
281# nodist_libparse_SOURCES = libSingular.la
282 
283# # libSingular.la -lnumeric
284libparse_LDADD = -lomalloc
285libparse_LDFLAGS = -static ${AMLDFLAGS}
286# TODO for libparse:
287# multiple definition of `category_out': libparse.cc v.s. utils.cc
288# undefined reference to `iiInitSingularProcinfo(procinfo*, char const*, char const*, int, long, int)'
289
290#########################################################
291# the Singular library (*.lib files)
292
293include ${srcdir}/singular-libs
294
295singularlibrarydir = ${datadir}/singular
296singularlibrary = $(SLIB0:%=LIB/%) $(SLIB1:%=LIB/%) $(PLIBS:%=LIB/%)
297nobase_dist_singularlibrary_DATA = LIB/all.lib LIB/tst.lib LIB/help.cnf ${singularlibrary}
298EXTRA_DIST = make_alllib.sh LIB/all.lib.tmpl singular-libs LIB/help.cnf
299
300# ${nobase_dist_singularlibrary_DATA}
301
302LIB/all.lib: ${srcdir}/make_alllib.sh ${srcdir}/LIB/all.lib.tmpl ${singularlibrary}
303        $(MKDIR_P) LIB
304        ${srcdir}/make_alllib.sh ${srcdir}/LIB/all.lib.tmpl ${SLIB0} ${PLIBS}
305
306# [ -d ${builddir}/LIB ] || ( $(MKDIR_P) LIB ; cp ${srcdir}/LIB/*.lib ${builddir}/LIB/ )
307
308########################### TEST #########################
309
310TESTS_ENVIRONMENT = SINGULARPATH='${abs_top_builddir}/Singular/LIB:${abs_top_srcdir}/Singular/LIB:${abs_top_builddir}/libpolys/polys/.libs:${abs_top_builddir}/factory/gftables'
311TESTS_ENVIRONMENT += SINGULAR_ROOT_DIR='${abs_top_builddir}'
312
313if WANT_DEBUG
314TESTS=test-s-g test-s-r test-d-g test-d-r
315else
316TESTS=test-s-r test-d-r
317endif
318check_PROGRAMS=$(TESTS)
319
320# Static versions
321
322test_s_r_CFLAGS = -O3 -fomit-frame-pointer ${PIPE}
323test_s_g_CFLAGS = ${PIPE}
324
325test_s_r_CXXFLAGS = -O3 -fomit-frame-pointer -Wextra -Wall -Wno-long-long ${PIPE} $(CXXTEMPLFLAGS)
326test_s_g_CXXFLAGS = -g -Wextra -Wall -Wno-long-long -pedantic ${PIPE} $(CXXTEMPLFLAGS)
327
328test_s_r_SOURCES = test.cc
329test_s_g_SOURCES = test.cc
330
331test_s_r_LDADD = libSingular.la -lnumeric -lkernel -lpolys -lcoeffs -lreporter -lmisc $(FACTORY_LIBS) -lomalloc -lfindexec $(FLINT_LIBS) $(NTL_LIBS) $(GMP_LIBS) ${USEPPROCSDYNAMICLDFLAGS} ${USEPPROCSDYNAMICLD}
332test_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}
333
334test_s_r_CPPFLAGS = ${AM_CPPFLAGS} -DHAVE_CONFIG_H -DNDEBUG -DOM_NDEBUG
335test_s_g_CPPFLAGS = ${AM_CPPFLAGS} -DHAVE_CONFIG_H
336
337test_s_r_LDFLAGS = -static ${AMLDFLAGS}
338test_s_g_LDFLAGS = -static ${AMLDFLAGS}
339
340
341# Dynamic versions
342
343test_d_r_CFLAGS = -O3 -fomit-frame-pointer ${PIPE}
344test_d_g_CFLAGS = ${PIPE}
345
346test_d_r_CXXFLAGS = -O3 -fomit-frame-pointer -Wextra -Wall -Wno-long-long ${PIPE} $(CXXTEMPLFLAGS)
347test_d_g_CXXFLAGS = -g -Wextra -Wall -Wno-long-long -pedantic ${PIPE} $(CXXTEMPLFLAGS)
348
349test_d_r_SOURCES = test.cc
350test_d_g_SOURCES = test.cc
351
352test_d_r_LDADD = libSingular.la -lnumeric -lkernel -lpolys -lcoeffs -lreporter -lmisc $(FACTORY_LIBS) -lomalloc -lfindexec $(FLINT_LIBS) $(NTL_LIBS) $(GMP_LIBS) ${USEPPROCSDYNAMICLDFLAGS} ${USEPPROCSDYNAMICLD}
353test_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}
354
355test_d_r_CPPFLAGS = ${AM_CPPFLAGS} -DHAVE_CONFIG_H -DNDEBUG -DOM_NDEBUG
356test_d_g_CPPFLAGS = ${AM_CPPFLAGS} -DHAVE_CONFIG_H
357
358test_d_r_LDFLAGS = ${AMLDFLAGS}
359test_d_g_LDFLAGS = ${AMLDFLAGS}
360
361#########################################################
362
363# These files are built first
364BUILT_SOURCES = feOpt.inc feOptTS.inc feOptES.inc iparith.inc LIB/all.lib plural_cmd.inc \
365                gftables MOD
366
367CLEANFILES = $(BUILT_SOURCES) $(EXTRA_PROGRAMS)
368
369feOpt.inc: feOptGen
370        ${abs_builddir}/feOptGen
371
372feOptES.inc: feOptES
373        ${abs_builddir}/feOptES
374
375feOptTS.inc: feOptTS
376        ${abs_builddir}/feOptTS
377
378plural_cmd.inc iparith.inc: gentable1
379        ${abs_builddir}/gentable1
380
381# # fake rule to fix parallel make http://www.gnu.org/s/hello/manual/automake/Multiple-Outputs.html
382# plural_cmd.inc: iparith.inc
383
384
385gftables: ${abs_top_srcdir}/factory/gftables
386        ln -snf ${abs_top_srcdir}/factory/gftables ${abs_builddir}/gftables
387
388MOD: ${abs_top_builddir}/libpolys/polys/.libs
389        ln -snf ${abs_top_builddir}/libpolys/polys/.libs/ ${abs_builddir}/MOD
Note: See TracBrowser for help on using the repository browser.