source: git/Singular/Makefile.am @ 91ecf18

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