1 | ################################################################# |
---|
2 | ### |
---|
3 | ### Makefile for Singular |
---|
4 | ### |
---|
5 | ################################################################# |
---|
6 | |
---|
7 | SHELL = /bin/sh |
---|
8 | |
---|
9 | ## |
---|
10 | ## versions |
---|
11 | ## |
---|
12 | SINGULAR_MAJOR_VERSION = @SINGULAR_MAJOR_VERSION@ |
---|
13 | SINGULAR_MINOR_VERSION = @SINGULAR_MINOR_VERSION@ |
---|
14 | DIST_NAME = Singular-${SINGULAR_MAJOR_VERSION}.${SINGULAR_MINOR_VERSION} |
---|
15 | |
---|
16 | ## |
---|
17 | ## various paths |
---|
18 | ## |
---|
19 | srcdir = @srcdir@ |
---|
20 | prefix = @prefix@ |
---|
21 | exec_prefix = @exec_prefix@ |
---|
22 | libdir = @libdir@ |
---|
23 | # program executable goes here |
---|
24 | bindir = @bindir@ |
---|
25 | # Singular libs go here |
---|
26 | singulardatadir = @singulardatadir@ |
---|
27 | includedir = @includedir@ |
---|
28 | |
---|
29 | ## |
---|
30 | ## various programs |
---|
31 | ## |
---|
32 | CC = @CC@ |
---|
33 | CXX = @CXX@ |
---|
34 | LEXP = @LEXP@ |
---|
35 | BISON = bison |
---|
36 | PERL = perl |
---|
37 | @SET_MAKE@ |
---|
38 | INSTALL = ./install-sh -c |
---|
39 | INSTALL_PROGRAM = ${INSTALL} |
---|
40 | INSTALL_DATA = ${INSTALL} -m 644 |
---|
41 | MKINSTALLDIRS = ./mkinstalldirs |
---|
42 | |
---|
43 | ## |
---|
44 | ## compiler and linker options |
---|
45 | ## |
---|
46 | CFLAGS = @CFLAGS@ -pipe |
---|
47 | CXXFLAGS = @CXXFLAGS@ -pipe |
---|
48 | CXXTEMPLFLAGS = @CXXTEMPLFLAGS@ |
---|
49 | CPPFLAGS = -I${srcdir} @CPPFLAGS@ |
---|
50 | DEFS = @DEFS@ -DNDEBUG |
---|
51 | LDFLAGS = @LDFLAGS@ |
---|
52 | STATIC_LDFLAGS = @STATIC_LDFLAGS@ |
---|
53 | LIBS = @NEED_LIBS@ |
---|
54 | |
---|
55 | ## |
---|
56 | ## subdirectories |
---|
57 | ## |
---|
58 | # where the doumentation files are |
---|
59 | docdir = doc |
---|
60 | # where the tests files are |
---|
61 | testdir = tests |
---|
62 | |
---|
63 | ## |
---|
64 | ## the configuration |
---|
65 | ## |
---|
66 | WITH_MP = @WITH_MP@ |
---|
67 | WITH_FACTORY = @WITH_FACTORY@ |
---|
68 | WITH_LIBFAC = @WITH_LIBFAC@ |
---|
69 | WITH_DBM = @WITH_DBM@ |
---|
70 | DOS_CROSS = @DOS_CROSS@ |
---|
71 | |
---|
72 | ## |
---|
73 | ## End configuration dependend stuff |
---|
74 | ################################################################# |
---|
75 | |
---|
76 | ### |
---|
77 | ### file sets |
---|
78 | ### |
---|
79 | |
---|
80 | CXXSOURCES=grammar.cc scanner.cc algmap.cc attrib.cc binom.cc clapconv.cc \ |
---|
81 | clapmem.cc clapsing.cc claptmpl.cc cntrlc.cc \ |
---|
82 | extra.cc febase.cc feread.cc \ |
---|
83 | ffields.cc hdegree.cc hilb.cc hutil.cc \ |
---|
84 | ideals.cc intvec.cc iparith.cc \ |
---|
85 | ipassign.cc ipconv.cc ipid.cc iplib.cc \ |
---|
86 | ipprint.cc ipshell.cc khstd.cc kstdfac.cc \ |
---|
87 | comm.cc kstd1.cc kstd2.cc kutil.cc lists.cc \ |
---|
88 | longalg.cc longrat.cc \ |
---|
89 | longrat0.cc maps.cc matpol.cc misc.cc \ |
---|
90 | mminit.cc modulop.cc \ |
---|
91 | fglm.cc fglmzero.cc fglmvec.cc fglmgauss.cc fglmhom.cc \ |
---|
92 | numbers.cc polys.cc polys0.cc polys1.cc polys-impl.cc \ |
---|
93 | ring.cc shortfl.cc silink.cc sing_mp.cc\ |
---|
94 | sing_dld.cc sing_dbm.cc spolys.cc spolys0.cc \ |
---|
95 | subexpr.cc syz.cc syz0.cc syz1.cc \ |
---|
96 | tesths.cc timer.cc weight.cc \ |
---|
97 | mpsr_Put.cc mpsr_PutPoly.cc mpsr_Tok.cc mpsr_GetPoly.cc \ |
---|
98 | mpsr_Get.cc mpsr_GetMisc.cc mpsr_Error.cc \ |
---|
99 | ndbm.cc spSpolyLoop.cc libparse.cc |
---|
100 | |
---|
101 | CSOURCES=mmalloc.c mmallocb.c mmallocs.c mmblock.c mmheap.c mmspec.c mmutil.c weight0.c |
---|
102 | |
---|
103 | SOURCES=${CSOURCES} ${CXXSOURCES} grammar.y scanner.l libparse.l spSpolyLoop.pl |
---|
104 | |
---|
105 | HEADERS=algmap.h hutil.h lists.h stairc.h attrib.h ideals.h \ |
---|
106 | longalg.h mpsr_Tok.h structs.h binom.h intvec.h longrat.h \ |
---|
107 | numbers.h stype.h clapconv.h ipconv.h maps.h page.h \ |
---|
108 | subexpr.h clapsing.h ipid.h matpol.h polys.h syz.h \ |
---|
109 | cntrlc.h ipprint.h mmemory.h ring.h timer.h \ |
---|
110 | febase.h ipshell.h mmprivat.h shortfl.h tok.h \ |
---|
111 | ffields.h khstd.h silink.h \ |
---|
112 | fglm.h comm.h kstd1.h modulop.h sing_dbm.h weight.h \ |
---|
113 | fglmgauss.h fglmvec.h kstd2.h mpsr.h sing_mp.h \ |
---|
114 | kstdfac.h mpsr_Get.h spolys.h \ |
---|
115 | kutil.h mpsr_Put.h spolys0.h \ |
---|
116 | ndbm.h spSpolyLoop.h polys-impl.h polys-comp.h |
---|
117 | |
---|
118 | TESTS=${testdir}/comparecheck ${testdir}/fac_test.in ${testdir}/fac_test.out\ |
---|
119 | ${testdir}/general_test.in ${testdir}/general_test.out \ |
---|
120 | ${testdir}/mpcheck ${testdir}/mpcheck.data \ |
---|
121 | ${testdir}/dbm_test.in ${testdir}/dbm_test.out |
---|
122 | |
---|
123 | DOCS=${docdir}/Makefile.in ${docdir}/copyright.tex ${docdir}/doc2tex.c \ |
---|
124 | ${docdir}/examples.doc ${docdir}/examples.tex ${docdir}/proc.tex \ |
---|
125 | ${docdir}/singular.doc ${docdir}/start.doc \ |
---|
126 | ${docdir}/start.tex ${docdir}/tutor.tex ${docdir}/singular.tex |
---|
127 | |
---|
128 | DISTFILES=${SOURCES} ${HEADERS} Makefile.in configure.in configure \ |
---|
129 | mod2.h.in grammar.h testgh install-sh mkinstalldirs \ |
---|
130 | ${TESTS} ${DOCS} |
---|
131 | |
---|
132 | OBJS=grammar.o scanner.o matpol.o binom.o\ |
---|
133 | febase.o feread.o timer.o intvec.o attrib.o lists.o\ |
---|
134 | longrat.o longrat0.o misc.o ring.o numbers.o maps.o\ |
---|
135 | hilb.o comm.o kstd1.o kstd2.o kutil.o khstd.o kstdfac.o modulop.o spolys.o\ |
---|
136 | ideals.o subexpr.o hdegree.o hutil.o ffields.o shortfl.o \ |
---|
137 | longalg.o spolys0.o syz.o syz0.o syz1.o weight.o weight0.o \ |
---|
138 | ipid.o ipshell.o iplib.o ipassign.o ipconv.o ipprint.o\ |
---|
139 | polys.o polys0.o polys1.o polys-impl.o extra.o\ |
---|
140 | mminit.o mmutil.o mmalloc.o mmallocb.o mmallocs.o \ |
---|
141 | mmspec.o mmblock.o mmheap.o sing_dld.o sing_dbm.o silink.o \ |
---|
142 | sing_mp.o fglm.o fglmzero.o fglmvec.o fglmhom.o fglmgauss.o cntrlc.o \ |
---|
143 | algmap.o clapconv.o clapmem.o clapsing.o claptmpl.o\ |
---|
144 | mpsr_Error.o mpsr_Put.o mpsr_PutPoly.o mpsr_GetPoly.o \ |
---|
145 | mpsr_Get.o mpsr_GetMisc.o ndbm.o spSpolyLoop.o libparse.o |
---|
146 | |
---|
147 | ## |
---|
148 | ## PRIMARY Targets |
---|
149 | ## |
---|
150 | |
---|
151 | |
---|
152 | .l.cc: |
---|
153 | @if test "${LEXP}" = touch; then \ |
---|
154 | touch scanner.cc; \ |
---|
155 | echo Warning: could not rebuilt scanner.cc;\ |
---|
156 | else \ |
---|
157 | echo "${LEXP} -s -I -t $< > scanner.cc"; \ |
---|
158 | ${LEXP} -s -I -t $< > scanner.cc; \ |
---|
159 | fi |
---|
160 | .y.cc: |
---|
161 | ${BISON} -d -t -o grammar.cc $< |
---|
162 | chmod +x testgh |
---|
163 | ./testgh |
---|
164 | |
---|
165 | .cc.o: |
---|
166 | ${CXX} ${CXXFLAGS} ${CXXTEMPLFLAGS} ${CPPFLAGS} ${DEFS} -c $< |
---|
167 | .c.o: |
---|
168 | ${CC} ${CFLAGS} ${CPPFLAGS} ${DEFS} -c $< |
---|
169 | |
---|
170 | all: Singular |
---|
171 | |
---|
172 | Singular: mod2.h Makefile version.h scanner.cc ${OBJS} iparith.o \ |
---|
173 | mpsr_Tok.o tesths.cc libparse.cc |
---|
174 | ${CXX} ${CXXFLAGS} ${CPPFLAGS} ${DEFS} -o Singular \ |
---|
175 | tesths.cc iparith.o mpsr_Tok.o ${OBJS} ${LDFLAGS} ${LIBS} |
---|
176 | |
---|
177 | Singular-static: mod2.h Makefile version.h scanner.cc ${OBJS} iparith.o \ |
---|
178 | mpsr_Tok.o tesths.cc |
---|
179 | ${CXX} ${CXXFLAGS} ${CPPFLAGS} ${DEFS} -o Singular-static \ |
---|
180 | tesths.cc iparith.o mpsr_Tok.o \ |
---|
181 | ${OBJS} ${STATIC_LDFLAGS} ${LDFLAGS} ${LIBS} |
---|
182 | |
---|
183 | |
---|
184 | iparith.o mpsr_Tok.o : iparith.inc mpsr_Tok.inc |
---|
185 | |
---|
186 | claptmpl.o: claptmpl.cc mod2.h |
---|
187 | ${CXX} ${CXXFLAGS} ${CPPFLAGS} ${DEFS} -c $< |
---|
188 | |
---|
189 | iparith.inc mpsr_Tok.inc: iparith.cc ipconv.cc tok.h mpsr_Tok.cc grammar.h mod2.h |
---|
190 | @if test "${DOS_CROSS}" = yes; then \ |
---|
191 | echo "NEED TO GENERATE inc FILES -- Please be patient" ;\ |
---|
192 | cd ..; \ |
---|
193 | ./configure.dos --generate-inc; \ |
---|
194 | else \ |
---|
195 | echo ${CXX} ${CXXFLAGS} ${CPPFLAGS} ${DEFS} -DGENTABLE \ |
---|
196 | -o gentable iparith.cc tesths.cc mpsr_Tok.cc \ |
---|
197 | ${OBJS} ${LDFLAGS} ${LIBS};\ |
---|
198 | ${CXX} ${CXXFLAGS} ${CPPFLAGS} ${DEFS} -DGENTABLE \ |
---|
199 | -o gentable iparith.cc tesths.cc mpsr_Tok.cc \ |
---|
200 | ${OBJS} ${LDFLAGS} ${LIBS};\ |
---|
201 | echo ./gentable; \ |
---|
202 | ./gentable; \ |
---|
203 | echo /bin/rm gentable;\ |
---|
204 | /bin/rm gentable; \ |
---|
205 | fi |
---|
206 | |
---|
207 | |
---|
208 | version.h: ${SOURCES} ${HEADERS} Makefile.in mod2.h.in configure.in |
---|
209 | echo "#define SINGULAR_VERSION_ID " `date '+%y%m%d%H'` >version.h |
---|
210 | |
---|
211 | mod2.h: stamp-h |
---|
212 | |
---|
213 | stamp-h : config.status mod2.h.in |
---|
214 | CONFIG_FILES= CONFIG_HEADERS=mod2.h ./config.status |
---|
215 | |
---|
216 | spSpolyLoop.cc spSpolyLoop.dd : spSpolyLoop.inc |
---|
217 | |
---|
218 | spSpolyLoop.inc: spSpolyLoop.pl |
---|
219 | ${PERL} spSpolyLoop.pl > spSpolyLoop.inc |
---|
220 | |
---|
221 | libparse: libparse_main.o utils.o |
---|
222 | ${CXX} -o libparse libparse_main.o utils.o |
---|
223 | |
---|
224 | libparse_main.o: libparse.cc |
---|
225 | ${CXX} -c -o libparse_main.o libparse.cc -DSTANDALONE_PARSER |
---|
226 | |
---|
227 | libparse.cc: libparse.l |
---|
228 | @if test "${LEXP}" = touch; then \ |
---|
229 | touch libparse.cc; \ |
---|
230 | echo Warning: could not rebuilt libparse.cc;\ |
---|
231 | else \ |
---|
232 | echo ${LEXP} -I -Pyylp -olibparse.cc libparse.l;\ |
---|
233 | ${LEXP} -I -Pyylp -olibparse.cc libparse.l;\ |
---|
234 | fi |
---|
235 | |
---|
236 | Makefile: Makefile.in config.status |
---|
237 | CONFIG_FILES="Makefile" CONFIG_HEADERS= ./config.status |
---|
238 | |
---|
239 | doc/Makefile: doc/Makefile.in config.status |
---|
240 | CONFIG_FILES="doc/Makefile" CONFIG_HEADERS= ./config.status |
---|
241 | |
---|
242 | config.status: configure |
---|
243 | ./config.status --recheck |
---|
244 | |
---|
245 | configure: configure.in |
---|
246 | @echo "WARNING: You need to rerun autoconf. I am proceeding, for now." |
---|
247 | @touch configure |
---|
248 | # autoconf |
---|
249 | |
---|
250 | ## |
---|
251 | ## install targets |
---|
252 | ## |
---|
253 | install: all installbin installdata installinfo |
---|
254 | |
---|
255 | installbin: Singular |
---|
256 | ${MKINSTALLDIRS} ${bindir} |
---|
257 | ${INSTALL_PROGRAM} Singular ${bindir} |
---|
258 | |
---|
259 | installdata: |
---|
260 | ${MKINSTALLDIRS} ${singulardatadir} |
---|
261 | ${MKINSTALLDIRS} ${singulardatadir}/gftables |
---|
262 | for file in ${srcdir}/LIB/gftables/[0-9]*; do \ |
---|
263 | ${INSTALL_DATA} $${file} ${singulardatadir}/gftables; \ |
---|
264 | done |
---|
265 | for file in ${srcdir}/LIB/*.lib; do \ |
---|
266 | ${INSTALL_DATA} $${file} ${singulardatadir}; \ |
---|
267 | done |
---|
268 | |
---|
269 | installinfo: |
---|
270 | cd ${docdir}; ${MAKE} install |
---|
271 | |
---|
272 | uninstall: uninstallbin uninstalldata uninstallinfo |
---|
273 | |
---|
274 | uninstallbin: |
---|
275 | -rm -f ${bindir}/Singular |
---|
276 | -rmdir ${bindir} |
---|
277 | |
---|
278 | uninstalldata: |
---|
279 | -rm -rf ${singulardatadir}/*.lib ${singulardatadir}/gftables |
---|
280 | -rmdir ${singulardatadir} |
---|
281 | |
---|
282 | unistallinfo: |
---|
283 | cd ${docdir}; ${MAKE} uninstall |
---|
284 | |
---|
285 | ## |
---|
286 | ## clean targest |
---|
287 | ## |
---|
288 | mostlyclean: clean |
---|
289 | |
---|
290 | clean: |
---|
291 | -rm -rf Singular* *.o *.og core *.d *.dd *~ \#* /tmp/mp* \ |
---|
292 | *.got *dump* *.diff *.dir *.pag |
---|
293 | cd ${docdir}; ${MAKE} clean |
---|
294 | |
---|
295 | distclean: clean |
---|
296 | -rm -rf depend iparith.inc mpsr_Tok.inc spSpolyLoop.inc |
---|
297 | -rm -rf ${DIST_NAME} ${testdir}/out stamp-h |
---|
298 | -rm mod2.h Makefile TAGS* config.status config.cache config.log |
---|
299 | cd ${docdir}; ${MAKE} distclean |
---|
300 | |
---|
301 | maintainer-clean: distclean |
---|
302 | @echo "This command is intended for maintainers to use;" |
---|
303 | @echo "Rebuilding the deleted files requires flex" |
---|
304 | @echo "bison and autoconf" |
---|
305 | -rm configure scanner.cc grammar.h grammar.cc libparse.cc |
---|
306 | |
---|
307 | info dvi ps html: |
---|
308 | cd ${docdir}; ${MAKE} $@ |
---|
309 | |
---|
310 | check: Singular ${testdir}/general_test.in ${testdir}/general_test.out |
---|
311 | - @ SINGULARPATH=`pwd`/LIB; export SINGULARPATH; \ |
---|
312 | PATH=`pwd`:${PATH}; export PATH;\ |
---|
313 | Singular=`pwd`/Singular; export Singular;\ |
---|
314 | ${testdir}/comparecheck ${testdir}/general_test.in ${testdir}/general_test.out |
---|
315 | @ if test "${WITH_MP}" = yes; then ${MAKE} mpcheck; fi; |
---|
316 | @ if test "${WITH_FACTORY}" = yes && test "${WITH_LIBFAC}" = yes; then \ |
---|
317 | ${MAKE} factorycheck;\ |
---|
318 | fi |
---|
319 | @ if test "${WITH_DBM}" = yes; then ${MAKE} dbmcheck; fi |
---|
320 | |
---|
321 | |
---|
322 | mpcheck: Singular ${testdir}/mpcheck ${testdir}/mpcheck.data |
---|
323 | - @ SINGULARPATH=`pwd`/LIB; export SINGULARPATH; \ |
---|
324 | PATH=`pwd`:${PATH}; export PATH;\ |
---|
325 | Singular=`pwd`/Singular; export Singular;\ |
---|
326 | ${testdir}/mpcheck ${testdir}/mpcheck.data |
---|
327 | |
---|
328 | factorycheck: Singular ${testdir}/comparecheck ${testdir}/fac_test.in \ |
---|
329 | ${testdir}/fac_test.out |
---|
330 | - @ SINGULARPATH=`pwd`/LIB; export SINGULARPATH; \ |
---|
331 | PATH=`pwd`:${PATH}; export PATH;\ |
---|
332 | Singular=`pwd`/Singular; export Singular;\ |
---|
333 | ${testdir}/comparecheck ${testdir}/fac_test.in ${testdir}/fac_test.out |
---|
334 | |
---|
335 | dbmcheck: Singular ${testdir}/comparecheck ${testdir}/dbm_test.in \ |
---|
336 | ${testdir}/dbm_test.out |
---|
337 | - @ SINGULARPATH=`pwd`/LIB; export SINGULARPATH; \ |
---|
338 | PATH=`pwd`:${PATH}; export PATH;\ |
---|
339 | Singular=`pwd`/Singular; export Singular;\ |
---|
340 | ${testdir}/comparecheck ${testdir}/dbm_test.in ${testdir}/dbm_test.out |
---|
341 | |
---|
342 | |
---|
343 | ## |
---|
344 | ## miscellanous targets |
---|
345 | ## |
---|
346 | |
---|
347 | dist: |
---|
348 | rm -rf ${DISTNAME}.tar* ${TEMPDIR}/${DISTNAME}* |
---|
349 | mkdir ${TEMPDIR}/${DISTNAME} |
---|
350 | - cp -pR . ${TEMPDIR}/${DISTNAME} |
---|
351 | cd ${TEMPDIR}/${DISTNAME}; ${MAKE} distclean; |
---|
352 | cd ${TEMPDIR}; tar cf ${DISTNAME}.tar ${DISTNAME} |
---|
353 | rm -rf ${TEMPDIR}/${DISTNAME} |
---|
354 | - gzip -9 ${TEMPDIR}/${DISTNAME}.tar |
---|
355 | - mv ${TEMPDIR}/${DISTNAME}.tar.gz . |
---|
356 | |
---|
357 | TAGS: |
---|
358 | etags ${SOURCES} ${HEADERS} |
---|
359 | |
---|
360 | ## |
---|
361 | ## Below here is stuff for developpers |
---|
362 | ################################################################# |
---|
363 | |
---|
364 | ## |
---|
365 | ## compiler and linker options for debug version |
---|
366 | ## |
---|
367 | |
---|
368 | CCG = gcc |
---|
369 | CXXG = gcc |
---|
370 | CXXM = gcc -MM |
---|
371 | CCM = gcc -MM |
---|
372 | |
---|
373 | CFLAGSG = -g -Wall -Wno-unused -pipe |
---|
374 | CXXFLAGSG = -g -Wall -Wno-unused -pipe |
---|
375 | CXXTEMPLFLAGSG = -fno-implicit-templates |
---|
376 | DEFSG = @DEFS@ |
---|
377 | |
---|
378 | ## |
---|
379 | ## .og files for having -O and -g object versions available at the same time |
---|
380 | ## |
---|
381 | |
---|
382 | OBJG1= grammar.og scanner.og matpol.og binom.og\ |
---|
383 | febase.og feread.og timer.og intvec.og attrib.og lists.og\ |
---|
384 | longrat.og longrat0.og misc.og ring.og numbers.og maps.og\ |
---|
385 | hilb.og comm.og kstd1.og kstd2.og kutil.og khstd.og kstdfac.og modulop.og \ |
---|
386 | spolys.og ideals.og subexpr.og hdegree.og hutil.og ffields.og shortfl.og \ |
---|
387 | longalg.og spolys0.og syz.og syz0.og syz1.og weight.og \ |
---|
388 | ipid.og ipshell.og iplib.og ipassign.og ipconv.og ipprint.og\ |
---|
389 | polys.og polys0.og polys1.og polys-impl.og extra.og\ |
---|
390 | mminit.og sing_dld.og sing_dbm.og silink.og \ |
---|
391 | sing_mp.og fglm.og fglmzero.og fglmvec.og fglmgauss.og fglmhom.og\ |
---|
392 | algmap.og clapconv.og clapmem.og clapsing.og \ |
---|
393 | cntrlc.og \ |
---|
394 | mpsr_Error.og mpsr_Put.og mpsr_PutPoly.og mpsr_GetPoly.og \ |
---|
395 | mpsr_Get.og mpsr_GetMisc.og \ |
---|
396 | ndbm.og spSpolyLoop.og libparse.og |
---|
397 | |
---|
398 | OBJG2= mmalloc.og mmallocb.og mmallocs.og mmblock.og mmheap.og \ |
---|
399 | mmspec.og mmutil.og weight0.og |
---|
400 | |
---|
401 | OBJG=$(OBJG1) $(OBJG2) claptmpl.og |
---|
402 | |
---|
403 | ## |
---|
404 | ## Debug Targets |
---|
405 | ## |
---|
406 | |
---|
407 | claptmpl.og: claptmpl.cc mod2.h |
---|
408 | $(CXXG) ${CXXFLAGSG} ${CPPFLAGS} ${DEFSG} -c $< -o $@ |
---|
409 | $(OBJG1): %.og: %.cc |
---|
410 | $(CXXG) ${CXXFLAGSG} ${CXXTEMPLFLAGSG} ${CPPFLAGS} ${DEFSG} -c $< -o $@ |
---|
411 | |
---|
412 | $(OBJG2): %.og: %.c |
---|
413 | $(CCG) ${CFLAGSG} ${CPPFLAGS} ${DEFSG} -c $< -o $@ |
---|
414 | |
---|
415 | Singularg: scanner.cc $(OBJG) iparith.og mpsr_Tok.og tesths.cc version.h |
---|
416 | $(CXXG) ${CXXFLAGSG} ${CPPFLAGS} ${DEFSG} -o Singularg \ |
---|
417 | tesths.cc iparith.og mpsr_Tok.og $(OBJG) ${LDFLAGS} ${LIBS} |
---|
418 | |
---|
419 | iparith.og: iparith.inc iparith.cc |
---|
420 | $(CXXG) ${CXXFLAGSG} ${CPPFLAGS} ${DEFSG} -c iparith.cc -o iparith.og |
---|
421 | |
---|
422 | mpsr_Tok.og: iparith.inc mpsr_Tok.cc |
---|
423 | $(CXXG) ${CXXFLAGSG} ${CPPFLAGS} ${DEFSG} -c mpsr_Tok.cc -o mpsr_Tok.og |
---|
424 | |
---|
425 | installg: Singularg |
---|
426 | ${MKINSTALLDIRS} ${bindir} |
---|
427 | ${INSTALL_PROGRAM} Singularg ${bindir} |
---|
428 | |
---|
429 | ## |
---|
430 | ## compiler and linker options for profile version |
---|
431 | ## |
---|
432 | |
---|
433 | CCP = gcc |
---|
434 | CXXP = gcc |
---|
435 | |
---|
436 | CFLAGSP = -pg -O3 -pipe |
---|
437 | CXXFLAGSP = -pg -O3 -pipe |
---|
438 | CXXTEMPLFLAGSP = -fno-implicit-templates |
---|
439 | DEFSP = @DEFS@ -DNDEBUG -DDO_PROFILE |
---|
440 | LDFLAGSP = -static @LDFLAGS@ |
---|
441 | |
---|
442 | ## |
---|
443 | ## .op files for |
---|
444 | ## |
---|
445 | |
---|
446 | OBJP1= grammar.op scanner.op matpol.op binom.op\ |
---|
447 | febase.op feread.op timer.op intvec.op attrib.op lists.op\ |
---|
448 | longrat.op longrat0.op misc.op ring.op numbers.op maps.op\ |
---|
449 | hilb.op comm.op kstd1.op kstd2.op kutil.op khstd.op kstdfac.op modulop.op \ |
---|
450 | spolys.op ideals.op subexpr.op hdegree.op hutil.op ffields.op shortfl.op \ |
---|
451 | longalg.op spolys0.op syz.op syz0.op syz1.op weight.op \ |
---|
452 | ipid.op ipshell.op iplib.op ipassign.op ipconv.op ipprint.op\ |
---|
453 | polys.op polys0.op polys1.op polys-impl.op extra.op\ |
---|
454 | mminit.op sing_dld.op sing_dbm.op silink.op \ |
---|
455 | sing_mp.op fglm.op fglmzero.op fglmvec.op fglmgauss.op fglmhom.op\ |
---|
456 | algmap.op clapconv.op clapmem.op clapsing.op \ |
---|
457 | cntrlc.op \ |
---|
458 | mpsr_Error.op mpsr_Put.op mpsr_PutPoly.op mpsr_GetPoly.op \ |
---|
459 | mpsr_Get.op mpsr_GetMisc.op \ |
---|
460 | ndbm.op spSpolyLoop.op libparse.op |
---|
461 | |
---|
462 | OBJP2= mmalloc.op mmallocb.op mmallocs.op mmblock.op mmheap.op \ |
---|
463 | mmspec.op mmutil.op weight0.op |
---|
464 | |
---|
465 | OBJP=$(OBJP1) $(OBJP2) claptmpl.op |
---|
466 | |
---|
467 | ## |
---|
468 | ## Debug Targets |
---|
469 | ## |
---|
470 | |
---|
471 | claptmpl.op: claptmpl.cc mod2.h |
---|
472 | $(CXXP) ${CXXFLAGSP} ${CPPFLAGS} ${DEFSP} -c $< -o $@ |
---|
473 | $(OBJP1): %.op: %.cc |
---|
474 | $(CXXP) ${CXXFLAGSP} ${CXXTEMPLFLAGSP} ${CPPFLAGS} ${DEFSP} -c $< -o $@ |
---|
475 | |
---|
476 | $(OBJP2): %.op: %.c |
---|
477 | $(CCP) ${CFLAGSP} ${CPPFLAGS} ${DEFSP} -c $< -o $@ |
---|
478 | |
---|
479 | Singularp: scanner.cc $(OBJP) iparith.op mpsr_Tok.op tesths.cc version.h |
---|
480 | $(CXXP) ${CXXFLAGSP} ${CPPFLAGS} ${DEFSP} -o Singularp \ |
---|
481 | tesths.cc iparith.op mpsr_Tok.op $(OBJP) ${LDFLAGSP} ${LIBS} |
---|
482 | |
---|
483 | iparith.op: iparith.inc iparith.cc |
---|
484 | $(CXXP) ${CXXFLAGSP} ${CPPFLAGS} ${DEFSP} -c iparith.cc -o iparith.op |
---|
485 | |
---|
486 | mpsr_Tok.op: iparith.inc mpsr_Tok.cc |
---|
487 | $(CXXP) ${CXXFLAGSP} ${CPPFLAGS} ${DEFSP} -c mpsr_Tok.cc -o mpsr_Tok.op |
---|
488 | |
---|
489 | installp: Singularp |
---|
490 | ${MKINSTALLDIRS} ${bindir} |
---|
491 | ${INSTALL_PROGRAM} Singularp ${bindir} |
---|
492 | |
---|
493 | |
---|
494 | ## |
---|
495 | ## dependencies |
---|
496 | ## |
---|
497 | %.dd: %.cc mod2.h |
---|
498 | echo $(@:.dd=.og) $(@:.dd=.op) " " \\ > $@ |
---|
499 | $(CXXM) -DGENTABLE ${CPPFLAGS} ${DEFSG} $< >> $@ |
---|
500 | |
---|
501 | %.d: %.c mod2.h |
---|
502 | echo $(@:.d=.og) $(@:.d=.op) " " \\ > $@ |
---|
503 | $(CCM) ${CPPFLAGS} ${DEFSG} $< >> $@ |
---|
504 | |
---|
505 | depend: $(CXXSOURCES:.cc=.dd) $(CSOURCES:.c=.d) mod2.h |
---|
506 | cat *.d *.dd >depend |
---|
507 | |
---|
508 | #include $(SOURCES:.cc=.dd) $(CSOURCES:.c=.d) |
---|
509 | #include *.d *.dd |
---|
510 | ifeq (depend,$(wildcard depend)) |
---|
511 | include depend |
---|
512 | endif |
---|
513 | |
---|
514 | |
---|