source: git/Singular/Makefile.am @ 0419ab

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