source: git/Singular/Makefile.in @ 5ecc946

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