source: git/Singular/Makefile.in @ 82716e

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