source: git/Singular/Makefile.in @ 24adf5

spielwiese
Last change on this file since 24adf5 was 24adf5, checked in by Olaf Bachmann <obachman@…>, 27 years ago
Tue Jun 17 11:47:47 1997 Olaf Bachmann <obachman@ratchwum.mathematik.uni-kl.de (Olaf Bachmann)> * Makefile.in (Singular): added mod2.h to dependencies of iparith.inc git-svn-id: file:///usr/local/Singular/svn/trunk@392 2c84dea3-7e68-4137-9b89-c4e89433aadc
  • Property mode set to 100644
File size: 10.8 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@
34BISON           = bison
35LEX             = flex
36@SET_MAKE@
37INSTALL         = ./install-sh -c
38INSTALL_PROGRAM = ${INSTALL}
39INSTALL_DATA    = ${INSTALL} -m 644
40MKINSTALLDIRS   = ./mkinstalldirs
41
42##
43## compiler and linker options
44##
45CFLAGS          = @CFLAGS@
46CXXFLAGS        = @CXXFLAGS@
47CXXNOOPTFLAGS   = @CXXNOOPTFLAGS@
48CXXTEMPLFLAGS   = @CXXTEMPLFLAGS@
49CPPFLAGS        = -I${srcdir} @CPPFLAGS@
50DEFS            = @DEFS@ -DNDEBUG
51LDFLAGS         = @LDFLAGS@
52LIBS            = @NEED_LIBS@
53
54##
55## subdirectories
56##
57# where the doumentation files are
58docdir          = doc
59# where the tests files are
60testdir         = tests
61
62##
63## the configuration
64##
65WITH_MP         = @WITH_MP@
66WITH_FACTORY    = @WITH_FACTORY@
67WITH_LIBFAC     = @WITH_LIBFAC@
68
69##
70## End configuration dependend stuff
71#################################################################
72
73###
74### file sets
75###
76
77CXXSOURCES=grammar.cc scanner.cc algmap.cc attrib.cc binom.cc clapconv.cc \
78    clapmem.cc clapsing.cc claptmpl.cc cntrlc.cc \
79    extra.cc febase.cc feread.cc \
80    ffields.cc hdegree.cc hilb.cc hutil.cc \
81    ideals.cc intvec.cc iparith.cc \
82    ipassign.cc ipconv.cc ipid.cc iplib.cc \
83    ipprint.cc ipshell.cc khstd.cc kstdfac.cc \
84    kstd1.cc kstd2.cc kutil.cc lists.cc \
85    longalg.cc longrat.cc \
86    longrat0.cc maps.cc matpol.cc misc.cc \
87    mminit.cc modulop.cc \
88    fglm.cc fglmzero.cc fglmvec.cc \
89    numbers.cc polys.cc polys0.cc polys1.cc polys2.cc \
90    ring.cc shortfl.cc silink.cc sing_mp.cc\
91    sing_dld.cc sing_dbm.cc spolys.cc spolys0.cc \
92    subexpr.cc syz.cc syz0.cc syz1.cc \
93    tesths.cc timer.cc weight.cc \
94    mpsr_Put.cc mpsr_PutPoly.cc mpsr_Tok.cc mpsr_GetPoly.cc \
95    mpsr_Get.cc mpsr_GetMisc.cc mpsr_Error.cc
96
97CSOURCES=mmalloc.c mmallocb.c mmallocs.c mmblock.c mmheap.c mmspec.c mmutil.c
98
99SOURCES=${CSOURCES} ${CXXSOURCES} grammar.y scanner.l
100
101HEADERS=algmap.h hutil.h lists.h stairc.h attrib.h ideals.h \
102        longalg.h mpsr_Tok.h structs.h binom.h intvec.h longrat.h \
103        numbers.h stype.h clapconv.h ipconv.h maps.h page.h \
104        subexpr.h clapsing.h ipid.h matpol.h polys.h syz.h \
105        cntrlc.h ipprint.h mmemory.h ring.h timer.h \
106        febase.h ipshell.h mmprivat.h shortfl.h tok.h \
107        ffields.h khstd.h silink.h \
108        fglm.h kstd1.h modulop.h sing_dbm.h weight.h \
109        fglmvec.h kstd2.h mpsr.h sing_mp.h \
110        kstdfac.h mpsr_Get.h spolys.h \
111        kutil.h mpsr_Put.h spolys0.h
112
113TESTS=${testdir}/comparecheck ${testdir}/fac_test.in ${testdir}/fac_test.out\
114        ${testdir}/general_test.in ${testdir}/general_test.out \
115        ${testdir}/mpcheck ${testdir}/mpcheck.data
116
117DOCS=${docdir}/Makefile.in ${docdir}/copyright.tex ${docdir}/doc2tex.c \
118        ${docdir}/examples.doc ${docdir}/examples.tex ${docdir}/proc.tex \
119        ${docdir}/singular.doc ${docdir}/start.doc \
120        ${docdir}/start.tex ${docdir}/tutor.tex ${docdir}/singular.tex
121
122DISTFILES=${SOURCES} ${HEADERS} Makefile.in configure.in configure \
123        mod2.h.in grammar.h testgh install-sh mkinstalldirs \
124        ${TESTS} ${DOCS}
125
126OBJS=grammar.o scanner.o matpol.o binom.o\
127     febase.o feread.o timer.o intvec.o attrib.o lists.o\
128     longrat.o longrat0.o misc.o ring.o numbers.o maps.o\
129     hilb.o kstd1.o kstd2.o kutil.o khstd.o kstdfac.o modulop.o spolys.o\
130     ideals.o subexpr.o hdegree.o hutil.o ffields.o shortfl.o \
131     longalg.o spolys0.o syz.o syz0.o syz1.o weight.o \
132     ipid.o ipshell.o iplib.o ipassign.o ipconv.o ipprint.o\
133     polys.o polys0.o polys1.o polys2.o extra.o\
134     mminit.o mmutil.o mmalloc.o mmallocb.o mmallocs.o \
135     mmspec.o mmblock.o mmheap.o sing_dld.o sing_dbm.o silink.o \
136     sing_mp.o fglm.o fglmzero.o fglmvec.o cntrlc.o \
137     algmap.o clapconv.o  clapmem.o clapsing.o claptmpl.o\
138     mpsr_Error.o mpsr_Put.o mpsr_PutPoly.o mpsr_GetPoly.o \
139     mpsr_Get.o mpsr_GetMisc.o
140
141##
142## PRIMARY Targets
143##
144
145
146.l.cc:
147        ${LEX} -s -I -t $< > scanner.cc
148
149.y.cc:
150        ${BISON} -d -t -o grammar.cc $<
151        chmod +x testgh
152        ./testgh
153
154.cc.o: 
155        ${CXX} ${CXXFLAGS} ${CXXTEMPLFLAGS} ${CPPFLAGS} ${DEFS} -c $<
156.c.o:
157        ${CC} ${CFLAGS} ${CPPFLAGS} ${DEFS} -c $<
158
159all:    Singular
160
161Singular: mod2.h Makefile version.h scanner.cc ${OBJS} iparith.o \
162                                                mpsr_Tok.o tesths.cc
163        ${CXX} ${CXXFLAGS} ${CPPFLAGS} ${DEFS} -o Singular \
164        tesths.cc iparith.o mpsr_Tok.o ${OBJS} ${LDFLAGS} ${LIBS}
165
166iparith.o mpsr_Tok.o : iparith.inc mpsr_Tok.inc
167
168claptmpl.o: claptmpl.cc mod2.h
169        ${CXX} ${CXXFLAGS}  ${CPPFLAGS} ${DEFS} -c $<   
170
171weight.o: weight.cc mod2.h
172        ${CXX} ${CXXNOOPTFLAGS} ${CPPFLAGS} ${DEFS} -c $<
173       
174iparith.inc mpsr_Tok.inc: iparith.cc ipconv.cc tok.h mpsr_Tok.cc grammar.h mod2.h
175        ${CXX} ${CXXFLAGS} ${CPPFLAGS} ${DEFS} -DGENTABLE -o gentable \
176        iparith.cc tesths.cc mpsr_Tok.cc ${OBJS} ${LDFLAGS} ${LIBS}
177        ./gentable
178        /bin/rm gentable
179
180version.h: ${SOURCES} ${HEADERS} Makefile.in mod2.h.in configure.in
181        echo "#define SINGULAR_VERSION_ID " `date '+%y%m%d%H'` >version.h
182
183mod2.h: stamp-h
184
185stamp-h : config.status mod2.h.in
186        CONFIG_FILES= CONFIG_HEADERS=mod2.h ./config.status
187
188Makefile: Makefile.in config.status
189        CONFIG_FILES="Makefile" CONFIG_HEADERS= ./config.status
190
191doc/Makefile: doc/Makefile.in config.status
192        CONFIG_FILES="doc/Makefile" CONFIG_HEADERS= ./config.status
193
194config.status: configure
195        ./config.status --recheck
196
197configure: configure.in
198        @echo "WARNING: You need to rerun autoconf. I am proceeding, for now."
199        touch configure
200#       autoconf
201
202##
203## install targets
204##
205install: all installbin installdata installinfo
206
207installbin: Singular
208        ${MKINSTALLDIRS} ${bindir}
209        ${INSTALL_PROGRAM} Singular ${bindir}
210
211installdata:
212        ${MKINSTALLDIRS} ${singulardatadir}
213        ${MKINSTALLDIRS} ${singulardatadir}/gftables
214        for file in ${srcdir}/LIB/gftables/[0-9]*; do \
215                ${INSTALL_DATA} $${file} ${singulardatadir}/gftables; \
216        done
217        for file in ${srcdir}/LIB/*.lib; do \
218                ${INSTALL_DATA} $${file} ${singulardatadir}; \
219        done
220
221installinfo:
222        cd ${docdir}; ${MAKE} install
223
224uninstall: uninstallbin uninstalldata uninstallinfo
225
226uninstallbin:
227        -rm -f ${bindir}/Singular
228        -rmdir ${bindir}
229
230uninstalldata:
231        -rm -rf ${singulardatadir}/*.lib ${singulardatadir}/gftables
232        -rmdir ${singulardatadir}
233
234unistallinfo:
235        cd ${docdir}; ${MAKE} uninstall
236
237##
238## clean targest
239##
240mostlyclean: clean
241
242clean:
243        -rm -rf Singular* *.o *.og core *.d *.dd *~ \#* /tmp/mp* \
244                *.got *dump* *.diff
245        cd ${docdir}; ${MAKE} clean
246
247distclean: clean
248        -rm -rf depend *.inc ${DIST_NAME} ${testdir}/out stamp-h
249        -rm mod2.h Makefile TAGS* config.status config.cache config.log
250        cd ${docdir}; ${MAKE} distclean
251
252maintainer-clean: distclean
253        @echo "This command is intended for maintainers to use;"
254        @echo "Rebuilding the deleted files requires flex (version 2.3) "
255        @echo "bison and autoconf"
256        -rm configure scanner.cc grammar.h grammar.cc
257
258info dvi ps html:
259        cd ${docdir}; ${MAKE} $@
260
261check:  Singular ${testdir}/general_test.in ${testdir}/general_test.out
262        - @ SINGULARPATH=`pwd`/LIB; export SINGULARPATH; \
263        PATH=`pwd`:${PATH}; export PATH;\
264        ${testdir}/comparecheck ${testdir}/general_test.in ${testdir}/general_test.out
265        @ if test "${WITH_MP}" = yes; then ${MAKE} mpcheck; fi;
266        @ if test "${WITH_FACTORY}" = yes && test "${WITH_LIBFAC}" = yes; then \
267          ${MAKE} factorycheck;\
268        fi     
269                   
270
271mpcheck: Singular ${testdir}/mpcheck ${testdir}/mpcheck.data
272        - @ SINGULARPATH=`pwd`/LIB; export SINGULARPATH; \
273        PATH=`pwd`:${PATH}; export PATH;\
274        ${testdir}/mpcheck ${testdir}/mpcheck.data
275
276factorycheck: Singular ${testdir}/comparecheck ${testdir}/fac_test.in \
277                ${testdir}/fac_test.out
278        - @ SINGULARPATH=`pwd`/LIB; export SINGULARPATH; \
279        PATH=`pwd`:${PATH}; export PATH;\
280        ${testdir}/comparecheck ${testdir}/fac_test.in ${testdir}/fac_test.out
281       
282##
283## miscellanous targets
284##
285
286dist:
287        rm -rf ${DISTNAME}.tar* ${TEMPDIR}/${DISTNAME}*
288        mkdir ${TEMPDIR}/${DISTNAME}
289        - cp -pR . ${TEMPDIR}/${DISTNAME}
290        cd ${TEMPDIR}/${DISTNAME}; ${MAKE} distclean;
291        cd ${TEMPDIR}; tar cf ${DISTNAME}.tar ${DISTNAME}
292        rm -rf ${TEMPDIR}/${DISTNAME}
293        - gzip -9 ${TEMPDIR}/${DISTNAME}.tar
294        - mv ${TEMPDIR}/${DISTNAME}.tar.gz .
295
296TAGS:
297        etags ${SOURCES} ${HEADERS}
298
299##
300## Below here is stuff for developpers
301#################################################################
302
303##
304## compiler and linker options for debug version
305##
306
307CCG             = gcc
308CXXG            = gcc
309CXXM            = gcc -MM
310CCM             = gcc -MM
311
312CFLAGSG         = -g -Wall -Wno-unused
313CXXFLAGSG       = -g -Wall -Wno-unused
314CXXTEMPLFLAGSG  = -fno-implicit-templates
315DEFSG           = @DEFS@
316
317##
318## .og files for having -O and -g object versions available at the same time
319##
320
321OBJG1=  grammar.og scanner.og matpol.og binom.og\
322     febase.og feread.og timer.og intvec.og attrib.og lists.og\
323     longrat.og longrat0.og misc.og ring.og numbers.og maps.og\
324     hilb.og kstd1.og kstd2.og kutil.og khstd.og kstdfac.og modulop.og \
325     spolys.og ideals.og subexpr.og hdegree.og hutil.og ffields.og shortfl.og \
326     longalg.og spolys0.og syz.og syz0.og syz1.og weight.og \
327     ipid.og ipshell.og iplib.og ipassign.og ipconv.og ipprint.og\
328     polys.og polys0.og polys1.og polys2.og extra.og\
329     mminit.og sing_dld.og sing_dbm.og silink.og \
330     sing_mp.og fglm.og fglmzero.og fglmvec.og \
331     algmap.og clapconv.og  clapmem.og clapsing.og \
332     cntrlc.og  \
333     mpsr_Error.og mpsr_Put.og mpsr_PutPoly.og mpsr_GetPoly.og \
334     mpsr_Get.og mpsr_GetMisc.og
335
336OBJG2= mmalloc.og mmallocb.og mmallocs.og mmblock.og mmheap.og \
337     mmspec.og mmutil.og
338
339OBJG=$(OBJG1) $(OBJG2) claptmpl.og
340
341##
342## Debug Targets
343##
344
345claptmpl.og: claptmpl.cc mod2.h
346        $(CXXG)  ${CXXFLAGSG} ${CPPFLAGS} ${DEFSG} -c $< -o $@
347$(OBJG1): %.og: %.cc
348        $(CXXG) ${CXXFLAGSG} ${CXXTEMPLFLAGSG} ${CPPFLAGS} ${DEFSG} -c $< -o $@
349
350$(OBJG2): %.og: %.c
351        $(CCG)  ${CFLAGSG} ${CPPFLAGS} ${DEFSG} -c $< -o $@
352
353Singularg: scanner.cc $(OBJG) iparith.og mpsr_Tok.og tesths.cc version.h
354        $(CXXG) ${CXXFLAGSG} ${CPPFLAGS} ${DEFSG} -o Singularg \
355        tesths.cc iparith.og mpsr_Tok.og $(OBJG) ${LDFLAGS} ${LIBS}
356
357iparith.og: iparith.inc iparith.cc
358        $(CXXG)  ${CXXFLAGSG} ${CPPFLAGS} ${DEFSG} -c iparith.cc -o iparith.og
359
360mpsr_Tok.og: iparith.inc mpsr_Tok.cc
361        $(CXXG) ${CXXFLAGSG} ${CPPFLAGS} ${DEFSG} -c mpsr_Tok.cc -o mpsr_Tok.og
362
363installg: Singularg
364        ${MKINSTALLDIRS} ${bindir}
365        ${INSTALL_PROGRAM} Singularg ${bindir} 
366
367
368##
369## dependencies
370##
371       
372%.dd: %.cc mod2.h
373        echo $@ $(@:.dd=.og) " " \\ > $@
374        $(CXXM) -DGENTABLE ${CPPFLAGS} ${DEFSG} $< >> $@
375
376%.d: %.c mod2.h
377        echo $@ $(@:.d=.og) " " \\ > $@
378        $(CCM) ${CPPFLAGS} ${DEFSG} $< >> $@
379
380depend: $(CXXSOURCES:.cc=.dd) $(CSOURCES:.c=.d) mod2.h
381        cat *.d *.dd >depend
382
383#include $(SOURCES:.cc=.dd) $(CSOURCES:.c=.d)
384#include *.d *.dd
385ifeq (depend,$(wildcard depend))
386include depend
387endif
388
389
Note: See TracBrowser for help on using the repository browser.