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