source: git/kernel/makefile.SAVE @ f5d2647

spielwiese
Last change on this file since f5d2647 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: 7.5 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_CFLAGS = -I.. -I../libpolys -I/opt/local/include
38LIBPOLYS_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
39LIBPOLYS_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
40
41PIPE            = -pipe
42CFLAGS          = -O3 -fomit-frame-pointer ${PIPE} ${LIBPOLYS_CFLAGS}
43CXXFLAGS        = -O3 -fomit-frame-pointer -fno-rtti ${PIPE} ${LIBPOLYS_CFLAGS}
44CXXTEMPLFLAGS   =  -fno-exceptions ## -fno-implicit-templates
45CPPFLAGS        = -I${srcdir} -I..  -I${includedir}   ${LIBPOLYS_CFLAGS}
46DEFS            = -DNDEBUG -DOM_NDEBUG
47LDFLAGS         = -L${srcdir}/lib
48LD_DYN_FLAGS    = -ldl -rdynamic
49SFLAGS          = -fpic -DPIC
50SLDFLAGS        = -shared
51
52LD_LIBC         = -lc
53STATIC_LDFLAGS  = -static
54LIBS            = -lm -lsingfac -lsingcf -lntl -lgmp -lreadline -lncurses -lm  -lnsl  -lomalloc_ndebug
55MP_LIBS         = -lMPT -lMP -lnsl
56
57## End configuration dependend stuff
58#################################################################
59
60###
61### file sets
62###
63
64# normal C++ source files
65CXXSOURCES=\
66    polys.cc 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 kpolys.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 preimage.cc
86   
87# CXXSOURCES2   = SingularBuilder.cpp
88
89#    numbers.cc polys.cc p_polys.cc polys0.cc polys1.cc polys-impl.cc \
90
91# normal C source files
92CSOURCES = fegetopt.c
93
94# special C++ source files (need extra compiling and/or linking), for which
95# dependencies should be generated
96ESOURCES=mmalloc.cc
97
98SOURCES=${CSOURCES} ${CXXSOURCES} \
99        kInline.h
100
101HEADERS= polys.h hutil.h idrec.h stairc.h ideals.h \
102        structs.h \
103        syz.h \
104        fast_maps.h \
105        febase.h \
106        walkProc.h walkMain.h walkSupport.h\
107        khstd.h sparsmat.h \
108        fglm.h kstd1.h \
109        fglmgauss.h fglmvec.h \
110        kstdfac.h kmatrix.h\
111        kutil.h \
112        GMPrat.h multicnt.h npolygon.h semic.h spectrum.h splist.h multicnt.h \
113        eigenval.h units.h \
114        fegetopt.h \
115        ratgring.h shiftgb.h nc.h \
116        semic.h \
117        gfan.h preimage.h
118
119DISTFILES=${SOURCES} ${HEADERS} ${ESOURCES} \
120        Makefile.in \
121        mod2.h.in install-sh mkinstalldirs
122
123OBJS := $(CXXSOURCES:.cc=.o) $(CSOURCES:.c=.o) #$(CXXSOURCES2:.cpp=.o)
124OBJS2 := $(ESOURCES:.cc=.o)
125OBJSG2 := $(ESOURCES:.cc=.og)
126OBJSP2 := $(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
136OBJG= $(CXXSOURCES:.cc=.og) $(CSOURCES:.c=.og)
137
138OBJG := $(OBJG) $(STATIC_SOURCES:.cc=.og)
139OBJP := $(OBJP) $(STATIC_SOURCES:.cc=.op)
140
141all:    libkernel.a libkernel_g.a mmalloc.o ${OBJS2}
142
143libkernel.a: ${OBJS}
144        -rm -f libkernel.a
145        ar cr $@ $^
146
147##
148## install targets
149##
150install-nolns: install
151
152install-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
157install: all installbin
158
159install_all: install libkernel_p.a
160        - ranlib libkernel_p.a
161
162installbin: libkernel.a libkernel_g.a
163        ${MKINSTALLDIRS} ${bindir}
164        - ranlib libkernel.a
165        - ranlib libkernel_g.a
166
167install-bindist: libkernel.a
168        ${MKINSTALLDIRS} ${bindir}
169
170##
171## clean targest
172##
173mostlyclean:
174        -rm -f *.o *.og core *.op
175
176clean: mostlyclean
177        -rm -f *.bak *.d *.dd depend *.a *.so* testr testg
178
179distclean: clean
180        -rm -f *~ .\#*
181        -rm -f mod2.h Makefile TAGS* tags config.status config.cache config.log
182
183srcclean:
184        @echo "This command is intended for maintainers to use;"
185        @echo "Rebuilding the deleted files requires flex"
186        @echo "bison, perl"
187
188maintainer-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
197TAGS:   ${SOURCES} ${ESOURCES} ${HEADERS}
198        etags ${SOURCES} ${ESOURCES} ${HEADERS}
199
200tags:   
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
212OBJG1 := $(CXXSOURCES:.cc=.og)
213OBJG2 := $(CSOURCES:.c=.og)
214
215##
216## compiler and linker options for debug version
217##
218
219CCG             = ${CC}
220CXXG            = ${CXX} -Wall
221CXXM            = gcc -MM -MG -DGENERATE_DEPEND
222CCM             = gcc -MM -MG -DGENERATE_DEPEND
223
224CFLAGSG         = -g ${PIPE} ${LIBPOLYS_CFLAGS}
225CXXFLAGSG       = -g ${PIPE} ${LIBPOLYS_CFLAGS}
226DEFSG           =
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
238libkernel_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
248OBJP1 := $(CXXSOURCES:.cc=.op)
249OBJP2 := $(CSOURCES:.c=.op)
250
251OBJP=$(OBJP1) $(OBJP2)
252
253OBJP := $(OBJP) $(STATIC_SOURCES:.cc=.op)
254
255##
256## compiler and linker options for profiling version
257##
258
259CCP             = ${CC}
260CXXP            = ${CXX}
261
262CFLAGSP         = -g -pg -O ${PIPE} ${LIBPOLYS_CFLAGS}
263CXXFLAGSP       = -g -pg -O ${PIPE} ${LIBPOLYS_CFLAGS}
264DEFSP           =
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
279libkernel_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
295depend:   $(CXXSOURCES:.cc=.dd) $(ESOURCES:.cc=.dd) $(CSOURCES:.c=.d) mod2.h
296        cat *.d *.dd >depend
297
298ifeq (depend,$(wildcard depend))
299include depend
300endif
301
302
303testg: test.og libkernel_g.a
304        $(CXXG) ${CXXFLAGSG} ${CXXTEMPLFLAGS} ${CPPFLAGS} ${DEFSG} $< -o $@ -L. -lkernel_g ${LIBPOLYS_LIBSG} ${LD_DYN_FLAGS}
305
306testr: test.o libkernel.a
307        $(CXX) ${CXXFLAGS} ${CXXTEMPLFLAGS} ${CPPFLAGS} ${DEFS} $< -o $@ -L. -lkernel ${LIBPOLYS_LIBS} ${LD_DYN_FLAGS}
308
309# My headers test
310check: all testg testr
311        SINGULAR_ROOT_DIR="${PWD}/../" SINGULARPATH="${PWD}/../libpolys/polys/.libs" ./testg
312        SINGULAR_ROOT_DIR="${PWD}/../" SINGULARPATH="${PWD}/../libpolys/polys/.libs" ./testr
Note: See TracBrowser for help on using the repository browser.