source: git/Singular/Makefile.in @ 54b356

spielwiese
Last change on this file since 54b356 was 54b356, checked in by Hans Schönemann <hannes@…>, 24 years ago
* hannes: added LIB/IP.lib LIB/toric.lib git-svn-id: file:///usr/local/Singular/svn/trunk@4312 2c84dea3-7e68-4137-9b89-c4e89433aadc
  • Property mode set to 100644
File size: 18.5 KB
Line 
1#################################################################
2###
3### Makefile for Singular
4###
5#################################################################
6
7SHELL           = /bin/sh
8
9##
10## version
11##
12SINGULAR_VERSION        = @SINGULAR_VERSION@
13SINGULAR                = @SINGULAR@
14SINGUNAME               = @SINGUNAME@
15EXEC_EXT                = @EXEC_EXT@
16##
17## various paths
18##
19srcdir          = @srcdir@
20prefix          = @prefix@
21exec_prefix     = @exec_prefix@
22libdir          = @libdir@
23# program executable goes here
24bindir          = @bindir@
25# includes are taken from here
26includedir      = @includedir@
27slibdir         = ${prefix}/LIB
28install_bindir  = ${install_prefix}/${SINGUNAME}
29install_slibdir = ${install_prefix}/LIB
30
31##
32## various programs
33##
34@SET_MAKE@
35CC              = @CC@
36CXX             = @CXX@
37LEX             = @LEX@
38PERL            = @PERL@
39BISON           = bison
40INSTALL         = @INSTALL@
41INSTALL_PROGRAM = @INSTALL_PROGRAM@
42INSTALL_DATA    = @INSTALL_DATA@
43MKINSTALLDIRS   = ./mkinstalldirs
44LN_S            = @LN_S@
45
46##
47## compiler and linker options
48##
49PIPE            = @PIPE@
50CFLAGS          = @CFLAGS@ ${PIPE}
51CXXFLAGS        = @CXXFLAGS@ ${PIPE}
52CXXTEMPLFLAGS   = @CXXTEMPLFLAGS@
53CPPFLAGS        = -I${srcdir} @CPPFLAGS@
54DEFS            = -DNDEBUG -D@SING_UNAME@ @DEFS@
55LDFLAGS         = @LDFLAGS@
56LD_DYN_FLAGS    = @LD_DYN_FLAGS@
57LD_LIBC         = @LD_LIBC@
58STATIC_LDFLAGS  = @STATIC_LDFLAGS@
59LIBS            = -lm @NEED_LIBS@
60
61##
62## End configuration dependend stuff
63#################################################################
64
65###
66### file sets
67###
68
69# normal C++ source files
70CXXSOURCES=grammar.cc scanner.cc algmap.cc attrib.cc binom.cc clapconv.cc \
71    clapmem.cc clapsing.cc cntrlc.cc\
72    extra.cc febase.cc feread.cc fehelp.cc feResource.cc feOpt.cc\
73    ffields.cc hdegree.cc hilb.cc hutil.cc \
74    ideals.cc intvec.cc \
75    ipassign.cc ipconv.cc ipid.cc iplib.cc \
76    ipprint.cc ipshell.cc khstd.cc kstdfac.cc \
77    kstd1.cc kstd2.cc kutil.cc lists.cc \
78    longalg.cc longrat.cc longrat0.cc \
79    maps.cc matpol.cc misc.cc sdb.cc gnumpfl.cc gnumpc.cc \
80    mminit.cc modulop.cc mpr_complex.cc sparsmat.cc \
81    fglm.cc fglmzero.cc fglmvec.cc fglmgauss.cc fglmhom.cc fglmcomb.cc \
82    numbers.cc polys.cc polys0.cc polys1.cc polys-impl.cc \
83    ring.cc shortfl.cc silink.cc sing_mp.cc\
84    sing_dld.cc sing_dbm.cc kspoly.cc \
85    subexpr.cc syz.cc syz0.cc syz1.cc syz2.cc\
86    timer.cc weight.cc \
87    mpsr_Put.cc mpsr_PutPoly.cc mpsr_GetPoly.cc \
88    mpsr_Get.cc mpsr_GetMisc.cc mpsr_Error.cc \
89    GMPrat.cc multicnt.cc npolygon.cc semic.cc spectrum.cc splist.cc \
90    ndbm.cc  libparse.cc mod_raw.cc\
91    pcv.cc kbuckets.cc prProcs.cc \
92    mpr_inout.cc mpr_base.cc mpr_numeric.cc \
93    prCopy.cc
94
95
96# normal C source files
97CSOURCES=mmalloc.c mmheap.c mmpage.c mmcheck.c  mmisc.c mmtables.c \
98    mmbt.c weight0.c find_exec.c fegetopt.c fereadl.c page.c feOpenWinntUrl.c
99
100# special source files (need extra compiling and/or linking)
101ESOURCES=iparith.cc gmalloc.c tesths.cc mpsr_Tok.cc claptmpl.cc
102
103SOURCES=${CSOURCES} ${CXXSOURCES} ${ESOURCES} \
104        grammar.y scanner.l libparse.l syz2.cc
105
106# ASO_SOURCES
107ASO_SOURCES = structs.aso.cc ipid.aso.cc mmprivate.aso.cc silink.aso.cc \
108              matpol.aso.cc longrat.aso.cc kbuckets.aso.cc mpsr_Get.aso.cc \
109              attrib.aso.cc lists.aso.cc\
110              syz.aso.cc subexpr.aso.cc
111
112HEADERS=algmap.h hutil.h lists.h stairc.h attrib.h ideals.h \
113        longalg.h mpsr_Tok.h structs.h binom.h intvec.h longrat.h \
114        numbers.h stype.h clapconv.h ipconv.h maps.h page.h \
115        subexpr.h clapsing.h ipid.h matpol.h polys.h syz.h \
116        cntrlc.h ipprint.h ring.h timer.h sdb.h \
117        febase.h ipshell.h shortfl.h tok.h mpr_complex.h mpr_global.h \
118        mmemory.h mmprivate.h mmpage.h page.h \
119        ffields.h khstd.h silink.h sparsmat.h gnumpfl.h gnumpc.h \
120        fglm.h kstd1.h modulop.h sing_dbm.h weight.h \
121        fglmgauss.h fglmvec.h mpsr.h sing_mp.h \
122        kstdfac.h mpsr_Get.h mmbt.h \
123        kutil.h mpsr_Put.h sing_dld.h\
124        ndbm.h polys-impl.h polys-comp.h libparse.h \
125        GMPrat.h multicnt.h npolygon.h semic.h spectrum.h splist.h multicnt.h \
126        pcv.h mod_raw.h kbuckets.h prProcs.h \
127        mpr_global.h mpr_inout.h mpr_base.h mpr_numeric.h \
128        feOpt.h fegetopt.h distrib.h walk.h \
129        prCopy.h
130
131INCS=febase.inc polys.inc iparith.inc mpsr_Tok.inc feOpt.inc
132
133DISTFILES=${SOURCES} ${HEADERS} Makefile.in configure.in configure \
134        mod2.h.in grammar.h testgh install-sh mkinstalldirs \
135        ${INCS} $(ASO_SOURCES) check_aso.pl aso.h
136
137OBJS := $(CXXSOURCES:.cc=.o) $(CSOURCES:.c=.o)
138
139ASO_OBJS := $(ASO_SOURCES:.aso.cc=.aso)
140
141#
142# Singular libraries which go into distribution
143# MAKE SURE THAT THIS IS UP_TO_DATE
144#
145SLIBS = algebra.lib        all.lib            classify.lib       deform.lib  \
146        elim.lib           factor.lib         finvar.lib         general.lib \
147        graphics.lib       hnoether.lib       homolog.lib        inout.lib   \
148        ainvar.lib         jordan.lib         latex.lib          linalg.lib  \
149        matrix.lib         mondromy.lib       normal.lib                     \
150        poly.lib           presolve.lib       primdec.lib                    \
151        primitiv.lib       random.lib         ring.lib           sing.lib    \
152        solve.lib          solver.lib         spcurve.lib        standard.lib\
153        surf.lib           triang.lib         template.lib       spectrum.lib\
154        Mregular.lib       toric.lib          IP.lib
155
156SLIBS_FILES = $(addprefix LIB/,${SLIBS})
157
158GFTABLES = $(wildcard LIB/gftables/[1-9]*)
159
160##
161## Build Targets
162##
163.l.cc:
164        @if test "x${LEX}" = x; then \
165                echo Error: no lex given, could not rebuilt scanner.cc;\
166                exit 1; \
167        fi
168        ${LEX} -s -I -t $< > scanner.cc
169.y.cc:
170        @if test "x${BISON}" = x; then \
171                echo Error: no bison given, could not rebuilt grammar.cc;\
172                exit 1; \
173        fi
174        ${BISON} -d -t -o grammar.cc $<
175        chmod +x testgh
176        ./testgh
177
178.cc.o: 
179        ${CXX} ${CXXFLAGS} ${CXXTEMPLFLAGS} ${CPPFLAGS} ${DEFS} -c $<
180.c.o:
181        ${CC} ${CFLAGS} ${CPPFLAGS} ${DEFS} -c $<
182
183%.aso.o: %.aso.cc mmtables.inc
184        ${CXX} ${CXXFLAGS} ${CXXTEMPLFLAGS} ${CPPFLAGS} ${DEFS} $< -o $@
185.PRECIOUS: %.aso.o
186
187%.aso: %.aso.o
188        ./$< > $@
189
190all:    Singular
191
192Singular: mod2.h Makefile version.h scanner.cc gmalloc.o \
193          ${ASO_OBJS} ${OBJS} \
194          iparith.o tesths.cc libparse.cc claptmpl.o mpsr_Tok.o
195        ${CXX} ${CXXFLAGS} ${CPPFLAGS} ${CXXTEMPLFLAGS} ${DEFS} \
196          -o Singular \
197          tesths.cc iparith.o mpsr_Tok.o claptmpl.o\
198          ${OBJS} ${LDFLAGS} ${LIBS} ${LD_DYN_FLAGS} \
199          gmalloc.o ${LD_LIBC}
200
201Singular-static: mod2.h Makefile version.h scanner.cc  gmalloc.o \
202                ${ASO_OBJS}  ${OBJS} \
203                iparith.o mpsr_Tok.o tesths.cc claptmpl.o
204        ${CXX} ${CXXFLAGS} ${CPPFLAGS} ${CXXTEMPLFLAGS} ${DEFS} \
205          -o Singular-static \
206          tesths.cc iparith.o mpsr_Tok.o claptmpl.o\
207          ${OBJS} ${STATIC_LDFLAGS} ${LDFLAGS} ${LIBS} ${LD_DYN_FLAGS} \
208          gmalloc.o ${LD_LIBC}
209
210iparith.o mpsr_Tok.o : iparith.inc mpsr_Tok.inc
211
212claptmpl.o: claptmpl.cc mod2.h
213        ${CXX} ${CXXFLAGS}  ${CPPFLAGS} ${DEFS} -c $<   
214
215iparith.inc mpsr_Tok.inc: gmalloc.o claptmpl.o iparith.cc \
216                          ipconv.cc tok.h mpsr_Tok.cc grammar.h mod2.h
217        ${CXX} ${CXXFLAGS} ${CPPFLAGS} ${CXXTEMPLFLAGS} ${DEFS} -DGENTABLE \
218             -o gentable claptmpl.o iparith.cc tesths.cc mpsr_Tok.cc \
219             ${OBJS} ${LDFLAGS} ${LIBS} gmalloc.o ${LD_LIBC}
220        ./gentable
221        /bin/rm -f gentable gentable.exe
222
223
224mmtables.inc: mmtables.c mmprivate.h mmemory.h mod2.h
225        ${CC} ${CFLAGS}  ${CPPFLAGS}\
226               -DGENERATE_INDEX_TABLE  -DHAVE_ASO=0 -DHAVE_INDEX_TABLE mmtables.c -o mmtables
227        ./mmtables > mmtables.inc
228        rm -f mmtables mmtables.exe
229
230mmtables.o mmtables.d: mmtables.inc
231
232version.h: ${SOURCES} ${HEADERS} Makefile.in mod2.h.in \
233           configure.in
234        echo unsigned long feVersionId =  `date '+%Y%m%d%H'`\; >version.h
235
236libparse: libparse_main.o utils.o fegetopt.o febase.cc
237        ${CXX}  -DHAVE_ASO=0 -DSTANDALONE_PARSER -o libparse febase.cc libparse_main.o utils.o fegetopt.o
238
239libparse_main.o: libparse.cc
240        ${CXX} -c -o libparse_main.o libparse.cc  -DHAVE_ASO=0 -DSTANDALONE_PARSER
241
242libparse.cc: libparse.l
243        @if test "x${LEX}" = x; then \
244                echo Error: no lex given, could not rebuilt libparse.cc;\
245                exit 1; \
246        fi
247        ${LEX} -I -Pyylp -olibparse.cc libparse.l
248
249# Hmm compiling with -fomit-frame-pointer resulted in access violation
250# under cygwin
251ESingular: fegetopt.o feResource.cc mod2.h feOpt.cc version.h emacs.cc \
252           feOptES.inc
253        ${CXX} -O ${DEFS} -DESINGULAR -o ESingular emacs.cc fegetopt.o \
254        ${LDFLAGS} ${LIBS} ${LD_LIBC}
255
256TSingular: fegetopt.o feResource.cc mod2.h feOpt.cc version.h emacs.cc \
257           feOptTS.inc
258        ${CXX} -O ${DEFS} -DTSINGULAR -o TSingular emacs.cc fegetopt.o \
259        ${LDFLAGS} ${LIBS} ${LD_LIBC}
260
261feOpt.h: feOpt.inc feOptES.inc feOptTS.inc
262
263feOpt.inc: feOpt.cc mod2.h
264        $(CXX) -DGENERATE_OPTION_INDEX -DHAVE_ASO=0 feOpt.cc -o feOpt
265        ./feOpt
266        /bin/rm -f feOpt feOpt.exe
267
268feOptES.inc: feOpt.cc
269        $(CXX) -DGENERATE_OPTION_INDEX  -DHAVE_ASO=0 -DESINGULAR feOpt.cc -o feOpt
270        ./feOpt
271        rm -f feOpt feOpt.exe
272
273feOptTS.inc: feOpt.cc
274        $(CXX) -DGENERATE_OPTION_INDEX  -DHAVE_ASO=0 -DTSINGULAR feOpt.cc -o feOpt
275        ./feOpt
276        rm -f feOpt feOpt.exe
277
278prCopy.cc : prCopy.inc
279
280prCopy.inc : prCopyMacros.h prCopyTemplate.cc prCopy.pl
281        $(PERL) prCopy.pl > prCopy.inc
282
283src: scanner.cc grammar.h grammar.cc libparse.cc
284
285mod2.h: stamp-h
286
287stamp-h : config.status mod2.h.in
288        CONFIG_FILES= CONFIG_HEADERS="mod2.h" ./config.status
289
290Makefile: Makefile.in config.status
291        CONFIG_FILES="Makefile" CONFIG_HEADERS= ./config.status
292
293config.status: configure
294        ./config.status --recheck
295
296configure: configure.in
297        @echo "WARNING: You need to rerun autoconf. I am proceeding, for now."
298        @touch configure
299#       autoconf
300
301##
302## windows only targets
303##
304run.o: run.c run.h
305        gcc -c -I. -O2 run.c -o run.o
306
307runTSingular : run.c run.h run.rc run.o
308        windres -DTSINGULAR -i run.rc -o run_res.o
309        gcc -mwindows -e _mainCRTStartup run.o run_res.o -o runTSingular.exe
310
311runESingular : run.c run.h run.rc run.o
312        windres -DESINGULAR -i run.rc -o run_res.o
313        gcc -mwindows -e _mainCRTStartup run.o run_res.o -o runESingular.exe
314
315run_res.o : run.rc
316        windres -i run.rc -o run_res.o
317
318run: run.c run.h run_res.o run.o
319        gcc -mwindows -e _mainCRTStartup run.o run_res.o -o run.exe
320
321##
322## install targets
323##
324ifeq ($(SINGUNAME),ix86-Win)
325RUN_SINGULARS=runESingular runTSingular
326endif
327
328install: all installbin installslib
329
330installbin: Singular libparse ESingular TSingular ${RUN_SINGULARS}
331        ${MKINSTALLDIRS} ${bindir}
332        ${INSTALL_PROGRAM} Singular ${SINGULAR}
333        ${INSTALL_PROGRAM} libparse ${RUN_SINGULARS} ${bindir}
334        ${INSTALL_PROGRAM} ESingular ${bindir}
335        ${INSTALL_PROGRAM} TSingular ${bindir}
336        chmod a+x ${SINGULAR}
337        rm -f ${bindir}/Singular${EXEC_EXT}
338        cd ${bindir}; ${LN_S} ${SINGULAR} Singular${EXEC_EXT};\
339
340installslib: LIB
341        test -r ${slibdir} || ${LN_S} `pwd`/LIB ${slibdir}
342
343
344uninstall: uninstallbin
345
346uninstallbin:
347        rm -f ${bindir}/Singular${EXEC_EXT}
348        rm -f ${SINGULAR}
349        -rmdir ${bindir}
350
351##
352## clean targest
353##
354mostlyclean:
355        -rm -f Singular Singularg Singularp Singularb libparse feOpt*.inc
356        -rm -f *.o *.og core *.op *.ob *.ot Singulart
357        -rm ESingular* TSingular*
358
359clean: mostlyclean
360         -rm -f *.aso *.bak *.d *.dd depend
361
362distclean: clean
363        -rm -f iparith.inc mpsr_Tok.inc stamp.h
364        -rm -f Singular* *.gprof *.bprof *~ .\#* version.h
365        -rm -f mod2.h Makefile TAGS* tags config.status config.cache config.log
366        -rm -f ${slibdir}
367
368srcclean:
369        @echo "This command is intended for maintainers to use;"
370        @echo "Rebuilding the deleted files requires flex"
371        @echo "bison, perl"
372        -rm -f scanner.cc grammar.h grammar.cc libparse.cc
373
374maintainer-clean: distclean srcclean
375        @echo "This command is intended for maintainers to use;"
376        @echo "Rebuilding the deleted files requires flex"
377        @echo "bison, perl and autoconf"
378        -rm configure
379
380##
381## miscellanous targets
382##
383
384Singular-bindist: $(HEADERS) $(SOURCES) Makefile depend
385        echo "#define MAKE_DISTRIBUTION " > distrib.h
386        ${MAKE} Singular ESingular TSingular
387        ${MKINSTALLDIRS} ${install_bindir}
388        ${INSTALL_PROGRAM} -s  Singular ESingular TSingular ${install_bindir}
389        echo "#undef MAKE_DISTRIBUTION " > distrib.h
390
391Singular-static-bindist: $(HEADERS) $(SOURCES) Makefile depend
392        echo "#define MAKE_DISTRIBUTION " > distrib.h
393        ${MAKE} Singular-static ESingular TSingular
394        ${MKINSTALLDIRS} ${install_bindir}
395        ${INSTALL_PROGRAM} -s Singular-static Singular ${install_bindir}
396        echo "#undef MAKE_DISTRIBUTION " > distrib.h
397
398install-bindist: libparse ${RUN_SINGULARS} Singular-bindist
399        ${MKINSTALLDIRS} ${install_bindir}
400        ${INSTALL_PROGRAM} -s Singular ESingular TSingular ${install_bindir}
401        ${INSTALL_PROGRAM} -s libparse ${RUN_SINGULARS} ${install_bindir}
402
403install-static-bindist: libparse ${RUN_SINGULARS} Singular-static-bindist
404        ${MKINSTALLDIRS} ${install_bindir}
405        ${INSTALL_PROGRAM} -s Singular ESingular TSingular ${install_bindir}
406        ${INSTALL_PROGRAM} -s libparse ${RUN_SINGULARS} ${install_bindir}
407
408install-sharedist: ${SLIBS_FILES} LIB/gftables
409        ${MKINSTALLDIRS} ${install_slibdir}
410        cp ${SLIBS_FILES} ${install_slibdir}
411        ${MKINSTALLDIRS} ${install_slibdir}/gftables
412        cp ${GFTABLES} ${install_slibdir}/gftables
413        chmod -R +rX ${install_slibdir}/*
414
415tar:
416        tar cf Singular-${SINGULAR_VERSION}-src.tar ${DISTFILES}
417        gzip -f Singular-${SINGULAR_VERSION}-src.tar
418
419
420TAGS:   ${SOURCES} ${HEADERS}
421        etags ${SOURCES} ${HEADERS}
422
423tags:   
424        ctags *.y *.l *.c *.h *.cc *.inc
425
426echoLIBS:
427        @echo ${SLIBS}
428
429##
430## Below here is stuff for developpers
431#################################################################
432
433##
434## compiler and linker options for debug version
435##
436
437CCG             = gcc
438CXXG            = gcc
439CXXM            = gcc -MM -MG -DGENERATE_DEPEND
440CCM             = gcc -MM -MG -DGENERATE_DEPEND
441
442CFLAGSG         = -g -Wall -Wno-unused ${PIPE}
443CXXFLAGSG       = -g -Wall -Wno-unused ${PIPE}
444CXXTEMPLFLAGSG  = -fno-implicit-templates
445DEFSG           = -D@SING_UNAME@ @DEFS@
446
447##
448## .og files for having -O and -g object versions available at the same time
449##
450
451OBJG1 := $(CXXSOURCES:.cc=.og)
452OBJG2 := $(CSOURCES:.c=.og)
453
454
455OBJG=$(OBJG1) $(OBJG2)
456
457##
458## Debug Targets
459##
460
461claptmpl.og: claptmpl.cc mod2.h
462        $(CXXG)  ${CXXFLAGSG} ${CPPFLAGS} ${DEFSG} -c $< -o $@
463
464$(OBJG1) : %.og: %.cc
465        $(CXXG) ${CXXFLAGSG} ${CXXTEMPLFLAGSG} ${CPPFLAGS} ${DEFSG} -c $< -o $@
466
467$(OBJG2) gmalloc.og: %.og: %.c
468        $(CCG)  ${CFLAGSG} ${CPPFLAGS} ${DEFSG} -c $< -o $@
469
470Singularg: scanner.cc gmalloc.og \
471           $(ASO_OBJS) $(OBJG)  \
472           iparith.og mpsr_Tok.og claptmpl.og tesths.cc version.h
473        $(CXXG) ${CXXFLAGSG} ${CXXTEMPLFLAGSG} ${CPPFLAGS} ${DEFSG} -o Singularg \
474        tesths.cc iparith.og mpsr_Tok.og claptmpl.og $(OBJG) ${LDFLAGS} ${LIBS} \
475        ${LD_DYN_FLAGS} gmalloc.og
476
477iparith.og: iparith.inc iparith.cc
478        $(CXXG)  ${CXXFLAGSG} ${CXXTEMPLFLAGSG} ${CPPFLAGS} ${DEFSG} -c iparith.cc -o iparith.og
479
480mpsr_Tok.og: iparith.inc mpsr_Tok.cc
481        $(CXXG) ${CXXFLAGSG} ${CPPFLAGS} ${CXXTEMPLFLAGSG} ${DEFSG} -c mpsr_Tok.cc -o mpsr_Tok.og
482
483installg: Singularg
484        ${MKINSTALLDIRS} ${bindir}
485        ${INSTALL_PROGRAM} Singularg ${bindir} 
486
487ESingularg: fegetopt.og feResource.cc mod2.h feOpt.cc version.h emacs.cc \
488           feOptES.inc
489        ${CXXG} -DESINGULAR -g ${DEFSG} -o ESingularg emacs.cc fegetopt.og ${LDFLAGS} ${LIBS}
490
491##
492## compiler and linker options for profile version
493##
494
495CCP             = gcc
496CXXP            = gcc
497
498CFLAGSP         = -pg -O3 ${PIPE}
499CXXFLAGSP       = -pg -O3 ${PIPE}
500CXXTEMPLFLAGSP  = -fno-implicit-templates
501DEFSP           = -DNDEBUG -DDO_PROFILE -D@SING_UNAME@ @DEFS@
502LDFLAGSP        = -static @LDFLAGS@
503
504CFLAGSB         = -g -O3 ${PIPE}
505CXXFLAGSB       = -g -O3 ${PIPE}
506CXXTEMPLFLAGSB  = -fno-implicit-templates
507DEFSB           = -D@SING_UNAME@ -DNDEBUG @DEFS@
508LDFLAGSB        = -static @LDFLAGS@
509
510# bprof object  file to link with
511BPROFOBJ        = /usr/local/lib/bmon.o
512
513DEFST           = -DNDEBUG -D@SING_UNAME@ -DMTRACK @DEFS@
514LDFLAGST        = @LDFLAGS@
515CFLAGST         = -g  -w ${PIPE}
516CXXFLAGST       = -g  -w ${PIPE}
517
518##
519## op and ob files for gprof and bprof, ot for mtrack
520##
521
522OBJP1 := $(CXXSOURCES:.cc=.op)
523OBJP2 := $(CSOURCES:.c=.op)
524OBJP=$(OBJP1) $(OBJP2)
525
526OBJB1 := $(CXXSOURCES:.cc=.ob)
527OBJB2 := $(CSOURCES:.c=.ob)
528OBJB=$(OBJB1) $(OBJB2)
529
530OBJT1 := $(CXXSOURCES:.cc=.ot)
531OBJT2 := $(CSOURCES:.c=.ot)
532OBJT=$(OBJT1) $(OBJT2)
533
534##
535## profile targets
536##
537
538## for gprof
539claptmpl.op: claptmpl.cc mod2.h
540        $(CXXP)  ${CXXFLAGSP} ${CPPFLAGS} ${DEFSP} -c $< -o $@
541
542$(OBJP1): %.op: %.cc
543        $(CXXP) ${CXXFLAGSP} ${CXXTEMPLFLAGSP} ${CPPFLAGS} ${DEFSP} -c $< -o $@
544
545$(OBJP2) gmalloc.op: %.op: %.c
546        $(CCP)  ${CFLAGSP} ${CPPFLAGS} ${DEFSP} -c $< -o $@
547
548Singularp: scanner.cc  gmalloc.op \
549           $(ASO_OBJS) $(OBJP) \
550           iparith.op mpsr_Tok.op claptmpl.op tesths.cc version.h
551        $(CXXP) ${CXXFLAGSP} ${CXXTEMPLFLAGSP} ${CPPFLAGS} ${DEFSP} -o Singularp \
552        tesths.cc iparith.op mpsr_Tok.op claptmpl.op $(OBJP) ${LDFLAGSP} ${LIBS} \
553        ${LD_DYN_FLAGS} gmalloc.op
554
555iparith.op: iparith.inc iparith.cc
556        $(CXXP)  ${CXXFLAGSP} ${CXXTEMPLFLAGSP} ${CPPFLAGS} ${DEFSP} -c iparith.cc -o iparith.op
557
558mpsr_Tok.op: iparith.inc mpsr_Tok.cc
559        $(CXXP) ${CXXFLAGSP} ${CXXTEMPLFLAGSP} ${CPPFLAGS} ${DEFSP} -c mpsr_Tok.cc -o mpsr_Tok.op
560
561
562## for bprof
563claptmpl.ob: claptmpl.cc mod2.h
564        $(CXXP)  ${CXXFLAGSP} ${CPPFLAGS} ${DEFSB} -c $< -o $@
565
566$(OBJB1): %.ob: %.cc
567        $(CXXP) ${CXXFLAGSP} ${CXXTEMPLFLAGSP} ${CPPFLAGS} ${DEFSB} -c $< -o $@
568
569$(OBJB2) gmalloc.ob: %.ob: %.c
570        $(CCP)  ${CFLAGSP} ${CPPFLAGS} ${DEFSB} -c $< -o $@
571
572Singularb: scanner.cc  gmalloc.ob $(OBJB) iparith.ob mpsr_Tok.ob claptmpl.ob tesths.cc version.h
573        $(CXXP) ${CXXFLAGSP} ${CPPFLAGS} ${DEFSB} -o Singularb \
574        tesths.cc iparith.ob mpsr_Tok.ob claptmpl.ob $(OBJB) $(BPROFOBJ) \
575        ${LDFLAGSP} ${LIBS} ${LD_DYN_FLAGS} gmalloc.ob
576
577iparith.ob: iparith.inc iparith.cc
578        $(CXXP)  ${CXXFLAGSP} ${CXXTEMPLFLAGSP} ${CPPFLAGS} ${DEFSB} -c iparith.cc -o iparith.ob
579
580mpsr_Tok.ob: iparith.inc mpsr_Tok.cc
581        $(CXXP) ${CXXFLAGSP} ${CXXTEMPLFLAGSP} ${CPPFLAGS} ${DEFSB} -c mpsr_Tok.cc -o mpsr_Tok.ob
582
583#
584# for mtrack
585#
586claptmpl.ot: claptmpl.cc mod2.h
587        $(CXXP)  ${CXXFLAGST} ${CPPFLAGS} ${DEFST} -c $< -o $@
588
589$(OBJT1): %.ot: %.cc
590        $(CXXP) ${CXXFLAGST} ${CXXTEMPLFLAGSP} ${CPPFLAGS} ${DEFST} -c $< -o $@
591
592$(OBJT2) gmalloc.ot: %.ot: %.c
593        $(CCP)  ${CFLAGST} ${CPPFLAGS} ${DEFST} -c $< -o $@
594
595Singulart: scanner.cc  gmalloc.ot $(OBJT) iparith.ot mpsr_Tok.ot claptmpl.ot tesths.cc version.h
596        $(CXXP) ${CXXFLAGST} ${CPPFLAGS} ${DEFST} -o Singulart \
597        tesths.cc iparith.ot mpsr_Tok.ot claptmpl.ot $(OBJT) ${LDFLAGST} ${LIBS} \
598        ${LD_DYN_FLAGS} gmalloc.ot
599
600iparith.ot: iparith.ic iparith.cc
601        $(CXXP)  ${CXXFLAGST} ${CXXTEMPLFLAGSB} ${CPPFLAGS} ${DEFST} -c iparith.cc -o iparith.ot
602
603mpsr_Tok.ot: iparith.inc mpsr_Tok.cc
604        $(CXXP) ${CXXFLAGST} ${CXXTEMPLFLAGSB} ${CPPFLAGS} ${DEFST} -c mpsr_Tok.cc -o mpsr_Tok.ot
605
606
607##
608## check_aso
609##
610check_aso:
611        ${PERL} check_aso.pl $(SOURCES)
612##
613## dependencies
614##
615
616%.aso.dd: %.aso.cc mod2.h aso.h
617        $(CXXM) ${CPPFLAGS} ${DEFS} $< >> $@
618
619%.dd: %.cc mod2.h
620        echo $(@:.dd=.og) $(@:.dd=.op) $(@:.dd=.ob) $(@:.dd=.ot)" " \\ > $@
621        $(CXXM) -DGENTABLE ${CPPFLAGS} ${DEFSG} $< >> $@
622
623%.d: %.c mod2.h
624        echo $(@:.d=.og) $(@:.d=.op) $(@:.d=.ob) $(@:.d=.ot)" " \\ > $@
625        $(CCM) ${CPPFLAGS} ${DEFSG} $< >> $@
626
627depend:   $(ASO_SOURCES:.cc=.dd) $(CXXSOURCES:.cc=.dd) $(CSOURCES:.c=.d) mod2.h
628        cat *.d *.dd >depend
629
630ifeq (depend,$(wildcard depend))
631include depend
632endif
633
634
635
Note: See TracBrowser for help on using the repository browser.