source: git/Singular/makefile @ bda3ea

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