source: git/Singular/makefile.SAVE @ f8565a

spielwiese
Last change on this file since f8565a was 5fdf7a, checked in by Max Horn <max@…>, 11 years ago
Replace --no-{rtti,exceptions} by -fno-{rtti,exceptions} This improves compatibility with clang. Moreover, to the best of my knowledge, the --no-* variants are undocumented to start with. At least the GCC manuals for all versions from 2.95.3 till 4.7.2 only list the -fno-* variants, as far as I could tell.
  • Property mode set to 100644
File size: 9.7 KB
Line 
1# Generated automatically from Makefile.in by configure.-
2#################################################################
3###
4### Makefile for Singular
5###
6#################################################################
7
8SHELL           = /bin/sh
9
10##
11## version
12##
13SINGULAR_VERSION        = spielwiese
14##
15## various paths
16##
17srcdir          = .
18includedir      = ../libpolys
19
20##
21## various programs
22##
23
24CC              = gcc
25LD              = ld
26CXX             = g++
27PERL            = perl
28INSTALL         = /usr/bin/install -c
29INSTALL_PROGRAM = ${INSTALL}
30INSTALL_DATA    = ${INSTALL} -m 644
31MKINSTALLDIRS   = ./mkinstalldirs
32LN_S            = ln -s
33
34##
35## compiler and linker options
36##
37LIBPOLYS_INCLUDES = -I.. -I../libpolys -I/opt/local/include -I/sw/include
38
39LIBPOLYS_CFLAGS   = ${LIBPOLYS_INCLUDES}
40
41LIBPOLYS_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
43LIBPOLYS_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
46PYTHON_INCLUDES =
47# `python2-config --includes`
48PYTHON_CFLAGS =
49# `python2-config --cflags`
50PYTHON_LIBS   =
51# `python2-config --libs`
52
53PIPE            = -pipe
54CFLAGS          = -O3 -Wall -fomit-frame-pointer ${PIPE} ${LIBPOLYS_CFLAGS} ${PYTHON_CFLAGS}
55CXXFLAGS        = -O3 -Wall -fomit-frame-pointer -fno-rtti ${PIPE} ${LIBPOLYS_CFLAGS} ${PYTHON_CFLAGS}
56CXXTEMPLFLAGS   =  -fno-exceptions ## -fno-implicit-templates
57CPPFLAGS        = -I${srcdir} -I..  -I${includedir} ${LIBPOLYS_INCLUDES}  ${PYTHON_INCLUDES}
58DEFSNL          = -DNDEBUG -DOM_NDEBUG
59DEFS            = ${DEFSNL} -DLIBSINGULAR
60LDFLAGS         = -L${srcdir}/lib
61LD_DYN_FLAGS    = -ldl -rdynamic
62SFLAGS          = -fpic -DPIC
63SLDFLAGS        = -shared
64
65LD_LIBC         = -lc
66STATIC_LDFLAGS  = -static
67LIBS            = -lm -lsingfac -lsingcf -lntl -lgmp -lreadline -lncurses -lm  -lnsl  -lomalloc_ndebug ${PYTHON_LIBS}
68MP_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
79ESOURCES=claptmpl.cc
80
81# normal C++ source files
82CXXSOURCES=\
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
148CXXSOURCES2     = SingularBuilder.cpp
149
150CSOURCES = fereadl.c mmstd.c
151
152SOURCES=${CSOURCES} ${CXXSOURCES} \
153        kInline.h
154
155HEADERS=\
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
215OBJS := $(CXXSOURCES:.cc=.o) $(CSOURCES:.c=.o) #$(CXXSOURCES2:.cpp=.o)
216OBJS2 := $(ESOURCES:.cc=.o)
217OBJSG2 := $(ESOURCES:.cc=.og)
218OBJSP2 := $(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
228OBJG= $(OBJS:.o=.og)
229
230OBJG := $(OBJG) $(STATIC_SOURCES:.cc=.og)
231OBJP := $(OBJP) $(STATIC_SOURCES:.cc=.op)
232
233all: feOpt.inc all1
234
235all1: feOpt.inc libSingular_g.a libSingular.a Singular Singularg
236
237tesths.og: %.og: %.cc
238        $(CXXG) ${CXXFLAGSG} ${CXXTEMPLFLAGS} ${CPPFLAGS} ${DEFSGNL} -c $< -o $@
239       
240tesths.o: %.o: %.cc
241        $(CXX) ${CXXFLAGS} ${CXXTEMPLFLAGS} ${CPPFLAGS} ${DEFSNL} -c $< -o $@
242
243Singular: 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
246Singularg: 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##
253mostlyclean:
254        -rm -f *.o *.og core *.op
255
256clean: mostlyclean
257        -rm -f *.bak *.d *.dd depend *.a *.so*
258        -rm feOpt.inc iparith.inc plural_cmd.inc
259
260distclean: clean
261        -rm -f *~ .\#*
262        -rm -f Makefile TAGS* tags config.status config.cache config.log
263
264srcclean:
265        @echo "This command is intended for maintainers to use;"
266        @echo "Rebuilding the deleted files requires flex"
267        @echo "bison, perl"
268
269maintainer-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
276feOpt.cc: feOpt.inc
277feOpt.h: feOpt.inc
278cntrlc.cc: feOpt.inc
279misc_ip.cc: feOpt.inc
280test.cc: iparith.inc
281iparith.cc: iparith.inc
282
283mpsr_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
293TAGS:   ${SOURCES} ${ESOURCES} ${HEADERS}
294        etags ${SOURCES} ${ESOURCES} ${HEADERS}
295
296tags:   
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
308OBJG1 := $(CXXSOURCES:.cc=.og)
309OBJG2 := $(CSOURCES:.c=.og)
310
311##
312## compiler and linker options for debug version
313##
314
315CCG             = ${CC} -g
316CXXG            = ${CXX} -g
317CXXM            = gcc -MM -MG -DGENERATE_DEPEND
318CCM             = gcc -MM -MG -DGENERATE_DEPEND
319
320DEFSGNL         =
321DEFSG           = ${DEFSGNL} -DLIBSINGULAR
322
323CFLAGSG         = -Wall ${PIPE} ${LIBPOLYS_CFLAGS} ${PYTHON_CFLAGS}
324CXXFLAGSG       = -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
341OBJP1 := $(CXXSOURCES:.cc=.op)
342OBJP2 := $(CSOURCES:.c=.op)
343
344OBJP=$(OBJP1) $(OBJP2)
345
346OBJP := $(OBJP) $(STATIC_SOURCES:.cc=.op)
347
348##
349## compiler and linker options for profiling version
350##
351
352CCP             = ${CC} -g -pg
353CXXP            = ${CXX} -g -pg
354
355CFLAGSP         = -O ${PIPE} ${LIBPOLYS_CFLAGS}
356CXXFLAGSP       = -O ${PIPE} ${LIBPOLYS_CFLAGS}
357DEFSP           =
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
384depend:   $(CXXSOURCES:.cc=.dd) $(ESOURCES:.cc=.dd) $(CSOURCES:.c=.d)
385        cat *.d *.dd >depend
386
387ifeq (depend,$(wildcard depend))
388include depend
389endif
390
391
392# My headers test
393# test: test.o
394
395feOpt.inc:
396        $(CXX) $(CXXFLAGS) -DGENERATE_OPTION_INDEX ${CPPFLAGS} feOpt.cc -o feOpt
397        ./feOpt
398        /bin/rm -f feOpt feOpt.exe
399
400feOptES.inc:
401        $(CXX) $(CXXFLAGS) -DGENERATE_OPTION_INDEX ${CPPFLAGS} -DESINGULAR -I../kernel feOpt.cc -o feOptES
402        ./feOptES
403        rm -f feOptES feOptES.exe
404
405feOptTS.inc:
406        $(CXX) $(CXXFLAGS) -DGENERATE_OPTION_INDEX ${CPPFLAGS} -DTSINGULAR -I../kernel feOpt.cc -o feOptTS
407        ./feOptTS
408        rm -f feOptTS feOptTS.exe
409
410plural_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
416iparith.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
424libSingular.a: ${OBJS}
425        -rm -f $@
426        ar cr $@ $^
427
428
429libSingular_g.a: ${OBJG}
430        -rm -f $@
431        ar cr $@ $^
432
433# My headers test
434check: 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
438testg: 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
441testr: 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
Note: See TracBrowser for help on using the repository browser.