source: git/Singular/makefile @ 9680805

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