source: git/Singular/Makefile.am @ 02b4e1

spielwiese
Last change on this file since 02b4e1 was 02b4e1, checked in by Michael Orlitzky <michael@…>, 2 years ago
Singular/Makefile.am: use FACTORY_LIBS when linking Singular. When building with --enable-factory, Singular should be linked against FACTORY_LIBS. GNU libtool manages to ignore this somehow, but when building with slibtool, one sees e.g.: rlibtool: link: x86_64-pc-linux-gnu-g++ ... -o .libs/Singular mold: error: undefined symbol: tesths.o: feArgv0 mold: error: undefined symbol: tesths.o: fe_optarg mold: error: undefined symbol: tesths.o: fe_optarg ... This commit adds FACTORY_LIBS to Singular_LDADD within Makefile.am to fix the build with those stricter tools.
  • Property mode set to 100644
File size: 6.8 KB
Line 
1ACLOCAL_AMFLAGS = -I../m4
2
3AM_CPPFLAGS = -I${top_srcdir} -I${top_builddir} -I${top_srcdir}/kernel -I${top_builddir}/kernel -I${top_srcdir}/libpolys -I${top_builddir}/libpolys $(FACTORY_INCLUDES) $(CCLUSTER_CPPFLAGS)  $(GMP_CPPFLAGS) $(FLINT_CFLAGS)
4
5AM_CXXFLAGS=$(NTL_CPPFLAGS) -fno-delete-null-pointer-checks
6
7all-local: all.lib gftables MOD ${abs_builddir}/LIB Singular$(EXEEXT) ESingular$(EXEEXT) TSingular$(EXEEXT)
8
9if SING_WIN
10SUBDIRS = ${BUILTIN_MODULES} . dyn_modules
11else
12SUBDIRS = dyn_modules .
13endif
14
15########################### Possible builtin modules... #########################
16BUILTIN_FLAGS = ${BUILTIN_LIBS}
17
18########################### libSingular* #########################
19
20libSingular_LTLIBRARIES = libSingular.la
21libSingulardir = $(libdir)
22
23libSingular_la_CPPFLAGS = ${AM_CPPFLAGS} -DLIBSINGULAR ${PTHREAD_CFLAGS}
24
25SOURCES = \
26   links/asciiLink.cc\
27   attrib.cc\
28   blackbox.cc\
29   calcSVD.cc\
30   cntrlc.cc\
31   countedref.cc\
32   denom_list.cc\
33   eigenval_ip.cc\
34   extra.cc\
35   feOpt.cc\
36   fehelp.cc\
37   fevoices.cc\
38   fglm.cc\
39   gms.cc\
40   grammar.cc\
41   iparith.cc\
42   ipassign.cc\
43   ipconv.cc\
44   ipid.cc\
45   iplib.cc\
46   ipprint.cc\
47   ipshell.cc\
48   libparse.cc\
49   linearAlgebra_ip.cc\
50   lists.cc\
51   maps_ip.cc\
52   misc_ip.cc\
53   mod_lib.cc\
54   links/ndbm.cc\
55   newstruct.cc\
56   number2.cc\
57   pcv.cc\
58   links/pipeLink.cc\
59   scanner.cc\
60   sdb.cc\
61   links/silink.cc\
62   links/sing_dbm.cc\
63   links/slInit_Static.cc\
64   links/ssiLink.cc\
65   links/semaphore.c\
66   subexpr.cc\
67   pyobject_setup.cc\
68   walk.cc\
69   walk_ip.cc\
70   wrapper.cc\
71   mmstd.c claptmpl.cc\
72   febase.cc \
73   svd/libs/amp.cpp \
74   svd/libs/ap.cpp
75
76#   links/slInit_Dynamic.cc
77
78libSingular_la_SOURCES   = $(SOURCES)
79
80SingularHEADERS = \
81   attrib.h \
82   blackbox.h \
83   cntrlc.h \
84   countedref.h \
85   links/dbm_sl.h \
86   distrib.h \
87   eigenval_ip.h \
88   feOpt.h feOptTab.h fehelp.h feOpt.inc feOptTS.inc feOptES.inc\
89   fglm.h \
90   gms.h \
91   grammar.h \
92   idrec.h \
93   iparith.inc \
94   ipconv.h \
95   ipid.h \
96   ipprint.h \
97   ipshell.h \
98   libparse.h \
99   libsingular.h \
100   linearAlgebra_ip.h\
101   lists.h \
102   locals.h \
103   maps_ip.h \
104   misc_ip.h \
105   mmalloc.h \
106   mod_lib.h \
107   links/ndbm.h \
108   newstruct.h \
109   number2.h \
110   pcv.h \
111   links/pipeLink.h \
112   pyobject_setup.h \
113   sdb.h \
114   links/silink.h \
115   links/sing_dbm.h \
116   links/slInit.h \
117   links/ssiLink.h \
118   links/simpleipc.h \
119   stype.h \
120   subexpr.h \
121   table.h \
122   tok.h \
123   walk.h \
124   fevoices.h \
125   svd_si.h \
126   svd/libs/amp.h  svd/libs/ap.h  svd/libs/stdafx.h \
127   svd/bdsvd.h  svd/bidiagonal.h  svd/blas.h  svd/lq.h  svd/qr.h  svd/reflections.h \
128   svd/rotations.h  svd/svd.h
129
130
131
132# -DMAKE_DISTRIBUTION
133
134# plural_cmd.inc
135nodist_libSingular_la_SOURCES = feOpt.inc iparith.inc
136
137libSingular_la_LDFLAGS    =$(SINGULAR_LDFLAGS) ${USEPPROCSDYNAMICLDFLAGS} ${USEPPROCSDYNAMICLD} -release ${PACKAGE_VERSION} $(CCLUSTER_LIBS) ${PTHREAD_LDFLAGS}
138libSingular_la_LIBADD     =${USEPPROCSDYNAMICLDFLAGS} ${USEPPROCSDYNAMICLD} ${BUILTIN_FLAGS} ${top_builddir}/kernel/libkernel.la ${PTHREAD_LIBS}
139
140libSingular_includedir = ${includedir}/singular/Singular
141nobase_libSingular_include_HEADERS = $(SingularHEADERS)
142
143########################### Singular* #########################
144dist_man1_MANS = Singular.man ESingular.man TSingular.man
145
146EXTRA_PROGRAMS =  libparse Singulard
147
148# the "optional_Singular_programs" variable should be defined in the configure
149# script, and listed in an AC_SUBST macro
150
151bin_PROGRAMS = Singular ESingular TSingular $(optional_Singular_programs)
152
153Singular_SOURCES = tesths.cc utils.cc  utils.h
154
155Singular_LDADD = libSingular.la ${OMALLOC_LIBS} ${BUILTIN_FLAGS} $(FACTORY_LIBS)
156
157Singular_LDFLAGS = ${AM_LDFLAGS} ${BUILTIN_FLAGS}
158
159Singulard_SOURCES = tesths.cc utils.cc  utils.h
160
161Singulard_LDADD = libSingular.la ${BUILTIN_FLAGS}
162
163Singulard_LDFLAGS = -shared ${AM_LDFLAGS} ${BUILTIN_FLAGS}
164
165scriptdir = $(libexecdir)/singular/MOD
166dist_script_SCRIPTS = singularsurf singularsurf_jupyter singularsurf_win surfex
167
168#### ESingular
169ESingular_CPPFLAGS = ${AM_CPPFLAGS} -DESINGULAR -DPROTO
170ESingular_LDADD =  ${top_builddir}/libpolys/reporter/libreporter.la \
171${top_builddir}/libpolys/misc/libmisc.la ${OMALLOC_LIBS} \
172${top_builddir}/resources/libsingular_resources.la
173
174
175ESingular_SOURCES = emacs.cc feOptES.inc feOpt.cc
176
177#### same for TSingular
178TSingular_CPPFLAGS = ${AM_CPPFLAGS} -DTSINGULAR -DPROTO
179TSingular_LDADD = ${top_builddir}/libpolys/reporter/libreporter.la \
180${top_builddir}/libpolys/misc/libmisc.la ${OMALLOC_LIBS} \
181${top_builddir}/resources/libsingular_resources.la
182
183TSingular_SOURCES = emacs.cc feOptTS.inc feOpt.cc
184# utils.cc utils.h
185
186
187#### libparse
188libparse_CPPFLAGS = ${AM_CPPFLAGS} -DSTANDALONE_PARSER
189
190libparse_SOURCES = libparse.cc utils.cc utils.h
191
192libparse_LDADD = ${top_builddir}/resources/libsingular_resources.la
193libparse_LDFLAGS = ${AM_LDFLAGS}
194
195#########################################################
196# the Singular library (*.lib files)
197
198include ${srcdir}/singular-libs
199
200singularlibrarydir = ${datadir}/singular
201singularlibrary = $(SLIB0:%=LIB/%) $(SLIB1:%=LIB/%) $(PLIBS:%=LIB/%) $(SLIB2:%=LIB/%)
202nobase_dist_singularlibrary_DATA = LIB/tst.lib LIB/help.cnf ${singularlibrary}
203EXTRA_DIST = grammar.y libparse.ll make_alllib.sh make_grammar make_table \
204             LIB/all.lib.tmpl singular-libs LIB/help.cnf LIB/.singularrc \
205             LIB/COPYING links/slInit_Dynamic.cc gentable.cc
206
207singularalllibrarydir = ${datadir}/singular/LIB
208singularalllibrary = all.lib
209nobase_dist_singularalllibrary_DATA = all.lib
210
211all.lib: ${srcdir}/make_alllib.sh ${srcdir}/LIB/all.lib.tmpl ${singularlibrary}
212        ${srcdir}/make_alllib.sh ${srcdir}/LIB/all.lib.tmpl ${SLIB0} ${PLIBS}
213
214########################### TEST #########################
215TESTS_ENVIRONMENT = SINGULARPATH='${top_builddir}/Singular/LIB:${top_srcdir}/Singular/LIB:${top_builddir}/libpolys/polys/.libs:${top_builddir}/factory/gftables'
216TESTS_ENVIRONMENT += SINGULAR_ROOT_DIR='${top_builddir}'
217
218TESTS=test
219
220check_PROGRAMS=$(TESTS)
221
222test_SOURCES = test.cc
223test_LDADD = ${builddir}/../omalloc/libomalloc.la libSingular.la
224
225#########################################################
226# These files are built first
227BUILT_SOURCES = all.lib gftables MOD
228CLEANFILES = $(BUILT_SOURCES) $(EXTRA_PROGRAMS)
229
230clean-local:
231        if [ "${abs_builddir}" != "${abs_srcdir}" ]; then \
232          if [ -L ${abs_builddir}/LIB ]; then unlink ${abs_builddir}/LIB; fi \
233        fi
234
235# # fake rule to fix parallel make http://www.gnu.org/s/hello/manual/automake/Multiple-Outputs.html
236
237gftables: ${top_srcdir}/factory/gftables
238        ln -snf ${top_srcdir}/factory/gftables ${builddir}/gftables
239
240${abs_builddir}/LIB: ${srcdir}/LIB
241        if [ "${abs_builddir}" != "${abs_srcdir}" ]; then \
242          ln -snf ${abs_srcdir}/LIB ${abs_builddir}/; \
243        fi
244
245MOD:
246        if [ -d "${top_builddir}/libpolys/polys/.libs" ]; then \
247          ln -snf ${top_builddir}/libpolys/polys/.libs/ ${abs_builddir}/MOD; \
248        fi
249
250echoLIBS:
251        @echo ${SLIB0} ${SLIB1} ${SLIB2} ${PLIBS}
252
Note: See TracBrowser for help on using the repository browser.