1 | # Generated automatically from Makefile.in by configure.- |
---|
2 | ################################################################# |
---|
3 | ### |
---|
4 | ### Makefile for Singular |
---|
5 | ### |
---|
6 | ################################################################# |
---|
7 | |
---|
8 | SHELL = /bin/sh |
---|
9 | |
---|
10 | ## |
---|
11 | ## version |
---|
12 | ## |
---|
13 | SINGULAR_VERSION = spielwiese |
---|
14 | ## |
---|
15 | ## various paths |
---|
16 | ## |
---|
17 | srcdir = . |
---|
18 | includedir = ../libpolys |
---|
19 | |
---|
20 | ## |
---|
21 | ## various programs |
---|
22 | ## |
---|
23 | |
---|
24 | CC = gcc |
---|
25 | LD = ld |
---|
26 | CXX = g++ |
---|
27 | PERL = perl |
---|
28 | INSTALL = /usr/bin/install -c |
---|
29 | INSTALL_PROGRAM = ${INSTALL} |
---|
30 | INSTALL_DATA = ${INSTALL} -m 644 |
---|
31 | MKINSTALLDIRS = ./mkinstalldirs |
---|
32 | LN_S = ln -s |
---|
33 | |
---|
34 | ## |
---|
35 | ## compiler and linker options |
---|
36 | ## |
---|
37 | LIBPOLYS_CFLAGS = -I.. -I../libpolys -DHAVE_SINGULAR |
---|
38 | LIBPOLYS_LIBS = -L../factory -L../omalloc -L../libpolys/misc -L../libpolys/reporter -L../libpolys/resources -L../libpolys/coeffs -L../libpolys/polys -lpolys -lcoeffs -lresources -lreporter -lmisc -lfactory -lomalloc |
---|
39 | LIBPOLYS_LIBSG = -L../factory -L../omalloc -L../libpolys/misc -L../libpolys/reporter -L../libpolys/resources -L../libpolys/coeffs -L../libpolys/polys -lpolys_g -lcoeffs_g -lresources_g -lreporter_g -lmisc_g -lfactory -lomalloc_g |
---|
40 | |
---|
41 | PIPE = -pipe |
---|
42 | CFLAGS = -O3 -fomit-frame-pointer ${PIPE} ${LIBPOLYS_CFLAGS} |
---|
43 | CXXFLAGS = -O3 -fomit-frame-pointer --no-rtti ${PIPE} ${LIBPOLYS_CFLAGS} |
---|
44 | CXXTEMPLFLAGS = -fno-implicit-templates --no-exceptions |
---|
45 | CPPFLAGS = -I${srcdir} -I.. -I${includedir} ${LIBPOLYS_CFLAGS} |
---|
46 | DEFS = -DNDEBUG -DOM_NDEBUG |
---|
47 | LDFLAGS = -L${srcdir}/lib |
---|
48 | LD_DYN_FLAGS = -ldl -rdynamic |
---|
49 | SFLAGS = -fpic -DPIC |
---|
50 | SLDFLAGS = -shared |
---|
51 | |
---|
52 | LD_LIBC = -lc |
---|
53 | STATIC_LDFLAGS = -static |
---|
54 | LIBS = -lm -lsingfac -lsingcf -lntl -lgmp -lreadline -lncurses -lm -lnsl -lomalloc_ndebug |
---|
55 | MP_LIBS = -lMPT -lMP -lnsl |
---|
56 | |
---|
57 | ## End configuration dependend stuff |
---|
58 | ################################################################# |
---|
59 | |
---|
60 | ### |
---|
61 | ### file sets |
---|
62 | ### |
---|
63 | |
---|
64 | # normal C++ source files |
---|
65 | CXXSOURCES=\ |
---|
66 | febase.cc feread.cc \ |
---|
67 | hdegree.cc hilb.cc hutil.cc \ |
---|
68 | gr_kstd2.cc \ |
---|
69 | ideals.cc \ |
---|
70 | khstd.cc kstdfac.cc \ |
---|
71 | kstd1.cc kstd2.cc kutil.cc \ |
---|
72 | misc.cc \ |
---|
73 | fast_maps.cc \ |
---|
74 | fglmzero.cc fglmvec.cc fglmgauss.cc fglmhom.cc fglmcomb.cc \ |
---|
75 | kspoly.cc \ |
---|
76 | semic.cc \ |
---|
77 | syz.cc syz0.cc syz1.cc syz2.cc syz3.cc\ |
---|
78 | timer.cc \ |
---|
79 | GMPrat.cc multicnt.cc npolygon.cc semic.cc spectrum.cc splist.cc \ |
---|
80 | walkProc.cc walkMain.cc walkSupport.cc\ |
---|
81 | eigenval.cc units.cc \ |
---|
82 | fast_mult.cc digitech.cc \ |
---|
83 | tgb.cc tgbgauss.cc ringgb.cc f5data.cc f5lists.cc f5gb.cc \ |
---|
84 | f5c.cc ratgring.cc shiftgb.cc gfan.cc \ |
---|
85 | linearAlgebra.cc nc.cc |
---|
86 | CXXSOURCES2 = SingularBuilder.cpp |
---|
87 | |
---|
88 | # numbers.cc polys.cc p_polys.cc polys0.cc polys1.cc polys-impl.cc \ |
---|
89 | |
---|
90 | # normal C source files |
---|
91 | CSOURCES=fegetopt.c mmstd.c |
---|
92 | |
---|
93 | # special C++ source files (need extra compiling and/or linking), for which |
---|
94 | # dependencies should be generated |
---|
95 | ESOURCES=mmalloc.cc |
---|
96 | |
---|
97 | SOURCES=${CSOURCES} ${CXXSOURCES} \ |
---|
98 | kInline.h |
---|
99 | |
---|
100 | HEADERS=hutil.h idrec.h stairc.h ideals.h \ |
---|
101 | structs.h \ |
---|
102 | syz.h \ |
---|
103 | fast_maps.h \ |
---|
104 | febase.h \ |
---|
105 | walkProc.h walkMain.h walkSupport.h\ |
---|
106 | khstd.h sparsmat.h \ |
---|
107 | fglm.h kstd1.h \ |
---|
108 | fglmgauss.h fglmvec.h \ |
---|
109 | kstdfac.h kmatrix.h\ |
---|
110 | kutil.h \ |
---|
111 | GMPrat.h multicnt.h npolygon.h semic.h spectrum.h splist.h multicnt.h \ |
---|
112 | eigenval.h units.h \ |
---|
113 | fegetopt.h \ |
---|
114 | ratgring.h shiftgb.h nc.h \ |
---|
115 | mmalloc.h \ |
---|
116 | semic.h \ |
---|
117 | gfan.h |
---|
118 | |
---|
119 | DISTFILES=${SOURCES} ${HEADERS} ${ESOURCES} \ |
---|
120 | Makefile.in \ |
---|
121 | mod2.h.in install-sh mkinstalldirs |
---|
122 | |
---|
123 | OBJS := $(CXXSOURCES:.cc=.o) $(CSOURCES:.c=.o) #$(CXXSOURCES2:.cpp=.o) |
---|
124 | OBJS2 := $(ESOURCES:.cc=.o) |
---|
125 | OBJSG2 := $(ESOURCES:.cc=.og) |
---|
126 | OBJSP2 := $(ESOURCES:.cc=.op) |
---|
127 | |
---|
128 | ## |
---|
129 | ## Build Targets |
---|
130 | ## |
---|
131 | .cc.o: |
---|
132 | ${CXX} ${CXXFLAGS} ${CXXTEMPLFLAGS} ${CPPFLAGS} ${DEFS} -c $< |
---|
133 | .c.o: |
---|
134 | ${CC} ${CFLAGS} ${CPPFLAGS} ${DEFS} -c $< |
---|
135 | |
---|
136 | OBJG= $(CXXSOURCES:.cc=.og) $(CSOURCES:.c=.og) |
---|
137 | |
---|
138 | OBJG := $(OBJG) $(STATIC_SOURCES:.cc=.og) |
---|
139 | OBJP := $(OBJP) $(STATIC_SOURCES:.cc=.op) |
---|
140 | |
---|
141 | all: libkernel.a libkernel_g.a mmalloc.o ${OBJS2} |
---|
142 | |
---|
143 | libkernel.a: ${OBJS} |
---|
144 | -rm -f libkernel.a |
---|
145 | ar cr $@ $^ |
---|
146 | |
---|
147 | ## |
---|
148 | ## install targets |
---|
149 | ## |
---|
150 | install-nolns: install |
---|
151 | |
---|
152 | install-libsingular: install |
---|
153 | -${MKINSTALLDIRS} ${includedir} |
---|
154 | -${MKINSTALLDIRS} ${includedir}/singular |
---|
155 | -for file in *.h kInline.h; do sed -e "s:<kernel/:<singular/:"< $$file | sed -e "s:<Singular/:<singular/:"|sed -e "s:<omalloc/:<:"|sed -e "s:<factory/:<:" > ${includedir}/singular/$$file; done |
---|
156 | |
---|
157 | install: all installbin |
---|
158 | |
---|
159 | install_all: install libkernel_p.a |
---|
160 | - ranlib libkernel_p.a |
---|
161 | |
---|
162 | installbin: libkernel.a libkernel_g.a |
---|
163 | ${MKINSTALLDIRS} ${bindir} |
---|
164 | - ranlib libkernel.a |
---|
165 | - ranlib libkernel_g.a |
---|
166 | |
---|
167 | install-bindist: libkernel.a |
---|
168 | ${MKINSTALLDIRS} ${bindir} |
---|
169 | |
---|
170 | ## |
---|
171 | ## clean targest |
---|
172 | ## |
---|
173 | mostlyclean: |
---|
174 | -rm -f *.o *.og core *.op |
---|
175 | |
---|
176 | clean: mostlyclean |
---|
177 | -rm -f *.bak *.d *.dd depend *.a *.so* |
---|
178 | |
---|
179 | distclean: clean |
---|
180 | -rm -f *~ .\#* |
---|
181 | -rm -f mod2.h Makefile TAGS* tags config.status config.cache config.log |
---|
182 | |
---|
183 | srcclean: |
---|
184 | @echo "This command is intended for maintainers to use;" |
---|
185 | @echo "Rebuilding the deleted files requires flex" |
---|
186 | @echo "bison, perl" |
---|
187 | |
---|
188 | maintainer-clean: distclean srcclean |
---|
189 | @echo "This command is intended for maintainers to use;" |
---|
190 | @echo "Rebuilding the deleted files requires flex" |
---|
191 | @echo "bison, perl and autoconf" |
---|
192 | |
---|
193 | ## |
---|
194 | ## miscellanous targets |
---|
195 | ## |
---|
196 | |
---|
197 | TAGS: ${SOURCES} ${ESOURCES} ${HEADERS} |
---|
198 | etags ${SOURCES} ${ESOURCES} ${HEADERS} |
---|
199 | |
---|
200 | tags: |
---|
201 | ctags *.c *.h *.cc *.inc |
---|
202 | |
---|
203 | ## |
---|
204 | ## Below here is stuff for developpers |
---|
205 | ################################################################# |
---|
206 | |
---|
207 | |
---|
208 | ## |
---|
209 | ## .og files for having -O and -g object versions available at the same time |
---|
210 | ## |
---|
211 | |
---|
212 | OBJG1 := $(CXXSOURCES:.cc=.og) |
---|
213 | OBJG2 := $(CSOURCES:.c=.og) |
---|
214 | |
---|
215 | ## |
---|
216 | ## compiler and linker options for debug version |
---|
217 | ## |
---|
218 | |
---|
219 | CCG = ${CC} |
---|
220 | CXXG = ${CXX} -Wall |
---|
221 | CXXM = gcc -MM -MG -DGENERATE_DEPEND |
---|
222 | CCM = gcc -MM -MG -DGENERATE_DEPEND |
---|
223 | |
---|
224 | CFLAGSG = -g ${PIPE} ${LIBPOLYS_CFLAGS} |
---|
225 | CXXFLAGSG = -g ${PIPE} ${LIBPOLYS_CFLAGS} |
---|
226 | DEFSG = |
---|
227 | |
---|
228 | ## |
---|
229 | ## Debug Targets |
---|
230 | ## |
---|
231 | |
---|
232 | %.og: %.cc |
---|
233 | $(CXXG) ${CXXFLAGSG} ${CXXTEMPLFLAGS} ${CPPFLAGS} ${DEFSG} -c $< -o $@ |
---|
234 | |
---|
235 | $(OBJG2) : %.og: %.c |
---|
236 | $(CCG) ${CFLAGSG} ${CPPFLAGS} ${DEFSG} -c $< -o $@ |
---|
237 | |
---|
238 | libkernel_g.a: ${OBJG} ${OBJSG2} |
---|
239 | -rm -f libkernel_g.a |
---|
240 | ar cr $@ ${OBJG} |
---|
241 | |
---|
242 | |
---|
243 | |
---|
244 | ## |
---|
245 | ## .op files for profiling |
---|
246 | ## |
---|
247 | |
---|
248 | OBJP1 := $(CXXSOURCES:.cc=.op) |
---|
249 | OBJP2 := $(CSOURCES:.c=.op) |
---|
250 | |
---|
251 | OBJP=$(OBJP1) $(OBJP2) |
---|
252 | |
---|
253 | OBJP := $(OBJP) $(STATIC_SOURCES:.cc=.op) |
---|
254 | |
---|
255 | ## |
---|
256 | ## compiler and linker options for profiling version |
---|
257 | ## |
---|
258 | |
---|
259 | CCP = ${CC} |
---|
260 | CXXP = ${CXX} |
---|
261 | |
---|
262 | CFLAGSP = -g -pg -O ${PIPE} ${LIBPOLYS_CFLAGS} |
---|
263 | CXXFLAGSP = -g -pg -O ${PIPE} ${LIBPOLYS_CFLAGS} |
---|
264 | DEFSP = |
---|
265 | |
---|
266 | |
---|
267 | |
---|
268 | |
---|
269 | ## |
---|
270 | ## Profiling Targets |
---|
271 | ## |
---|
272 | |
---|
273 | %.op: %.cc |
---|
274 | $(CXXP) ${CXXFLAGSP} ${CXXTEMPLFLAGS} ${CPPFLAGS} ${DEFSP} -c $< -o $@ |
---|
275 | |
---|
276 | $(OBJP2) : %.op: %.c |
---|
277 | $(CCP) ${CFLAGSP} ${CPPFLAGS} ${DEFSP} -c $< -o $@ |
---|
278 | |
---|
279 | libkernel_p.a: ${OBJP} ${OBJSP2} |
---|
280 | -rm -f libkernel_p.a |
---|
281 | ar cr $@ ${OBJP} |
---|
282 | |
---|
283 | ## |
---|
284 | ## dependencies |
---|
285 | ## |
---|
286 | |
---|
287 | %.dd: %.cc mod2.h |
---|
288 | echo $(@:.dd=.og) $(@:.dd=.op) " " \\ > $@ |
---|
289 | $(CXXM) -DGENTABLE ${CPPFLAGS} ${DEFSG} $< >> $@ |
---|
290 | |
---|
291 | %.d: %.c mod2.h |
---|
292 | echo $(@:.d=.og) $(@:.d=.op) " " \\ > $@ |
---|
293 | $(CCM) ${CPPFLAGS} ${DEFSG} $< >> $@ |
---|
294 | |
---|
295 | depend: $(CXXSOURCES:.cc=.dd) $(ESOURCES:.cc=.dd) $(CSOURCES:.c=.d) mod2.h |
---|
296 | cat *.d *.dd >depend |
---|
297 | |
---|
298 | ifeq (depend,$(wildcard depend)) |
---|
299 | include depend |
---|
300 | endif |
---|
301 | |
---|
302 | |
---|
303 | test.og: test.cc mod2.h libkernel_g.a |
---|
304 | $(CXXG) ${CXXFLAGSG} ${CXXTEMPLFLAGS} ${CPPFLAGS} ${DEFSG} -c $< -o $@ |
---|
305 | |
---|
306 | test.o: test.cc mod2.h libkernel_g.a |
---|
307 | $(CXX) ${CXXFLAGS} ${CXXTEMPLFLAGS} ${CPPFLAGS} ${DEFS} -c $< -o $@ |
---|
308 | |
---|
309 | |
---|
310 | test-g: test.og |
---|
311 | $(CXXG) ${CXXFLAGSG} ${CXXTEMPLFLAGS} ${CPPFLAGS} ${DEFSG} $< -o $@ -L. -lkernel_g ${LIBPOLYS_LIBSG} -lntl -ldl -lgmp |
---|
312 | |
---|
313 | test: test.o |
---|
314 | $(CXX) ${CXXFLAGS} ${CXXTEMPLFLAGS} ${CPPFLAGS} ${DEFS} $< -o $@ -L. -lkernel ${LIBPOLYS_LIBS} -lntl -ldl -lgmp |
---|
315 | |
---|
316 | # My headers test |
---|
317 | check: all test test-g |
---|