source: git/Singular/Makefile.am @ cda527

spielwiese
Last change on this file since cda527 was cda527, checked in by Hans Schoenemann <hannes@…>, 10 years ago
link Singular-libs statically: dynamic was linked against build-dir
  • Property mode set to 100644
File size: 9.0 KB
Line 
1ACLOCAL_AMFLAGS = -I ../m4
2
3GIT_VERSION := $(shell $(top_srcdir)/git-version-gen $(top_srcdir)/.tarball-git-version)
4
5AM_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)   -DGIT_VERSION='"$(GIT_VERSION)"'
6
7if HAVE_GFANLIB
8  USE_GFANLIB = ${top_builddir}/dyn_modules/callgfanlib/gfanlib.la ${abs_top_builddir}/gfanlib/libgfan.la ${CDDGMPLDFLAGS}
9else
10  USE_GFANLIB =
11endif
12
13# AM_LDFLAGS = libSingular.la ${top_builddir}/numeric/libnumeric.la ${top_builddir}/kernel/libkernel.la
14
15########################### Dynamic Modules... #########################
16if ENABLE_P_PROCS_DYNAMIC
17  moduledir = $(libexecdir)/singular/MOD
18else !ENABLE_P_PROCS_DYNAMIC
19  moduledir = $(libdir)/singular
20endif !ENABLE_P_PROCS_DYNAMIC
21
22##########################################################################
23module_LTLIBRARIES = pyobject.la
24
25pyobject_la_SOURCES = pyobject.cc
26
27pyobject_la_CXXFLAGS = $(PYTHON_CSPEC)
28pyobject_la_CPPFLAGS = $(PYTHON_CPPFLAGS)  ${AM_CPPFLAGS}
29
30pyobject_la_LDFLAGS = $(PYTHON_EXTRA_LIBS)  $(PYTHON_LSPEC) ${AM_LDFLAGS} $(PYTHON_EXTRA_LDFLAGS) $(PYTHON_LDFLAGS) -module -export-dynamic -avoid-version -flat_namespace -weak_reference_mismatches weak -undefined dynamic_lookup
31###  -export-dynamic -shared -module -avoid-version (add to all DMs?)
32
33##########################################################################
34if PYTHON_USE
35  PY=pyobject.la  $(PYTHON_EXTRA_LIBS)  $(PYTHON_LSPEC) $(PYTHON_EXTRA_LDFLAGS) $(PYTHON_LDFLAGS)
36else !PYTHON_USE
37  PY=
38endif !PYTHON_USE
39
40if SI_EMBED_PYTHON
41 EMBED_PYOBJECT   = ${PY} ${top_builddir}/dyn_modules/syzextra/syzextra.la ${USE_GFANLIB}
42else !SI_EMBED_PYTHON
43  EMBED_PYOBJECT =
44endif !SI_EMBED_PYTHON
45
46########################### libSingular* #########################
47
48libSingular_LTLIBRARIES = libSingular.la
49libSingulardir = $(libdir)
50
51libSingular_la_CPPFLAGS = ${AM_CPPFLAGS} -DLIBSINGULAR
52
53SOURCES =    Minor.cc\
54   MinorInterface.cc\
55   MinorProcessor.cc\
56   links/asciiLink.cc\
57   attrib.cc\
58   blackbox.cc\
59   calcSVD.cc\
60   cntrlc.cc\
61   countedref.cc\
62   denom_list.cc\
63   eigenval_ip.cc\
64   extra.cc\
65   feOpt.cc\
66   fehelp.cc\
67   fevoices.cc\
68   fglm.cc\
69   gms.cc\
70   grammar.cc\
71   interpolation.cc\
72   iparith.cc\
73   ipassign.cc\
74   ipconv.cc\
75   ipid.cc\
76   iplib.cc\
77   ipprint.cc\
78   ipshell.cc\
79   janet.cc\
80   libparse.cc\
81   linearAlgebra_ip.cc\
82   lists.cc\
83   maps_ip.cc\
84   minpoly.cc\
85   misc_ip.cc\
86   mod_lib.cc\
87   links/ndbm.cc\
88   newstruct.cc\
89   pcv.cc\
90   links/pipeLink.cc\
91   scanner.cc\
92   sdb.cc\
93   links/s_buff.cc\
94   links/silink.cc\
95   links/sing_dbm.cc\
96   sing_win.cc\
97   links/slInit_Static.cc\
98   links/ssiLink.cc\
99   links/semaphore.c\
100   subexpr.cc\
101   pyobject_setup.cc\
102   singmathic.cc\
103   walk.cc\
104   walk_ip.cc\
105   wrapper.cc\
106   fereadl.c mmstd.c claptmpl.cc\
107   rlimit.c
108
109#   links/slInit_Dynamic.cc
110
111libSingular_la_SOURCES   = $(SOURCES)
112
113SingularHEADERS =    Cache.h \
114   CacheImplementation.h \
115   Minor.h \
116   MinorInterface.h \
117   MinorProcessor.h \
118   attrib.h \
119   blackbox.h \
120   cntrlc.h \
121   countedref.h \
122   links/dbm_sl.h \
123   distrib.h \
124   eigenval_ip.h \
125   feOpt.h feOptTab.h fehelp.h \
126   fglm.h \
127   gms.h \
128   grammar.h \
129   interpolation.h \
130   idrec.h \
131   ipconv.h \
132   ipid.h \
133   ipprint.h \
134   ipshell.h \
135   janet.h \
136   libparse.h \
137   libsingular.h \
138   linearAlgebra_ip.h\
139   lists.h \
140   locals.h \
141   maps_ip.h \
142   minpoly.h \
143   misc_ip.h \
144   mmalloc.h \
145   mod_lib.h \
146   omSingularConfig.h \
147   links/ndbm.h \
148   newstruct.h \
149   pcv.h \
150   links/pipeLink.h \
151   pyobject_setup.h \
152   run.h \
153   sdb.h \
154   links/silink.h \
155   links/s_buff.h \
156   links/sing_dbm.h \
157   sing_win.h \
158   links/slInit.h \
159   links/ssiLink.h \
160   links/simpleipc.h \
161   si_signals.h \
162   stype.h \
163   subexpr.h \
164   table.h \
165   tok.h \
166   walk.h \
167   rlimit.h
168
169
170# -DMAKE_DISTRIBUTION
171
172# plural_cmd.inc
173nodist_libSingular_la_SOURCES = feOpt.inc iparith.inc
174
175libSingular_la_LDFLAGS    = ${USEPPROCSDYNAMICLDFLAGS} ${USEPPROCSDYNAMICLD} -release ${PACKAGE_VERSION}
176
177libSingular_la_LIBADD      = ${EMBED_PYOBJECT} ${top_builddir}/numeric/libnumeric.la ${top_builddir}/kernel/libkernel.la \
178${USEPPROCSDYNAMICLDFLAGS} ${USEPPROCSDYNAMICLD}
179
180
181libSingular_includedir = ${includedir}/singular/Singular
182nobase_libSingular_include_HEADERS = $(SingularHEADERS)
183
184#########################################################
185# handle all the generated *.inc
186
187noinst_PROGRAMS = gentable1 feOptGen feOptES feOptTS
188
189gentable1_SOURCES = gentable.cc grammar.h tok.h table.h
190gentable1_CPPFLAGS = ${AM_CPPFLAGS}
191
192feOptGen_SOURCES = feOptGen.cc feOptGen.h
193feOptGen_CPPFLAGS = ${AM_CPPFLAGS}
194
195feOptES_SOURCES = feOptGen.cc feOptGen.h
196feOptES_CPPFLAGS = ${AM_CPPFLAGS} -DESINGULAR
197
198feOptTS_SOURCES = feOptGen.cc feOptGen.h
199feOptTS_CPPFLAGS = ${AM_CPPFLAGS} -DTSINGULAR
200
201########################### Singular* #########################
202
203EXTRA_PROGRAMS =  libparse Singulars
204
205# the "optional_programs" variable should be defined in the configure
206# script, and listed in an AC_SUBST macro
207optional_Singular_programs =
208
209bin_PROGRAMS = Singular ESingular TSingular $(optional_Singular_programs)
210
211Singular ESingular TSingular $(optional_Singular_programs): ${abs_builddir}/LIB
212
213Singular_SOURCES = tesths.cc mmalloc.cc fegetopt.c fegetopt.h utils.cc  utils.h
214
215Singular_LDADD = libSingular.la ${EMBED_PYOBJECT}
216
217Singular_LDFLAGS = -static ${EMBED_PYOBJECT}
218
219Singulars_SOURCES = tesths.cc mmalloc.cc fegetopt.c fegetopt.h utils.cc  utils.h
220
221#  ${EMBED_PYOBJECT_LDFLAGS}  ${EMBED_PYOBJECT_LDFLAGS}
222Singulars_LDADD = libSingular.la ${EMBED_PYOBJECT}
223
224Singulars_LDFLAGS = -static ${AM_LDFLAGS} ${EMBED_PYOBJECT}
225
226scriptdir = $(libexecdir)/singular/MOD
227dist_script_SCRIPTS = singularsurf
228
229#### ESingular
230ESingular_CPPFLAGS = ${AM_CPPFLAGS} -DESINGULAR -DPROTO
231# ESingular_LDFLAGS = -static ${AM_LDFLAGS}
232ESingular_LDADD =  ${top_builddir}/libpolys/reporter/libreporter.la \
233${top_builddir}/libpolys/misc/libmisc.la ${top_builddir}/omalloc/libomalloc.la \
234${top_builddir}/resources/libresources.la
235
236
237ESingular_SOURCES = emacs.cc fegetopt.c fegetopt.h feOptES.inc feOpt.cc
238
239#### same for TSingular
240TSingular_CPPFLAGS = ${AM_CPPFLAGS} -DTSINGULAR -DPROTO
241# TSingular_LDFLAGS = -static ${AM_LDFLAGS}
242TSingular_LDADD = ${top_builddir}/libpolys/reporter/libreporter.la \
243${top_builddir}/libpolys/misc/libmisc.la ${top_builddir}/omalloc/libomalloc.la \
244${top_builddir}/resources/libresources.la
245
246TSingular_SOURCES = emacs.cc fegetopt.c fegetopt.h feOptTS.inc feOpt.cc
247# utils.cc utils.h
248
249
250#### libparse
251libparse_CPPFLAGS = ${AM_CPPFLAGS} -DSTANDALONE_PARSER
252
253libparse_SOURCES = libparse.cc fegetopt.c fegetopt.h utils.cc  utils.h
254
255libparse_LDADD = ${top_builddir}/omalloc/libomalloc.la
256libparse_LDFLAGS = -static ${AM_LDFLAGS}
257
258#########################################################
259# the Singular library (*.lib files)
260
261include ${srcdir}/singular-libs
262
263singularlibrarydir = ${datadir}/singular
264singularlibrary = $(SLIB0:%=LIB/%) $(SLIB1:%=LIB/%) $(PLIBS:%=LIB/%)
265nobase_dist_singularlibrary_DATA = LIB/tst.lib LIB/help.cnf ${singularlibrary}
266EXTRA_DIST = make_alllib.sh LIB/all.lib.tmpl singular-libs \
267             LIB/help.cnf links/slInit_Dynamic.cc
268
269singularalllibrarydir = ${datadir}/singular/LIB
270singularalllibrary = all.lib
271nobase_dist_singularalllibrary_DATA = all.lib
272
273all.lib: ${srcdir}/make_alllib.sh ${srcdir}/LIB/all.lib.tmpl ${singularlibrary}
274        ${srcdir}/make_alllib.sh ${srcdir}/LIB/all.lib.tmpl ${SLIB0} ${PLIBS}
275
276########################### TEST #########################
277TESTS_ENVIRONMENT = SINGULARPATH='${top_builddir}/Singular/LIB:${top_srcdir}/Singular/LIB:${top_builddir}/libpolys/polys/.libs:${top_builddir}/factory/gftables'
278TESTS_ENVIRONMENT += SINGULAR_ROOT_DIR='${top_builddir}'
279
280TESTS=test
281
282check_PROGRAMS=$(TESTS)
283
284test_SOURCES = test.cc
285# ${EMBED_PYOBJECT_LDFLAGS}
286test_LDADD = libSingular.la
287
288#########################################################
289
290# These files are built first
291BUILT_SOURCES = feOpt.inc feOptTS.inc feOptES.inc iparith.inc all.lib plural_cmd.inc \
292                gftables MOD
293
294CLEANFILES = $(BUILT_SOURCES) $(EXTRA_PROGRAMS)
295
296clean-local:
297        if [ "${abs_builddir}" != "${abs_srcdir}" ]; then \
298          if [ -L ${abs_builddir}/LIB ]; then unlink ${abs_builddir}/LIB; fi \
299        fi
300
301feOpt.inc: feOptGen$(EXEEXT)
302        ${builddir}/feOptGen$(EXEEXT)
303
304feOptES.inc: feOptES$(EXEEXT)
305        ${builddir}/feOptES$(EXEEXT)
306
307feOptTS.inc: feOptTS$(EXEEXT)
308        ${builddir}/feOptTS$(EXEEXT)
309
310plural_cmd.inc iparith.inc: gentable1$(EXEEXT)
311        ${builddir}/gentable1$(EXEEXT)
312
313# # fake rule to fix parallel make http://www.gnu.org/s/hello/manual/automake/Multiple-Outputs.html
314# plural_cmd.inc: iparith.inc
315
316gftables: ${top_srcdir}/factory/gftables
317        ln -snf ${top_srcdir}/factory/gftables ${builddir}/gftables
318
319${abs_builddir}/LIB: ${srcdir}/LIB
320        if [ "${abs_builddir}" != "${abs_srcdir}" ]; then \
321          ln -snf ${abs_srcdir}/LIB ${abs_builddir}/; \
322        fi
323
324MOD: ${top_builddir}/libpolys/polys/.libs
325        ln -snf ${top_builddir}/libpolys/polys/.libs/ ${builddir}/MOD
326
Note: See TracBrowser for help on using the repository browser.