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_INCLUDES = -I.. -I../libpolys -I/opt/local/include |
---|
38 | |
---|
39 | LIBPOLYS_CFLAGS = ${LIBPOLYS_INCLUDES} |
---|
40 | |
---|
41 | 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 -L/opt/local/lib -lntl -lgmp -ldl |
---|
42 | |
---|
43 | 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 -L/opt/local/lib -lntl -lgmp -ldl |
---|
44 | |
---|
45 | |
---|
46 | PYTHON_INCLUDES = `python-config --includes` |
---|
47 | PYTHON_CFLAGS = `python-config --cflags` |
---|
48 | PYTHON_LIBS = `python-config --libs` |
---|
49 | |
---|
50 | PIPE = -pipe |
---|
51 | CFLAGS = -O3 -Wall -fomit-frame-pointer ${PIPE} ${LIBPOLYS_CFLAGS} ${PYTHON_CFLAGS} |
---|
52 | CXXFLAGS = -O3 -Wall -fomit-frame-pointer --no-rtti ${PIPE} ${LIBPOLYS_CFLAGS} ${PYTHON_CFLAGS} |
---|
53 | CXXTEMPLFLAGS = -fno-implicit-templates --no-exceptions |
---|
54 | CPPFLAGS = -I${srcdir} -I.. -I${includedir} ${LIBPOLYS_INCLUDES} ${PYTHON_INCLUDES} |
---|
55 | DEFS = -DNDEBUG -DOM_NDEBUG -DHAVE_SINGULAR |
---|
56 | LDFLAGS = -L${srcdir}/lib |
---|
57 | LD_DYN_FLAGS = -ldl -rdynamic |
---|
58 | SFLAGS = -fpic -DPIC |
---|
59 | SLDFLAGS = -shared |
---|
60 | |
---|
61 | LD_LIBC = -lc |
---|
62 | STATIC_LDFLAGS = -static |
---|
63 | LIBS = -lm -lsingfac -lsingcf -lntl -lgmp -lreadline -lncurses -lm -lnsl -lomalloc_ndebug ${PYTHON_LIBS} |
---|
64 | MP_LIBS = -lMPT -lMP -lnsl |
---|
65 | |
---|
66 | ## End configuration dependend stuff |
---|
67 | ################################################################# |
---|
68 | |
---|
69 | ### |
---|
70 | ### file sets |
---|
71 | ### |
---|
72 | |
---|
73 | # normal C++ source files |
---|
74 | CXXSOURCES=\ |
---|
75 | Minor.cc\ |
---|
76 | MinorInterface.cc\ |
---|
77 | MinorProcessor.cc\ |
---|
78 | attrib.cc\ |
---|
79 | bbcone.cc\ |
---|
80 | bbfan.cc\ |
---|
81 | bigintm.cc\ |
---|
82 | blackbox.cc\ |
---|
83 | calcSVD.cc\ |
---|
84 | cntrlc.cc\ |
---|
85 | denom_list.cc\ |
---|
86 | eigenval_ip.cc\ |
---|
87 | extra.cc\ |
---|
88 | feOpt.cc\ |
---|
89 | fehelp.cc\ |
---|
90 | fevoices.cc \ |
---|
91 | fglm.cc\ |
---|
92 | gms.cc\ |
---|
93 | grammar.cc\ |
---|
94 | interpolation.cc\ |
---|
95 | iparith.cc\ |
---|
96 | ipassign.cc\ |
---|
97 | ipconv.cc\ |
---|
98 | ipid.cc\ |
---|
99 | iplib.cc\ |
---|
100 | ipprint.cc\ |
---|
101 | ipshell.cc\ |
---|
102 | janet.cc\ |
---|
103 | libparse.cc\ |
---|
104 | linearAlgebra_ip.cc\ |
---|
105 | lists.cc\ |
---|
106 | maps_ip.cc\ |
---|
107 | minpoly.cc\ |
---|
108 | misc_ip.cc\ |
---|
109 | mpsr_Error.cc\ |
---|
110 | mpsr_Get.cc\ |
---|
111 | mpsr_GetMisc.cc\ |
---|
112 | mpsr_GetPoly.cc\ |
---|
113 | mpsr_Put.cc\ |
---|
114 | mpsr_PutPoly.cc\ |
---|
115 | mpsr_Timer.cc\ |
---|
116 | mpsr_Tok.cc\ |
---|
117 | mpsr_sl.cc\ |
---|
118 | ndbm.cc\ |
---|
119 | newstruct.cc\ |
---|
120 | pcv.cc\ |
---|
121 | pipeLink.cc\ |
---|
122 | scanner.cc\ |
---|
123 | sdb.cc\ |
---|
124 | silink.cc\ |
---|
125 | sing_dbm.cc\ |
---|
126 | sing_win.cc\ |
---|
127 | slInit_Dynamic.cc\ |
---|
128 | slInit_Static.cc\ |
---|
129 | ssiLink.cc\ |
---|
130 | subexpr.cc\ |
---|
131 | utils.cc\ |
---|
132 | walk.cc\ |
---|
133 | walk_ip.cc\ |
---|
134 | wrapper.cc |
---|
135 | |
---|
136 | # tesths.cc |
---|
137 | |
---|
138 | # pyobject.cc pyobject_setup.cc |
---|
139 | |
---|
140 | CXXSOURCES2 = SingularBuilder.cpp |
---|
141 | |
---|
142 | # special C++ source files (need extra compiling and/or linking), for which |
---|
143 | # dependencies should be generated |
---|
144 | ESOURCES=claptmpl.cc |
---|
145 | |
---|
146 | SOURCES=${CSOURCES} ${CXXSOURCES} \ |
---|
147 | kInline.h |
---|
148 | |
---|
149 | HEADERS=\ |
---|
150 | Cache.h \ |
---|
151 | CacheImplementation.h \ |
---|
152 | Minor.h \ |
---|
153 | MinorInterface.h \ |
---|
154 | MinorProcessor.h \ |
---|
155 | attrib.h \ |
---|
156 | bbcone.h \ |
---|
157 | bigintm.h \ |
---|
158 | blackbox.h \ |
---|
159 | cntrlc.h \ |
---|
160 | dbm_sl.h \ |
---|
161 | distrib.h \ |
---|
162 | eigenval_ip.h \ |
---|
163 | feOpt.h \ |
---|
164 | gms.h \ |
---|
165 | grammar.h \ |
---|
166 | interpolation.h \ |
---|
167 | ipconv.h \ |
---|
168 | ipid.h \ |
---|
169 | ipprint.h \ |
---|
170 | ipshell.h \ |
---|
171 | janet.h \ |
---|
172 | libparse.h \ |
---|
173 | libsingular.h \ |
---|
174 | lists.h \ |
---|
175 | locals.h \ |
---|
176 | maps_ip.h \ |
---|
177 | minpoly.h \ |
---|
178 | misc_ip.h \ |
---|
179 | mpsr.h \ |
---|
180 | mpsr_Get.h \ |
---|
181 | mpsr_Put.h \ |
---|
182 | mpsr_Timer.h \ |
---|
183 | mpsr_Tok.h \ |
---|
184 | mpsr_sl.h \ |
---|
185 | ndbm.h \ |
---|
186 | newstruct.h \ |
---|
187 | omSingularConfig.h \ |
---|
188 | pcv.h \ |
---|
189 | pipeLink.h \ |
---|
190 | pyobject_setup.h \ |
---|
191 | run.h \ |
---|
192 | sdb.h \ |
---|
193 | silink.h \ |
---|
194 | sing_dbm.h \ |
---|
195 | sing_win.h \ |
---|
196 | slInit.h \ |
---|
197 | ssiLink.h \ |
---|
198 | static.h \ |
---|
199 | stype.h \ |
---|
200 | subexpr.h \ |
---|
201 | table.h \ |
---|
202 | tok.h \ |
---|
203 | utils.h \ |
---|
204 | walk.h |
---|
205 | |
---|
206 | |
---|
207 | OBJS := $(CXXSOURCES:.cc=.o) $(CSOURCES:.c=.o) #$(CXXSOURCES2:.cpp=.o) |
---|
208 | OBJS2 := $(ESOURCES:.cc=.o) |
---|
209 | OBJSG2 := $(ESOURCES:.cc=.og) |
---|
210 | OBJSP2 := $(ESOURCES:.cc=.op) |
---|
211 | |
---|
212 | ## |
---|
213 | ## Build Targets |
---|
214 | ## |
---|
215 | .cc.o: |
---|
216 | ${CXX} ${CXXFLAGS} ${CXXTEMPLFLAGS} ${CPPFLAGS} ${DEFS} -c $< |
---|
217 | .c.o: |
---|
218 | ${CC} ${CFLAGS} ${CPPFLAGS} ${DEFS} -c $< |
---|
219 | |
---|
220 | OBJG= $(OBJS:.o=.og) |
---|
221 | |
---|
222 | OBJG := $(OBJG) $(STATIC_SOURCES:.cc=.og) |
---|
223 | OBJP := $(OBJP) $(STATIC_SOURCES:.cc=.op) |
---|
224 | |
---|
225 | all: libSingular_g.a libSingular.a Singular Singularg |
---|
226 | |
---|
227 | Singular: tesths.o libSingular.a |
---|
228 | $(CXX) ${CXXFLAGS} ${CXXTEMPLFLAGS} ${CPPFLAGS} ${DEFS} tesths.o -o $@ -L. -lSingular -L../kernel -lkernel ${LIBPOLYS_LIBS} |
---|
229 | |
---|
230 | Singularg: tesths.og libSingular_g.a |
---|
231 | $(CXXG) ${CXXFLAGSG} ${CXXTEMPLFLAGSG} ${CPPFLAGSG} ${DEFSG} tesths.og -o $@ -L. -lSingular_g -L../kernel -lkernel_g ${LIBPOLYS_LIBSG} |
---|
232 | |
---|
233 | |
---|
234 | ## |
---|
235 | ## clean targest |
---|
236 | ## |
---|
237 | mostlyclean: |
---|
238 | -rm -f *.o *.og core *.op |
---|
239 | |
---|
240 | clean: mostlyclean |
---|
241 | -rm -f *.bak *.d *.dd depend *.a *.so* |
---|
242 | -rm feOpt.inc iparith.inc plural_cmd.inc |
---|
243 | |
---|
244 | distclean: clean |
---|
245 | -rm -f *~ .\#* |
---|
246 | -rm -f Makefile TAGS* tags config.status config.cache config.log |
---|
247 | |
---|
248 | srcclean: |
---|
249 | @echo "This command is intended for maintainers to use;" |
---|
250 | @echo "Rebuilding the deleted files requires flex" |
---|
251 | @echo "bison, perl" |
---|
252 | |
---|
253 | maintainer-clean: distclean srcclean |
---|
254 | @echo "This command is intended for maintainers to use;" |
---|
255 | @echo "Rebuilding the deleted files requires flex" |
---|
256 | @echo "bison, perl and autoconf" |
---|
257 | |
---|
258 | #dep. |
---|
259 | feOpt.h: feOpt.inc |
---|
260 | |
---|
261 | misc_ip.cc: feOpt.h |
---|
262 | |
---|
263 | mpsr_Tok.inc: gentable2.cc |
---|
264 | ${CXX} ${CXXFLAGS} ${CPPFLAGS} ${CXXTEMPLFLAGS} ${DEFS} gentable2.cc -o gentable2 |
---|
265 | ./gentable2 |
---|
266 | /bin/rm -f gentable2 gentable2.exe |
---|
267 | |
---|
268 | |
---|
269 | iparith.o :iparith.inc |
---|
270 | |
---|
271 | ## |
---|
272 | ## miscellanous targets |
---|
273 | ## |
---|
274 | |
---|
275 | TAGS: ${SOURCES} ${ESOURCES} ${HEADERS} |
---|
276 | etags ${SOURCES} ${ESOURCES} ${HEADERS} |
---|
277 | |
---|
278 | tags: |
---|
279 | ctags *.c *.h *.cc *.inc |
---|
280 | |
---|
281 | ## |
---|
282 | ## Below here is stuff for developpers |
---|
283 | ################################################################# |
---|
284 | |
---|
285 | |
---|
286 | ## |
---|
287 | ## .og files for having -O and -g object versions available at the same time |
---|
288 | ## |
---|
289 | |
---|
290 | OBJG1 := $(CXXSOURCES:.cc=.og) |
---|
291 | OBJG2 := $(CSOURCES:.c=.og) |
---|
292 | |
---|
293 | ## |
---|
294 | ## compiler and linker options for debug version |
---|
295 | ## |
---|
296 | |
---|
297 | CCG = ${CC} -g |
---|
298 | CXXG = ${CXX} -g |
---|
299 | CXXM = gcc -MM -MG -DGENERATE_DEPEND |
---|
300 | CCM = gcc -MM -MG -DGENERATE_DEPEND |
---|
301 | |
---|
302 | DEFSG = -DHAVE_SINGULAR |
---|
303 | |
---|
304 | CFLAGSG = -Wall ${PIPE} ${LIBPOLYS_CFLAGS} ${PYTHON_CFLAGS} |
---|
305 | CXXFLAGSG = -Wall ${PIPE} ${LIBPOLYS_CFLAGS} ${PYTHON_CFLAGS} |
---|
306 | |
---|
307 | ## |
---|
308 | ## Debug Targets |
---|
309 | ## |
---|
310 | |
---|
311 | %.og: %.cc |
---|
312 | $(CXXG) ${CXXFLAGSG} ${CXXTEMPLFLAGS} ${CPPFLAGS} ${DEFSG} -c $< -o $@ |
---|
313 | |
---|
314 | $(OBJG2) : %.og: %.c |
---|
315 | $(CCG) ${CFLAGSG} ${CPPFLAGS} ${DEFSG} -c $< -o $@ |
---|
316 | |
---|
317 | |
---|
318 | ## |
---|
319 | ## .op files for profiling |
---|
320 | ## |
---|
321 | |
---|
322 | OBJP1 := $(CXXSOURCES:.cc=.op) |
---|
323 | OBJP2 := $(CSOURCES:.c=.op) |
---|
324 | |
---|
325 | OBJP=$(OBJP1) $(OBJP2) |
---|
326 | |
---|
327 | OBJP := $(OBJP) $(STATIC_SOURCES:.cc=.op) |
---|
328 | |
---|
329 | ## |
---|
330 | ## compiler and linker options for profiling version |
---|
331 | ## |
---|
332 | |
---|
333 | CCP = ${CC} -g -pg |
---|
334 | CXXP = ${CXX} -g -pg |
---|
335 | |
---|
336 | CFLAGSP = -O ${PIPE} ${LIBPOLYS_CFLAGS} |
---|
337 | CXXFLAGSP = -O ${PIPE} ${LIBPOLYS_CFLAGS} |
---|
338 | DEFSP = |
---|
339 | |
---|
340 | |
---|
341 | |
---|
342 | |
---|
343 | ## |
---|
344 | ## Profiling Targets |
---|
345 | ## |
---|
346 | |
---|
347 | %.op: %.cc |
---|
348 | $(CXXP) ${CXXFLAGSP} ${CXXTEMPLFLAGS} ${CPPFLAGS} ${DEFSP} -c $< -o $@ |
---|
349 | |
---|
350 | $(OBJP2) : %.op: %.c |
---|
351 | $(CCP) ${CFLAGSP} ${CPPFLAGS} ${DEFSP} -c $< -o $@ |
---|
352 | |
---|
353 | ## |
---|
354 | ## dependencies |
---|
355 | ## |
---|
356 | |
---|
357 | %.dd: %.cc |
---|
358 | echo $(@:.dd=.og) $(@:.dd=.op) " " \\ > $@ |
---|
359 | $(CXXM) -DGENTABLE ${CPPFLAGS} ${DEFSG} $< >> $@ |
---|
360 | |
---|
361 | %.d: %.c |
---|
362 | echo $(@:.d=.og) $(@:.d=.op) " " \\ > $@ |
---|
363 | $(CCM) ${CPPFLAGS} ${DEFSG} $< >> $@ |
---|
364 | |
---|
365 | depend: $(CXXSOURCES:.cc=.dd) $(ESOURCES:.cc=.dd) $(CSOURCES:.c=.d) |
---|
366 | cat *.d *.dd >depend |
---|
367 | |
---|
368 | ifeq (depend,$(wildcard depend)) |
---|
369 | include depend |
---|
370 | endif |
---|
371 | |
---|
372 | |
---|
373 | # My headers test |
---|
374 | # test: test.o |
---|
375 | |
---|
376 | feOpt.inc: feOpt.cc |
---|
377 | $(CXX) $(CXXFLAGS) -DGENERATE_OPTION_INDEX ${CPPFLAGS} feOpt.cc -o feOpt |
---|
378 | ./feOpt |
---|
379 | /bin/rm -f feOpt feOpt.exe |
---|
380 | |
---|
381 | feOptES.inc: feOpt.cc |
---|
382 | $(CXX) $(CXXFLAGS) -DGENERATE_OPTION_INDEX ${CPPFLAGS} -DESINGULAR -I../kernel feOpt.cc -o feOptES |
---|
383 | ./feOptES |
---|
384 | rm -f feOptES feOptES.exe |
---|
385 | |
---|
386 | feOptTS.inc: feOpt.cc |
---|
387 | $(CXX) $(CXXFLAGS) -DGENERATE_OPTION_INDEX ${CPPFLAGS} -DTSINGULAR -I../kernel feOpt.cc -o feOptTS |
---|
388 | ./feOptTS |
---|
389 | rm -f feOptTS feOptTS.exe |
---|
390 | |
---|
391 | plural_cmd.inc: gentable.cc grammar.h tok.h table.h |
---|
392 | ${CXX} ${CXXFLAGS} ${CPPFLAGS} ${CXXTEMPLFLAGS} ${DEFS} gentable.cc \ |
---|
393 | -o gentable1 |
---|
394 | ./gentable1 |
---|
395 | /bin/rm -f gentable1 gentable1.exe |
---|
396 | |
---|
397 | iparith.inc: gentable.cc grammar.h tok.h table.h |
---|
398 | ${CXX} ${CXXFLAGS} ${CPPFLAGS} ${CXXTEMPLFLAGS} ${DEFS} gentable.cc \ |
---|
399 | -o gentable1 |
---|
400 | ./gentable1 |
---|
401 | /bin/rm -f gentable1 gentable1.exe |
---|
402 | |
---|
403 | |
---|
404 | |
---|
405 | libSingular.a: ${OBJS} |
---|
406 | -rm -f $@ |
---|
407 | ar cr $@ $^ |
---|
408 | |
---|
409 | |
---|
410 | libSingular_g.a: ${OBJG} |
---|
411 | -rm -f $@ |
---|
412 | ar cr $@ $^ |
---|
413 | |
---|
414 | test: test.o libSingular.a |
---|
415 | $(CXX) ${CXXFLAGS} ${CXXTEMPLFLAGS} ${CPPFLAGS} ${DEFS} $< -o $@ -L. -lSingular -L../kernel -lkernel ${LIBPOLYS_LIBS} |
---|
416 | |
---|
417 | # My headers test |
---|
418 | check: test testg |
---|
419 | ./test |
---|
420 | ./testg |
---|
421 | |
---|
422 | testg: test.og libSingular_g.a |
---|
423 | $(CXXG) ${CXXFLAGSG} ${CXXTEMPLFLAGS} ${CPPFLAGS} ${DEFSG} $< -o $@ -L. -lSingular_g -L../kernel -lkernel_g ${LIBPOLYS_LIBSG} |
---|