source: git/Singular/Makefile.in @ 6d09c56

spielwiese
Last change on this file since 6d09c56 was 6d09c56, checked in by Olaf Bachmann <obachman@…>, 27 years ago
Mon Apr 28 21:00:07 1997 Olaf Bachmann <obachman@ratchwum.mathematik.uni-kl.de (Olaf Bachmann)> * Added README, INSTALL, COPYING file to distribution * tesths.cc (main): slightly changed Singular banner; fixed display of version number git-svn-id: file:///usr/local/Singular/svn/trunk@204 2c84dea3-7e68-4137-9b89-c4e89433aadc
  • Property mode set to 100644
File size: 8.5 KB
Line 
1#################################################################
2###
3### Makefile for Singular
4###
5#################################################################
6
7SHELL           = /bin/sh
8
9##
10## versions
11##
12MAJOR_VERSION   = @MAJOR_VERSION@
13MINOR_VERSION   = @MINOR_VERSION@
14DIST_NAME       = Singular-${MAJOR_VERSION}.${MINOR_VERSION}
15CONFIGURE_INPUT = @ac_configure_args@
16
17##
18## various paths
19##
20srcdir          = @srcdir@
21prefix          = @prefix@
22exec_prefix     = @exec_prefix@
23libdir          = @libdir@
24# program executable goes here
25bindir          = @bindir@
26# read-only architecture-independent data (like Singular libs) go here
27singulardatadir = @singulardatadir@
28includedir      = @includedir@
29
30##
31## various programs
32##
33CC              = @CC@
34CXX             = @CXX@
35BISON           = @BISON@
36LEX             = @LEX@
37INSTALL         = @INSTALL@
38INSTALL_DATA    = @INSTALL_DATA@
39INSTALL_PROGRAM = @INSTALL_PROGRAM@
40MKINSTALLDIRS   = @MKINSTALLDIRS@
41
42##
43## compiler and linker options
44##
45CFLAGS          = @CFLAGS@
46CXXFLAGS        = @CXXFLAGS@
47CXXTEMPLFLAGS   = @CXXTEMPLFLAGS@
48CPPFLAGS        = @CPPFLAGS@ -I${srcdir}
49DEFS            = @DEFS@ -DNDEBUG
50LDFLAGS         = @LDFLAGS@
51LIBS            = @LIBS@
52
53##
54## End configuration dependend stuff
55#################################################################
56
57CXXSOURCES=grammar.cc scanner.cc algmap.cc attrib.cc binom.cc clapconv.cc \
58    clapmem.cc clapsing.cc claptmpl.cc cntrlc.cc \
59    extra.cc febase.cc feread.cc \
60    ffields.cc hdegree.cc hilb.cc hutil.cc \
61    ideals.cc intvec.cc iparith.cc \
62    ipassign.cc ipconv.cc ipid.cc iplib.cc \
63    ipprint.cc ipshell.cc khstd.cc kstdfac.cc \
64    kstd1.cc kstd2.cc kutil.cc lists.cc \
65    longalg.cc longrat.cc \
66    longrat0.cc maps.cc matpol.cc misc.cc \
67    mminit.cc modulop.cc \
68    fglm.cc fglmzero.cc fglmvec.cc \
69    numbers.cc polys.cc polys0.cc polys1.cc polys2.cc \
70    ring.cc shortfl.cc silink.cc sing_mp.cc\
71    sing_dld.cc sing_dbm.cc spolys.cc spolys0.cc \
72    subexpr.cc syz.cc syz0.cc syz1.cc \
73    tesths.cc timer.cc weight.cc \
74    mpsr_Put.cc mpsr_PutPoly.cc mpsr_Tok.cc mpsr_GetPoly.cc \
75    mpsr_Get.cc mpsr_GetMisc.cc mpsr_Error.cc
76
77CSOURCES=mmalloc.c mmallocb.c mmallocs.c mmblock.c mmheap.c mmspec.c mmutil.c
78
79SOURCES=${CSOURCES} ${CXXSOURCES} grammar.y scanner.l
80
81HEADERS=algmap.h hutil.h lists.h stairc.h attrib.h ideals.h \
82        longalg.h mpsr_Tok.h structs.h binom.h intvec.h longrat.h \
83        numbers.h stype.h clapconv.h ipconv.h maps.h page.h \
84        subexpr.h clapsing.h ipid.h matpol.h polys.h syz.h \
85        cntrlc.h ipprint.h mmemory.h ring.h timer.h \
86        febase.h ipshell.h mmprivat.h shortfl.h tok.h \
87        ffields.h khstd.h silink.h \
88        fglm.h kstd1.h modulop.h sing_dbm.h weight.h \
89        fglmvec.h kstd2.h mpsr.h sing_mp.h \
90        kstdfac.h mpsr_Get.h spolys.h \
91        kutil.h mpsr_Put.h spolys0.h
92
93DISTFILES=${SOURCES} ${HEADERS} Makefile.in configure.in configure \
94        mod2.h.in grammar.h testgh install-sh mkinstalldirs
95
96OBJS=grammar.o scanner.o matpol.o binom.o\
97     febase.o feread.o timer.o intvec.o attrib.o lists.o\
98     longrat.o longrat0.o misc.o ring.o numbers.o maps.o\
99     hilb.o kstd1.o kstd2.o kutil.o khstd.o kstdfac.o modulop.o spolys.o\
100     ideals.o subexpr.o hdegree.o hutil.o ffields.o shortfl.o \
101     longalg.o spolys0.o syz.o syz0.o syz1.o weight.o \
102     ipid.o ipshell.o iplib.o ipassign.o ipconv.o ipprint.o\
103     polys.o polys0.o polys1.o polys2.o extra.o\
104     mminit.o mmutil.o mmalloc.o mmallocb.o mmallocs.o \
105     mmspec.o mmblock.o mmheap.o sing_dld.o sing_dbm.o silink.o \
106     sing_mp.o fglm.o fglmzero.o fglmvec.o cntrlc.o \
107     algmap.o clapconv.o  clapmem.o clapsing.o claptmpl.o\
108     mpsr_Error.o mpsr_Put.o mpsr_PutPoly.o mpsr_GetPoly.o \
109     mpsr_Get.o mpsr_GetMisc.o
110
111##
112## PRIMARY Targets
113##
114
115.l.cc:
116        ${LEX} -s -I -t $< > scanner.cc
117
118.y.cc:
119        ${BISON} -d -t -o grammar.cc $<
120        chmod +x testgh
121        ./testgh
122
123.cc.o: 
124        ${CXX} ${CXXFLAGS} ${CXXTEMPLFLAGS} ${CPPFLAGS} ${DEFS} -c $<
125.c.o:
126        ${CC} ${CFLAGS} ${CPPFLAGS} ${DEFS} -c $<
127
128Singular: mod2.h version.h scanner.cc ${OBJS} iparith.o mpsr_Tok.o tesths.cc
129        ${CXX} ${CXXFLAGS} ${CPPFLAGS} ${DEFS} -o Singular \
130        tesths.cc iparith.o mpsr_Tok.o ${OBJS} ${LDFLAGS} ${LIBS}
131
132iparith.o mpsr_Tok.o : iparith.inc
133
134claptmpl.o: claptmpl.cc mod2.h
135        ${CXX} ${CXXFLAGS}  ${CPPFLAGS} ${DEFS} -c $<   
136       
137
138iparith.inc : ${OBJS} iparith.cc ipconv.cc tok.h mpsr_Tok.cc grammar.h
139        ${CXX} ${CXXFLAGS} ${CPPFLAGS} ${DEFS} -DGENTABLE -o gentable \
140        iparith.cc tesths.cc mpsr_Tok.cc ${OBJS} ${LDFLAGS} ${LIBS}
141        ./gentable
142        /bin/rm gentable
143
144version.h: ${SOURCES} ${HEADERS} Makefile.in mod2.h.in configure.in
145        echo "#define VERSION_ID " `date '+%y%m%d%H'` >version.h
146
147mod2.h: configure mod2.h.in Makefile.in
148        ./configure ${CONFIGURE_INPUT}
149        touch -r mod2.h configure configure.in Makefile.in
150
151configure: configure.in
152        autoconf configure.in > configure
153        chmod a+x configure
154
155all: Singular
156
157install: all installbin installdata
158
159installbin: Singular
160        ${MKINSTALLDIRS} ${bindir}
161        ${INSTALL_PROGRAM} Singular ${bindir}
162
163installdata:
164        ${MKINSTALLDIRS} ${singulardatadir}
165        ${MKINSTALLDIRS} ${singulardatadir}/gftables
166        for file in ${srcdir}/LIB/gftables/[0-9]*; do \
167                ${INSTALL_DATA} $${file} ${singulardatadir}/gftables; \
168        done
169        for file in ${srcdir}/LIB/*.lib; do \
170                ${INSTALL_DATA} $${file} ${singulardatadir}; \
171        done
172
173uninstall: uninstallbin uninstalldata
174
175uninstallin:
176        -rm -f ${bindir}/Singular
177        -rmdir ${bindir}
178
179uninstalldata:
180        -rm -rf ${singulardatadir}/*.lib ${singulardatadir}/gftables
181        -rmdir ${singulardatadir}
182
183mostlyclean: clean
184
185clean:
186        -rm -f Singular* *.o *.og core *.d *.dd *~\#*
187
188distclean: clean
189        -rm -f depend *.inc ${DIST_NAME}
190        -rm mod2.h Makefile TAGS* config.status config.cache config.log
191
192maintainer-clean: distlean
193        @echo "This command is intended for maintainers to use;"
194        @echo "it deletes files that may require special tools to rebuild."
195        -rm configure scanner.cc grammar.h grammar.cc
196
197check:  Makefile.in tests/check tests/output
198        cd tests; tests/check ${bindir}/Singular; cd ..
199
200dist:
201        -rm -rf ${DIST_NAME}
202        -rm -f ${DIST_NAME}.tar.gz
203        ${MKINSTALLDIRS} ${DIST_NAME}/LIB/gftables
204        -ln ${DISTFILES} ${DIST_NAME}
205        -ln LIB/*.lib ${DIST_NAME}/LIB
206        -ln LIB/gftables/* ${DIST_NAME}/LIB/gftables
207        tar cvf ${DIST_NAME}.tar  ${DIST_NAME}
208        gzip -9 ${DIST_NAME}.tar
209
210TAGS:
211        etags ${SOURCES} ${HEADERS}
212
213##
214## Below here is stuff for developpers
215#################################################################
216
217##
218## compiler and linker options
219##
220
221CCG             = gcc
222CXXG            = gcc
223CXXM            = gcc -MM
224CCM             = gcc -MM
225
226CFLAGSG         = -g -Wall -Wno-unused
227CXXFLAGSG       = -g -Wall -Wno-unused
228CXXTEMPLFLAGSG  = -fno-implicit-templates
229DEFSG           = @DEFS@
230
231##
232## .og files for having -O and -g object versions available at the same time
233##
234
235OBJG1=  grammar.og scanner.og matpol.og binom.og\
236     febase.og feread.og timer.og intvec.og attrib.og lists.og\
237     longrat.og longrat0.og misc.og ring.og numbers.og maps.og\
238     hilb.og kstd1.og kstd2.og kutil.og khstd.og kstdfac.og modulop.og \
239     spolys.og ideals.og subexpr.og hdegree.og hutil.og ffields.og shortfl.og \
240     longalg.og spolys0.og syz.og syz0.og syz1.og weight.og \
241     ipid.og ipshell.og iplib.og ipassign.og ipconv.og ipprint.og\
242     polys.og polys0.og polys1.og polys2.og extra.og\
243     mminit.og sing_dld.og sing_dbm.og silink.og \
244     sing_mp.og fglm.og fglmzero.og fglmvec.og \
245     algmap.og clapconv.og  clapmem.og clapsing.og \
246     cntrlc.og  \
247     mpsr_Error.og mpsr_Put.og mpsr_PutPoly.og mpsr_GetPoly.og \
248     mpsr_Get.og mpsr_GetMisc.og
249
250OBJG2= mmalloc.og mmallocb.og mmallocs.og mmblock.og mmheap.og \
251     mmspec.og mmutil.og
252
253OBJG=$(OBJG1) $(OBJG2) claptmpl.og
254
255##
256## Targets
257##
258
259claptmpl.og: claptmpl.cc mod2.h
260        $(CXXG)  ${CXXFLAGSG} ${CPPFLAGS} ${DEFSG} -c $< -o $@
261$(OBJG1): %.og: %.cc
262        $(CXXG) ${CXXFLAGSG} ${CXXTEMPLFLAGSG} ${CPPFLAGS} ${DEFSG} -c $< -o $@
263
264$(OBJG2): %.og: %.c
265        $(CCG)  ${CFLAGSG} ${CPPFLAGS} ${DEFSG} -c $< -o $@
266
267Singularg: scanner.cc $(OBJG) iparith.og mpsr_Tok.og tesths.cc version.h
268        $(CXXG) ${CXXFLAGSG} ${CPPFLAGS} ${DEFSG} -o Singularg \
269        tesths.cc iparith.og mpsr_Tok.og $(OBJG) ${LDFLAGS} ${LIBS}
270
271iparith.og: iparith.inc iparith.cc
272        $(CXXG)  ${CXXFLAGSG} ${CPPFLAGS} ${DEFSG} -c iparith.cc -o iparith.og
273
274mpsr_Tok.og: iparith.inc mpsr_Tok.cc
275        $(CXXG) ${CXXFLAGSG} ${CPPFLAGS} ${DEFSG} -c mpsr_Tok.cc -o mpsr_Tok.og
276
277installg: Singularg
278        ${MKINSTALLDIRS} ${bindir}
279        ${INSTALL_PROGRAM} Singularg ${bindir} 
280
281
282##
283## dependencies
284##
285       
286%.dd: %.cc mod2.h
287        echo $@ $(@:.dd=.og) " " \\ > $@
288        $(CXXM) -DGENTABLE ${CPPFLAGS} ${DEFSG} $< >> $@
289
290%.d: %.c mod2.h
291        echo $@ $(@:.d=.og) " " \\ > $@
292        $(CCM) ${CPPFLAGS} ${DEFSG} $< >> $@
293
294depend: $(CXXSOURCES:.cc=.dd) $(CSOURCES:.c=.d) mod2.h
295        cat *.d *.dd >depend
296
297#include $(SOURCES:.cc=.dd) $(CSOURCES:.c=.d)
298#include *.d *.dd
299ifeq (depend,$(wildcard depend))
300include depend
301endif
302
303
Note: See TracBrowser for help on using the repository browser.