source: git/Singular/Makefile.am @ 05051f

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