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